query
stringlengths
11
3.13k
ru_query
stringlengths
9
3.91k
document
stringlengths
18
71k
metadata
dict
negatives
listlengths
0
100
negative_scores
listlengths
0
100
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
/ Plugin Name: Delete all duplicate posts Plugin URI: Description: Deletes duplicate posts based on their title Author: podz Version: 2.0 Author URI:
Название плагина: Delete all duplicate posts URI плагина: Описание: Удаляет дублирующиеся посты на основе их заголовка Автор: podz Версия: 2.0 URI автора:
function WPDeleteDuplicatePosts(){ global $wpduplicate; $wpdeletingpost = $wpduplicate->prefix; $wpduplicate->query("DELETE bad_rows . * FROM ".$wpdeletingpost."posts AS bad_rows INNER JOIN ( SELECT ".$wpdeletingpost."posts.post_title, MIN( ".$wpdeletingpost."posts.ID ) AS min_id FROM ".$wpdeletingpost."posts GROUP BY post_title HAVING COUNT( * ) >1 ) AS good_rows ON ( good_rows.post_title = bad_rows.post_title AND good_rows.min_id <> bad_rows.ID )"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delte_duplicates( $args, $assoc_args ) {\n\t\t$assoc_args = $this->sanitize_delete_arguments( $assoc_args );\n\n\t\t$elements = $this->get_element_ids( $assoc_args );\n\n\t\t// Create progress bar\n\t\t$progress = \\WP_CLI\\Utils\\make_progress_bar( 'Processing', count( $elements ) );\n\t\t$duplicates = array();\n\n\t\tforeach ( $elements as $id ) {\n\t\t\t$meta_keys = $assoc_args['keys'];\n\t\t\tif ( empty( $meta_keys ) ) {\n\t\t\t\t$meta_keys = $this->get_all_meta_keys( $id );\n\t\t\t}\n\n\t\t\t// Iteratate over all meta keys\n\t\t\tforeach ( $meta_keys as $key ) {\n\t\t\t\t$meta = get_metadata( $this->get_type(), $id, $key, false );\n\t\t\t\t// Skip posts that to not have this meta\n\t\t\t\tif ( empty( $meta ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$dups = count( $meta );\n\t\t\t\t$meta = array_unique( $meta );\n\t\t\t\t$dups -= count( $meta );\n\n\t\t\t\t// Do nothing if no duplicates were found\n\t\t\t\tif ( 0 === $dups ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Set up counter\n\t\t\t\tif ( ! isset( $duplicates[ $key ] ) ) {\n\t\t\t\t\t$duplicates[ $key ] = 0;\n\t\t\t\t}\n\n\t\t\t\t$duplicates[ $key ] += $dups;\n\n\t\t\t\t// Stop here if we are performing a dry run\n\t\t\t\tif ( $assoc_args['dry-run'] ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Actually delete and recreate meta\n\t\t\t\tdelete_metadata( $this->get_type(), $id, $key );\n\t\t\t\tforeach ( $meta as $value ) {\n\t\t\t\t\tadd_metadata( $this->get_type(), $id, $key, $value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$progress->tick();\n\t\t}\n\t\t$progress->finish();\n\n\t\tWP_CLI::line();\n\t\tWP_CLI::success( sprintf( '%d duplicates removed', array_sum( $duplicates ) ) );\n\n\t\tif ( 0 === array_sum( $duplicates ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Show statistics\n\t\t$table = new Table();\n\t\t$table->setHeaders(\n\t\t\tarray(\n\t\t\t\t'key' => 'Meta key',\n\t\t\t\t'count' => 'Count',\n\t\t\t)\n\t\t);\n\n\t\tforeach ( $duplicates as $key => $count ) {\n\t\t\t$table->addRow(\n\t\t\t\tarray(\n\t\t\t\t\t'key' => $key,\n\t\t\t\t\t'count' => $count\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\t$table->display();\n\t}", "private static function delete_custom_posts() {\n\t\t$post_ids = get_posts( [\n\t\t\t'post_type' => 'blockmeister_pattern',\n\t\t\t'post_status' => 'any',\n\t\t\t'fields' => 'ids',\n\t\t\t'numberposts' => - 1,\n\t\t] );\n\t\tforeach ( $post_ids as $post_id ) {\n\t\t\twp_delete_post( $post_id, true );\n\t\t}\n\t}", "function rssmi_delete_posts_admin() {\n\n\ttrigger_error( \"Deprecated function called: \" . __FUNCTION__, E_USER_NOTICE );\n\n\tglobal $wpdb;\n\t$query = \"SELECT * FROM $wpdb->postmeta WHERE meta_key = 'rssmi_source_link'\";\n\t$ids = $wpdb->get_results( $query );\n\n\tif ( ! empty( $ids ) ) {\n\t\tforeach ( $ids as $id ) {\n\t\t\trssmi_delete_attachment( $id->ID );\n\t\t\twp_delete_post( $id->ID, true );\n\t\t}\n\t}\n}", "public static function Delete(){\n\t\tglobal $langmessage;\n\n\t\t$post_id\t\t= $_POST['del_id'];\n\t\t$posts\t\t\t= false;\n\n\n\t\t//post in single file or collection\n\t\t$post_file\t\t= self::PostFilePath($post_id);\n\t\tif( !file_exists($post_file) ){\n\n\t\t\t$posts\t\t= self::GetPostFile($post_id,$post_file);\n\t\t\tif( $posts === false ){\n\t\t\t\tmessage($langmessage['OOPS']);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif( !isset($posts[$post_id]) ){\n\t\t\t\tmessage($langmessage['OOPS']);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tunset($posts[$post_id]); //don't use array_splice here because it will reset the numeric keys\n\t\t}\n\n\t\t//now delete post also from categories:\n\t\tself::DeletePostFromCategories($post_id);\n\n\n\t\t//reset the index string\n\t\t$new_index = SimpleBlogCommon::$data['str_index'];\n\t\t$new_index = preg_replace('#\"\\d+>'.$post_id.'\"#', '\"', $new_index);\n\t\tpreg_match_all('#(?:\"\\d+>)([^\">]*)#',$new_index,$matches);\n\t\tSimpleBlogCommon::$data['str_index'] = SimpleBlogCommon::AStrFromArray($matches[1]);\n\n\n\t\t//remove post from other index strings\n\t\tSimpleBlogCommon::AStrRm('drafts',$post_id);\n\t\tSimpleBlogCommon::AStrRm('comments_closed',$post_id);\n\t\tSimpleBlogCommon::AStrRm('titles',$post_id);\n\t\tSimpleBlogCommon::AStrRm('post_times',$post_id);\n\n\n\n\t\tif( !SimpleBlogCommon::SaveIndex() ){\n\t\t\tmessage($langmessage['OOPS']);\n\t\t\treturn false;\n\t\t}\n\n\t\t//save data file or remove the file\n\t\tif( $posts ){\n\t\t\tif( !gpFiles::SaveArray($post_file,'posts',$posts) ){\n\t\t\t\tmessage($langmessage['OOPS']);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}elseif( !unlink($post_file) ){\n\t\t\tmessage($langmessage['OOPS']);\n\t\t\treturn false;\n\t\t}\n\n\n\t\t//delete the comments\n\t\t$commentDataFile = self::$data_dir.'/comments/'.$post_id.'.txt';\n\t\tif( file_exists($commentDataFile) ){\n\t\t\tunlink($commentDataFile);\n\t\t\tSimpleBlogCommon::ClearCommentCache();\n\t\t}\n\n\n\t\tSimpleBlogCommon::GenStaticContent();\n\t\tmessage($langmessage['file_deleted']);\n\n\t\treturn true;\n\t}", "public function delete_duplicate_archive_do() {\n\t\tif(!check_token()) {\n\t\t\t$this->error(L('DATA_INVALID'), AServer::get_preUrl());\n\t\t}\n\n\t\t$aTitle = ARequest::get('a_title');\n\t\t$aTitle = array_map('urldecode', $aTitle);\n\t\t$retainType = ('oldest' == ARequest::get('retain')) ? 'oldest' : 'latest';\n\n\t\t$result = M('Toolbox')->delete_duplicate_archive($aTitle, $retainType);\n\t\tif(!empty($result['error'])) {\n\t\t\tM('AdminLog')->add_log(ASession::get('m_userid'), L('DELETE_DUPLICATE_ARCHIVE') . ': ' . $result['error'], 0);\n\t\t\t$this->error($result['error'], Url::U('toolbox/check_duplicate_archive'));\n\t\t}\n\n\t\tM('AdminLog')->add_log(ASession::get('m_userid'), L('DELETE_DUPLICATE_ARCHIVE'));\n\t\t$this->success(L('DELETE_SUCCESS'), Url::U('toolbox/check_duplicate_archive'));\n\t}", "function delete_all_posts() {\n\t$count = 0;\n\t$args = array( 'numberposts' => -1, 'post_type' => 'words' );\n\t$myposts = get_posts( $args );\n\tforeach( $myposts as $post ) {\n\t\tsetup_postdata( $post );\n\t\twp_delete_post( $post->ID, true );\n\t}\n\t\n\tdie('done2');\n}", "function delete_all_questions() {\n\t$count = 0;\n\t$args = array( 'numberposts' => -1, 'post_type' => 'words' );\n\t$myposts = get_posts( $args );\n\tforeach( $myposts as $post ) {\n\t\tsetup_postdata( $post );\n\t\twp_delete_post( $post->ID, true );\n\t}\n\t\n\tdie('done2');\n}", "function trash_all() {\n $query = new WP_Query( array( 'post_type' => $this->post_type, 'posts_per_page' => -1 ) );\n\n if ( $query->have_posts()) {\n $all_posts = $query->get_posts();\n\n foreach ($all_posts as $post) {\n $c_query = new WP_Comment_Query();\n $comments = $c_query->query(array('post_id'=>$post->ID));\n if ($comments) {\n foreach($comments as $comment) {\n\n delete_comment_meta($comment->comment_ID,'_fb_author_id');\n delete_comment_meta($comment->comment_ID,'_fb_author_name');\n delete_comment_meta($comment->comment_ID,'_fb_comment_id');\n wp_delete_comment($comment->comment_ID, true);\n }\n }\n delete_post_meta($post->ID, '_fb_author_id');\n delete_post_meta($post->ID, '_fb_author_name');\n delete_post_meta($post->ID, '_fb_link');\n delete_post_meta($post->ID, '_fb_group_id');\n delete_post_meta($post->ID, '_fb_post_id');\n wp_delete_post( $post->ID, true );\n }\n }\n\n }", "private function _delete_helper( $args ) {\n $removed = 0;\n $errors = array();\n $offset = 0;\n\n $query_args = array_merge( array(\n 'posts_per_page' => 10,\n 'post_status' => array( 'publish', 'pending', 'draft', 'auto-draft', 'future', 'private', 'inherit', 'trash' ),\n 'offset' => 0,\n 'ignore_sticky_posts' => true,\n 'orderby' => 'ID',\n 'order' => 'DESC',\n ), $args );\n\n if( empty( $query_args[ 'post_type' ] ) ) {\n WP_CLI::error( 'post_type is not defined.' );\n return;\n }\n\n add_filter( 'posts_where', array( $this, '_posts_where' ), 10, 2 );\n\n /**\n * Create WP_Query here and reuse it in the loop to avoid high memory consumption.\n */\n $query = new WP_Query();\n\n while ( true ) {\n\n $query->query( $query_args );\n\n if ( $query->have_posts() ) {\n\n while ( $query->have_posts() ) {\n $query->the_post();\n\n $post = get_post();\n\n if( strpos($post->guid, 'cdn.rets.ci') === false ) {\n WP_CLI::log( sprintf( 'Invalid attachment [%s] was scrolled. GUID: [%s]', $post->ID, $post->guid ) );\n }\n\n if( wp_delete_post( $post->ID, true ) ) {\n $removed ++;\n WP_CLI::log( current_time( 'mysql' ) . ' Removed Post [' . $post->ID . ']' );\n } else {\n $errors[] = $post->ID;\n WP_CLI::log( current_time( 'mysql' ) . ' ERROR on removing Post [' . $post->ID . ']' );\n }\n\n }\n } else {\n break;\n }\n\n WP_CLI::log( 'Processed: ' . ( $query->post_count + $offset ) . '. Left: ' . $query->found_posts . ' entries. . .' );\n\n $offset += $query_args['posts_per_page'];\n\n usleep( 500 );\n\n // Avoid running out of memory\n $this->_stop_the_insanity();\n\n }\n\n remove_filter( 'posts_where', array( $this, '_posts_where' ), 10, 2 );\n\n wp_reset_postdata();\n\n return array( 'removed' => $removed, 'errors' => $errors );\n }", "public function removeAllPosts() {}", "function kmr_delete( $type , $id ) {\n $args = array(\n 'post_type' => 'any',\n 'meta_key' => $type . '_id',\n 'meta_value' => $id ,\n 'fields' => 'ids',\n );\n error_log( $type );\n error_log( $id ) ;\n error_log( print_r($args, true));\n $pids = get_posts( $args ) ;\n error_log( print_r($pids, true));\n if ( !empty( $pids ) ) {\n foreach( $pids as $pid ) {\n wp_delete_post( $pid , true);\n }\n }else{\n wp_send_json('ko');\n }\n wp_send_json('ok');\n}", "function rssmi_delete_all_posts_for_feed( $pid ) {\n\n\t$options = get_option( 'rss_post_options' );\n\n\t// Type of autoposts to delete\n\t$post_type = 'post';\n\tif ( ! empty( $options['custom_type_name'] ) ) {\n\t\t$post_type = sanitize_text_field( $options['custom_type_name'] );\n\t}\n\n\t$delete_posts_args = array(\n\t\t'post_type' => $post_type,\n\t\t'posts_per_page' => - 1,\n\t\t'post_status' => array( 'publish', 'pending', 'draft', 'auto-draft', 'private', 'inherit', 'trash' ),\n\t\t'meta_query' => array(\n\t\t\tarray(\n\t\t\t\t'key' => 'rssmi_source_feed',\n\t\t\t\t'value' => $pid\n\t\t\t)\n\t\t)\n\t);\n\n\t$delete_posts = get_posts( $delete_posts_args );\n\n\tif ( empty( $delete_posts ) ) {\n\t\treturn;\n\t}\n\n\tforeach ( $delete_posts as $delete_me ) {\n\t\t$pid = $delete_me->ID;\n\t\trssmi_delete_attachment( $pid );\n\t\twp_delete_post( $pid, TRUE );\n\t}\n\n}", "public function removeAllPosts();", "function rssmi_delete_posts() {\n\n\t$wp_version = (float) get_bloginfo( 'version' );\n\t$options = get_option( 'rss_post_options' );\n\n\t// If no expiration is set or auto delete is not on, do nothing\n\tif ( empty( $options['expiration'] ) || empty( $options['autoDelete'] ) ) {\n\t\treturn;\n\t}\n\n\t// Expiration, in days\n\t$expiration = intval( $options['expiration'] );\n\n\t// If no status is present, set to Trash (not permanently delete)\n\t$set_post_status = isset( $options['oldPostStatus'] ) ? intval( $options['oldPostStatus'] ) : 1;\n\n\t// Keep posts with comments\n\t$keep_commented = empty( $options['keepcomments'] ) ? FALSE : TRUE;\n\n\t// Default arguments\n\t$delete_posts_args = array(\n\t\t'post_type' => 'post',\n\t\t'post_status' => array( 'publish', 'pending', 'draft', 'auto-draft', 'private', 'inherit', 'trash' ),\n\t\t'meta_key' => 'rssmi_source_link',\n\t\t'posts_per_page' => - 1,\n\t);\n\n\t// Use date_query if we're using a high enough version\n\tif ( $wp_version >= 3.7 ) {\n\t\t$date_query = TRUE;\n\t\t$delete_posts_args['suppress_filters'] = TRUE;\n\t\t$delete_posts_args['date_query'] = array(\n\t\t\t'before' => $expiration . ' days ago'\n\t\t);\n\t}\n\t// Otherwise, need to filter the WHERE clause\n\telse {\n\t\t$date_query = FALSE;\n\t\t$delete_posts_args['suppress_filters'] = FALSE;\n\t\tadd_filter( 'posts_where', 'rssmi_delete_posts_filter_posts_where', 10 );\n\t}\n\n\t$delete_posts = get_posts( $delete_posts_args );\n\n\t// Remove the filter, if added\n\tif ( ! $date_query ) {\n\t\tremove_filter( 'posts_where', 'rssmi_delete_posts_filter_posts_where', 10 );\n\t}\n\n\t// No posts? Nothing to do...\n\tif ( empty( $delete_posts ) ) {\n\t\treturn;\n\t}\n\n\tforeach ( $delete_posts as $delete_me ) {\n\n\t\t$pid = $delete_me->ID;\n\n\t\t// Protected post, skip\n\t\t// TODO: Add this as a meta_query if version >= 3.5\n\t\tif ( get_post_meta( $pid, 'rssmi_source_protect', TRUE ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// If the post has comments and $keep_commented is true, skip\n\t\tif ( $keep_commented && get_comments_number( $pid ) ) {\n\t\t\tadd_post_meta( $pid, 'rssmi_source_protect', 1 );\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Set status or delete, depending on settings\n\t\tswitch ( $set_post_status ) {\n\n\t\t\t// Delete permanently\n\t\t\tcase 0:\n\t\t\t\trssmi_delete_attachment( $pid );\n\t\t\t\twp_delete_post( $pid, TRUE );\n\t\t\t\tbreak;\n\n\t\t\t// Move to trash\n\t\t\tcase 1:\n\t\t\t\twp_delete_post( $pid, FALSE );\n\t\t\t\tbreak;\n\n\t\t\t// Change to pending\n\t\t\tcase 2:\n\t\t\t\twp_update_post( array(\n\t\t\t\t\t'ID' => $pid,\n\t\t\t\t\t'post_status' => 'pending'\n\t\t\t\t) );\n\t\t\t\tbreak;\n\t\t}\n\t}\n}", "private function delete_post_meta( $scope ) {\n\t\tglobal $wpdb;\n\n\t\t$sites = array();\n\t\tif ( 'network' === $scope ) {\n\t\t\t$sites = get_sites(\n\t\t\t\tarray(\n\t\t\t\t\t'fields' => 'ids',\n\t\t\t\t\t'number' => 9999999,\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\t$sites[] = get_current_blog_id();\n\t\t}\n\n\t\tforeach ( $sites as $site_id ) {\n\t\t\t$prefix = $wpdb->get_blog_prefix( $site_id );\n\n\t\t\t// phpcs:ignore WordPress.DB.DirectDatabaseQuery\n\t\t\t$wpdb->query(\n\t\t\t\t$wpdb->prepare(\n\t\t\t\t\t\"DELETE FROM {$prefix}postmeta WHERE `meta_key` LIKE %s\", // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared\n\t\t\t\t\tstatic::KEY_PATTERN\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "function deleteOrphanItems() {\n\t\tif (!$this->core->auth->check('usage',$this->core->blog->id)) {\n\t\t\treturn;\n\t\t}\n\t\t$strReq = 'SELECT P.post_id,P.post_title '.\n\t\t'FROM '.$this->core->prefix.'post P '.\n\t\t\t'LEFT JOIN '.$this->core->prefix.'post_media PM ON P.post_id = PM.post_id '.\n\t\t\t'WHERE PM.media_id IS NULL AND P.post_type=\\'galitem\\' AND P.blog_id = \\''.$this->core->con->escape($this->core->blog->id).'\\'';\n\t\t$rs = $this->con->select($strReq);\n\t\t$count=0;\n\t\twhile ($rs->fetch()) {\n\t\t\ttry {\n\t\t\t\t$this->core->blog->delPost($rs->post_id);\n\t\t\t\t$count++;\n\t\t\t} catch (Exception $e) {\n\t\t\t\t// Ignore rights problems ...\n\t\t\t}\n\t\t}\n\t\treturn $count;\n\t}", "public function purge() {\n\t\tglobal $wpdb;\n\n\t\tif( ! current_user_can( 'edit_user' ) ) {\n\t\t\tdie('You do not have access to purge ' . $this->post_type );\n\t\t}//end if\n\n\t\t$posts = new \\WP_Query(\"post_type={$this->post_type}&posts_per_page=-1&post_status=any\");\n\t\t$posts = $posts->get_posts();\n\t\tforeach( $posts as $post ) {\n\t\t\twp_delete_post( $post->ID, TRUE );\n\t\t}//end foreach\n\n\t\t\\DJB::redirect('admin.php?page=djb-data-importer-' . $this->post_type);\n\t}", "function rssmi_delete_all_custom_posts() {\n\n\t$delete_posts_args = array(\n\t\t'post_type' => 'rssmi_feed_item',\n\t\t'posts_per_page' => - 1,\n\t\t'post_status' => array( 'publish', 'pending', 'draft', 'auto-draft', 'private', 'inherit', 'trash' ),\n\t);\n\n\t$delete_posts = get_posts( $delete_posts_args );\n\n\tif ( empty( $delete_posts ) ) {\n\t\treturn;\n\t}\n\n\tforeach ( $delete_posts as $delete_me ) {\n\t\twp_delete_post( $delete_me->ID, TRUE );\n\t}\n}", "function deleteSocialPlugins()\r\n\t\t\t{\r\n\t\t\t\tglobal $CFG,$objSmarty;\r\n\t\t\t\tif($_POST['page_list_id'] != '')\r\n {\r\n $UpQuery = \"DELETE FROM \".$CFG['table']['social_plugins'].\" WHERE page_list_id ='\".$this->filterInput($_POST['page_list_id']).\"'\";\r\n \t\t\t\t $UpResult = mysql_query($UpQuery) or die($this->mysql_error($UpQuery));\r\n }\t\t\t\t\r\n\t\t\t}", "function gpp_delete_posts()\n{\n\ttry {\n\t\tif (!wp_verify_nonce($_POST['delete_nonce'], 'gppnonce_delete_action'))\n\t\t\tthrow new Exception(__('Sorry! You failed the security check', 'guest-post-publish'), 1);\n\n\t/*\tif (!current_user_can('delete_post', $_POST['post_id']))\n\t\t\tthrow new Exception(__(\"You don't have permission to delete this post\", 'guest-post-publish'), 1); */\n\n\t\t$result = wp_delete_post($_POST['post_id']);\n\t\tif (!$result)\n\t\t\tthrow new Exception(__(\"The Story could not be deleted\", 'guest-post-publish'), 1);\n\n\t\t$data['success'] = true;\n\t\t$data['message'] = __('The Story has been deleted successfully!', 'guest-post-publish');\n\t} catch (Exception $ex) {\n\t\t$data['success'] = false;\n\t\t$data['message'] = $ex->getMessage();\n\t}\n\tdie(json_encode($data));\n}", "function tt_wp_duplicate_posts() {\n\tglobal $wpdb;\n\tif( ! (isset($_GET['post']) || isset($_POST['post']) || (isset($_REQUEST['action']) && 'tt_wp_duplicate_posts' == $_REQUEST['action']))) {\n\t\twp_die('No post to duplicate has been supplied!');\n\t}\n\n\t/*\n\t * get the original post id\n\t */\n\t$post_id = (isset($_GET['post']) ? $_GET['post'] : $_POST['post']);\n\t/*\n\t * and all the original post data then\n\t */\n\t$post = get_post($post_id);\n\n\t/*\n\t * if you don't want current user to be the new post author,\n\t * then change next couple of lines to this: $new_post_author = $post->post_author;\n\t */\n\t$current_user = wp_get_current_user();\n\t$new_post_author = $current_user->ID;\n\n\t/*\n\t * if post data exists, create the post duplicate\n\t */\n\tif(isset($post) && $post != null) {\n\n\t\t/*\n\t\t * new post data array\n\t\t */\n\t\t$args = array(\n\t\t\t'comment_status' => $post->comment_status,\n\t\t\t'ping_status' => $post->ping_status,\n\t\t\t'post_author' => $new_post_author,\n\t\t\t'post_content' => $post->post_content,\n\t\t\t'post_excerpt' => $post->post_excerpt,\n\t\t\t'post_name' => $post->post_name,\n\t\t\t'post_parent' => $post->post_parent,\n\t\t\t'post_password' => $post->post_password,\n\t\t\t'post_status' => $post->post_status,\n\t\t\t'post_title' => $post->post_title,\n\t\t\t'post_type' => $post->post_type,\n\t\t\t'to_ping' => $post->to_ping,\n\t\t\t'menu_order' => $post->menu_order\n\t\t);\n\n\t\t/*\n\t\t * insert the post by wp_insert_post() function\n\t\t */\n\t\t$new_post_id = wp_insert_post($args);\n\n\t\t/*\n\t\t * get all current post terms ad set them to the new post draft\n\t\t */\n\t\t$taxonomies = get_object_taxonomies($post->post_type); // returns array of taxonomy names for post type, ex array(\"category\", \"post_tag\");\n\t\tforeach($taxonomies as $taxonomy) {\n\t\t\t$post_terms = wp_get_object_terms($post_id, $taxonomy, array('fields' => 'slugs'));\n\t\t\twp_set_object_terms($new_post_id, $post_terms, $taxonomy, false);\n\t\t}\n\n\t\t/*\n\t\t * duplicate all post meta just in two SQL queries\n\t\t */\n\t\t$post_meta_infos = $wpdb->get_results(\"SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$post_id\");\n\t\tif(count($post_meta_infos) != 0) {\n\t\t\t$sql_query = \"INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) \";\n\t\t\tforeach($post_meta_infos as $meta_info) {\n\t\t\t\t$meta_key = $meta_info->meta_key;\n\t\t\t\t$meta_value = addslashes($meta_info->meta_value);\n\t\t\t\t$sql_query_sel[] = \"SELECT $new_post_id, '$meta_key', '$meta_value'\";\n\t\t\t}\n\t\t\t$sql_query .= implode(\" UNION ALL \", $sql_query_sel);\n\t\t\t$wpdb->query($sql_query);\n\t\t}\n\n\n\t\t/*\n\t\t * finally, redirect to the edit post screen for the new draft\n\t\t */\n\t\twp_redirect(admin_url('post.php?action=edit&post=' . $new_post_id));\n\t\texit;\n\t} else {\n\t\twp_die('Post creation failed, could not find original post: ' . $post_id);\n\t}\n}", "function blogger_deletePost($args) {\n\n\t global $wpdb;\n\n\t $post_ID = $args[1];\n\t $user_login = $args[2];\n\t $user_pass = $args[3];\n\t $publish = $args[4];\n\n\t if (!$this->login_pass_ok($user_login, $user_pass)) {\n\t return $this->error;\n\t }\n\n\t $actual_post = wp_get_single_post($post_ID,ARRAY_A);\n\n\t if (!$actual_post) {\n\t \treturn new IXR_Error(404, 'Sorry, no such post.');\n\t }\n\n\t $user_data = get_userdatabylogin($user_login);\n\n\t if (!user_can_delete_post($user_data->ID, $post_ID)) {\n\t return new IXR_Error(401, 'Sorry, you do not have the right to delete this post.');\n\t }\n\n\t $result = wp_delete_post($post_ID);\n\n\t if (!$result) {\n\t \treturn new IXR_Error(500, 'For some strange yet very annoying reason, this post could not be deleted.');\n\t }\n\n\t return true;\n\t}", "function tools_210_dupe_settings()\n\t{\n\t\t//-----------------------------------------\n\t\t// Remove dupe categories\n\t\t//-----------------------------------------\n\t\t\n\t\t$title_id_to_keep = array();\n\t\t$title_id_to_delete = array();\n\t\t$title_deleted_count = 0;\n\t\t$msg = '';\n\t\t\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'conf_settings_titles', 'order' => 'conf_title_id DESC' ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\t\t\n\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\tif ( $title_id_to_keep[ $r['conf_title_title'] ] )\n\t\t\t{\n\t\t\t\t$title_id_to_delete[ $r['conf_title_id'] ] = $r['conf_title_id'];\n\t\t\t\t\n\t\t\t\t$msg .= \"Deleting: {$r['conf_title_title']} ID:{$r['conf_title_id']}<br />\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$title_id_to_keep[ $r['conf_title_title'] ] = $r['conf_title_id'];\n\t\t\t\t$msg .= \"KEEPING: {$r['conf_title_title']} ID:{$r['conf_title_id']}<br />\";\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( count( $title_id_to_delete ) )\n\t\t{\n\t\t\t$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'conf_settings_titles', 'where' => 'conf_title_id IN ('.implode( ',', $title_id_to_delete ).')' ) );\n\t\t}\n\t\t\n\t\t$title_deleted_count = intval( count($title_id_to_delete) );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Time to move on dude\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->main_msg = \"$title_deleted_count duplicate setting titles deleted<br />$msg\";\n\t\t$this->tools_splash();\n\t}", "function delete_post($post_ID) {\r\n\t\\ESWP\\Client::delete_doc($post_ID, new \\ESWP\\MyTypes\\Posts());\t\r\n}", "public function delete() {\n global $wp_query;\n\n $user = $this->authenticate('basic');\n $this->authorize($user->ID,array('delete_posts','delete_published_posts'));\n \n $result = wp_delete_post( $wp_query->query['id'] );\n\n if(!$result)\n $results = array( 'error' => __('There was a problem deleting your post.') );\n else\n $results = array( 'post_id' => $wp_query->query['id'],\n 'message' => __('Your post was deleted successfully.') );\n\n $this->render($results);\n }", "function deletePost() {\n\t\t$post_id = (int) $this->post['id'];\n\t\trequire ze::funIncPath(__FILE__, __FUNCTION__);\n\t\t$this->deleteUploads($post_id);\n\t}", "function rssmi_delete_custom_posts() {\n\n\t$wp_version = (float) get_bloginfo( 'version' );\n\t$options = get_option( 'rssmi_global_options' );\n\n\t// Expiration not set or set to \"0\" (never delete)\n\tif ( empty( $options['expiration'] ) ) {\n\t\treturn;\n\t}\n\t$expiration = intval( $options['expiration'] );\n\n\t// Default arguments\n\t$delete_posts_args = array(\n\t\t'post_type' => 'rssmi_feed_item',\n\t\t'posts_per_page' => - 1,\n\t\t'post_status' => array( 'publish', 'pending', 'draft', 'auto-draft', 'private', 'inherit', 'trash' ),\n\t);\n\n\t// Use date_query if we're using a high enough version\n\tif ( $wp_version >= 3.7 ) {\n\t\t$date_query = TRUE;\n\t\t$delete_posts_args['suppress_filters'] = TRUE;\n\t\t$delete_posts_args['date_query'] = array(\n\t\t\t'before' => $expiration . ' days ago'\n\t\t);\n\t}\n\t// Otherwise, need to filter the WHERE clause\n\telse {\n\t\t$date_query = FALSE;\n\t\t$delete_posts_args['suppress_filters'] = FALSE;\n\t\tadd_filter( 'posts_where', 'rssmi_delete_custom_posts_filter_posts_where', 10 );\n\t}\n\n\t$delete_items = get_posts( $delete_posts_args );\n\n\t// Remove the filter, if added\n\tif ( ! $date_query ) {\n\t\tremove_filter( 'posts_where', 'rssmi_delete_custom_posts_filter_posts_where', 10 );\n\t}\n\n\tforeach ( $delete_items as $delete_me ) {\n\t\twp_delete_post( $delete_me->ID, TRUE );\n\t}\n}", "function rssmi_on_delete( $pid ) {\n\t$post = get_post( $pid );\n\tif ( 'rssmi_feed' === $post->post_type ) {\n\t\trssmi_delete_all_for_feed( $pid );\n\t\trssmi_delete_all_posts_for_feed( $pid );\n\t}\n}", "public function deleteReplies()\n {\n $posts = $this->where('belongs_to', $this->id)->delete();\n }", "function wp_delete_auto_drafts()\n{\n}", "public function Delete(){\r\n $this->__checkPostUser(); # check if this post is from user\r\n\r\n $this->p->del($_GET['id']);\r\n $this->c->delbyPID($_GET['id']);\r\n $this->h->setMessage('Post Deleted');\r\n header('Location: /search');\r\n }", "function machete_delete_post_revisions() {\n\t$sql = \"\n\tDELETE a,b,c\n\t\tFROM wp_posts a\n\t\tWHERE a.post_type = 'revision'\n\t\tLEFT JOIN wp_term_relationships b\n\t\tON (a.ID = b.object_id)\n\t\tLEFT JOIN wp_postmeta c ON (a.ID = c.post_id);\";\n\t$rows = $wpdb->query($sql);\n}", "function delete_post($dbh){\n\n \t\t$sth = $dbh->prepare(\"select id from wpprefix_posts where post_type='post_type'\");\n\t\t\t$sth->execute();\n\t\t\t$result = $sth->fetchAll(PDO::FETCH_COLUMN, 0);\n\t\t\t$id = implode(\",\",$result);\n\t\t\t\n\t\t\t$sth1 = $dbh->prepare(\"delete from wpprefix_posts where id in(\".$id.\")\");\n\t\t\t$sth1->execute();\t\n\n\t\t\t$sth2 = $dbh->prepare(\"delete from wpprefix_postmeta where post_id in(\".$id.\")\");\n\t\t\t$sth2->execute();\n\t\t\t$dbh = null;\n\t\t}", "static public function deleteDuplicatedPosts($token, $scheduledPosts = null, $publishedPosts = null){\n $uris = [];\n foreach( ($publishedPosts + $scheduledPosts) as $postId => $post){\n $uri = self::getPostUri($post);\n if(in_array($uri, $uris)){\n self::delete($postId, $token);\n }else{\n $uris[] = $uri;\n }\n }\n\n return $uris;\n }", "function rssmi_delete_all_for_feed( $pid ) {\n\n\t$delete_posts_args = array(\n\t\t'post_type' => 'rssmi_feed_item',\n\t\t'posts_per_page' => - 1,\n\t\t'post_status' => array( 'publish', 'pending', 'draft', 'auto-draft', 'private', 'inherit', 'trash' ),\n\t\t'meta_query' => array(\n\t\t\tarray(\n\t\t\t\t'key' => 'rssmi_item_feed_id',\n\t\t\t\t'value' => $pid\n\t\t\t)\n\t\t)\n\t);\n\n\t$delete_posts = get_posts( $delete_posts_args );\n\n\tif ( empty( $delete_posts ) ) {\n\t\treturn;\n\t}\n\n\tforeach ( $delete_posts as $delete_me ) {\n\t\t$pid = $delete_me->ID;\n\t\trssmi_delete_attachment( $pid );\n\t\twp_delete_post( $pid, TRUE );\n\t}\n\n}", "function DeletePostManagerDate_byPostId($id,$action){\n global $wpdb;\n $table = $wpdb->prefix.\"wlcc_contentmanager_\" .$action;\n if(is_array($id)){\n $ids = implode(',',$id);\n $q = \"DELETE FROM $table WHERE post_id IN (\" .$ids .\")\";\n }else{\n $q = \"DELETE FROM $table WHERE post_id=\" .$id;\n }\n $wpdb->query($q);\n }", "public function deletePostMusic()\n {\n $sql = \"DELETE FROM wp_posts WHERE post_type = 'music';\";\n\n static::execute($sql);\n }", "function popular_posts_reset() {\n\tglobal $wpdb;\n\t$pvc_custom = 'pvc_views';\n\t$wpdb->query(\"DELETE FROM $wpdb->postmeta WHERE meta_key = '$pvc_custom'\");\n}", "function deleted_post($post_id)\n {\n }", "function dz_jetpack_remove_relatedposts() {\n if ( class_exists( 'Jetpack_RelatedPosts' ) && is_singular( 'albums' ) ) {\n $jprp = Jetpack_RelatedPosts::init();\n $callback = array( $jprp, 'filter_add_target_to_dom' );\n remove_filter( 'the_content', $callback, 40 );\n }\n}", "public function deleteWithPosts()\r\n\t{\r\n\t\t$this->posts()->delete();\r\n\r\n\t\treturn $this->delete();\r\n\t}", "function wpse_54258_run_only_once(){ \n global $wpdb;\n $allposts = $wpdb->get_results( \"SELECT ID FROM $wpdb->posts WHERE post_status = 'published'\" );\n foreach( $allposts as $pt ) {\n add_hashTags( $pt->$ID, $pt->$url);\n }\n}", "public function delete() {\r\n $posts = Post::delete();\r\n $posts = Post::all();\r\n require_once('views/posts/index.php');\r\n }", "public function massDeleteAction()\n {\n $postIds = $this->getRequest()->getParam('post');\n if (!is_array($postIds)) {\n Mage::getSingleton('adminhtml/session')\n ->addError(Mage::helper('news')->__('Please select posts to delete.'));\n $this->_redirect('*/*/index');\n return;\n }\n try {\n foreach ($postIds as $postId) {\n Mage::getModel('news/post')->load($postId)\n ->setIsMassaction(true)\n ->delete();\n }\n Mage::getModel('news/post_action')->processMassaction($postIds);\n Mage::getSingleton('adminhtml/session')\n ->addSuccess(\n Mage::helper('news')->__('Total of %d posts were successfully deleted.',\n count($postIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')\n ->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')\n ->addError(Mage::helper('news')->__('There was an error deleting posts.'));\n Mage::logException($e);\n }\n $this->_redirect('*/*/index');\n }", "public function delete_post(){\n\t$username = 'user';\n\t$password = '123456789';\n\t$postid = 26;\n\t$rest_api_url = \"http://localhost/tasks/wordpress/wp-json/wp/v2/posts/\".$postid;\n\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n\tcurl_setopt($ch, CURLOPT_URL, $rest_api_url);\n\tcurl_setopt($ch, CURLOPT_POST, 1);\n\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, [\n\t 'Content-Type: application/json',\n\t\t'Authorization: Basic ' . base64_encode($username . ':' . $password),\n\t]);\n\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n\techo $result = curl_exec($ch);\n\n\tcurl_close($ch);\n\n }", "public function delete_element_post() {\n\t\tif ( current_user_can( 'delete_published_pages' ) ) {\n\t\t\t$element_ids = '';\n\n\t\t\tif ( isset( $_GET['post'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification\n\t\t\t\t$element_ids = wp_unslash( $_GET['post'] ); // phpcs:ignore WordPress.Security\n\t\t\t}\n\n\t\t\tif ( '' !== $element_ids ) {\n\t\t\t\t$element_ids = (array) $element_ids;\n\t\t\t}\n\n\t\t\tif ( ! empty( $element_ids ) ) {\n\t\t\t\tforeach ( $element_ids as $id ) {\n\t\t\t\t\twp_delete_post( $id, true );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$referer = fusion_get_referer();\n\t\tif ( $referer ) {\n\t\t\twp_safe_redirect( $referer );\n\t\t\texit;\n\t\t}\n\t}", "function yourls_delete_link_by_keyword( $keyword ) {\n // Allow plugins to short-circuit the whole function\n $pre = yourls_apply_filter( 'shunt_delete_link_by_keyword', null, $keyword );\n if ( null !== $pre ) {\n return $pre;\n }\n\n $table = YOURLS_DB_TABLE_URL;\n $keyword = yourls_sanitize_keyword($keyword);\n $delete = yourls_get_db()->fetchAffected(\"DELETE FROM `$table` WHERE `keyword` = :keyword\", array('keyword' => $keyword));\n yourls_do_action( 'delete_link', $keyword, $delete );\n return $delete;\n}", "public function delete() {\n\t\t$this->checkDisposed();\n\t\t\t\n\t\tDataBase::query(\n\t\t\t\"DELETE FROM \".DataBase::formTableName('Premanger', 'Plugin').\" \".\n\t\t\t\"WHERE plugin.pluginID = '$this->_id'\");\n\t\t\t\n\t\tunset(self::$_instances[$this->_id]);\n\t\tif (self::$_count !== null)\n\t\tself::$_count--;\n\n\t\t$this->dispose();\n\t}", "public function removeAllRelatedPosts() {}", "function delete() {\n $revisions = (array) Revisions::buildPageHistory($this->getId(), $this->getProject());\n foreach($revisions as $revision) {\n $revision->delete();\n }\n return parent::delete();\n }", "function tb_cm_delete_cached_tweets($tweets_to_delete) {\n\n global $wpdb;\n $table_name = $wpdb->prefix . \"tweetblender\";\n $toDelete = implode(\"','\",$tweets_to_delete);\n return $wpdb->query($wpdb->prepare(\"DELETE FROM $table_name WHERE div_id IN ( %s )\",$toDelete));\n}", "public function deleteContentAndCopyLivePage() {}", "function rd_duplicate_post_link( $actions, $post ) {\n if (current_user_can('edit_posts')) {\n $actions['duplicate'] = '<a href=\"' . wp_nonce_url('admin.php?action=rd_duplicate_post_as_draft&post=' . $post->ID, basename(__FILE__), 'duplicate_nonce' ) . '\" title=\"Duplicate this item\" rel=\"permalink\">Duplicate</a>';\n }\n return $actions;\n}", "public function delete()\n {\n // Preperare the query to delete post\n $stmt = $this->pdo->prepare(\"DELETE FROM posts WHERE posts_id = :posts_id\");\n $stmt->execute(\n [\n // Fetches the unique post id and executes the query.\n \":posts_id\" => $_GET[\"id\"],\n ]\n );\n\n // Preperare the query to delete all comments on this post\n $stmt = $this->pdo->prepare(\"DELETE FROM comments WHERE posts_id = :posts_id\");\n $stmt->execute(\n [\n // Fetches the unique post id and executes the query.\n \":posts_id\" => $_GET[\"id\"],\n ]\n );\n // Return to index\n header('Location: ../index.php');\n return true;\n }", "function rssmi_delete_all_feed_items() {\n\trssmi_delete_all_custom_posts();\n\techo '<strong>The feeds database has been cleared.</strong>';\n\tdie();\n\n}", "public function deleted(Post $post)\n\t{\n\t\t$lowerPriorityPosts = Post::where('position', '>', $post->position)\n\t\t\t->get();\n\n\t\tforeach ($lowerPriorityPosts as $lowerPriorityPost) {\n\t\t\t$lowerPriorityPost->position--;\n\t\t\t$lowerPriorityPost->saveQuietly();\n\t\t}\n\t}", "function rd_duplicate_post_link($actions, $post)\n{\n if (current_user_can('edit_posts')) {\n $actions['duplicate'] = '<a href=\"' . wp_nonce_url('admin.php?action=rd_duplicate_post_as_draft&post=' . $post->ID, basename(__FILE__), 'duplicate_nonce') . '\" title=\"Duplicate this item\" rel=\"permalink\">Duplicate</a>';\n }\n\n return $actions;\n}", "protected function _delete()\n {\n $photoTable = Engine_Api::_()->getItemTable('sesblog_photo');\n $photoSelect = $photoTable->select()->where('album_id = ?', $this->getIdentity());\n foreach( $photoTable->fetchAll($photoSelect) as $sesblogPhoto ) {\n $sesblogPhoto->delete();\n }\n\n parent::_delete();\n }", "function uni_duplicate_post_link( $actions, $post ) {\n if (current_user_can('edit_posts')) {\n $actions['duplicate'] = '<a href=\"' . wp_nonce_url('admin.php?action=uni_duplicate_post_as_draft&post=' . $post->ID, basename(__FILE__), 'duplicate_nonce' ) . '\" title=\"'.__('Duplicate this item','shtheme').'\" rel=\"permalink\">'.__('Duplicate','shtheme').'</a>';\n }\n return $actions;\n}", "public function deletePost(Post $post)\n {\n }", "public function deletaAllPosts()\n\t{\n\t\textract($this->args);\n\t\t$args = array(\n\t\t\t'posts_per_page' => -1,\n\t\t\t'offset' => 0,\n\t\t\t'category' => '',\n\t\t\t'orderby' => 'post_date',\n\t\t\t'order' => 'DESC',\n\t\t\t'include' => '',\n\t\t\t'exclude' => '',\n\t\t\t'meta_key' => '',\n\t\t\t'meta_value' => '',\n\t\t\t'post_type' => $post_type,\n\t\t\t'post_mime_type' => '',\n\t\t\t'fields'\t\t => 'ids',\n\t\t\t'post_parent' => '',\n\t\t\t'post_status' => 'publish',\n\t\t\t'suppress_filters' => true );\n\n\t\t$posts = get_posts($args);\n\t\tif($posts)\n\t\t{\n\t\t\tforeach ($posts as &$post) \n\t\t\t{\n\t\t\t\t wp_delete_post($post, $force_delete);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\n\t}", "function removeLike($conn, $postId, $userEmail) {\n $sql = \"DELETE FROM POSTLIKE\nWHERE POSTID = $postId AND \nUSEREMAIL = '$userEmail'\";\n\n $conn->exec($sql);\n }", "function do_delete($post) {\n global $returnurl, $DB;\n\n blog_delete_attachments($post);\n\n $status = $DB->delete_records('post', array('id'=>$post->id));\n tag_set('post', $post->id, array());\n\n add_to_log(SITEID, 'blog', 'delete', 'index.php?userid='. $post->userid, 'deleted blog entry with entry id# '. $post->id);\n}", "function wp_delete_post($postid = 0, $force_delete = \\false)\n{\n}", "protected function afterDelete()\n\t{\n\t\tparent::afterDelete();\n// \t\tComment::model()->deleteAll('post_id='.$this->id);\n\t\tTag::model()->updateFrequency($this->postTags, '');\n\t}", "public function delete()\n {\n // Delete the questions\n $this->questions()->delete();\n\n // Delete the blog post\n return parent::delete();\n }", "public function unload_markdown_for_posts() {\n\t\tremove_action( 'wp_insert_post', array( $this, 'wp_insert_post' ) );\n\t\tremove_filter( 'wp_insert_post_data', array( $this, 'wp_insert_post_data' ), 10, 2 );\n\t\tremove_filter( 'edit_post_content', array( $this, 'edit_post_content' ), 10, 2 );\n\t\tremove_filter( 'edit_post_content_filtered', array( $this, 'edit_post_content_filtered' ), 10, 2 );\n\t\tremove_action( 'wp_restore_post_revision', array( $this, 'wp_restore_post_revision' ), 10, 2 );\n\t\tremove_filter( '_wp_post_revision_fields', array( $this, '_wp_post_revision_fields' ) );\n\t\tremove_action( 'xmlrpc_call', array( $this, 'xmlrpc_actions' ) );\n\t\tremove_filter( 'content_save_pre', array( $this, 'preserve_code_blocks' ), 1 );\n\t}", "function tt_wp_duplicate_post_link($actions, $post) {\n\tif(current_user_can('edit_posts')) {\n\t\t$actions['duplicate'] = '<a href=\"admin.php?action=tt_wp_duplicate_posts&amp;post=' . $post->ID . '\" rel=\"permalink\"><span class=\"dashicons dashicons-arrow-left-alt2\" style=\"font-size: 8px;vertical-align: baseline\"></span>Duplicate<span class=\"dashicons dashicons-arrow-right-alt2\" style=\"font-size: 8px;vertical-align: baseline\"></span></a>';\n\t}\n\n\treturn $actions;\n}", "public function deletePost(array $ids);", "public function deletePost()\n\t{\n\t\t$this->checkAuth(5);\n\t\t\n\t\tif (isset($_POST['delete'])) {\n\t\t\t$this->model->deletePost();\n\t\t\t\n\t\t\tCache::delete('blog/');\n\t\t\t\n\t\t\tUrl::redirect('blog/');\n\t\t}\n\t\t$data = $this->model->getPost();\n\t\tif (!$data) {\n\t\t\t$this->error();\n\t\t}\n\t\t$this->view->assign('post', $this->filter->single($data));\n\t\t$this->view->template('delete');\n\n\t}", "function rd_duplicate_post_link( $actions, $post ) {\n\tif ( current_user_can( 'edit_posts' ) ) {\n\t\t$actions['duplicate'] = '<a href=\"admin.php?action=rd_duplicate_post_as_draft&amp;post=' . $post->ID . '\" title=\"Duplicate this item\" rel=\"permalink\">Duplicate</a>';\n\t}\n\n\treturn $actions;\n}", "function rd_duplicate_post_link( $actions, $post ) {\n if (current_user_can('edit_posts')) {\n $actions['duplicate'] = '<a href=\"admin.php?action=rd_duplicate_post_as_draft&amp;post=' . $post->ID . '\" title=\"Duplicate this item\" rel=\"permalink\">Duplicate</a>';\n }\n return $actions;\n}", "public function delete() {\n\t\t\tif($this->request->args[0]){\n\t\t\t\t//Find matching posts, then delete them\n\t\t\t\t$myPost = MyPosts::find($this->request->args[0])->delete();\n\t\t\t\t//Send the retrieved post data to the view\n\t\t\t\t$this->redirect( array('MyPosts::index' ) );\n\t\t\t}\n\t\t}", "function delete_post_meta_by_key($post_meta_key)\n{\n}", "public function purge( $args, $assoc_args ) {\n\n\t\t$urls = array_filter( array_map( 'esc_url_raw', $args ) );\n\t\t$post_ids = array_filter( array_map( 'absint', explode( ',', WP_CLI\\Utils\\get_flag_value( $assoc_args, 'post_ids' ) ) ) );\n\t\t$comment_ids = array_filter( array_map( 'absint', explode( ',', WP_CLI\\Utils\\get_flag_value( $assoc_args, 'comment_ids' ) ) ) );\n\n\t\tif ( ! $urls && ! $post_ids && ! $comment_ids ) {\n\n\t\t\t$urls[] = home_url();\n\n\t\t}\n\n\t\t$posts = [];\n\t\t$comments = [];\n\n\t\tif ( $comment_ids ) {\n\n\t\t\t$comments = new WP_Comment_Query;\n\t\t\t$comments = $comments->query( [ 'comment__in' => array_unique( $comment_ids ), 'number' => 999 ] );\n\t\t\t$comments = ( $comments ) ? $comments : [];\n\n\t\t}\n\n\t\tif ( $comments ) {\n\n\t\t\t$post_ids = array_merge( $post_ids, wp_list_pluck( $comments, 'comment_post_ID' ) );\n\n\t\t}\n\n\t\tif ( $post_ids ) {\n\n\t\t\t$posts = new WP_Query( [ 'post__in' => array_unique( $post_ids ), 'posts_per_page' => 999 ] );\n\t\t\t$posts = $posts->have_posts() ? $posts->posts : [];\n\n\t\t}\n\n\t\tforeach ( $posts as $post ) {\n\n\t\t\t$urls = array_merge( $urls, Control::get_urls_for_post( $post ) );\n\n\t\t}\n\n\t\t$results = Control::purge( $urls );\n\n\t\tif ( ! $results ) {\n\n\t\t\tWP_CLI::error( 'There are no URLs to purge.' );\n\n\t\t}\n\n\t\t$items = [];\n\n\t\tforeach ( $results as $result ) {\n\n\t\t\t$items[] = [ 'url' => $result ];\n\n\t\t}\n\n\t\t$format = WP_CLI\\Utils\\get_flag_value( $assoc_args, 'format', 'table' );\n\n\t\tWP_CLI\\Utils\\format_items( $format, $items, [ 'url' ] );\n\n\t}", "function oa_loudvoice_watch_delete_post($postid)\n{\n // Is LoudVoice running?\n if (oa_louddvoice_is_setup())\n {\n // Comment Token\n $post_token = oa_loudvoice_get_token_for_post($postid);\n if (!empty($post_token))\n {\n // Add the post to the list of posts to be removed\n oa_loudvoice_set_to_delete_for_post_token($post_token, true);\n }\n }\n}", "public function deleteAll() {\n return $this->getEntityManager()\n\t\t\t->createQuery('\n\t\t\t\tDELETE AppBundle\\Entity\\Post p')\n \t->getScalarResult();\n }", "function socialwiki_delete_page_likes($pid) {\n Global $DB;\n $DB->delete_records_select('socialwiki_likes', 'pageid=?', array($pid));\n}", "public function do_remove() {\n\n\t\t// Required plugins are not active\n\t\tif ( ! $this->plugins_are_active() ) {\n\t\t\t$this->errors->add( 'kalium_demo_content_remove_plugins_not_active', sprintf( 'Required plugins are not active, <strong>%s</strong> cannot be uninstalled.', $this->get_name() ) );\n\t\t\treturn;\n\t\t}\n\n\t\t// Vars\n\t\t$content_pack = $this->get_content_pack();\n\t\t$backup_manager = $content_pack->backup_manager();\n\t\t$backup_options = $backup_manager->get_backup_options();\n\t\t$import_instance = $content_pack->get_import_instance();\n\t\t$import_instance_id = $import_instance->get_id();\n\t\t$options = $this->get_options();\n\n\t\t// Delete posts\n\t\t$post_ids = Kalium_Demo_Content_Helpers::get_post_ids( $import_instance_id );\n\n\t\tforeach ( $post_ids as $post_id ) {\n\t\t\twp_delete_post( $post_id, true );\n\t\t}\n\n\t\t// Delete terms\n\t\t$term_ids = Kalium_Demo_Content_Helpers::get_term_ids( $import_instance_id );\n\n\t\tforeach ( $term_ids as $term_id ) {\n\t\t\t$term = get_term( $term_id );\n\n\t\t\tif ( $term ) {\n\t\t\t\twp_delete_term( $term_id, $term->taxonomy );\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Revert options.\n\t\t */\n\n\t\t// Front page\n\t\tif ( isset( $backup_options['page_on_front'] ) ) {\n\t\t\t$page_on_front = $backup_options['page_on_front'];\n\n\t\t\tif ( get_post( $page_on_front ) ) {\n\t\t\t\tupdate_option( 'page_on_front', $page_on_front, 'yes' );\n\t\t\t}\n\t\t}\n\n\t\t// Posts page\n\t\tif ( isset( $backup_options['page_for_posts'] ) ) {\n\t\t\t$page_for_posts = $backup_options['page_for_posts'];\n\n\t\t\tif ( get_post( $page_for_posts ) ) {\n\t\t\t\tupdate_option( 'page_for_posts', $page_for_posts, 'yes' );\n\t\t\t}\n\t\t}\n\n\t\t// Update show on front option\n\t\tif ( isset( $backup_options['show_on_front'] ) ) {\n\t\t\tupdate_option( 'show_on_front', $backup_options['show_on_front'] );\n\t\t}\n\n\t\t// Permalink structure\n\t\tif ( isset( $backup_options['permalink_structure'] ) ) {\n\t\t\tupdate_option( 'permalink_structure', $backup_options['permalink_structure'] );\n\t\t}\n\n\t\t// Menus\n\t\tif ( ! empty( $backup_options['menus'] ) ) {\n\t\t\t$nav_menu_locations = get_theme_mod( 'nav_menu_locations' );\n\n\t\t\tforeach ( $backup_options['menus'] as $menu_location => $nav_menu_id ) {\n\n\t\t\t\t// Replace menu if it exists\n\t\t\t\tif ( get_term( $nav_menu_id ) ) {\n\t\t\t\t\t$nav_menu_locations[ $menu_location ] = $nav_menu_id;\n\t\t\t\t} else {\n\t\t\t\t\tunset( $nav_menu_locations[ $menu_location ] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Revert nav menu locations\n\t\t\tset_theme_mod( 'nav_menu_locations', $nav_menu_locations );\n\t\t}\n\n\t\t// WooCommerce options\n\t\t$woocommerce = kalium_get_array_key( $options, 'woocommerce', [] );\n\n\t\tif ( ! empty( $woocommerce ) && kalium()->is->woocommerce_active() ) {\n\n\t\t\t// Pages\n\t\t\tif ( $pages = kalium_get_array_key( $backup_options, 'woocommerce_pages' ) ) {\n\t\t\t\tforeach ( $pages as $option_name => $option_value ) {\n\n\t\t\t\t\tif ( $option_value && get_post( $option_value ) ) {\n\t\t\t\t\t\tupdate_option( $option_name, $option_value );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tupdate_option( $option_name, '' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Thumbnails\n\t\t\tif ( $thumbnails = kalium_get_array_key( $backup_options, 'woocommerce_thumbnails' ) ) {\n\t\t\t\tforeach ( $thumbnails as $option_name => $option_value ) {\n\t\t\t\t\tupdate_option( $option_name, $option_value, 'yes' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// WooCommerce options\n\t\t\tif ( $woo_options = kalium_get_array_key( $backup_options, 'woocommerce_options' ) ) {\n\t\t\t\tforeach ( $woo_options as $option_name => $option_value ) {\n\t\t\t\t\tupdate_option( $option_name, $option_value, 'yes' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// WooCommerce attribute taxonomies\n\t\t\tif ( $attribute_taxonomies = kalium_get_array_key( $woocommerce, 'attribute_taxonomies' ) ) {\n\t\t\t\t$imported_attribute_taxonomies = json_decode( $attribute_taxonomies, true );\n\t\t\t\t$previous_attribute_taxonomies = kalium_get_array_key( $backup_options, 'woocommerce_attribute_taxonomies', [] );\n\n\t\t\t\tif ( is_array( $imported_attribute_taxonomies ) ) {\n\t\t\t\t\tforeach ( wc_get_attribute_taxonomies() as $attribute_taxonomy ) {\n\n\t\t\t\t\t\t// Check if current attribute taxonomy is imported\n\t\t\t\t\t\tforeach ( $imported_attribute_taxonomies as $imported_attribute_taxonomy ) {\n\n\t\t\t\t\t\t\t// Matched attribute\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t$attribute_taxonomy->attribute_name === $imported_attribute_taxonomy['attribute_name'] ||\n\t\t\t\t\t\t\t\t$attribute_taxonomy->attribute_label === $imported_attribute_taxonomy['attribute_label']\n\t\t\t\t\t\t\t) {\n\n\t\t\t\t\t\t\t\t// Check if this attribute was previously imported\n\t\t\t\t\t\t\t\t$previously_imported = false;\n\n\t\t\t\t\t\t\t\tforeach ( $previous_attribute_taxonomies as $previous_attribute_taxonomy ) {\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t$imported_attribute_taxonomy['attribute_name'] === $previous_attribute_taxonomy['attribute_name'] ||\n\t\t\t\t\t\t\t\t\t\t$imported_attribute_taxonomy['attribute_label'] === $previous_attribute_taxonomy['attribute_label']\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t$previously_imported = true;\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// If not previously imported, delete it\n\t\t\t\t\t\t\t\tif ( ! $previously_imported ) {\n\t\t\t\t\t\t\t\t\twc_delete_attribute( $attribute_taxonomy->attribute_id );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flush rewrite rules\n\t\tflush_rewrite_rules( true );\n\n\t\t// Mark as removed\n\t\tparent::do_remove();\n\t}", "public function delete()\n\t{\n\t\t$post = new titania_post;\n\t\t$post->topic = $this;\n\n\t\t$sql = 'SELECT * FROM ' . TITANIA_POSTS_TABLE . '\n\t\t\tWHERE topic_id = ' . (int) $this->topic_id;\n\t\t$result = phpbb::$db->sql_query($sql);\n\t\twhile ($row = phpbb::$db->sql_fetchrow($result))\n\t\t{\n\t\t\t$post->__set_array($row);\n\t\t\t$post->delete();\n\t\t}\n\t\tphpbb::$db->sql_freeresult($result);\n\n\t\t// Remove any subscriptions to this topic\n\t\t$sql = 'DELETE FROM ' . TITANIA_WATCH_TABLE . '\n\t\t\tWHERE watch_object_type = ' . ext::TITANIA_TOPIC . '\n\t\t\t\tAND watch_object_id = ' . $this->topic_id;\n\t\tphpbb::$db->sql_query($sql);\n\n\t\t// Remove any tracking for this topic\n\t\t$this->tracking->clear_item(ext::TITANIA_TOPIC, $this->topic_id);\n\n\t\t// Delete the now empty topic\n\t\t$sql = 'DELETE FROM ' . TITANIA_TOPICS_TABLE . '\n\t\t\tWHERE topic_id = ' . $this->topic_id;\n\t\tphpbb::$db->sql_query($sql);\n\t}", "public function delete_meta() {\n\t\treturn Updraft_Task_Meta::bulk_delete_task_meta($this->id);\n\t}", "function rd_duplicate_post_link( $actions, $post ) {\n\n\tif (current_user_can('edit_posts')) {\n\n\t\t$actions['duplicate'] = '<a href=\"' . wp_nonce_url('admin.php?action=rd_duplicate_post_as_draft&post=' . $post->ID, basename(__FILE__), 'duplicate_nonce' ) . '\" title=\"Duplicate this item\" rel=\"permalink\">Duplicate</a>';\n\n\t}\n\n\treturn $actions;\n\n}", "function delete_post_page()\n\t{\n\t\t$post_id = '';\n\t\t$title\t = '';\n\t\t\n\t\t/** -------------------------------------\n\t\t/** Fetch some meta data based on the request\n\t\t/** -------------------------------------*/\n\t\t\t\n\t\tif ($this->current_request == 'deletereply')\n\t\t{\n\t\t\t$query = $this->EE->db->query(\"SELECT p.topic_id, p.post_id, p.forum_id, p.body, p.author_id,\n\t\t\t\t\t\t\t\tf.forum_text_formatting, f.forum_html_formatting, f.forum_auto_link_urls, f.forum_allow_img_urls \n\t\t\t\t\t\t\t\tFROM exp_forum_posts AS p, exp_forums AS f\n\t\t\t\t\t\t\t\tWHERE f.forum_id = p.forum_id\n\t\t\t\t\t\t\t\tAND p.post_id = '{$this->current_id}'\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = $this->EE->db->query(\"SELECT t.topic_id, t.forum_id, t.title, t.body, t.author_id,\n\t\t\t\t\t\t\t\tf.forum_text_formatting, f.forum_html_formatting, f.forum_auto_link_urls, f.forum_allow_img_urls \n\t\t\t\t\t\t\t\tFROM exp_forum_topics AS t, exp_forums AS f\n\t\t\t\t\t\t\t\tWHERE f.forum_id = t.forum_id\n\t\t\t\t\t\t\t\tAND t.topic_id = '{$this->current_id}'\");\n\t\t}\n\n\t\t/** -------------------------------------\n\t\t/** No result? Smack em'\n\t\t/** -------------------------------------*/\n\t\t\n\t\tif ($query->num_rows() == 0)\n\t\t{\n\t\t\treturn $this->EE->output->show_user_error('general', array($this->EE->lang->line('not_authorized')));\n\t\t}\n\t\t\n\t\t/** -------------------------------------\n\t\t/** Create Vars for simplicity\n\t\t/** -------------------------------------*/\n\t\t\n\t\tforeach ($query->row_array() as $key => $val)\n\t\t{\n\t\t\t$$key = $val;\n\t\t}\n\t\t\t\n\t\t/** -------------------------------------\n\t\t/** Is the user allowed to delete?\n\t\t/** -------------------------------------*/\n\t\t\t\n\t\tif ( ! $this->_mod_permission('can_delete', $forum_id))\n\t\t{\n\t\t\treturn $this->_trigger_error('not_authorized');\n\t\t}\n\n\t\t// Only Superadmins can delete other Superadmin posts\n\t\t\n\t\tif ($author_id != $this->EE->session->userdata('member_id'))\n\t\t{\n\t\t\t// Fetch the Super Admin IDs\n\t\t\t$super_admins = $this->fetch_superadmins();\n\n\t\t\tif (in_array($author_id, $super_admins) && $this->EE->session->userdata('group_id') != 1)\n\t\t\t{\n\t\t\t\treturn $this->_trigger_error('not_authorized');\n\t\t\t}\n\t\t}\n\t\t\n\t\t/** -------------------------------------\n\t\t/** Define the redirect location\n\t\t/** -------------------------------------*/\n\t\t\n\t\tif ($this->current_request == 'deletereply')\n\t\t{\n\t\t\t$this->form_actions['forum:delete_post']['RET'] = $this->_forum_path('/viewthread/'.$topic_id.'/');\n\t\t\t$this->form_actions['forum:delete_post']['post_id'] = $post_id;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->form_actions['forum:delete_post']['RET'] = $this->_forum_path('/viewforum/'.$forum_id.'/');\n\t\t\t$this->form_actions['forum:delete_post']['topic_id'] = $topic_id;\n\t\t}\n\t\n\t\t/** -------------------------------------\n\t\t/** Build the warning\n\t\t/** -------------------------------------*/\n\t\n\t\t$str = $this->_load_element('delete_post_warning');\n\t\t\t\n\t\tif ($this->current_request == 'deletereply')\n\t\t{\n\t\t\t$str = $this->_deny_if('is_topic', $str);\n\t\t\t$str = $this->_allow_if('is_reply', $str);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$str = $this->_allow_if('is_topic', $str);\n\t\t\t$str = $this->_deny_if('is_reply', $str);\n\t\t}\n\t\t\t\t\n\t\t$this->EE->load->library('typography');\n\t\t$this->EE->typography->initialize();\n\n\t\t$str = $this->_var_swap($str,\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'title'\t=> $this->_convert_special_chars($title),\n\t\t\t\t\t\t\t\t\t\t'body'\t=> $this->EE->typography->parse_type($body, \n\t\t\t\t\t\t\t\t\t\t\t\t\t array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'text_format'\t=> $forum_text_formatting,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'html_format'\t=> $forum_html_formatting,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'auto_links'\t=> $forum_auto_link_urls,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'allow_img_url' => $forum_allow_img_urls\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\t\t\n\t\t\n\t\treturn str_replace('{include:delete_post_warning}', $str, $this->_load_element('delete_post_page'));\n\t}", "function DeletePostManagerDate($id,$action){\n global $wpdb;\n $table = $wpdb->prefix.\"wlcc_contentmanager_\" .$action;\n if(is_array($id)){\n $ids = implode(',',$id);\n $q = \"DELETE FROM $table WHERE id IN (\" .$ids .\")\";\n }else{\n $q = \"DELETE FROM $table WHERE id=\" .$id;\n }\n $wpdb->query($q);\n }", "public function deleted(Post $post)\n {\n //...\n }", "function remove_singular_confirmation_page() {\n\n global $wpdb;\n\n $the_page_title = get_option( \"pagina_confirmacion_singular_titulo\" );\n $the_page_name = get_option( \"pagina_confirmacion_singular_name\" );\n\n // the id of our page...\n $the_page_id = get_option( 'pagina_confirmacion_singular_id' );\n if( $the_page_id ) {\n\n wp_delete_post( $the_page_id ); // this will trash, not delete\n\n }\n\n delete_option(\"pagina_confirmacion_singular_titulo\");\n delete_option(\"pagina_confirmacion_singular_name\");\n delete_option(\"pagina_confirmacion_singular_id\");\n\n}", "public function delete() {\n comment::where('post', '=', $this->id())->delete();\n \n // now delete the post\n parent::delete();\n \n }", "public function deletePost() {\n $inputJson = Input::all();\n \n\n $post = Post::find($inputJson['postid']);\n\n\n $returnObject = new stdClass();\n $returnObject->status = 'ok';\n $returnObject->mission_completed = 'false';\n\n\n \n\n $usertask = UserTask::where('user_id', $post->user_id)->where('task_id', $post->task_id)->where('group_id', $post->group_id)->get();\n\n if (isset($usertask[0])){\n\n $userTaskRecord = UserTask::find($usertask[0]->id);\n\n $userTaskRecord->delete();\n\n $returnObject->mission_completed = 'true';\n\n }\n\n // remove likes associated with the post\n\n $affectedLikes = Like::where('post_id', $inputJson['postid'])->delete();\n\n // remove notifications associated with the post\n\n $affectedNotifications = Notification::where('type', 'newlike')->orWhere('type', 'newcomment')->where('source_id', $inputJson['postid'])->delete();\n\n\n\n \n\n $post->delete();\n\n $returnObject->message = \"Post deleted successfully\";\n\n return Response::json($returnObject);\n }", "function rd_duplicate_post_link( $actions, $post ) {\r\n if (current_user_can('edit_posts')) {\r\n $actions['duplicate'] = '<a href=\"' . wp_nonce_url('admin.php?action=rd_duplicate_post_as_draft&post=' . $post->ID, basename(__FILE__), 'duplicate_nonce' ) . '\" title=\"Duplicate this item\" rel=\"permalink\">Duplicate</a>';\r\n }\r\n return $actions;\r\n }", "function insert_email(){\r\n $email = $_POST['email'];//'alala@nfdsnvm.com';\r\n \r\n $the_query = new WP_Query( array( 'post_type' => 'email') );\r\n $is_unique = true;\r\n $title = '';\r\n while ( $the_query->have_posts() ) : $the_query->the_post();\r\n if( get_the_title() == $email ){ $is_unique = false; break;}\r\n endwhile;\r\n wp_reset_postdata();\r\n\r\n if($is_unique){\r\n $my_post = array(\r\n 'post_title' => $email,\r\n 'post_type' => 'email',\r\n 'post_status' => 'publish' \r\n );\r\n wp_insert_post( $my_post );\r\n }\r\n \r\n die($is_unique);\r\n }", "public function delete() {\n\t\tglobal $wpdb;\n\t\t\n\t\tif ( !$this->exists() ) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn $wpdb->query($wpdb->prepare(\"DELETE FROM $wpdb->post_views_counter WHERE post_id = %d\", $this->_id));\n\t}", "function awesome_duplicate_post_link( $actions, $post ) {\n if (current_user_can('edit_posts')) {\n $actions['duplicate'] = '<a href=\"admin.php?action=rd_duplicate_post_as_draft&amp;post=' . $post->ID . '\" title=\"Duplicate this item\" rel=\"permalink\">Duplicate</a>';\n }\n return $actions;\n}", "function delete_post($post_id, $database)\r\n{\r\n $post_id = $database->real_escape_string($post_id);\r\n // Delete the post\r\n $sql = \"DELETE FROM `miniblog` where `post_id` = {$post_id}\";\r\n $result = mb_query($sql, $database);\r\n\r\n return $result;\r\n}", "function yz_delete_user_posts_count_transient( $post_id = null, $post = null, $updated = false ) {\n\n if ( $updated ) {\n return;\n }\n\n // Get Post Author.\n $post_author = get_post_field( 'post_author', $post_id );\n\n // Delete Transient.\n delete_transient( 'yz_count_user_posts_' . $post_author );\n\n}", "function delete_post($no)\n\t{\n $query2 = sprintf(\" DELETE FROM singles WHERE id ='%s'\",mysql_real_escape_string($no));\n\t$result=mysql_query($query2);\n\t\t\n\t\n\t\t\n\t}", "public function Delete()\n\t{\n\t\ttry\n\t\t{\n\t\t\t\t\t\t\n\t\t\t// TODO: if a soft delete is prefered, change this to update the deleted flag instead of hard-deleting\n\n\t\t\t$pk = $this->GetRouter()->GetUrlParam('idtitle');\n\t\t\t$title = $this->Phreezer->Get('Title',$pk);\n\n\t\t\t$title->Delete();\n\n\t\t\t$output = new stdClass();\n\n\t\t\t$this->RenderJSON($output, $this->JSONPCallback());\n\n\t\t}\n\t\tcatch (Exception $ex)\n\t\t{\n\t\t\t$this->RenderExceptionJSON($ex);\n\t\t}\n\t}", "protected function hook_postDelete() {\n\t}", "public function bulk_delete()\n\t\t{\n\t\t\tglobal $wpdb;\n\n\t\t\t$action = $this->current_action();\n\n\t\t\tif( 'delete' !== $action ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t//more\n\t\t}", "function wp_revisions_to_keep($post)\n{\n}", "function tools_dupe_settings()\n\t{\n\t\t//-----------------------------------------\n\t\t// Remove dupe categories\n\t\t//-----------------------------------------\n\t\t\n\t\t$title_id_to_keep = array();\n\t\t$title_id_to_delete = array();\n\t\t$title_deleted_count = 0;\n\t\t\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'conf_settings_titles', 'order' => 'conf_title_id' ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\t\t\n\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\tif ( $title_id_to_keep[ $r['conf_title_title'] ] )\n\t\t\t{\n\t\t\t\t$title_id_to_delete[ $r['conf_title_id'] ] = $r['conf_title_id'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$title_id_to_keep[ $r['conf_title_title'] ] = $r['conf_title_id'];\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( count( $title_id_to_delete ) )\n\t\t{\n\t\t\t$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'conf_settings_titles', 'where' => 'conf_title_id IN ('.implode( ',', $title_id_to_delete ).')' ) );\n\t\t}\n\t\t\n\t\t$title_deleted_count = intval( count($title_id_to_delete) );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Remove dupe settings\n\t\t//-----------------------------------------\n\t\t\n\t\t$setting_id_to_keep = array();\n\t\t$setting_id_to_delete = array();\n\t\t$setting_id_deleted_count = 0;\n\t\t\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'conf_settings', 'order' => 'conf_id' ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\t\t\n\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\tif ( $setting_id_to_keep[ $r['conf_title'].','.$r['conf_key'] ] )\n\t\t\t{\n\t\t\t\t$setting_id_to_delete[ $r['conf_id'] ] = $r['conf_id'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$setting_id_to_keep[ $r['conf_title'].','.$r['conf_key'] ] = $r['conf_id'];\n\t\t\t}\n\t\t}\n\t\n\t\tif ( count( $setting_id_to_delete ) )\n\t\t{\n\t\t\t$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'conf_settings', 'where' => 'conf_id IN ('.implode( ',', $setting_id_to_delete ).')' ) );\n\t\t}\n\t\t\n\t\t$setting_deleted_count = intval( count($setting_id_to_delete) );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Time to move on dude\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->main_msg = \"$title_deleted_count duplicate setting titles deleted and $setting_deleted_count duplicate settings deleted\";\n\t\t$this->tools_splash();\n\t}" ]
[ "0.65141547", "0.6273747", "0.6264055", "0.621475", "0.61659116", "0.6129118", "0.6123116", "0.6086943", "0.605388", "0.6049908", "0.59869903", "0.5985223", "0.5968297", "0.5966881", "0.5920729", "0.5919584", "0.5913836", "0.589093", "0.58699685", "0.5863577", "0.5861227", "0.5850411", "0.5811338", "0.58012384", "0.5784191", "0.57771486", "0.5773685", "0.57526135", "0.5740977", "0.57366806", "0.5715413", "0.5687217", "0.5660787", "0.5638025", "0.5634648", "0.56067234", "0.557771", "0.5575091", "0.5564151", "0.55589664", "0.55422693", "0.5534369", "0.55172384", "0.55106676", "0.5506465", "0.550091", "0.55000424", "0.5494177", "0.54916215", "0.54877186", "0.5485071", "0.5482871", "0.5480326", "0.5479957", "0.54680693", "0.546616", "0.54631895", "0.54608554", "0.54584813", "0.54516214", "0.5446632", "0.5437067", "0.5429088", "0.5426048", "0.5425025", "0.54233265", "0.54205185", "0.54100406", "0.5408651", "0.5407028", "0.540575", "0.5398739", "0.5394759", "0.5394293", "0.5392043", "0.5382117", "0.53817314", "0.5378927", "0.53772837", "0.537375", "0.53684396", "0.5365785", "0.53645355", "0.5349251", "0.53286856", "0.5326789", "0.53257406", "0.5323127", "0.5317856", "0.5315685", "0.5312867", "0.5309468", "0.53082854", "0.5307957", "0.53074986", "0.53010374", "0.53004086", "0.529862", "0.52957916", "0.529454" ]
0.74262786
0
Gets the traits that have been used in the current statement tree.
Получает черты, которые были использованы в текущем дереве выражений.
public function getTraitsUsed() { return $this->traitsUsed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUsedTraits()\n {\n return $this->usedTraits;\n }", "public function getTraits()\n {\n return isset($this->traits) ? $this->traits : null;\n }", "public function traits(): array\n {\n return $this->getRealClass()->getTraitNames();\n }", "public function getTraits(): array {\n\t\treturn $this->traits;\n\t}", "public function getTraits()\n {\n if (!isset($this->declarations['T_TRAIT'])) {\n return [];\n }\n\n return array_keys($this->declarations['T_TRAIT']);\n }", "public function getTraits(): array\n {\n return $this->traits;\n }", "private function calculateTraitMetrics()\n {\n $namespaces = $this->parseCodeResourceForTest();\n\n $analyzer = new CouplingAnalyzer();\n $analyzer->analyze($namespaces);\n\n return $analyzer->getNodeMetrics($namespaces[0]->getTraits()->current());\n }", "protected function getUsedTraitNames(): array\n {\n return [CacheTagsGetterTrait::class];\n }", "private function _getTraitNames() {\n\t\treturn new ImmutableContainer($this->_getAllTraitNames($this->_reflect()));\n\t}", "function Get_declared_traits($param) {\n return \"\";\n }", "public function getTraitsAttribute(): array\n {\n if (array_key_exists('rank', $this->attributes) && $this->attributes['rank'] >= config('chocolatey.minRank')) {\n return ['STAFF'];\n }\n\n return $this->traits;\n }", "private function _getTraits() {\n\t\treturn new ImmutableContainer($this->_getAllTraits($this->_reflect()));\n\t}", "public function getTraitInformation(): array\n {\n $traits = $this->getTraitModels();\n\n return array_map(function(TraitModel $model) {\n return $model->getInformation();\n }, $traits);\n }", "private function trait_uses_recursive($trait) : array\n {\n $traits = class_uses($trait);\n\n foreach ($traits as $trait) {\n $traits += $this->trait_uses_recursive($trait);\n }\n\n return $traits;\n }", "public function getTraitModels(): array\n {\n $traits = $this->visitor->getTraits();\n\n return array_combine(\n array_map(function(TraitModel $model) {\n return $model->getFullyQualifiedNamespace();\n }, $traits), $traits);\n }", "function trait_uses_recursive($trait)\n {\n $traits = class_uses($trait) ?: [];\n\n foreach ($traits as $trait) {\n $traits += trait_uses_recursive($trait);\n }\n\n return $traits;\n }", "function trait_uses_recursive($trait)\n {\n $traits = class_uses($trait) ?: [];\n\n foreach ($traits as $trait) {\n $traits += trait_uses_recursive($trait);\n }\n\n return $traits;\n }", "private function _getUses() {\n\t\t$parser = new PhpParser();\n\t\treturn $parser->parseClass($this->_reflect());\n\t}", "public function getUses()\n {\n return $this->getAllInner($this->getNonWhiteSpaceCode(), '{%use', '%}');\n }", "public function getUseStatements()\n {\n return $this->parseUseStatements();\n }", "public function getUseStatements()\n\t{\n\t\treturn $this->useStatements;\n\t}", "public function getUsedStructures()\n {\n // Check the tokens\n $structures = array();\n for ($i = 0; $i < $this->tokenCount; $i++) {\n // break as soon as we pass a structure keyword as \"use\" imports must be globally\n if ($this->isStructureToken($this->tokens[$i])) {\n break;\n }\n // if we got a use statement\n if ($this->tokens[$i][0] === T_USE) {\n $structure = '';\n for ($j = $i + 1; $j < count($this->tokens); $j++) {\n if ($this->tokens[$j][0] === T_STRING) {\n $structure .= '\\\\' . $this->tokens[$j][1];\n\n } elseif ($this->tokens[$j] === '{' ||\n $this->tokens[$j] === ';' ||\n $this->tokens[$j][0] === T_CURLY_OPEN\n ) {\n $structures[] = $structure;\n break;\n }\n }\n }\n }\n\n // Return what we did or did not found\n return $structures;\n }", "protected function setUpTraits()\n {\n $uses = array_flip(class_uses_recursive(static::class));\n\n if (isset($uses[WithTmpFiles::class])) {\n $this->registerTmpTrait();\n }\n\n return $uses;\n }", "public function getAllContextDefinitions()\n {\n return $this->contexts;\n }", "public static function traitsOf($classOrTrait){\n\t\t$traitsOf = static function($trait) use (&$traitsOf){\n\t\t\t$uses = \\class_uses($trait);\n\t\t\treturn (new \\Yasca\\Core\\IteratorBuilder)\n\t\t\t->from($uses)\n\t\t\t->concat(\n\t\t\t\t(new \\Yasca\\Core\\IteratorBuilder)\n\t\t\t\t->from($uses)\n\t\t\t\t->selectMany($traitsOf)\n\t\t\t);\n\t\t};\n\n\t\treturn (new \\Yasca\\Core\\IteratorBuilder)\n\t\t->from([$classOrTrait])\n\t\t->concat(\\class_parents($classOrTrait))\n\t\t->selectMany($traitsOf);\n\t}", "public function getUsedVariables()\n {\n\tif (!$this->usedVariables) {\n\t // Get the variable names defined in the AST\n\t $usedVarNames = array_map(function ($usedVar) {\n\t\treturn $usedVar->var;\n\t }, $this->getClosureAbstractSyntaxTree()->uses);\n\n\t // Get the variable names and values using reflection\n\t $usedVarValues = $this->reflection->getStaticVariables();\n\n\t // Combine the two arrays to create a canonical hash of variable names and values\n\t $this->usedVariables = array();\n\t foreach ($usedVarNames as $name) {\n\t\tif (isset($usedVarValues[$name])) {\n\t\t $this->usedVariables[$name] = $usedVarValues[$name];\n\t\t}\n\t }\n\t}\n\n\treturn $this->usedVariables;\n }", "public function getFacets()\n {\n return $this->context->getFacets();\n }", "public function getMacros() {\n return $this->macros;\n }", "protected function getUsedTables() : array\n {\n return [ 'roles_rights' ];\n }", "public static function getAllFacilities()\n {\n return self::getByTagtypeName('Facilities');\n }", "public function getClasses() {\r\n\t\treturn $this->ilRoomSharingDatabasePrivileges->getClasses();\r\n\t}", "public function getUses(): array\n {\n return $this->uses;\n }", "public function getUses(): array\n {\n return $this->uses;\n }", "public function getSituations()\n {\n return $this->situations;\n }", "public function getSuitabilities()\n {\n return $this->suitabilities;\n }", "public function getContexts()\n {\n return $this->_contexts;\n }", "public function heroClasses()\n {\n return $this->getGame()->heroClasses();\n }", "public function scopes()\n {\n return $this->scopes;\n }", "protected function getAvailableSectionTypes() {\n $result = [];\n if ($this->group) {\n $result = $this->entityTypeManager\n ->getStorage('living_spaces_section_type')\n ->loadByProperties(['parent' => '']);\n }\n elseif ($this->section) {\n $result = $this->entityTypeManager\n ->getStorage('living_spaces_section_type')\n ->loadByProperties(['parent' => $this->section->bundle()]);\n }\n\n return $result;\n }", "public static function getContextTypes()\n {\n return (array) $GLOBALS['TCA']['tx_contexts_contexts']['contextTypes'];\n }", "public function getContexts()\n {\n return $this->contexts;\n }", "protected function getContexts() {\n\t\treturn $this->contexts;\n\t}", "public function getTrait(): ReflectedTrait\n {\n return $this->trait;\n }", "protected function getUsedTables()\n {\n return [ 'formation' ];\n }", "function getTables() {\n\t\treturn array_keys($this->tables);\n\t}", "public function getExtends() {\n\t\treturn $this->node->extends;\n\t}", "public function getScopes()\n {\n // TODO: Implement getScopes() method.\n }", "public function getMtHs() {\n return $this->mtHs;\n }", "public function getAll() {\n return $this->contexts;\n }", "public function getMembershipTypes() {\n\t\ttry {\n\t\t\treturn Cache::remember('users.getMembershipTypes', Config::get('cache.duration.year'), function() {\n\t\t\t\t$list = [];\n\t\t\t\t$res = Role::whereIn('slug', ['voter', 'candidate'])->orderBy('id')->get();\n\t\t\t\tforeach ($res as $row) {\n\t\t\t\t\t$list[] = $row->toArray();\n\t\t\t\t}\n\n\t\t\t\treturn $list;\n\t\t\t});\n\t\t} catch (Exception $e) {\n\t\t\tlog::error($e);\n\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function getTechnologySet()\n {\n return $this->TechnologySet;\n }", "public function getTStatistics()\n {\n return array_slice($this->regression->getTStatistics(), 1);\n }", "public function getClassements()\n {\n return $this->classements;\n }", "function getImplementations( $thing = null )\n {\n $thing = $this->_stringify( $thing );\n if ( array_key_exists( $thing, $this->_interactions ) )\n {\n return $this->_interactions[ $thing ][ self::IMPLEMENTATIONS ];\n }\n return [];\n }", "public function setTraits($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\Struct::class);\n $this->traits = $var;\n\n return $this;\n }", "public function all_qualification_skill() {\n\t\t$query = $this->db->query(\"SELECT * from xin_module_types where type_of_module='qualification_skill'\");\n\t\treturn $query->result();\n\t}", "public function getStatements()\n {\n return isset($this->Statements) ? $this->Statements : null;\n }", "public function getScopes()\n {\n return $this->allScopes;\n }", "public function getContextTypes()\n {\n return [];\n }", "static public function unitTypes(){\n $tmp = Steam_MeasurementSystem::getInstance();\n return $tmp->unitTypes;\n }", "public function getTypes() {\n\t\treturn $this->getChildren(); // possibly change in future\n\t}", "function get_traits($class)\n {\n if ( ! is_string($class)) {\n $class = get_class($class);\n }\n\n foreach (class_uses_recursive($class) as $trait) {\n yield class_basename($trait);\n }\n }", "public function getAvailScopes()\n {\n return $this->listPublicMethods('#scope([a-zA-Z]+)#');\n }", "public function classes()\n {\n return $this->classes;\n }", "public function getTables()\n {\n return($this->tables);\n }", "function getUsedTable() {\n return $this->table;\n }", "public function getTauxHs() {\n return $this->tauxHs;\n }", "public function abilities()\n {\n return $this->roles->map->abilities->flatten()->pluck('name')->unique();\n }", "public function scopes() {\n return array(\n 'withRelated' => array(\n 'with' => array(\n 'effect' => array(\n 'alias' => 'characterEffectsEffect' . self::getScopeCounter(),\n 'scopes' => 'withRelated'\n ),\n )\n )\n );\n }", "public function getScopes();", "public function getScopes();", "public function classes() {\n return $this->classes;\n }", "public function classes() {\n return $this->classes;\n }", "public function getScopes() {\n return $this->scopes;\n }", "public function getScopes()\n {\n return $this->scopes;\n }", "public function getScopes()\n {\n return $this->scopes;\n }", "public function getScopes()\n {\n return $this->scopes;\n }", "public function getScopes()\n {\n return $this->scopes;\n }", "public function getScopes()\n {\n return $this->scopes;\n }", "public function getScopes()\n {\n return $this->scopes;\n }", "public function getScopes()\n {\n return $this->scopes;\n }", "public function getScopes()\n {\n return $this->scopes;\n }", "public function getClassTags() {\n $tags = array();\n $refl = new \\ReflectionClass(get_called_class());\n $matches = array();\n $comment = $refl->getDocComment();\n preg_match('/@tags (.+)/', $comment, $matches);\n if(count($matches) > 1) {\n $tags = array_map('trim', explode(',', $matches[1]));\n }\n return $tags;\n }", "public static function getAllTechniques()\n {\n return self::getByTagtypeName('Techniques');\n }", "public function getScopes()\n\t{\n\t\treturn $this->scopes;\n\t}", "public function getScopes()\n {\n\n return $this->scopes;\n }", "function getTables()\n\t{\n\t\treturn $this->tables;\n\t}", "public function getTables()\n {\n return $this->_tables;\n }", "public function getSpecifications() {\n return $this->specif;\n }", "public function getskills(){\n\t\treturn $this->_skills;\n\t}", "public static function get_columns()\n\t{\n\t\t$class = get_called_class();\n\t\t$variables = get_class_vars($class);\n\t\treturn array_keys($variables);\n\t}", "public function getAllUsedTags();", "public function getExtends()\n {\n return trim(trim($this->getOneInner($this->getNonWhiteSpaceCode(), '{%extends', '%}'), \"'\"), '\"');\n }", "function getICCTags() {\n\t\treturn $this->m_iccTags;\n\t}", "public function getTables()\n {\n return $this->tables;\n }", "public function getTables()\n {\n return $this->tables;\n }", "public function getTables()\n {\n return $this->tables;\n }", "public function getExtends()\n {\n return $this->extends;\n }", "public function abilities()\n {\n // Eloquent reletionship\n return $this->roles\n ->map->abilities\n ->flatten()->pluck('name')->unique();\n }", "public function getTables() {\n return $this->tables;\n }" ]
[ "0.7149085", "0.69870394", "0.66478986", "0.6564809", "0.649433", "0.64754426", "0.6003822", "0.58499444", "0.57289314", "0.5683291", "0.5655966", "0.5525178", "0.5461697", "0.5445843", "0.54382765", "0.5407751", "0.5407751", "0.5236835", "0.5216404", "0.5056084", "0.50218034", "0.4899622", "0.48250338", "0.4814868", "0.47840726", "0.47656682", "0.47242862", "0.47155553", "0.47153988", "0.46784317", "0.46747616", "0.4659201", "0.4659201", "0.464829", "0.4645197", "0.4644224", "0.464368", "0.46413893", "0.46413076", "0.46328244", "0.46322182", "0.4628153", "0.46168685", "0.46113095", "0.46086466", "0.4608344", "0.46061552", "0.46052057", "0.459533", "0.4580038", "0.45689678", "0.45589042", "0.45419472", "0.45358592", "0.45322198", "0.453064", "0.45197472", "0.4519435", "0.45043275", "0.45024532", "0.4499629", "0.44932014", "0.44906712", "0.44902638", "0.4488981", "0.44878927", "0.44866833", "0.4485304", "0.447807", "0.44693112", "0.44693112", "0.44665673", "0.44665673", "0.44657323", "0.44586527", "0.44586527", "0.44586527", "0.44586527", "0.44586527", "0.44586527", "0.44586527", "0.44586527", "0.4453787", "0.44523698", "0.44520867", "0.44506195", "0.4447086", "0.44389665", "0.44368923", "0.44346568", "0.4432497", "0.44305077", "0.4428011", "0.44266826", "0.44239894", "0.44239894", "0.44239894", "0.44230586", "0.4420557", "0.44170767" ]
0.7340137
0
Creates the items added by createCalendarItems_addItem
Создает элементы, добавленные createCalendarItems_addItem
public function createCalendarItems() { if(!$this->have_started_createItem) { $this->createCalenderItems_shutdown(); throw new Exception ('No items added.'); } if(count($this->CreateItem->Items->CalendarItem) == 0) { $this->createCalenderItems_shutdown(); throw new Exception ('No items added.'); } $result = $this->client->CreateItem($this->CreateItem); // < $this->client holds SOAP-client object if(count($this->CreateItem->Items->CalendarItem) > 1) { $ids = array(); foreach($result->ResponseMessages->CreateItemResponseMessage as $i => $response) { if($response->ResponseClass == 'Success') { // Returning the id/changekey for each item $ids[$i] = array( 'Id' => $response->Items->CalendarItem->ItemId->Id, 'ChangeKey' => $response->Items->CalendarItem->ItemId->ChangeKey, ); } else { // If there is no success, return null printout('Item '.$i.' failed creation: '.print_r($response, true)); $ids[$i] = array( 'Id' => null, 'ResponseMessage' => $response ); } } $this->createCalenderItems_shutdown(); return $ids; } if ( $result->ResponseMessages->CreateItemResponseMessage->ResponseClass == 'Success' ) { // Returning the id/changekey in an array with only one item $this->createCalenderItems_shutdown(); return array(0 => array( 'Id' => $result->ResponseMessages->CreateItemResponseMessage->Items->CalendarItem->ItemId->Id, 'ChangeKey' => $result->ResponseMessages->CreateItemResponseMessage->Items->CalendarItem->ItemId->ChangeKey, ) ); } else { // Return null $this->createCalenderItems_shutdown(); return array(0 => array( 'Id' => null, 'ResponseMessage' => $result->ResponseMessages->CreateItemResponseMessage )); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createCalendarItems_addItem($title, $text, $start, $end, $options, $primary_emailaddress = null)\n\t{\n\t\tif(!$this->have_started_createItem)\n\t\t\t$this->createCalendarItems_startup($primary_emailaddress);\n\t\tif(!is_array($options))\n\t\t\tthrow new Exception('Options must be array');\n\t\t\n\t\t$i = count($this->CreateItem->Items->CalendarItem);\n\t\t\n\t\t$this->CreateItem->Items->CalendarItem[$i] = new stdClass();\n\t\t\n\t\t$this->CreateItem->Items->CalendarItem[$i]->Subject = $title;\n\t\t\n\t\t$this->CreateItem->Items->CalendarItem[$i]->Start = $start; # ISO date format. Z denotes UTC time\n\t\t$this->CreateItem->Items->CalendarItem[$i]->End = $end;\n\t\t\n\t\t$this->CreateItem->Items->CalendarItem[$i]->Body['_'] = $text; \n\t\t$this->CreateItem->Items->CalendarItem[$i]->Body['BodyType']=\"Text\";\n\t\t\n\t\tforeach($options as $option => $value)\n\t\t{\n\t\t\tif(in_array($option,$this->calendaritem_valid_options))\n\t\t\t{\n\t\t\t\t$this->CreateItem->Items->CalendarItem[$i]->{$option} = $value;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//$this->CreateItem->Items->CalendarItem[$i]->RequiredAttendees->Attendee[]->Mailbox->EmailAddress = 'hn@jaermuseet.no';\n\t\t//$this->CreateItem->Items->CalendarItem[$i]->RequiredAttendees->Attendee[]->Mailbox->EmailAddress = 'runar.sandsmark@jaermuseet.no';\n\t\t\n\t\treturn $i;\n\t}", "function createItem();", "public function createItem();", "protected function createCalendarItems_startup ($primary_emailaddress = null)\n\t{\n\t\t$this->CreateItem = new stdClass();\n\t\t$this->CreateItem->SavedItemFolderId = new stdClass();\n\t\t$this->CreateItem->SavedItemFolderId->DistinguishedFolderId = new stdClass();\n\t\t$this->CreateItem->SavedItemFolderId->DistinguishedFolderId->Mailbox = new stdClass();\n\t\t$this->CreateItem->Items = new stdClass();\n\t\t\n\t\t$this->CreateItem->SavedItemFolderId->DistinguishedFolderId->Id = 'calendar';\n\t\tif(!is_null($primary_emailaddress))\n\t\t{\n\t\t\t$this->CreateItem->SavedItemFolderId->DistinguishedFolderId->Mailbox->EmailAddress = $primary_emailaddress;\n\t\t}\n\t\t$this->CreateItem->Items->CalendarItem = array();\n\t\t$this->CreateItem->SendMeetingInvitations = \"SendToNone\";\n\t\t\n\t\t$this->have_started_createItem = true;\n\t}", "public function createItem()\n {\n // TODO: Implement createItem() method.\n }", "function createItem($calendarId, $createdBy, $name, $note, $reminder, $type, $colour, $location, $options) {\n\tglobal $conn;\n\n\t$item_inserted = false; // return value\n\n\t// Fix input\n\t$name = trim($name);\n\t$note = trim($note);\n\n\t$item_stmt = mysqli_prepare($conn, \"INSERT INTO Items VALUES(0, ?, ?, NOW(), ?, ?, ?, ?, ?, ?);\");\n\tmysqli_stmt_bind_param($item_stmt, \"issssiss\", $calendarId, $name, $note, $reminder, $type, $createdBy, $location, $colour);\n\tmysqli_stmt_execute($item_stmt);\n\n\t$item_affected_rows = mysqli_stmt_affected_rows($item_stmt);\n\n\t// Get inserted item's itemId (for adding Event or Task, if applicable)\n\t$item_id = mysqli_insert_id($conn);\n\tmysqli_stmt_close($item_stmt); // close statement\n\n\t$item_inserted = $item_inserted || ($item_affected_rows > 0);\n\n\t// Return if item insert fails\n\tif (!$item_inserted) return false;\n\n\t// Handle insert Item Subclass (Event/Task)\n\t$affected_rows = 0;\n\tswitch($type) {\n\t\tcase \"event\":\n\t\t\t$start_date = $options[\"start_date\"];\n\t\t\t$end_date = $options[\"end_date\"];\n\n\t\t\t$stmt = mysqli_prepare($conn, \"INSERT INTO EventItems VALUES(?, ?, ?);\");\n\t\t\tmysqli_stmt_bind_param($stmt, \"iss\", $item_id, $start_date, $end_date);\n\t\t\tmysqli_stmt_execute($stmt);\n\n\t\t\t$affected_rows = mysqli_stmt_affected_rows($stmt);\n\n\t\t\tmysqli_stmt_close($stmt); // close statement\n\n\t\t\tbreak;\n\t\tcase \"task\":\n\t\t\t$due_date = $options['due_date'];\n\t\t\t$completion_date = $options['completion_date'];\n\n\t\t\t$stmt = mysqli_prepare($conn, \"INSERT INTO TaskItems VALUES(?, ?, ?);\");\n\t\t\tmysqli_stmt_bind_param($stmt, \"iss\", $item_id, $due_date, $completion_date);\n\t\t\tmysqli_stmt_execute($stmt);\n\n\t\t\t$affected_rows = mysqli_stmt_affected_rows($stmt);\n\n\t\t\tmysqli_stmt_close($stmt); // close statement\n\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t// if item is a reminder or note, then return here\n\t\t\treturn $item_inserted;\n\t}\n\n\t// this is for testing only, to be deleted -----------------\n\tif ($affected_rows > 0) {\n\t\t// echo \"Added Event or Task\";\n\t} else {\n\t\t// echo \"Cannot add Event or Task\";\n\t}\n\t// ---------------------------------------------------------\n\n\t$item_inserted = $item_inserted || ($affected_rows > 0);\n\n\treturn $item_inserted;\n}", "function action_createitem() {\n global $member, $manager;\n\n $blogid = intRequestVar('blogid');\n\n // check if allowed\n $member->teamRights($blogid) or $this->disallow();\n\n $memberid = $member->getID();\n\n $blog =& $manager->getBlog($blogid);\n\n $this->pagehead();\n\n // generate the add-item form\n $formfactory = new PAGEFACTORY($blogid);\n $formfactory->createAddForm('admin');\n\n $this->pagefoot();\n }", "protected function create_items ( $request ) {\n\t\t\t$request->item = array();\n\t\t\t$i = 0;\n\t\t\tforeach ( $this->items as $item ) {\n\t\t\t\t$it = new \\stdClass();\n\t\t\t\t$it->unitPrice = $item['unitPrice'];\n\t\t\t\t$it->quantity = $item['quantity'];\n\t\t\t\t$it->id = $i;\n\t\t\t\t\n\t\t\t\t$request->item[] = $it;\n\t\t\t\t\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t\n\t\t\treturn $request;\n\t\t\t\n\t\t}", "function ItemsForm_AddItem()\n {\n $newitem=$this->ItemsForm_CGI2AddItem();\n\n $add=TRUE;\n $add=$add && $this->ItemsForm_AddItemMissingData($newitem);\n $add=$add && $this->ItemsForm_AddItemTestUniqueData($newitem);\n\n if ($add)\n {\n $this->MySqlInsertItem(\"\",$newitem);\n $newitem=$this->MyMod_Item_PostProcess($newitem);\n\n $this->ItemsForm_ItemAdded=TRUE;\n array_push($this->Args[ \"Items\" ],$newitem);\n }\n }", "public function create()\n\t{\n\t\t$this->auth->restrict('Items.Resources.Create');\n\n\t\tif (isset($_POST['save']))\n\t\t{\n\t\t\tif ($insert_id = $this->save_items())\n\t\t\t{\n\t\t\t\t// Log the activity\n\t\t\t\tlog_activity($this->current_user->id, lang('items_act_create_record') .': '. $insert_id .' : '. $this->input->ip_address(), 'items');\n\n\t\t\t\tTemplate::set_message(lang('items_create_success'), 'success');\n\t\t\t\tredirect(SITE_AREA .'/resources/items');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tTemplate::set_message(lang('items_create_failure') . $this->items_model->error, 'error');\n\t\t\t}\n\t\t}\n\t\tAssets::add_module_js('items', 'items.js');\n\n\t\tTemplate::set('toolbar_title', lang('items_create') . ' Items');\n Template::set_view('resources/edit');\n\t\tTemplate::render();\n\t}", "function meeting_agenda_items_template_add() {\n // Use standard meeting form, which will be altered later\n return meeting_agenda_items_add('template~0');\n}", "public function createeventAction(){\n $this->_helper->layout->disableLayout(); \n $lists = $this->current_user->findModel_DbTable_ListViaModel_DbTable_UserHasListByUserAndList();\n $items = array();\n $event = new Model_DbTable_Event();\n $inst_list = new Model_DbTable_List();\n foreach($lists as $list){\n $items[] = $inst_list->getItems($list,$event->Model_id);\n }\n \n $events = array();\n foreach ($items as $item_tmp){\n foreach($item_tmp as $item){\n if(is_array($item)){\n $events[] = $item;\n }\n }\n }\n $this->view->events = $events;\n\t}", "public function createItem($items){\n if(is_array($items)){\n return $this->items->writeItems($items);\n } else {\n return $this->items->writeItems([$item]);\n }\n }", "public function createItem(array $item_data, $group_id);", "public function addItems($items)\n {\n foreach($items as $item)\n {\n\n if (! isset($item['id']))\n continue;\n\n $value = isset($item['value']) ? $item['value'] : '';\n $itemObj = new Item();\n $itemObj->item_id = $item['id'];\n $itemObj->value = $value;\n\n if (isset($item['order']))\n $itemObj->list_order = $item['order'];\n\n $this->items[] = $itemObj;\n\n }\n if (count($items) > 0)\n {\n $this->setStatus('preparing', true, false);\n $this->setStatus('finished', false, false); // can't be finished when adding items.\n }\n }", "public function testFedoraObjectCreationOnItemAdd()\n {\n\n // Capture starting count.\n $count = $this->objectsTable->count();\n\n // Set exhibit id.\n $this->request->setMethod('POST')\n ->setPost(array(\n 'public' => 1,\n 'featured' => 0,\n 'Elements' => array(),\n 'order' => array(),\n 'tags' => '',\n 'server' => 1,\n 'pid' => 'pid:test',\n 'dsids' => array('DC', 'content'),\n 'import' => 0,\n 'csrf_token' => $this->_getCsrfToken()\n )\n );\n\n // Hit item edit.\n $this->dispatch('items/add');\n\n // +1 editions.\n $this->assertEquals($this->objectsTable->count(), $count+1);\n\n // Get out service and check.\n $object = $this->_getLastRow($this->objectsTable);\n $this->assertEquals($object->server_id, 1);\n $this->assertEquals($object->pid, 'pid:test');\n $this->assertEquals($object->dsids, 'DC,content');\n\n }", "public function createInvoiceItems() {\n\n \t\t$firstItem = new invoiceItem();\n \t\t$secondItem = new invoiceItem();\n \t\t$thirdItem = new invoiceItem();\n\n\n \t\t$invoiceItems[] = $firstItem;\n \t\t$invoiceItems[] = $secondItem;\n \t\t$invoiceItems[] = $thirdItem;\n\n \t\t$firstItem->setItemID('1');\n \t\t$firstItem->setItemQuantity('6');\n \t\t$firstItem->setItemPrice('1200.99');\n \t\t$firstItem->setItemDescription('Macbook Pro');\n\n \t\t$secondItem->setItemID('2');\n \t\t$secondItem->setItemQuantity('2');\n \t\t$secondItem->setItemPrice('799.99');\n \t\t$secondItem->setItemDescription('HTC Vive');\n\n \t\t$thirdItem->setItemID('3');\n \t\t$thirdItem->setItemQuantity('13');\n \t\t$thirdItem->setItemPrice('79.99');\n \t\t$thirdItem->setItemDescription('SNES Classic');\n\n $this->invoice->setInvoiceItems($invoiceItems); \n \t}", "public function createItem(array $data);", "protected function add_calendar() {\n\t\t// Create an instance of calendar in order to check if it already exists, and only if not add the new one\n\t\t$calendar_obj = new Calendar();\n\n\t\t// Check if calendar was correctly created.\n\t\tif(!$calendar_obj -> exists($this -> f3 -> get('POST.categoria'))) {\n\n\t\t\t$calendar_obj = new Calendar(array(\n\t\t\t\t'categoria' => $this -> f3 -> get('POST.categoria'),\n\t\t\t\t'categorias_por_serie' => $this -> f3 -> get('POST.equipas_por_serie')\n\t\t\t));\n\t\t\t$this -> f3 -> set('message_code', 92);\n\t\t} else {\n\t\t\t$this -> f3 -> set('message_code', 93);\n\t\t}\n\t}", "function addCalendar() {\n $dialog = $this->_getCalendarDialog();\n $this->layout->add($dialog->getDialogXML());\n $this->layout->addLeft($this->_getPublicCalendarsList());\n $this->layout->addLeft($this->_getRecommendedEventsList());\n }", "public function createItemMultiple(array $items);", "function ItemsForm_CGI2AddItem()\n {\n $newitem=$this->Args[ \"AddItem\" ];\n foreach ($this->Args[ \"AddDatas\" ] as $data)\n {\n $newitem[ $data ]=$this->GetPOST(\"Add_\".$data);\n }\n\n return $newitem;\n }", "function addEventItem() {\r\n\t\t# Record Event\r\n\t\t$event = new \\Event\\Item();\r\n\t\t$event->add(\r\n\t\t\t\"MonitorAsset\",\r\n\t\t\t[\t\"code\" => uniqid(),\r\n\t\t\t\t\"timestamp\" => date(\"c\"),\r\n\t\t\t\t\"user\" => $GLOBALS['_SESSION_']->customer->code,\r\n\t\t\t\t\"description\" => \"Test Event Created\",\r\n\t\t\t]\r\n\t\t);\r\n\t\tif ($event->error) {\r\n\t\t\tapp_log(\"Failed to add change to history: \".$event->error,'error',__FILE__,__LINE__);\r\n\t\t}\r\n\r\n\t\t$response = new \\HTTP\\Response();\r\n\t\t$response->success = 1;\r\n\t\t$response->role = $result;\r\n\r\n\t\theader('Content-Type: application/xml');\r\n\t\tprint XMLout($response);\r\n\t}", "public function __construct()\n {\n $this->calendarItems = array();\n }", "function action_additem() {\n global $manager, $CONF;\n\n $manager->loadClass('ITEM');\n\n $result = ITEM::createFromRequest();\n\n if ($result['status'] == 'error')\n $this->error($result['message']);\n\n $blogid = getBlogIDFromItemID($result['itemid']);\n $blog =& $manager->getBlog($blogid);\n $btimestamp = $blog->getCorrectTime();\n $item = $manager->getItem(intval($result['itemid']), 1, 1);\n\n if ($result['status'] == 'newcategory') {\n $distURI = $manager->addTicketToUrl($CONF['AdminURL'] . 'index.php?action=itemList&blogid=' . intval($blogid));\n $this->action_categoryedit($result['catid'], $blogid, $distURI);\n } else {\n $methodName = 'action_itemList';\n call_user_func(array($this, $methodName), $blogid);\n }\n }", "abstract protected function buildItemsList();", "function additem()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '新增单品活动';\n $this->global['pageName'] = 'single_activity_add';\n $this->global['typelist'] = $this->product_util_model->getProductTypeList();\n\n if (empty($_POST)) {\n $data['empty'] = NULL;\n $data['start_time'] = date('Y-m-d H:i', strtotime(\"5 minutes\"));\n $data['end_time'] = date('Y-m-d H:i', strtotime(\"2 days\"));\n\n $this->loadViews(\"activity_manage/single_activity_add\", $this->global, $data, NULL);\n } else {\n $this->item_validate();\n }\n }\n }", "function as_new_item(){\n\t\t$database = new As_Dbconn();\t\t\t\n\t\t$New_Item_Details = array(\n\t\t\t'item_name' => trim($_POST['name']),\n\t\t\t'item_code' => trim($_POST['code']),\n\t\t\t'item_description' => trim($_POST['description']),\n\t\t\t'item_unit' => trim($_POST['unit']),\n\t\t\t'item_created' => date('Y-m-d H:i:s'),\n\t\t);\n\t\t\t\n\t\t$add_query = $database->as_insert( 'as_item', $New_Item_Details ); \n\t}", "public function create()\n\t{\n\t\t$this->_validate_input();\n\n\t\tif ($this->form_validation->run())\n\t\t{\n\t\t\t$employee = $this->wildfire->find('employee', $this->session->userdata('employee_id'));\n\t\t\t$this->item->set_employee_id($employee);\n\n\t\t\t$this->item->set_description($this->input->post('description'));\n\t\t\t$this->item->set_datetime_created('now');\n\n\t\t\t$this->item->save();\n\n\t\t\t$this->session->set_flashdata('notification', 'The item has been created successfully!');\n\t\t\t$this->session->set_flashdata('alert', 'success');\n\n\t\t\tredirect('items');\n\t\t}\n\n\t\t$data = array();\n\t\t$data['employees'] = $this->wildfire->get_all('employee')->as_dropdown('name');\n\n\t\t$this->load->view('items/create', $data);\n\t}", "public function create(&$item)\n {\n }", "protected function generateItems()\n {\n list($pids, $lastModifiedField, $sortField) = $this->getConfigFields();\n\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)\n ->getQueryBuilderForTable($this->table);\n\n $constraints = [];\n\n // Site language\n $this->addLanguageConstraint($constraints, $queryBuilder);\n\n // Storage\n $this->addPidsConstraint($pids, $constraints, $queryBuilder);\n\n // Additional where\n $this->addAdditionalWhereConstraint($constraints);\n\n // Do query\n $queryBuilder->select('*')\n ->from($this->table);\n\n if (!empty($constraints)) {\n $queryBuilder->where(\n ...$constraints\n );\n }\n\n $rows = $queryBuilder->orderBy($sortField)\n ->execute()\n ->fetchAll();\n\n foreach ($rows as $row) {\n $this->items[] = [\n 'data' => $row,\n 'lastMod' => (int)$row[$lastModifiedField]\n ];\n }\n }", "function addItems($a_nr)\n\t{\n\t\tfor ($i=1; $i<=$a_nr; $i++)\n\t\t{\n\t\t\t$new_item =& $this->dom->create_element(\"ListItem\");\n\t\t\t$new_item =& $this->list_node->append_child($new_item);\n\t\t}\n\t}", "protected function createCalenderItems_shutdown()\n\t{\n\t\tunset($this->CreateItem);\n\t\t$this->have_started_createItem = false;\n\t}", "protected function createItems($itemtype, $params = []) {\n $this->initEndpoint();\n $itemtype = $this->handleDepreciation($itemtype);\n\n $input = isset($params['input']) ? $params[\"input\"] : null;\n $item = new $itemtype;\n\n if (is_object($input)) {\n $input = [$input];\n $isMultiple = false;\n } else {\n $isMultiple = true;\n }\n\n if ($this->isDeprecated()) {\n $input = array_map(function($item) {\n return $this->deprecated_item->mapDeprecatedToCurrentFields($item);\n }, $input);\n }\n\n if (is_array($input)) {\n $idCollection = [];\n $failed = 0;\n $index = 0;\n foreach ($input as $object) {\n $object = self::inputObjectToArray($object);\n $current_res = [];\n\n //check rights\n if (!$item->can(-1, CREATE, $object)) {\n $failed++;\n $current_res = ['id' => false,\n 'message' => __(\"You don't have permission to perform this action.\")];\n } else {\n // add missing entity\n if (!isset($object['entities_id'])) {\n $object['entities_id'] = $_SESSION['glpiactive_entity'];\n }\n\n // add an entry to match gui post (which contains submit button)\n // to force having messages after redirect\n $object[\"_add\"] = true;\n\n //add current item\n $object = Toolbox::sanitize($object);\n $new_id = $item->add($object);\n if ($new_id === false) {\n $failed++;\n }\n $current_res = ['id' => $new_id,\n 'message' => $this->getGlpiLastMessage()];\n }\n\n // attach fileupload answer\n if (isset($params['upload_result'])\n && isset($params['upload_result'][$index])) {\n $current_res['upload_result'] = $params['upload_result'][$index];\n }\n\n // append current result to final collection\n $idCollection[] = $current_res;\n $index++;\n }\n\n if ($isMultiple) {\n if ($failed == count($input)) {\n $this->returnError($idCollection, 400, \"ERROR_GLPI_ADD\", false);\n } else if ($failed > 0) {\n $this->returnError($idCollection, 207, \"ERROR_GLPI_PARTIAL_ADD\", false);\n }\n } else {\n if ($failed > 0) {\n $this->returnError($idCollection[0]['message'], 400, \"ERROR_GLPI_ADD\", false);\n } else {\n return $idCollection[0];\n }\n }\n return $idCollection;\n\n } else {\n $this->messageBadArrayError();\n }\n }", "public function create_item($args, $assoc_args)\n {\n }", "function AddFormItem() {\n }", "public function add($itemToAdd);", "public function create()\n {\n $item = $this->repo->newInstance();\n\n // TODO: repositorio de este asunto\n $subCats = $this->repo->getSubCatsLists();\n $makers = Maker::lists('desc', 'id');\n $itemTypes = ItemType::lists('desc', 'id');\n $stockTypes = StockType::lists('desc', 'id');\n\n return $this->view->make(\n 'items.create',\n compact('item', 'subCats', 'makers', 'itemTypes', 'stockTypes')\n );\n }", "public function actionCreate()\n {\n\n if (!$this->canManageCalendar()) {\n throw new HttpException(403, Yii::t('CalendarExtensionModule.permissions', 'You are not allowed to manage External Calendar!'));\n }\n\n $model = new CalendarExtensionCalendar();\n// $model->title = Yii::$app->request->get('title');\n// $model->scenario = 'create';\n\n $model->content->setContainer($this->contentContainer);\n// $model->content->visibility = ($model->load(Yii::$app->request->post('public'))) ? Content::VISIBILITY_PUBLIC : Content::VISIBILITY_PRIVATE ;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n try {\n // load ical and parse it\n $ical = new ICal($model->url, array(\n 'defaultTimeZone' => Yii::$app->timeZone,\n ));\n // add info to CalendarModel\n $model->addAttributes($ical);\n $model->save();\n } catch (\\Exception $e) {\n return $this->render('create', [\n 'model' => $model,\n 'message' => $e,\n 'contentContainer' => $this->contentContainer\n ]);\n }\n $model->content->visibility = ($model->public) ? Content::VISIBILITY_PUBLIC : Content::VISIBILITY_PRIVATE ;\n $model->save();\n return $this->redirect($this->contentContainer->createUrl('view', array('id' => $model->id)));\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'contentContainer' => $this->contentContainer\n ]);\n }\n }", "public function action_create()\n\t{\n\t\t$item = RDFORM::factory('item');\n\t\t$item->load_from_array($_POST);\n\t\t$item->save();\n\t\t\n\t\tif ($item->saved)\n\t\t{\n\t\t\t$data['flash'] = Kohana::message('item_created');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['flash'] = Kohana::message('error_creating_item');\n\t\t\t$data['errors'] = $item->validation_errors;\n\t\t}\n\t\t\n\t\t$this->template->data = $data;\n\t}", "abstract protected function buildItems(): array;", "public function pushItems(): void;", "public function create()\n\t{\n\t\t$data = array();\n\t\t$data['budgets'] = Budget::getList();\n\t\t$data['services'] = Service::getList();\n\t\treturn View::make('items.create', $data);\n\t}", "public function create(Request $request)\n {\n request()->validate(Calendar::$rules);\n\n foreach ($request->input('inventory_id') as $inventory_id) {\n $data = [\n 'user_id' => $request->input('user_id'),\n 'inventory_id' => $inventory_id,\n 'start' => $request->input('start'),\n 'end' => $request->input('end'),\n 'startHour' => $request->input('startHour'),\n 'endHour' => $request->input('endHour'),\n ];\n\n Calendar::create($data);\n }\n }", "function meeting_agenda_items_add() {\n //orgright_debug_msg('meeting','Fn: meeting_agenda_items_add',6);\n // First get an array of any arguments passed to this function\n $args = func_get_args();\n // Create a new node data structure of the correct type\n $node = orgright_create_node('agenda_item');\n // Set the page title to display\n drupal_set_title(t('Create Agenda Item'));\n // Load the required include file\n module_load_include('inc', 'node', 'node.pages');\n // then call the form constructor function\n $output = drupal_get_form('agenda_item_node_form', $node, $args);\n // and return results\n // Set page breadcrumb\n orgright_breadcrumb(array(t('Meeting') => 'meeting'));\n return $output;\n}", "function as_add_new_schedule(){\n\t\t$database = new As_Dbconn();\t\t\t\n\t\t$New_Item_Details = array(\n\t\t\t'schedule_type' => trim($_POST['type']),\n\t\t\t'schedule_worker' => trim($_POST['workerid']),\n\t\t\t'schedule_day' => trim($_POST['day']),\n\t\t\t'schedule_starttime' => trim($_POST['starttime']),\n\t\t\t'schedule_stoptime' => trim($_POST['stoptime']),\n\t\t\t'schedule_place' => trim($_POST['place']),\n\t\t 'schedule_created' => date('Y-m-d H:i:s'),\n\t\t 'schedule_createdby' => \"1\",\n\t\t);\n\t\t\t\n\t\t$add_query = $database->as_insert( 'as_schedule', $New_Item_Details ); \n\t}", "public function addAll($items);", "public function createItem($item){\n $createItemJson = json_encode(array('items'=>array($item->newItemObject())));;\n //libZoteroDebug( $createItemJson );die;\n $aparams = array('target'=>'items');\n $reqUrl = $this->apiRequestUrl($aparams) . $this->apiQueryString($aparams);\n $response = $this->_request($reqUrl, 'POST', $createItemJson);\n return $response;\n }", "public function add_item(CreateFulfillmentOrderItem $item)\n {\n $key = (string)(count($this->items) + 1);\n $this->items[$key] = $item;\n }", "public function addItems($items) {\n\t\tforeach ($items as $item) {\n\t\t\t$this->_items[] = $item;\n\t\t}\n\t}", "function AddItem($item) {\n\t\t$this->ItemData[] = $item;\n\t}", "function addEvent() {\n $dialog = $this->_getEventDialog('Add Event');\n $this->layout->add($dialog->getDialogXML());\n $this->layout->addLeft($this->_getPublicCalendarsList());\n $this->layout->addLeft($this->_getRecommendedEventsList());\n }", "protected function processItems() {\n $this->SetPostingsToEmpty();\n\n //process the actual data\n $items = htmlqp($this->GetRequestData(), '#tudevent_box', $this->overrideEncoding())->find('.portletContent');\n foreach ($items as $item) {\n if ($item->children('.tudeventlist-eventdate')->count() == 1 and $item->children('.tudeventlist-linkedtext')->count() == 1) {\n $date = $item->children('.tudeventlist-eventdate')->text();\n $date = $this->convertDate($date);\n $link = $item->children('.tudeventlist-linkedtext')->children('a')->attr('href');\n $text = $item->children('.tudeventlist-linkedtext')->text();\n $text = $this->tidyText($this->prependText($text));\n\n //TODO feature enhancement: we could determine the author via subsequent calls to the linked calendar entries.\n //but since we are not printing the author anyways, this is currently not implemented\n $author = \"n/a\";\n $this->AppendToPostings($date, $author, $text, $link);\n }\n }\n }", "public function addToolbarItems() {\n\t\t\tif ( !defined( 'TRIBE_DISABLE_TOOLBAR_ITEMS' ) || !TRIBE_DISABLE_TOOLBAR_ITEMS ) {\n\t\t\t\tglobal $wp_admin_bar;\n\t\t\t\t\n\t\t\t\t$wp_admin_bar->add_menu( array(\n\t\t\t\t\t'id' => 'tribe-events',\n\t\t\t\t\t'title' => __( 'Events', 'tribe-events-calendar' ),\n\t\t\t\t\t'href' => $this->getLink( 'home' )\n\t\t\t\t) );\n\t\t\t\t\n\t\t\t\t$wp_admin_bar->add_group( array(\n\t\t\t\t\t'id' => 'tribe-events-group',\n\t\t\t\t\t'parent' => 'tribe-events'\n\t\t\t\t) );\n\t\t\t\t\n\t\t\t\t$wp_admin_bar->add_group( array(\n\t\t\t\t\t'id' => 'tribe-events-add-ons-group',\n\t\t\t\t\t'parent' => 'tribe-events'\n\t\t\t\t) );\n\t\t\t\t\n\t\t\t\t$wp_admin_bar->add_group( array(\n\t\t\t\t\t'id' => 'tribe-events-settings-group',\n\t\t\t\t\t'parent' => 'tribe-events'\n\t\t\t\t) );\n\t\t\t\t\n\t\t\t\t$wp_admin_bar->add_group( array(\n\t\t\t\t\t'id' => 'tribe-events-import-group',\n\t\t\t\t\t'parent' => 'tribe-events-add-ons-group'\n\t\t\t\t) );\n\t\t\t\t\n\t\t\t\t$wp_admin_bar->add_menu( array(\n\t\t\t\t\t'id' => 'tribe-events-view-calendar',\n\t\t\t\t\t'title' => __( 'View Calendar', 'tribe-events-calendar' ),\n\t\t\t\t\t'href' => $this->getLink( 'home' ),\n\t\t\t\t\t'parent' => 'tribe-events-group'\n\t\t\t\t) );\n\t\t\t\t\n\t\t\t\tif( current_user_can( 'edit_tribe_events' ) ) {\n\t\t\t\t\t$wp_admin_bar->add_menu( array(\n\t\t\t\t\t\t'id' => 'tribe-events-add-event',\n\t\t\t\t\t\t'title' => __( 'Add Event', 'tribe-events-calendar' ),\n\t\t\t\t\t\t'href' => trailingslashit( get_admin_url() ) . 'post-new.php?post_type=' . self::POSTTYPE,\n\t\t\t\t\t\t'parent' => 'tribe-events-group'\n\t\t\t\t\t) );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif( current_user_can( 'edit_tribe_events' ) ) {\n\t\t\t\t\t$wp_admin_bar->add_menu( array(\n\t\t\t\t\t\t'id' => 'tribe-events-edit-events',\n\t\t\t\t\t\t'title' => __( 'Edit Events', 'tribe-events-calendar' ),\n\t\t\t\t\t\t'href' => trailingslashit( get_admin_url() ) . 'edit.php?post_type=' . self::POSTTYPE,\n\t\t\t\t\t\t'parent' => 'tribe-events-group'\n\t\t\t\t\t) );\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\tif ( current_user_can( 'manage_options' ) ) {\t\t\t\n\t\t\t\t\t$wp_admin_bar->add_menu( array(\n\t\t\t\t\t\t'id' => 'tribe-events-settings',\n\t\t\t\t\t\t'title' => __( 'Settings', 'tribe-events-calendar' ),\n\t\t\t\t\t\t'parent' => 'tribe-events-settings-group'\n\t\t\t\t\t) );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( current_user_can( 'manage_options' ) ) {\t\t\t\n\t\t\t\t\t$wp_admin_bar->add_menu( array(\n\t\t\t\t\t\t'id' => 'tribe-events-settings-sub',\n\t\t\t\t\t\t'title' => __( 'Events', 'tribe-events-calendar' ),\n\t\t\t\t\t\t'href' => trailingslashit( get_admin_url() ) . 'edit.php?post_type=' . self::POSTTYPE . '&page=tribe-events-calendar',\n\t\t\t\t\t\t'parent' => 'tribe-events-settings'\n\t\t\t\t\t) );\n\t\t\t\t}\n\t\n\t\t\t\tif ( current_user_can( 'manage_options' ) ) {\t\t\t\n\t\t\t\t\t$wp_admin_bar->add_menu( array(\n\t\t\t\t\t\t'id' => 'tribe-events-help',\n\t\t\t\t\t\t'title' => __( 'Help', 'tribe-events-calendar' ),\n\t\t\t\t\t\t'href' => trailingslashit( get_admin_url() ) . 'edit.php?post_type=' . self::POSTTYPE . '&page=tribe-events-calendar&tab=help',\n\t\t\t\t\t\t'parent' => 'tribe-events-settings-group'\n\t\t\t\t\t) );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function run()\n {\n ItemType::create([\n \t\t'name' => 'Product'\n \t]);\n\n \tItemType::create([\n \t\t'name' => 'Service'\n \t]);\n\n \tItemType::create([\n \t\t'name' => 'Package'\n \t]);\n\n \tItemType::create([\n \t 'name' => 'Venue'\n ]);\n }", "abstract protected function addItem(Actor $owner, array $vars, array $items, array $collections);", "private function _add_items_to_form()\n {\n $existing_elements = $this->_type->selection;\n\n // Add to existing elements the ones requested (POST/GET) to this page\n $new_elements = $this->_get_request_elements();\n\n $elements = array_merge($this->static_options, $existing_elements, $new_elements);\n\n $ee_script = '';\n if ($this->_renderer_callback)\n {\n foreach ($elements as $key)\n {\n $data = $this->_get_key_data($key);\n if ($data)\n {\n $item = $this->_renderer_callback->render_data($data);\n $ee_script .= \"jQuery('#{$this->_element_id}_search_input').midcom_helper_datamanager2_widget_chooser_add_result_item({$data},'{$item}');\\n\";\n\n $this->_add_existing_item_as_static($key);\n }\n }\n }\n else\n {\n foreach ($elements as $key)\n {\n $data = $this->_get_key_data($key);\n if ($data)\n {\n $ee_script .= \"\\n\";\n $ee_script .= \"jQuery('#{$this->_element_id}_search_input')\\n\";\n $ee_script .= \".midcom_helper_datamanager2_widget_chooser_add_result_item(\\n\";\n $ee_script .= \" {$data},\\n\";\n $ee_script .= \" this\\n\";\n $ee_script .= \");\\n\";\n\n $this->_add_existing_item_as_static($key);\n }\n }\n }\n\n $this->_jscript .= $ee_script;\n $this->_jscript .= \"\\njQuery('#\" . $this->_element_id . \"_search_input').midcom_helper_datamanager2_widget_chooser_adjust_height();\";\n $this->_jscript .= '});';\n\n $this->_jscript .= \"\\nclose_dialog = function(widget_id){jQuery('#' + widget_id + '_creation_dialog').hide();};\";\n $this->_jscript .= \"\\nadd_item = function(data, widget_id){jQuery('#' + widget_id + '_search_input').midcom_helper_datamanager2_widget_chooser_add_result_item(data);};\";\n $this->_jscript .= '</script>';\n }", "public function action_create()\n\t{\n\t\t$items = Item::location('inventory', TRUE)->find_all();\n\n\t\t$this->view = new View_Item_Trade_Create;\n\n\t\tif (count($items) == 0)\n\t\t{\n\t\t\tHint::error('You don\\'t have any items in your invetnory to put up for trade.');\n\t\t\t$this->view->unable = TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->view->items = $items;\n\t\t\t$this->view->max_items = Kohana::$config->load('items.trade.lots.max_items');\n\t\t\t$this->view->max_type = (Kohana::$config->load('items.trade.lots.count_amount')) ? 'items' : 'stacks';\n\t\t\t$this->view->process_url = Route::url('item.trade.create.process');\n\t\t}\n\t}", "public function addAction()\n\t{\t// TODO: add event to google calendars\t\n\t}", "public function createAction() {\n\t\t$item = Epic_Mongo::newDoc('item');\n\t\t// Get Form for Item\n\t\t$form = $item->getEditForm();\n\t\t$form->setBuildToEquip($this->getRequest()->getParam(\"b\"));\n\t\t$form->setReturnMethod($this->getRequest()->getParam(\"return\"));\n\t\t$form->setSlot($this->getRequest()->getParam(\"slot\"));\n\t\t// $form->itemType->setValue($this->getRequest()->getParam(\"slot\"));\n\t\t$this->view->form = $form;\n\t\tif($this->getRequest()->isPost()) {\n\t\t\t$result = $form->process($this->getRequest()->getParams());\n\t\t\tif($result) {\n\t\t\t\tif(!is_array($result)) {\n\t\t\t\t\tswitch($result) {\n\t\t\t\t\t\tcase \"build\":\n\t\t\t\t\t\t\t$build = $form->getBuild();\n\t\t\t\t\t\t\t$this->_redirect(\"/b/\".$build->id);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"store\":\n\t\t\t\t\t\t\t$item = $form->getItem();\n\t\t\t\t\t\t\t$this->_redirect(\"/user/shop?selectItem=\".$item->id);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$i = Epic_Mongo::db('item')->find($result['upserted']);\n\t\t\t\t\t$this->_redirect(\"/i/\".$i->id);\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function create()\n {\n return view('items.create', ['rollTypes' => RollType::all(), 'steelTypes' => SteelType::all() ]);\n }", "public function addItems($items) {\n\t\tif (!isset($items[0])) {\n\t\t\t$items = array($items);\n\t\t}\n\t\t\n\t\tforeach ($items as $item) {\n\t\t\t$this->addItem($item);\n\t\t}\n\t}", "public function create()\n {\n $types = ItemType::get();\n $localyticsTypes = LocalyticsItemType::all();\n\n return view('admin.items.create', compact('types', 'localyticsTypes'));\n }", "function add()\n {\n $validator = new calendarValidator();\n $validMessage = null;\n $valid = true;\n \n if (wp_verify_nonce($_POST['_wpnonce'], 'createCalendar') && check_admin_referer('createCalendar'))\n {\n \n //Check if the calendar name is valid\n if ($validator->validCreatedCalendarName($_POST['calendarName']))\n {\n \n //Check if the slug is valid\n if ($validator->validCreatedCalendarSlug($_POST['calendarSlug']))\n {\n \n $calendar = new Calendar();\n $calendar->setName($_POST['calendarName']);\n $calendar->setSlug($validator->cleanCalendarSlug($_POST['calendarSlug']));\n $calendar->setDescription($_POST['calendarDescription']);\n \n //Revalidate the slug after it's been cleaned, to make sure something is there\n if (!$validator->validCreatedCalendarSlug($calendar->getSlug()))\n {\n $validMessage = 'This slug is invalid';\n }\n else\n {\n $calendarID = $calendar->add();\n }\n }\n \n //If the slug isn't valid\n else\n {\n $validMessage = 'The calendar slug is invalid. Calendar could not be added';\n }\n }\n //If the name isn't valid\n else\n {\n $validMessage = 'The calendar name is invalid. Calendar could not be added';\n }\n }\n else\n {\n $validMessage = 'This transaction didn\\'t work out';\n }\n \n //If we have an error message then print it for the user\n if (! empty($validMessage))\n {\n raiserror($validMessage);\n }\n \n }", "public function createItem($item)\n {\n $this->db->insert('items', $item);\n }", "protected function _afterLoad()\r\n {\r\n if ( ($filter = $this->getFilter('calendar_id')) ) {\r\n foreach ($this->_items as $item) {\r\n $item->setCalendarId($filter['value']);\r\n }\r\n }\r\n\r\n return parent::_afterLoad();\r\n }", "public function add($items) {\n\t $items = ObjectUtil::ensureArray($items);\n\t\t$this->collection = array_merge($this->collection, $items);\n\t}", "function add($item);", "public function add( $item );", "public function add(){\r\n\t\t\t$collName = $this->collectionName;\t\r\n\t\t\t$shephertz = new ShephertzApp();\r\n\t\t\tdate_default_timezone_set('Asia/Kolkata');\r\n\t\t\t$this->set('title_for_layout', 'Citybuzz | Add Event');\r\n\t\t}", "protected function saveItems()\n {\n $this->eventAccessObjectBackend->saveObject($this->items);\n }", "public function setItems();", "protected function save_items()\n {\n }", "public function create()\n\t{\n\t\treturn view('items.create');\n\t}", "public function run()\n {\n $items = [\n ['name' => 'Face to Face'],\n ['name' => 'Over the Phone'],\n ];\n\n foreach ($items as $item) {\n \\App\\AppointmentType::create($item);\n }\n }", "public function createItemDefinitionInstance();", "public function prepare_items()\n {\n }", "public function prepare_items()\n {\n }", "public function prepare_items()\n {\n }", "public function prepare_items()\n {\n }", "public function prepare_items()\n {\n }", "public function prepare_items()\n {\n }", "public function add_item($item)\n {\n }", "function ItemsForm_AddItemForm()\n {\n return\n $this->Form_Run\n (\n array\n (\n \"ID\" => $this->Form_Number,\n \"Name\" => \"AddForm\",\n \"Method\" => \"post\",\n\n \"Action\" => \n \"?Unit=\".$this->GetCGIVarValue(\"Unit\").\n \"&ModuleName=Events&Action=\".\n $this->CGI_Get(\"Action\").\n \"&Event=\".\n $this->GetGET(\"Event\")\n ,\n\n \"Anchor\" => \"TOP\",\n \"Uploads\" => FALSE,\n\n \"CGIGETVars\" => array(\"Group\",\"Datas\",\"Datas_Sort\",\"Datas_Reverse\"),\n \"CGIPOSTVars\" => array(),\n\n \"Contents\" => \"ItemsForm_AddRowsTable\",\n \"Options\" => array(),\n \"StartButtons\" => \"\",\n \"EndButtons\" => \"\",\n \"Buttons\" => \"\",\n \"Hiddens\" => array(\"Update\" => 1),\n\n \"Edit\" => 1,\n \"Update\" => 1,\n\n \"ReadMethod\" => \"\",\n //\"UpdateMethod\" => \"ItemsForm_AddItem\",\n \"ContentsHtml\" => \"\",\n \"ContentsLatex\" => \"\",\n\n \"UpdateCGIVar\" => \"Add\",\n \"UpdateCGIValue\" => 1,\n )\n ).\n \"\";\n\n }", "public function prepare_items()\n {\n }", "public function prepare_items()\n {\n }", "public function prepare_items()\n {\n }", "public function prepare_items()\n {\n }", "public function create()\n {\n $itemTypes = ItemType::all();\n\n return view('create_cse_item', compact('itemTypes'));\n }", "public function createItem( $preparedItem ) {\n\t}", "function ciniki_musicfestivals_sapos_itemAdd($ciniki, $tnid, $invoice_id, $item) {\n\n //\n // An registration was added to an invoice item, get the details and see if we need to \n // create a registration \n //\n if( isset($item['object']) && $item['object'] == 'ciniki.musicfestivals.class' && isset($item['object_id']) ) {\n //\n // Load current festival\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'musicfestivals', 'private', 'loadCurrentFestival');\n $rc = ciniki_musicfestivals_loadCurrentFestival($ciniki, $tnid);\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.musicfestivals.413', 'msg'=>'', 'err'=>$rc['err']));\n }\n $festival = $rc['festival'];\n \n //\n // Search classes by code or name\n //\n $strsql = \"SELECT classes.id, \"\n . \"classes.code, \"\n . \"classes.name, \"\n . \"classes.earlybird_fee, \"\n . \"classes.fee, \"\n . \"classes.virtual_fee, \"\n . \"categories.name AS category_name, \"\n . \"sections.name AS section_name \"\n . \"FROM ciniki_musicfestival_classes AS classes \"\n . \"INNER JOIN ciniki_musicfestival_categories AS categories ON (\"\n . \"classes.category_id = categories.id \"\n . \"AND categories.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \") \"\n . \"INNER JOIN ciniki_musicfestival_sections AS sections ON (\"\n . \"categories.section_id = sections.id \"\n . \"AND sections.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \") \"\n . \"WHERE classes.festival_id = '\" . ciniki_core_dbQuote($ciniki, $festival['id']) . \"' \"\n . \"AND classes.id = '\" . ciniki_core_dbQuote($ciniki, $item['object_id']) . \"' \"\n . \"AND classes.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.musicfestivals', 'class');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.musicfestivals.398', 'msg'=>'Unable to load class', 'err'=>$rc['err']));\n }\n if( !isset($rc['class']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.musicfestivals.399', 'msg'=>'Unable to find requested class'));\n }\n $class = $rc['class'];\n\n if( ($festival['flags']&0x0100) == 0x0100 ) {\n $class['name'] = $class['section_name'] . ' - ' . $class['category_name'] . ' - ' . $class['name'];\n } else {\n $class['name'] = $class['name'];\n }\n\n $fee = 0;\n $participation = 0;\n if( isset($festival['earlybird']) && $festival['earlybird'] == 'yes' ) {\n $fee = $class['earlybird_fee'];\n } elseif( isset($festival['live']) && $festival['live'] == 'yes' ) {\n $fee = $class['fee'];\n } elseif( isset($festival['virtual']) && $festival['virtual'] == 'yes' ) {\n $participation = 1;\n $fee = $class['virtual_fee'];\n } else {\n $fee = $class['fee'];\n }\n\n //\n // Load the customer for the invoice\n //\n $strsql = \"SELECT id, customer_id \"\n . \"FROM ciniki_sapos_invoices \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND id = '\" . ciniki_core_dbQuote($ciniki, $invoice_id) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.sapos', 'invoice');\n if( $rc['stat'] != 'ok' ) { \n return $rc;\n }\n if( !isset($rc['invoice']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.musicfestivals.411', 'msg'=>'Unable to find invoice'));\n }\n $invoice = $rc['invoice'];\n \n\n //\n // Create the registration\n //\n $registration = array(\n 'festival_id' => $festival['id'],\n 'billing_customer_id' => $invoice['customer_id'],\n 'teacher_customer_id' => 0,\n 'rtype' => 30,\n 'status' => 6,\n 'invoice_id' => $invoice_id,\n 'display_name' => '',\n 'public_name' => '',\n 'competitor1_id' => 0,\n 'competitor2_id' => 0,\n 'competitor3_id' => 0,\n 'competitor4_id' => 0,\n 'competitor5_id' => 0,\n 'class_id' => $class['id'],\n 'timeslot_id' => 0,\n 'title1' => '',\n 'perf_time1' => '',\n 'title2' => '',\n 'perf_time2' => '',\n 'title3' => '',\n 'perf_time3' => '',\n 'payment_type' => 0,\n 'fee' => $fee,\n 'participation' => $participation,\n );\n\n //\n // Add the registration\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectAdd');\n $rc = ciniki_core_objectAdd($ciniki, $tnid, 'ciniki.musicfestivals.registration', $registration, 0x04);\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.musicfestivals.412', 'msg'=>'Unable to add the registration', 'err'=>$rc['err']));\n }\n $reg_id = $rc['id'];\n \n return array('stat'=>'ok', 'object'=>'ciniki.musicfestivals.registration', 'object_id'=>$reg_id);\n }\n\n return array('stat'=>'ok');\n}", "public function testItemCreation()\n {\n $item = new Item();\n $item->setItemID($this->itemID);\n $item->setCount($this->itemQuantity);\n $this->assertEquals($this->itemID, $item->getItemID());\n $this->assertEquals($this->itemQuantity, $item->getCount());\n }", "function quote_handle_on_quick_add($items, $subitems, &$map, $logged_user, $projects, $companies, $interface = AngieApplication::INTERFACE_DEFAULT) {\n \tif($interface == AngieApplication::INTERFACE_DEFAULT) {\n\n\t\t $items->add('quote', array(\n\t\t 'text' => lang('quote'),\n\t\t \t'title' => lang('Create quote'),\n\t\t 'icon' => AngieApplication::getImageUrl('icons/32x32/invoice.png', QUOTE_MODULE),\n\t\t 'url' => Router::assemble('add_quote'),\n\t\t \t'event' => 'quote_created',\n\t\t ));\n\n \t} // if\n \t\n }", "public function add()\n\t{\n\t\t$admin_nav = $this->Menu_item->arrangeByTiers($this->Session->read('Admin.menu_id'));\t\n\t\t$page_url = '/inventory_items/add';\n\t\t$admin_check = $this->Menu_item->menuActiveHeaderCheck($page_url, $admin_nav);\n\t\t$this->set('admin_nav',$admin_nav);\n\t\t$this->set('admin_pages',$page_url);\n\t\t$this->set('admin_check',$admin_check);\n\t\t\n\t\t//get inventory types\n\t\t$inventories = $this->Inventory->find('all');\n\t\t$this->set('inventories',$inventories);\n\t\t$images = $this->Inventory_item->createAllImageArray();\n\t\t$this->set('images',$images);\n\t\t\n\n\t\tif($this->request->is('post')){\n\t\t\t//create the form data\n\t\t\t$this->request->data['Inventory_item']['company_id'] = $_SESSION['company_id'];\n\n\n\t\t\tif($this->Inventory_item->save($this->request->data)){\n\t\t\t\t$this->Session->setFlash('Your inventory item has been saved','default',array(),'success');\n\t\t\t\t$this->redirect(array('action'=>'index'));\n\t\t\t}\n\t\t}\t\n\t}", "private function add()\n {\n $this->registry->getObject('template')->buildFromTemplates(\n\t \t$this->registry->getSetting($this->registry->getObject('constants')->getConstant('pages_admin_base') ).$this->registry->getObject('constants')->getHeaderTpl(), \n\t \t$this->registry->getSetting($this->registry->getObject('constants')->getConstant('pages_admin_base') ).'gamification/'.$this->registry->getObject('constants')->getAddTpl(),\n\t \t$this->registry->getSetting($this->registry->getObject('constants')->getConstant('pages_admin_base') ).$this->registry->getObject('constants')->getFooterTpl()\n\t \t);\n \n // Cargamos el evento\n require_once( FRAMEWORK_PATH . 'models/event.inc');\n $evento = new Event( $this->registry );\n $pagination = $evento->listEvent();\n $this->registry->getObject('template')->getPage()->addTag( 'event', array( 'SQL', $pagination->getCache() ) ); \n $this->registry->getObject('template')->getPage()->addTag('error_msg','error-msg'); \n $this->registry->getObject('template')->getPage()->addTag('error_text',''); \n $this->registry->getObject('template')->getPage()->addTag('eventName',''); \n $this->registry->getObject('template')->getPage()->addTag('threshold','0');\n $this->registry->getObject('template')->getPage()->addTag('title','');\t\n\t $this->registry->getObject('template')->getPage()->addTag('description','');\n\t $this->registry->getObject('template')->getPage()->addTag('xp','0');\n $this->registry->getObject('template')->getPage()->addTag('rp','0');\n $this->registry->getObject('template')->getPage()->addTag('lp','0');\n }", "public function testEditionCreationOnItemAdd()\n {\n\n // Create exhibit.\n $exhibit = $this->_createExhibit('Exhibit 1');\n\n // Get starting count.\n $count = $this->editionsTable->count();\n\n // Set exhibit id.\n $this->request->setMethod('POST')\n ->setPost(array(\n 'public' => 1,\n 'featured' => 0,\n 'Elements' => array(),\n 'order' => array(),\n 'exhibit_id' => $exhibit->id\n )\n );\n\n // Hit item edit.\n $this->dispatch('items/add');\n\n // +1 editions.\n $this->assertEquals($this->editionsTable->count(), $count+1);\n\n }", "function addItemsProduct() {\n\t\t$opcionales = $_GET['opcionales'];\n\t\t$extras = $_GET['extras'];\n\t\t$sin = $_GET['sin'];\n\n\t\t$nota_opcional = $_REQUEST['nota_opcional'];\n\t\t$nota_extra = $_REQUEST['nota_extra'];\n\t\t$nota_sin = $_REQUEST['nota_sin'];\n\n\t\t$result = $this -> addProduct($opcionales, $extras, $sin, $nota_opcional, $nota_extra, $nota_sin);\n\t}", "public function create()\n {\n \t\n \treturn view('items.create');\n\n }", "public function create()\n\t{\n\t\t$menu_item = new \\MenuItem();\n\n\t\t$this->layout->content = \\View::make( 'admin.menu_items.create' )\n\t\t\t->with( 'menu_item', $menu_item );\n\t}", "public function addItem( array $data ) {\r\n\t\t\t$this->formList[] = $data;\r\n\t\t}" ]
[ "0.6870669", "0.6640306", "0.6579311", "0.653937", "0.6532325", "0.63905203", "0.6223364", "0.62005496", "0.619992", "0.619989", "0.6107904", "0.60801214", "0.6065809", "0.60486716", "0.60174584", "0.59942716", "0.5993126", "0.598851", "0.5965741", "0.59578156", "0.5934517", "0.5913984", "0.58912724", "0.58872783", "0.5877213", "0.5855134", "0.5846775", "0.57945365", "0.5781877", "0.5757136", "0.57320553", "0.5705882", "0.5662863", "0.56511235", "0.5638333", "0.5613628", "0.5597749", "0.55942285", "0.55902904", "0.55894554", "0.5574494", "0.55717015", "0.5565681", "0.55643964", "0.55612856", "0.5549002", "0.55486923", "0.55472815", "0.5540331", "0.5520242", "0.5518589", "0.55160666", "0.551165", "0.5501483", "0.5491225", "0.5476284", "0.5473505", "0.54697174", "0.5455633", "0.5449047", "0.5444601", "0.5443811", "0.54227096", "0.5419273", "0.5413683", "0.54121363", "0.54095775", "0.54070103", "0.53899693", "0.53878325", "0.5387111", "0.5379957", "0.5375983", "0.53719246", "0.53625935", "0.53419214", "0.53357184", "0.53357184", "0.53357184", "0.53350294", "0.53346926", "0.53346926", "0.5327724", "0.5325626", "0.53226244", "0.53226244", "0.53226244", "0.53226244", "0.5317692", "0.53163326", "0.53115815", "0.5305129", "0.52988935", "0.52974653", "0.52954227", "0.5292521", "0.52909005", "0.52899146", "0.52870876", "0.52854633" ]
0.72819024
0
After creation of calendar items (or it has failed) we'll do some clean up
После создания элементов календаря (или если это завершилось неудачей) мы выполним некоторую очистку
protected function createCalenderItems_shutdown() { unset($this->CreateItem); $this->have_started_createItem = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createCalendarItems()\n\t{\n\t\tif(!$this->have_started_createItem)\n\t\t{\n\t\t\t$this->createCalenderItems_shutdown();\n\t\t\tthrow new Exception ('No items added.');\n\t\t}\n\t\tif(count($this->CreateItem->Items->CalendarItem) == 0)\n\t\t{\n\t\t\t$this->createCalenderItems_shutdown();\n\t\t\tthrow new Exception ('No items added.');\n\t\t}\n\t\t\n\t\t$result = $this->client->CreateItem($this->CreateItem); // < $this->client holds SOAP-client object\n\t\tif(count($this->CreateItem->Items->CalendarItem) > 1)\n\t\t{\n\t\t\t$ids = array();\n\t\t\tforeach($result->ResponseMessages->CreateItemResponseMessage as $i => $response)\n\t\t\t{\n\t\t\t\tif($response->ResponseClass == 'Success')\n\t\t\t\t{\n\t\t\t\t\t// Returning the id/changekey for each item\n\t\t\t\t\t$ids[$i] = array(\n\t\t\t\t\t\t'Id' => $response->Items->CalendarItem->ItemId->Id,\n\t\t\t\t\t\t'ChangeKey' => $response->Items->CalendarItem->ItemId->ChangeKey,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// If there is no success, return null\n\t\t\t\t\tprintout('Item '.$i.' failed creation: '.print_r($response, true));\n\t\t\t\t\t$ids[$i] = array(\n\t\t\t\t\t\t\t'Id' => null,\n\t\t\t\t\t\t\t'ResponseMessage' => $response\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->createCalenderItems_shutdown();\n\t\t\treturn $ids;\n\t\t}\n\t\t\n\t\tif ( $result->ResponseMessages->CreateItemResponseMessage->ResponseClass == 'Success' )\n\t\t{\n\t\t\t// Returning the id/changekey in an array with only one item\n\t\t\t$this->createCalenderItems_shutdown();\n\t\t\treturn array(0 => \n\t\t\t\tarray(\n\t\t\t\t\t'Id' => $result->ResponseMessages->CreateItemResponseMessage->Items->CalendarItem->ItemId->Id,\n\t\t\t\t\t'ChangeKey' => $result->ResponseMessages->CreateItemResponseMessage->Items->CalendarItem->ItemId->ChangeKey,\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Return null\n\t\t\t$this->createCalenderItems_shutdown();\n\t\t\treturn array(0 => array(\n\t\t\t\t\t'Id' => null,\n\t\t\t\t\t'ResponseMessage' => $result->ResponseMessages->CreateItemResponseMessage\n\t\t\t\t));\n\t\t}\n\t}", "protected function cleanUp()\n {\n }", "function delete() {\n\t\t\ttry {\n\t\t\t\tDB::beginWork('Deleting calendar @ ' . __CLASS__);\n\n\t\t\t\tparent::delete();\n\n\t\t\t\t$calendar_events = CalendarEvents::findByCalendar($this->object, STATE_TRASHED);\n\t\t\t\tif (is_foreachable($calendar_events)) {\n\t\t\t\t\tforeach ($calendar_events as $calendar_event) {\n\t\t\t\t\t\tif ($calendar_event instanceof CalendarEvent) {\n\t\t\t\t\t\t\t$calendar_event->state()->delete();\n\t\t\t\t\t\t} // if\n\t\t\t\t\t} // foreach\n\t\t\t\t} // if\n\n\t\t\t\tDB::commit('Calendar deleted @ ' . __CLASS__);\n\t\t\t} catch(Exception $e) {\n\t\t\t\tDB::rollback('Failed to delete calendar @ ' . __CLASS__);\n\n\t\t\t\tthrow $e;\n\t\t\t} // try\n\t\t}", "public function __construct()\n {\n $this->calendarItems = array();\n }", "abstract protected function _cleanUp(): void;", "protected function dealWith()\n {\n }", "public function cleanup( )\r\n {\r\n // Set Current User\r\n $this->setCurrentlyLoggedInUser();\r\n\r\n // Fetch this class\r\n $this->log( 'Checking for RSS Objects in eZ Publish' );\r\n\r\n $rssImportArray = eZRSSImport::fetchActiveList( );\r\n\r\n $this->log( 'Total Active Feeds: '.count( $rssImportArray ) );\r\n\r\n\t $i = 0;\r\n\r\n\t // Iterate\r\n foreach ( array_keys( $rssImportArray ) as $rssImportKey )\r\n {\r\n // Fetch RSSImport Content Object\r\n $rssImport = $rssImportArray[$rssImportKey];\r\n\r\n\t // Fetch Parent ContentObjectTreeNode Object\r\n $parentNodeID = $rssImport->attribute( 'destination_node_id' );\r\n\r\n $this->log( 'Feed Count: '.$i);\r\n\r\n $this->log( 'Feed: '. $rssImport->attribute( 'name' ) .' [ID: '.$rssImport->ID.']');\r\n\r\n $this->numberRemoved = $this->clearRSSCacheNodeSubTree( $this->rssClasses, $this->rssLimit, $parentNodeID );\r\n\r\n $this->totalRemoved = $this->numberRemoved + $this->totalRemoved;\r\n $i++;\r\n }\r\n\r\n $this->log( 'RSS cleanup done: ' . $this->totalRemoved . ' items removed.' );\r\n }", "abstract public function cleanup();", "protected function _afterLoad()\r\n {\r\n if ( ($filter = $this->getFilter('calendar_id')) ) {\r\n foreach ($this->_items as $item) {\r\n $item->setCalendarId($filter['value']);\r\n }\r\n }\r\n\r\n return parent::_afterLoad();\r\n }", "protected function tearDown()\n {\n $this->calendar = null;\n parent::tearDown();\n }", "public static function cleanup()\n\t{\n\t\t// by this test.\n\t\t// Not necessary since in test\n\t\t// mode and nothing is committed,\n\t\t// but good practice if only to\n\t\t// document the side effects of\n\t\t// this test.\n\t\tif(static::$co_invented)\n\t\t{\n\t\t\tstatic::$co_invented->destroy();\n \tstatic::$co_invented = NULL;\n\t\t}\n\t\t\n return;\n\t}", "public function cleanup()\n {\n /**\n * This function intentionally left empty.\n */\n }", "public function clean()\n {\n $collectionOfOldies = Mage::getModel('klarna/pushlock')->getCollection()\n ->addFieldToFilter('created_at', array(\n 'to' => $this->getMaximumAllowedAge()\n ));\n\n if (count($collectionOfOldies)) {\n $this->delete($collectionOfOldies);\n }\n\n Mage::log(\"Routine for cleaning of klarna_pushlock table finished.\", null, 'kl_klarna.log');\n }", "public static function cleanup() {\n\t\t$old_entries = self::getOldEntries();\n\n\t\tforeach( $old_entries as $entry ) {\n\t\t\tself::delete( $entry->id );\n\t\t}\n\t}", "public abstract function cleanup();", "public function cleanup()\n {\n }", "public function cleanup()\n {\n }", "public function cleanup()\n\t{\n\t\t\n\t}", "public function cleanup()\n\t{\n\t\t\n\t}", "public function cleanup()\n\t{\n\t\t\n\t}", "function delete_get_calendar_cache()\n{\n}", "static function cleanupEvents(){\n $time = RDR_Setting::get(\"maxeventlifetime\")->value;\n if(!$time) $time = \"- 1 day\";\n while(true){\n $tmp = RDR_Event::getByCondition(\"createTime < {0}\", array(dt(\"now $time\")), null, 1000);\n if(!$tmp) break;\n db()->deleteMultiple($tmp);\n }\n }", "public function cleanup()\n {\n throw new ezcDbException( \"Not implemented\" );\n }", "public function cleanup();", "public function cleanup();", "public function cleanup();", "public function deleteAndCleanUp() { }", "public static function cleanup()\n {\n }", "function cleanUp()\n {\n $days = (int)Am_Di::getInstance()->config->get('email_log_days', 0);\n Am_Di::getInstance()->db->query(\"DELETE FROM ?_mail_queue\n WHERE added <= ?d AND sent IS NOT NULL\", Am_Di::getInstance()->time - 3600*24*$days);\n }", "public function cleanUp() {\n\t\t$actionError =& actionerrors::instance();\n\t\t$actionError->Clean();\n\t}", "public function actionExpireItem() {\n\t\n\t\tYii::log(\"Started clean item daily work\");\n\t\t\n\t\t$this->cleanItem();\n\t\t$this->expireItem();\n\t\t\t\t\n\t\tYii::log(\"finish clean item daily work\");\n\t}", "public function cleanup()\n\t{\n\t\t$lastmonth = Date::of(time() - (30 * 24 * 60 * 60))->toSql();\n\t\t$this->_db->setQuery(\"DELETE FROM `$this->_tbl` WHERE lastviewed < \" . $this->_db->quote($lastmonth));\n\t\t$this->_db->query();\n\t}", "protected function cleanup(): void {\n $this->error = null;\n foreach ($this->rules as &$rule) {\n if (is_string($rule)) {\n $rule = $this->factory->create($rule);\n }\n\n $rule->cleanup();\n }\n }", "public function cleanUp() {\n $s3 = $this->getS3();\n $aS3Files = $s3->getObjectsByBucket(self::BUCKET);\n foreach($aS3Files as $as3){\n $data = $s3->getInfo('dbback/' . $as3);\n if ($data['mtime']+($this->_days * 24 * 60 * 60) < time( 'void' )) {\n $deleted = $s3->removeObject('dbback/'.$as3);\n }\n }\n }", "public function Cleanup() {}", "protected function cleanup()\n\t{\n\t\t//unset the params_data and parent_params_data arrays to free some ram\n\t\tunset($this->params_data);\n\t\tunset($this->parent_params_data);\n\t}", "protected function _transactionCleanup() {\n $this->_transactionList = null;\n }", "public function cleanUp()\n {\n // Do nothing\n }", "protected function createCalendarItems_startup ($primary_emailaddress = null)\n\t{\n\t\t$this->CreateItem = new stdClass();\n\t\t$this->CreateItem->SavedItemFolderId = new stdClass();\n\t\t$this->CreateItem->SavedItemFolderId->DistinguishedFolderId = new stdClass();\n\t\t$this->CreateItem->SavedItemFolderId->DistinguishedFolderId->Mailbox = new stdClass();\n\t\t$this->CreateItem->Items = new stdClass();\n\t\t\n\t\t$this->CreateItem->SavedItemFolderId->DistinguishedFolderId->Id = 'calendar';\n\t\tif(!is_null($primary_emailaddress))\n\t\t{\n\t\t\t$this->CreateItem->SavedItemFolderId->DistinguishedFolderId->Mailbox->EmailAddress = $primary_emailaddress;\n\t\t}\n\t\t$this->CreateItem->Items->CalendarItem = array();\n\t\t$this->CreateItem->SendMeetingInvitations = \"SendToNone\";\n\t\t\n\t\t$this->have_started_createItem = true;\n\t}", "function __destruct() {\n\n #If we had a hash with all periods we had been touching - we could loop over this hash and update all auto posteringer - just once - and never forget it.\n #$this->set_journal_motkonto(array('post'=> array('voucher_VoucherPeriod' => $voucher->VoucherPeriod)));\n\n #We could also correct the balance in all journals involved when object dies.\n #$this->correct_journal_balance();\n\n }", "function _cleanup()\n\t{\n\t\t// Xoa IP het thoi gian block\n\t\t$where = array();\n\t\t$where['expire >'] = 0;\n\t\t$where['expire <'] = now();\n\t\t$this->del_rule($where);\n\t}", "public function cleanup(): void {\n $this->_clearSections();\n $this->_clearKeys();\n $this->_clearIfsAndFors();\n }", "protected function after() {}", "function cleanup() {\n\t\t$this->_core->cleanup();\n\t}", "public function tearDown()\n\t{\n\t\t$this->utils->resetToday();\n\t}", "public function runPostTestCleanUp();", "protected function cleanup() {\n\t\tif ($this->fields === NULL) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// correct internal state (loadedFields, values, etc)\n\t\tforeach ( $this->fields as $field ) {\n\t\t\t$field->cleanup();\n\t\t}\n\t\t\n\t\t// remove ourselves from callbacks\n\t\twhile ( self::$notifyOnSaveComplete && ( $key = array_search( $this, self::$notifyOnSaveComplete, true ) ) !== false ) {\n\t\t\tunset(self::$notifyOnSaveComplete[$key]);\n\t\t}\n\t\t\n\t\t\t\n\t\t$this->values = NULL;\n\t\t$this->valuesLastLoaded = NULL;\n\t\t\n\t\t$this->metaData = NULL;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t// disconnect fields\n\t\t$this->fields = NULL;\n\t\t\n\t\t$this->storage = NULL;\n\t}", "public function CleanUp() {\n // Optional. Delete this if you don't need it.\n }", "static function cleanupEntries(){\n $time = RDR_Setting::get(\"maxentrylifetime\")->value;\n if(!$time) return;\n $updated = false;\n while(true){\n $tmp = RDR_Entry::getByCondition(\"datetime < {0}\", array(dt(\"now $time\")), null, 1000);\n if(!$tmp) break;\n db()->deleteMultiple($tmp);\n $updated = true;\n }\n # after deleting some entries update readed/saved flags\n if($updated) self::cleanupFlags();\n }", "public function finalizeStore() {}", "function cleanUpPendingOrders() ;", "function cleanUpPendingOrders() ;", "private function cleanUpCachedObjects(): void\n {\n $this->registry->unregister('current_product');\n $this->registry->unregister('product');\n $this->_objectManager->removeSharedInstance(Request::class);\n $this->_objectManager->removeSharedInstance(Response::class);\n $this->_response = null;\n $this->_request = null;\n }", "protected function tearDown()\n {\n $this->cleanupReservations->execute();\n }", "public function __destruct() {\n\t\tglobal $db;\n\t\t\n\t\tif($this -> itemId > 0 && count($this -> saveArray) > 0) {\n\t\t\t$db -> query(\n\t\t\t\t'UPDATE `db_item` '.\n\t\t\t\t'SET '.implode(', ', array_map(function($v, $k) { return('`'.$k.'` = \"'.$v.'\"'); }, $this -> saveArray, array_keys($this -> saveArray))).' '.\n\t\t\t\t'WHERE `item_id` = \"'.$this -> itemId.'\"'\n\t\t\t);\n\t\t}\n\t}", "public function clean_up(){\n //-\n }", "public function __destruct()\n {\n // clean collection dependency\n foreach ($this->_collections as $collection) {\n $this->removeCollection($collection);\n }\n\n // remove instance from registry if not deleted (cause delete remove it)\n if (BaseZF_Item_Registry::removeItemInstance($this, get_class($this)) === false) {\n die(sprintf('Unable to destuct item \"%s\" properly', $this));\n }\n\n echo 'kill:' . $this;\n }", "public function __destruct() {\n\t\tunset( self::$collection[ $this->id ] );\n\t}", "protected function afterStore() {}", "public function finalize()\n\t{\n\t\t$this->storage->clear();\n\t}", "public function cleanUp()\n { if (! RuntimeState::G()->is_before_show_done) {\n foreach ($this->beforeShowHandlers as $v) {\n ($v)();\n }\n RuntimeState::G()->is_before_show_done=true;\n }\n RuntimeState::G()->end();\n $this->is_in_exception=false;\n }", "protected function processItems() {\n $this->SetPostingsToEmpty();\n\n //process the actual data\n $items = htmlqp($this->GetRequestData(), '#tudevent_box', $this->overrideEncoding())->find('.portletContent');\n foreach ($items as $item) {\n if ($item->children('.tudeventlist-eventdate')->count() == 1 and $item->children('.tudeventlist-linkedtext')->count() == 1) {\n $date = $item->children('.tudeventlist-eventdate')->text();\n $date = $this->convertDate($date);\n $link = $item->children('.tudeventlist-linkedtext')->children('a')->attr('href');\n $text = $item->children('.tudeventlist-linkedtext')->text();\n $text = $this->tidyText($this->prependText($text));\n\n //TODO feature enhancement: we could determine the author via subsequent calls to the linked calendar entries.\n //but since we are not printing the author anyways, this is currently not implemented\n $author = \"n/a\";\n $this->AppendToPostings($date, $author, $text, $link);\n }\n }\n }", "public function tearDown()\n {\n \t$this->unLoadDataSets();\n \tparent::tearDown();\n $this->db->query('DELETE FROM events');\n unset($this->object);\n }", "public function cleanup() {\n return $this->success('person_added',$this->object);\n }", "public function Cleanup()\r\n\t{\r\n\t}", "public function Cleanup()\r\n\t{\r\n\t}", "public function clean() {\n $this->cleanCount += 1;\n $this->noLysolUsedAlarm = false;\n $this->noSanitizerUsedAlarm = false;\n }", "public function initCleanData();", "function teardown(): void {\n\t\t$this->test_base->posts = array();\n\t\t$sitemaps = get_posts( array(\n\t\t\t'post_type' => Metro_Sitemap::SITEMAP_CPT,\n\t\t\t'fields' => 'ids',\n\t\t\t'posts_per_page' => -1,\n\t\t) );\n\t\tupdate_option( 'msm_sitemap_indexed_url_count' , 0 );\n\t\tarray_map( 'wp_delete_post', array_merge( $this->test_base->posts_created, $sitemaps ) );\n\t}", "public function onAfterInsert()\n\t{\n\t\t$this->ensureFolderExists();\n\t}", "public function cleanup() {\n $this->rm()->deleteField(\"field_not_used_any_more\");\n $this->rm()->deleteTemplate(\"tpl_not_used_any_more\");\n }", "public function __destruct()\r\n {\r\n if ($this->_dataChanged)\r\n {\r\n Auth::instance()->SaveData();\r\n }\r\n if ($this->_aclChanged)\r\n {\r\n Auth::instance()->SaveAcl();\r\n }\r\n }", "public function cleanup() : void;", "public function __destruct()\n {\n foreach($this->exceptions as $exception) {\n $this->post('errors', $exception->toEscapedZlibbedJson());\n //$this->post('errors', $exception->toJson());\n }\n }", "function untrash() {\n\t\t\ttry {\n\t\t\t\tDB::beginWork('Restoring calendar from a trash @ ' . __CLASS__);\n\n\t\t\t\tparent::untrash();\n\n\t\t\t\t$calendar_events = CalendarEvents::findByCalendar($this->object, STATE_TRASHED);\n\t\t\t\tif (is_foreachable($calendar_events)) {\n\t\t\t\t\tforeach ($calendar_events as $calendar_event) {\n\t\t\t\t\t\tif ($calendar_event instanceof CalendarEvent && $calendar_event->getState() === STATE_TRASHED) {\n\t\t\t\t\t\t\t$calendar_event->state()->untrash();\n\t\t\t\t\t\t} // if\n\t\t\t\t\t} // foreach\n\t\t\t\t} // if\n\n\t\t\t\tDB::commit('Calendar restored from a trash @ ' . __CLASS__);\n\t\t\t} catch(Exception $e) {\n\t\t\t\tDB::rollback('Failed to restore calendar from trash @ ' . __CLASS__);\n\n\t\t\t\tthrow $e;\n\t\t\t} // try\n\t\t}", "public function setEvents()\n {\n try {\n EventsDay::deleteAll();\n $date = strftime('%Y-%m-%d');\n $models = Calendar::find()->with('calendarLang')->where(['<=', 'date_begin', $date])->andWhere(['>=', 'date_end', $date])->all();\n if ($models) {\n foreach ($models as $model) {\n if ($model->calendarLang) {\n foreach ($model->calendarLang as $calendar) {\n $event = new EventsDay();\n $event->lang = $calendar->lang;\n $event->photo = $model->photo;\n $event->status = $model->status;\n $event->url = $model->url;\n $event->title = $calendar->title;\n if (!$event->save())\n throw new Exception($event->getFirstErrors());\n }\n }\n }\n }\n } catch (Exception $e) {\n file_put_contents('error.log', $e->getMessage());\n }\n }", "function createItem($calendarId, $createdBy, $name, $note, $reminder, $type, $colour, $location, $options) {\n\tglobal $conn;\n\n\t$item_inserted = false; // return value\n\n\t// Fix input\n\t$name = trim($name);\n\t$note = trim($note);\n\n\t$item_stmt = mysqli_prepare($conn, \"INSERT INTO Items VALUES(0, ?, ?, NOW(), ?, ?, ?, ?, ?, ?);\");\n\tmysqli_stmt_bind_param($item_stmt, \"issssiss\", $calendarId, $name, $note, $reminder, $type, $createdBy, $location, $colour);\n\tmysqli_stmt_execute($item_stmt);\n\n\t$item_affected_rows = mysqli_stmt_affected_rows($item_stmt);\n\n\t// Get inserted item's itemId (for adding Event or Task, if applicable)\n\t$item_id = mysqli_insert_id($conn);\n\tmysqli_stmt_close($item_stmt); // close statement\n\n\t$item_inserted = $item_inserted || ($item_affected_rows > 0);\n\n\t// Return if item insert fails\n\tif (!$item_inserted) return false;\n\n\t// Handle insert Item Subclass (Event/Task)\n\t$affected_rows = 0;\n\tswitch($type) {\n\t\tcase \"event\":\n\t\t\t$start_date = $options[\"start_date\"];\n\t\t\t$end_date = $options[\"end_date\"];\n\n\t\t\t$stmt = mysqli_prepare($conn, \"INSERT INTO EventItems VALUES(?, ?, ?);\");\n\t\t\tmysqli_stmt_bind_param($stmt, \"iss\", $item_id, $start_date, $end_date);\n\t\t\tmysqli_stmt_execute($stmt);\n\n\t\t\t$affected_rows = mysqli_stmt_affected_rows($stmt);\n\n\t\t\tmysqli_stmt_close($stmt); // close statement\n\n\t\t\tbreak;\n\t\tcase \"task\":\n\t\t\t$due_date = $options['due_date'];\n\t\t\t$completion_date = $options['completion_date'];\n\n\t\t\t$stmt = mysqli_prepare($conn, \"INSERT INTO TaskItems VALUES(?, ?, ?);\");\n\t\t\tmysqli_stmt_bind_param($stmt, \"iss\", $item_id, $due_date, $completion_date);\n\t\t\tmysqli_stmt_execute($stmt);\n\n\t\t\t$affected_rows = mysqli_stmt_affected_rows($stmt);\n\n\t\t\tmysqli_stmt_close($stmt); // close statement\n\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t// if item is a reminder or note, then return here\n\t\t\treturn $item_inserted;\n\t}\n\n\t// this is for testing only, to be deleted -----------------\n\tif ($affected_rows > 0) {\n\t\t// echo \"Added Event or Task\";\n\t} else {\n\t\t// echo \"Cannot add Event or Task\";\n\t}\n\t// ---------------------------------------------------------\n\n\t$item_inserted = $item_inserted || ($affected_rows > 0);\n\n\treturn $item_inserted;\n}", "public function __destruct()\n\t{\n\t\t$this->save();\n\n\t\t// Delete all maybe existing temporary package status files\n\t\tforeach (glob(\"/m23/tmp/getStatusFile*\") as $filename)\n\t\t\tunlink($filename);\n\t}", "public function queue_cleanup_personal_data()\n {\n }", "public function __destruct() {\n\t\t$this->cacheByObjectNumberAndObjectIdAndLanguage = array();\n\n\t\tparent::__destruct();\n\t}", "public function __destruct() {\t\r\n\t\tif (!is_null($this->cache))\t{\r\n\t\t\t$this->cache->stops = $this->stops;\r\n\t\t\t$this->cache->departures = $this->departures;\r\n\t\t\t$this->cache->spoje = $this->spoje;\r\n\t\t\t$this->cache->form_url = $this->form_url;\r\n\t\t\t$this->cache->categories = $this->categories;\r\n\t\t\t$this->cache->save();\r\n\t\t}\r\n\t}", "function _finalize()\n\t{\n\t}", "public function initAppointments()\n\t{\n\t\t$this->collAppointments = array();\n\t}", "private function cleanup()\n {\n $check = false;\n \n $x=0;\n\n do {\n $number = $this->calcNumber($x);\n $check = $this->checkNumberAvailable(Invoice::class, $this->invoice, $number);\n $x++;\n } while (!$check);\n\n $this->invoice->number = $number;\n\n //wipe references to invoices from related entities.\n $this->invoice->tasks()->update(['invoice_id' => null]);\n $this->invoice->expenses()->update(['invoice_id' => null]);\n\n return $this;\n }", "protected function tearDown()\r\n {\r\n StaticEventManager::resetInstance();\r\n }", "abstract protected function clean();", "protected function teardown() {\n foreach ($this->vidsOfAddedVideos as $vid) {\n if (!$this->dbh->query(\"DELETE FROM in_playlist WHERE vid=$vid\")) {\n $this->fail(\"Couldn't clean up database (in_playlist)..\");\n }\n }\n\n if (!$this->dbh->query(\"DELETE FROM video WHERE uid=$this->testuid\")) {\n $this->fail(\"Couldn't clean up database (video)..\");\n }\n if (!$this->dbh->query(\"DELETE FROM maintains WHERE uid=$this->testuid\")) {\n $this->fail(\"Couldn't clean up database (maintains)..\");\n }\n if (!$this->dbh->query(\"delete from playlist where title='$this->testPlaylistTitleString'\")) {\n $this->fail(\"couldn't clean up database (playlist)..\");\n }\n if (!$this->dbh->query(\"delete from user where uid=$this->testuid\")) {\n $this->fail(\"couldn't clean up database (user)..\");\n }\n }", "public function cleanOldData()\n {\n $expirationDate = Carbon::now()->subDay();\n Property::where('updated_at', '<', $expirationDate)->delete();\n }", "public function postFinalize() {}", "public function prepare_items()\n {\n }", "public function prepare_items()\n {\n }", "public function prepare_items()\n {\n }", "public function prepare_items()\n {\n }", "public function prepare_items()\n {\n }", "public function prepare_items()\n {\n }", "protected function _resetInternalState()\n {\n $this->_categoryNames = null;\n $this->_productsToCategoryPath = null;\n }", "public function run()\n {\n\t\tif(!Calendar::all()->first())\n\t\t\tfactory(Calendar::class, 1)->create();\n }", "function _end() {\n $m = epManager::instance();\n $m->deleteAll('eptBase');\n $m->deleteAll('eptAuthor');\n $m->deleteAll('eptBook');\n $m->deleteAll('eptBookstore');\n $m->deleteAll('eptContact');\n @unlink(dirname(__FILE__).'/ezpdo.log');\n @unlink('books.db');\n @epRmDir(dirname(__FILE__).'/compiled');\n return true;\n }", "public function cleanUp()\n\t{\n\t\tglobal $ilDB, $tree;\n\n\t\t// 1. Get rid of locks that have expired over an hour ago\n\t\t$old = time() - 3600;\n\t\t$q = 'DELETE'\n\t\t\t.' FROM '.$this->table\n\t\t\t.' WHERE expires < '.$ilDB->quote($old,'integer')\n\t\t;\n\t\t$ilDB->manipulate($q);\n\t\t\n\t\t// 2. Get rid of null resources which are not associated to\n\t\t// a lock due to step 1, or due to a database inconsistency\n\t\t// because we are working with non-transactional tables\n\t\t$q = 'SELECT dat.obj_id '\n\t\t\t\t.' FROM object_data AS dat'\n\t\t\t\t.' LEFT JOIN '.$this->table.' lck'\n\t\t\t\t.' ON dat.obj_id = lck.obj_id'\n\t\t\t\t.' WHERE dat.type = '.$ilDB->quote('null','text')\n\t\t\t\t.' AND lck.obj_id IS NULL'\n\t\t\t\t;\n/*\tTODO: smeyer.' FOR UPDATE' */\n\t\t\n \t$r = $ilDB->query($q);\n\t\twhile ($row = $r->fetchRow(DB_FETCHMODE_ASSOC))\n\t\t{\n\t\t\t$references = ilObject::_getAllReferences($row['obj_id']);\n\t\t\t$obj = new ilObjNull($row['obj_id'], false);\n\t\t\tif (count($references) == 0)\n\t\t\t{\n\t\t\t\t$obj->delete();\n\t\t\t} else {\n\t\t\t\tforeach ($references as $refId)\n\t\t\t\t{\n\t\t\t\t\t$obj->setRefId($refId);\n\t\t\t\t\t$obj->delete();\n\t\t\t\t\t$nodeData = $tree->getNodeData($refId);\n\t\t\t\t\t$tree->deleteTree($nodeData);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected function prepareEntries() {}" ]
[ "0.61189884", "0.60202163", "0.59121907", "0.5906392", "0.59041053", "0.585781", "0.57897973", "0.5757262", "0.57201475", "0.5714127", "0.571013", "0.57090247", "0.56981945", "0.5683007", "0.56612146", "0.5653961", "0.5653961", "0.5644074", "0.5644074", "0.5644074", "0.56309664", "0.56304604", "0.5623887", "0.56070757", "0.56070757", "0.56070757", "0.5548973", "0.55114627", "0.55056155", "0.5502708", "0.5485529", "0.5464179", "0.5458122", "0.5452991", "0.54201686", "0.5391394", "0.5368195", "0.5361567", "0.5360796", "0.53449106", "0.53406024", "0.53265893", "0.5325677", "0.5320746", "0.5310122", "0.5292245", "0.52902895", "0.52802104", "0.5270263", "0.52579314", "0.52561563", "0.52561563", "0.5255018", "0.52436", "0.5234719", "0.52185184", "0.52111375", "0.5199725", "0.5199311", "0.51886237", "0.5168267", "0.516666", "0.51611584", "0.51569766", "0.51482075", "0.51482075", "0.5143302", "0.5142346", "0.51417965", "0.5140385", "0.51392585", "0.51382565", "0.513615", "0.51336026", "0.5132661", "0.5109407", "0.51091486", "0.51025486", "0.50986356", "0.5092854", "0.50917", "0.50846434", "0.5082535", "0.508186", "0.5080372", "0.5073461", "0.50733185", "0.5071766", "0.50677615", "0.50668406", "0.50668406", "0.5066791", "0.5066141", "0.5066141", "0.5066141", "0.50627697", "0.5057323", "0.5047717", "0.5044487", "0.5037427" ]
0.722821
0
Search admin by name
Поиск администратора по имени
public function ajxSearchAdminName($adminName) { $escaped_name = addcslashes($adminName, '%'); $sql = "SELECT user.*, group_concat(user_tel.tel_no) AS telNos FROM user JOIN user_tel on user.user_id =user_tel.user_id WHERE user.role = 'admin' AND (user.first_name LIKE :first_name OR user.last_name LIKE :first_name) GROUP BY user.user_id"; $st = $this->db->prepare($sql); // print_r($sql); $st->execute(array( ':first_name' => "$adminName%" )); return $st->fetchAll(PDO::FETCH_ASSOC); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function admin_search() {\n $this->search();\n }", "public function adminsearch()\n {\n $search_text = $_GET['admin_search'];\n $adminsearch = Personal::where('unique_id', 'like', '%'.$search_text.'%')->first();\n return view('admin.form.search', compact('adminsearch'));\n }", "function dsadmin(){\n\n\t\t\t$input = array();\n\t\t\t$input['like'] = array('username' => 'h');\n\t\t\t$list = $this->admin_model->get_list($input);\n\t\t\n\t\t\tpre($list);\n\t\t}", "public function searchAdmin()\n {\n // should not be searched.\n $lookup_type = 'minatpekerjaan';\n $criteria=new CDbCriteria;\n\n\t\t\tif(!empty($this->lookup_id)){\n\t\t\t\t$criteria->addCondition(\"lookup_id = \".$this->lookup_id);\t\t\t\n\t\t\t}\n $criteria->compare('LOWER(lookup_name)',strtolower($this->lookup_name),true);\n $criteria->compare('LOWER(lookup_value)',strtolower($this->lookup_value),true);\n $criteria->compare('LOWER(lookup_type)',strtolower($lookup_type),true);\n $criteria->compare('lookup_urutan',$this->lookup_urutan);\n $criteria->compare('LOWER(lookup_kode)',strtolower($this->lookup_kode),true);\n $criteria->compare('lookup_aktif',isset($this->lookup_aktif)?$this->lookup_aktif:true);\n $criteria->order = 'lookup_type, lookup_urutan';\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function searchAdmin()\n {\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('author_name',$this->author_name,true);\n\t\t$criteria->compare('link',$this->link);\n\t\t$criteria->compare('insert_date',$this->insert_date,true);\n\t\t$criteria->compare('user_ip',$this->user_ip,true);\n\t\t$criteria->compare('is_university_document',$this->is_university_document);\n\t\t$criteria->compare('status',$this->status);\n $criteria->compare('user_id',$this->user_id);\n \n //$criteria->compare('status', 2);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n }", "function searchforadminuser(){\t//die('here');\n\t\t\t$this->layout = false;\n\t\t\t$id=$this->Session->read('User.id');\n\t\t\t$q=$_REQUEST['searchword'];\n\t\t\t//pr($q);die;\n\t\t\t$search=$this->User->query(\"select id,firstname,lastname,email,image from users where(firstname like '%$q%' or lastname like '%$q%' or email like '%$q%') order by id LIMIT 3\");\n\t\t//pr($search); die;\n\t\t$this->set('search',$search);\n\t\t$this->set('q',$q);\n\t\t$html=$this->render();\n\t\techo $html;\n\t\tdie;\n\t}", "public function getAdminByUserName($userName);", "function admin_index()\n\t{\n\t\t$search = (isset($this->params['named']['search']))\n\t\t\t? $this->params['named']['search']\n\t\t\t: '';\n\t\t\t\n\t\t$conditions = array();\n\t\t\n\t\tif(!empty($search)) {\n\t\t\t$conditions['OR'] = array(\n\t\t\t\t'Content.id =' => $search,\n\t\t\t\t'Content.name LIKE' => '%'.$search.'%',\n\t\t\t\t'Content.title LIKE' => '%'.$search.'%',\n\t\t\t\t'Content.body LIKE' => '%'.$search.'%',\n\t\t\t\t'Content.slug LIKE' => '%'.$search.'%',\n\t\t\t);\n\t\t}\n\n\t\t$contain = array();\n\n\t\t$this->set('search', $search);\n\t\t\n\t\t$this->data = $this->paginate('Content', $conditions);\n\t}", "public function listAsAdmin();", "public function suggestStoreAdminNamesAction() {\r\n $viewer_id = Engine_Api::_()->user()->getViewer()->getIdentity();\r\n $text = $this->_getParam('value');\r\n $store_admin_ids = $this->_getParam('store_admin_ids', null);\r\n $store_id = $this->_getParam('store_id', null);\r\n $limit = $this->_getParam('limit', 40);\r\n \r\n if( empty($store_id) )\r\n {\r\n return;\r\n }\r\n \r\n $userTable = Engine_Api::_()->getItemTable('user');\r\n $userTableName = $userTable->info('name');\r\n \r\n $manageAdminsTable = Engine_Api::_()->getDbtable('manageadmins', 'sitestore');\r\n $manageAdminsTableName = $manageAdminsTable->info('name');\r\n \r\n $select = $userTable->select()\r\n ->from($userTableName)\r\n ->setIntegrityCheck(false)\r\n ->joinLeft($manageAdminsTableName, \"$manageAdminsTableName.user_id = $userTableName.user_id\", array(\"\")) \r\n ->where(\"$userTableName.displayname LIKE ?\", \"%\" . $text . \"%\")\r\n ->where(\"$manageAdminsTableName.user_id !=?\", $viewer_id)\r\n ->where(\"$manageAdminsTableName.store_id =?\", $store_id);\r\n \r\n if( !empty($store_admin_ids) )\r\n {\r\n $select->where(\"$manageAdminsTableName.user_id NOT IN ($store_admin_ids)\");\r\n } \r\n \r\n $select->order(\"$userTableName.displayname ASC\")->limit($limit);\r\n $users = $userTable->fetchAll($select);\r\n\r\n $data = array();\r\n $mode = $this->_getParam('struct');\r\n if ($mode == 'text') {\r\n foreach ($users as $user) {\r\n $data[] = $user->displayname;\r\n }\r\n } else {\r\n foreach ($users as $user) {\r\n $data[] = array(\r\n 'id' => $user->user_id,\r\n 'label' => $user->displayname,\r\n 'photo' => $this->view->itemPhoto($user, 'thumb.icon'),\r\n );\r\n }\r\n }\r\n\r\n if ($this->_getParam('sendNow', true)) {\r\n return $this->_helper->json($data);\r\n } else {\r\n $this->_helper->viewRenderer->setNoRender(true);\r\n $data = Zend_Json::encode($data);\r\n $this->getResponse()->setBody($data);\r\n }\r\n }", "public function adminSearch()\n {\n $cars = (new Search)->query(new Car, ['brand', 'carModel', 'plates'], 5);\n return view('car.index')->with('cars', $cars);\n }", "public function list_admin()\n {\n return $this->db->get_where(\"admin\");\n }", "public function getAdmins();", "public function isAdmin($name=null);", "public function admin_index() {\n\n\t\tif (isset($this->request->data['User']['search'])) {\n\t\t\t$keyword = $this->request->data['User']['search'];\n\t\t\t//pr($keyword);die();\n\t\t} else {\n\t\t\t$keyword = '';\n\t\t}\n\t\t$this->paginate = array(\n\t\t\t'limit' => 6,\n\t\t\t'recursive' => 2,\n\t\t\t'order' => array('id' => 'desc'),\n\t\t\t'conditions' => array(\n\t\t\t\t'OR' => array('first_name LIKE' => '%' . $keyword . '%'),\n\t\t\t),\n\t\t);\n\t\t$users = $this->paginate('User');\n\n\t\t$this->set('users', $users);\n\n\t}", "public function index()\n {\n $admin_name=request()->admin_name;\n $where=[];\n if($admin_name){\n $where[]=['admin_name','like',\"%$admin_name%\"];\n }\n $pageSize=config('app.pageSize');\n $cate=Admin::where($where)->orderby('admin_id','desc')->paginate($pageSize);\n return view('admin.index',['cate'=>$cate,'admin_name'=>$admin_name]);\n }", "public function search_admin($title)\n {\n $query = $this->db->query(\"SELECT * from admin_populate_blog WHERE title LIKE '$title%' \");\n return $query->result_array();\n }", "public function searchAdminList(): Query\n {\n $entity = $this->getEntityName();\n $dql = \"SELECT {$entity} FROM {$this->bundle}:Evenement {$entity}\";\n $query = $this->getQuery($dql);\n\n return $query;\n }", "public static function admin_page() {\n\t\tSitewide_Search::get_template( 'sitewide-search-admin' );\n\t}", "public function searchMember() {\r\n \t$this->auth()->setRequirements('roles', ['Admin']);\r\n \t$this->auth()->setRequirements('rights', ['ManageMembers','ManageRights']);\r\n \t$this->redirectNotAuthorized();\r\n \t\r\n \tif(!isset($_POST['search'])){\r\n \t\t$this->layout()->render('admin/members/search.php');\r\n \t\t\r\n \t}else{ \t\t\r\n \t\t$this->memberlist();\r\n \t}\r\n \t\r\n }", "function _admin_search_query()\n{\n}", "public static function listAdmin()\n {\n if( isset( self::$Factory['admin'] ) )\n return self::$Factory['admin'];\n }", "public function actionAdmin()\n {\n Url::remember('', 'actions-admin');\n $this->checkAccess('user___account__manage');\n\n /** @var UserHeadManagerSearch $search */\n $search = \\Yii::createObject(UserHeadManagerSearch::className());\n $data_provider = $search->search(\\Yii::$app->request->get());\n\n\n return $this->render('admin', [\n 'search' => $search,\n 'data_provider' => $data_provider,\n ]);\n }", "public function searchAdmin()\n {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n\n $criteria->compare('created_at', $this->created_at, true);\n\n $criteria->compare('updated_at', $this->updated_at, true);\n\n $criteria->compare('table_name', $this->table_name, true);\n\n $criteria->compare('column_name', $this->column_name, true);\n\n $criteria->compare('old_value', $this->old_value, true);\n\n $criteria->compare('new_value', $this->new_value, true);\n\n $criteria->compare('user_id', $this->user_id);\n\n $criteria->compare('emp_id', $this->emp_id);\n\n $criteria->compare('trans_type', $this->trans_type);\n\n $criteria->compare('is_deleted', $this->is_deleted);\n\n $criteria->order = 'id desc';\n\n return new CActiveDataProvider('AuditTrails', array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => self::PAGE_SIZE)\n ));\n }", "public function actionAdmin() {\n $model = new $this->modelName('search');\n $model->unsetAttributes(); // Elimina cualquier valor por defecto\n if (isset($_GET[$this->modelName]))\n $model->attributes = $_GET[$this->modelName];\n\n $this->render('admin', array(\n 'model' => $model,\n ));\n }", "public function admin_search() {\n $url['action'] = 'index';\n \n // build a URL will all the search elements in it\n // the resulting URL will be\n // example.com/cake/posts/index/Search.keywords:mykeyword/Search.tag_id:3\n foreach ($this->data as $k=>$v){\n foreach ($v as $kk=>$vv){\n $url[$k.'.'.$kk]=$vv;\n }\n }\n \n // redirect the user to the url\n $this->redirect($url, null, true);\n }", "public function admin_search() {\n $url['action'] = 'index';\n \n // build a URL will all the search elements in it\n // the resulting URL will be\n // example.com/cake/posts/index/Search.keywords:mykeyword/Search.tag_id:3\n foreach ($this->data as $k=>$v){\n foreach ($v as $kk=>$vv){\n $url[$k.'.'.$kk]=$vv;\n }\n }\n \n // redirect the user to the url\n $this->redirect($url, null, true);\n }", "function ADMIN_KEYWORD()\n\t{\n\t\tif(env('MULTILINGUAL')) {\n\t\t\treturn \"gulf-admin\";\n\t\t} else {\n\t\t\treturn \"lifrica-admin\";\n\t\t}\n\t}", "public function getName()\n {\n return \"search\";\n }", "public function actionSearch($name)\n {\n \t$name = isset($name) ? $name : '';\n \t$list = array();\n \t$name = trim($name);\n \tif($name != '')\n \t{\n \t\t$query = UsersBase::find()->select(['id', 'fname', 'lname', 'status'])\n \t\t->where(['status' => 1, 'usertype' => UsersBase::UserTypeCandidate])\n \t\t->andFilterWhere(['or', ['like' , 'lname', $name],['like' , 'fname', $name]])\n \t\t->orderBy(['lname' => SORT_ASC, 'fname' => SORT_ASC]);\n \t\t$list = $query->all();\n \t\t//echo $query->createCommand()->sql; exit;\n \t}\n \n \tif(count($list) == 0)\n \t{\n \t\techo Yii::t('app', 'keine Ergebnisse');\n \t\texit;\n \t}\n \n \tforeach ($list as $item)\n \t{\n \t\techo '<li data-id=\"' . $item->id . '\">' . $item->fullname() . '</li>';\n \t}\n \texit;\n }", "public function index(Request $request)\n {\n $keyWord = $request->input(\"key_word\",\"\");\n if($keyWord){\n $adminRes = Admin::where(\"real_name\",\"like\",\"%{$keyWord}%\")->paginate(20);\n }else{\n $adminRes = Admin::paginate(20);\n }\n return view(\"admin.admin_list\",['adminRes'=>$adminRes]);\n }", "public static function inAdmin() {}", "public function admin_manage() {\n $conditions = \"User.role = '\" . UserRoleConst::RoleUser . \"'\";\n if (!empty($this->request->query['keyword'])) {\n $keyword = strtolower(trim($this->request->query['keyword']));\n $conditions .= \" AND ( LOWER(User.first_name) LIKE '%\" . $keyword . \"%' OR LOWER(User.last_name) LIKE '%\" . $keyword . \"%' OR LOWER(User.email) LIKE '%\" . $keyword . \"%')\";\n }\n if (!empty($this->request->query['type'])) {\n $account_type = strtolower(trim($this->request->query['type']));\n $conditions .= \" AND LOWER(User.user_type) = '\" . $account_type . \"'\";\n }\n\n $this->paginate = array(\n 'conditions' => $conditions,\n 'order' => 'User.id desc',\n 'limit' => ADMIN_PAGE_LIMIT\n );\n $users = $this->paginate('User');\n $this->set('users', $users);\n }", "public function search()\n\t{\n\t\t$request = array(\"name\" => $this->input->get(\"search\", TRUE));\n\n\t\t$data[\"members\"] = $this->Member->find_by($request);\n\t\t$data[\"main_content\"] =\t\"members/index\";\n\n\t\t$this->load->view(\"admin/template\", $data);\n\t}", "public function actionAdmin()\n {\n $searchModel = new AuthItemSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('admin', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n\n }", "public function Get_By_Admin()\n {\n\n $users = $this->Get(\"WHERE `is_admin`=1\");\n if(count($users) > 0)\n {\n return $users;\n }\n return FALSE;\n }", "public function users_search()\n {\n if($this->session->userdata('logged_in_admin'))\n {\n $this->load->view('admin/users/search.php');\n }else{\n $this->login();\n }\n }", "public function admin_index() {\r\n\r\n }", "function admin_index() {\n\t\t$type = isset($this->params['type']) == '' ? $this->params['named']['type'] : $this->params['type'];\n\t\t//escaping from the initial search session\n\t\tif(!empty($this->params['page']) and intval($this->params['page']) <=0) {\n\t\t\tif(isset($_SESSION['search'])) unset($_SESSION['search']);\n\t\t\t$this->redirect(array('type'=>$type,'action'=>'index'));\n\t\t}\n\t\t\n\t\tif((isset($this->params['type']) && $this->params['type']<>\"\") or (isset($this->params['named']['type']) && $this->params['named']['type']<>\"\")) {\n\t\t\t$type = isset($this->params['type'])=='' ? $this->params['named']['type'] :$this->params['type'];\n\t\t\tif($type=='clients') {\n\t\t\t\t$tm = 'Client';\n\t\t\t\t$condition[] = array('User.type'=>'C');\n\t\t\t\t$containmodels = array('Client');\n\t\t\t\t$fields = array('User.id','User.username','User.status','User.created','Client.first_name','Client.last_name','Client.company','Client.of_zip','Client.created');\n\t\t\t} else {\n\t\t\t\t$tm = 'Notary';\n\t\t\t\t$condition[] = array('User.type'=>'N');\n\t\t\t\t$containmodels = array('Notary');\n\t\t\t\t$fields = array('User.id','User.username','User.status','User.created','Notary.first_name','Notary.last_name','Notary.userstatus','Notary.zipcode','Notary.dd_zip','Notary.created');\n\t\t\t\t$this->set('notaryoptions', $this->_notaryoptions());\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(isset($_SESSION['search']['condition']) and !empty($_SESSION['search']['condition'])) {\n\t\t\t$condition[] = array(implode(' AND ', @$_SESSION['search']['condition']));\n\t\t}\n\t\t$this->User->Behaviors->attach('Containable');\n\t\t$this->paginate = array('contain'=>$containmodels, 'conditions'=>@$condition, 'order'=>'User.created DESC', 'fields'=>$fields);\n\t\t$this->set('users', $this->paginate('User'));\n\t\t$this->set('statusoptions', $this->_statusOptions());\n\t\t$this->set('yesnooptions', $this->_ynoptns());\n\t\t$this->set('usertype', $type);\n\t\t$this->set('usermodel', $tm);\n\t\t$this->set('statusoptns', $this->_statusOptions('p'));\n\t\t$this->set('states', $this->_stateoptions());\n\t\t$this->set('langoptions', $this->_langoptions());\n\t}", "function searchByName($title){\n $name = $title['search'];\n return db()->query(\"SELECT * FROM products WHERE productName LIKE '%$name%'\");\n }", "public function getAdmin(string $name)\n\t{\n\t\t$query = $this->getDb()->prepare('SELECT * FROM users WHERE email = :email');\n\t\t$query->bindValue(\"email\", $name, PDO::PARAM_STR);\n\t\t$query->execute();\n\n\t\t$dataAdmin = $query->fetchAll(PDO::FETCH_ASSOC);\n\t\tforeach ($dataAdmin as $admin) {\n\t\t\treturn new Admin($admin);\n\t\t}\n\t}", "public function searchAction()\n {\n $kosts = $this->modelsManager\n ->createBuilder()\n ->from(Kost::class)\n ->where('nama LIKE :search:', \n [\n 'search' => '%' . $search . '%',\n ]\n )\n ->getQuery()\n ->execute();\n }", "public function adminIndex()\n {\n $config = [\n 'title' => trans('HCSlugs::slugs.page_title'),\n 'listURL' => route('admin.api.slugs'),\n 'newFormUrl' => route('admin.api.form-manager', ['slugs-new']),\n 'editFormUrl' => route('admin.api.form-manager', ['slugs-edit']),\n // 'imagesUrl' => route('resource.get', ['/']),\n 'headers' => $this->getAdminListHeader(),\n ];\n\n $config['actions'][] = 'search';\n\n return hcview('HCCoreUI::admin.content.list', ['config' => $config]);\n }", "function superadmin_index() {\n\t\n\tif($this->request->url == 'superadmin') \n\t{\n\t\tif($this->Session->read('param_search')) \n\t\t\t{\n\t\t\t\t$this->Session->delete('param_search');\n\t\t\t}\n\t\tif($this->Session->read('data_search')) \n\t\t\t{\n\t\t\t\t$this->Session->delete('data_search');\n\t\t\t}\n\t}\t\n\t\n\t\t$this->set('meta_title','Admin users');\n\t\t$search = '';\n\t\t$act = '';\n\t\t$active = '';\n\t\t$argArr = array();\n\t\t$cond = '';\t\t\n\tif(isset($this->params['pass'][0]) && isset($this->params['pass'][1]) && $this->params['pass'][1] == 'page_record') {\n\t\t$this->Session->write('per_page_record',$this->params['pass'][0]);\n\t}\t\t\n\t\t/* Search conditon for text value */\n\t\t\n\t\t\n\t\tif(!empty($this->request->data)) {\n\t\t\t$search = $this->request->data['Adminuser']['search'];\n\t\t\t$act = $this->request->data['Adminuser']['act'];\n\t\t\t$this->Session->write('data_search',$this->data['Adminuser']);\n\t\t\t\tif($this->Session->read('param_search')) {\n\t\t\t\t\t$this->Session->delete('param_search');\n\t\t\t\t}\t\t\t\n\t\t}\n\t\telse if(isset($this->params['named']['search']) && $this->params['named']['search']) {\n\t\t\t $search = $this->params['named']['search'];\n\t\t\t $act = $this->params['named']['act'];\n\t\t\t $this->Session->write('param_search',$this->params['named']);\n\t\t\t\t if($this->Session->read('data_search')) {\n\t\t\t\t\t$this->Session->delete('data_search');\n\t\t\t\t}\t\t\t\t \n\t\t}\n\t\telse if($this->Session->read('data_search')) {\n\t\t\t$search = $this->Session->read('data_search.search');\n\t\t\t$act = $this->Session->read('data_search.act');\n\t\t\t\tif($this->Session->read('param_search')) {\n\t\t\t\t\t$this->Session->delete('param_search');\n\t\t\t\t}\t\t\n\t\t}\n\t\telse if($this->Session->read('param_search')) {\n\t\t\t$search = $this->Session->read('param_search.search');\n\t\t\t$act = $this->Session->read('param_search.act');\n\t\t\t\t if($this->Session->read('data_search')) {\n\t\t\t\t\t$this->Session->delete('data_search');\n\t\t\t\t}\t\t\n\t\t}\t\t\n\t\t\n\t\tif($search) {\n\t\t\t$argArr['search'] = $search;\n\t\t\t$argArr['act'] = $act;\n\t\t switch($search) {\n\t\t \tcase 'name' : \n\t\t\t \t\t$cond[] = array('OR'=>array('Adminuser.first_name LIKE'=>'%'.$search.'%','Adminuser.last_name LIKE'=>'%'.$search.'%'));\n\t\t\t \tbreak;\n\t\t\t \tcase 'email' : \n\t\t\t \t \t$cond[] = array('Adminuser.email LIKE'=>'%'.$search.'%');\n\t\t\t \tbreak;\t\n\t\t\t \tcase 'role' : \n\t\t\t \t \t$cond[] = array('Role.role_name LIKE'=>'%'.$search.'%');\n\t\t\t \tbreak;\t\t \n\t\t\t \tdefault :\t \n\t\t \t\t$cond[] = array('OR'=>array('Adminuser.first_name LIKE'=>'%'.$search.'%','Adminuser.last_name LIKE'=>'%'.$search.'%','Adminuser.username LIKE'=>'%'.$search.'%','Adminuser.email LIKE'=>'%'.$search.'%','Role.role_name LIKE'=>'%'.$search.'%'));\n\t\t\t }\n\t\t}\n\t\t\n\t\t$this->set('search', $search); \n\t\t$this->set('active', $active); \n\t\t$this->set('act', $act); \n\t\t$this->set('argArr', $argArr);\n\t\t/* End Search conditon for text value */\n\t\t/* Search conditon for Active status */\n\t\tif(isset($this->data['Adminuser']['active']) && $this->data['Adminuser']['active']) {\n\t\t\t$active = $this->data['Adminuser']['active'];\n\t\t}\n\t\telse if(isset($this->params['named']['active']) && $this->params['named']['active']) {\n\t\t\t$active = $this->params['named']['active'];\n\t\t}\n\t\telse {\n\t\t\t$active = ($this->Session->read('data_search.active')) ? $this->Session->read('data_search.active') : $this->Session->read('param_search.active');\n\t\t}\t\t\n\t\tif($active) {\n\t\t \t$this->set('active',$active);\n\t\t $cond[] = array('Adminuser.active'=>$active);\n\t\t}\n\t\n\t\t//all active and inactive records for paging.\n\t\t$active_record = $this->Adminuser->find('count',array('conditions'=>array('Adminuser.active'=>'yes',$cond)));\n\t\t$inactive_record = $this->Adminuser->find('count',array('conditions'=>array('Adminuser.active'=>'no',$cond)));\n\t\t$this->set('active_record',$active_record);\n\t\t$this->set('inactive_record',$inactive_record);\t\t\t\n\t\t/* End Search conditon for Active status */\n\t\t$condition = $cond;\n\t\t$record = ($this->Session->read('per_page_record')) ? $this->Session->read('per_page_record') : ADMIN_PER_PAGE_RECORD;\t\t\n\t\t$this->paginate = array('limit' => $record,'order' => array('Adminuser.first_name'=>'ASC'));\n\t\t$data = $this->paginate('Adminuser', $condition);\n\t\t\n\t\t $this->set('data',$data);\n\t\t\n\t }", "function adminUserList() {\n $arrClms = array(\n 'pkAdminID',\n 'AdminUserName',\n 'AdminCountry',\n 'AdminRegion'\n );\n $varWhr = \"AdminType = 'user-admin'\";\n $varOrderBy = 'AdminUserName ASC ';\n $arrRes = $this->select(TABLE_ADMIN, $arrClms, $varWhr);\n //pre($arrRes);\n return $arrRes;\n }", "function find_all_admins() {\n global $db;\n\n $sql = \"SELECT * FROM admins \";\n $sql .= \"ORDER BY last_name ASC, first_name ASC\";\n $result = mysqli_query($db, $sql);\n confirm_result_set($result);\n return $result;\n }", "public function admin_index($type=NULL) {\n\t\t$this->bulkactions();\n\t\t/* code to perform search functionality */\n\t\tif(isset($this->data) && !empty($this->data['User']['searchval'])){\n\t\t\t$this->Session->write('searchval',$this->data['User']['searchval']);\n\t\t\t$this->conditions\t= array(\"OR\"=>array(\"User.username like\"=>\"%\".$this->data['User']['searchval'].\"%\"));\n\t\t}\n\t\t\n\t\tif(isset($this->params['named']['page'])){\n\t\t\t\n\t\t\tif($this->Session->read('searchval')){\n\t\t\t\t$this->conditions\t= array(\"OR\"=>array(\"User.username like\"=>\"%\".$this->Session->read('searchval').\"%\"));\n\t\t\t\t$this->data['User']['searchval'] = $this->Session->read('searchval');\n\t\t\t}\n\t\t}elseif(empty($this->conditions)){\n\t\t\t$this->Session->delete('searchval');\n\t\t}\n\t\t/* end of code to perform search functionality */\n\t\t$this->User->recursive = 0;\n\t\t$this->set('users', $this->paginate($this->conditions));\n\t}", "public function search() {}", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('admin_id', $this->admin_id);\n $criteria->compare('admin_name', $this->admin_name, true);\n $criteria->compare('admin_username', $this->admin_username, true);\n $criteria->compare('admin_password', $this->admin_password, true);\n $criteria->compare('admin_email', $this->admin_email, true);\n $criteria->compare('admin_status', $this->admin_status);\n $criteria->compare('admin_created', $this->admin_created, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public function getAdmin(){\n\t\treturn admin::all();\n\t}", "public function actionAdmin()\n {\n if(!Yii::$app->user->can('entreprise-admin')){\n return $this->permissionRedirect();\n }\n $searchModel = new EntrepriseSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n if(!Yii::$app->user->identity->isAdmin)\n $dataProvider->query->andWhere('user_id ='.Yii::$app->user->id);\n return $this->render('admin', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function searchableAs(): string\n {\n return 'menupage_index';\n }", "public function index_admin($name=null)\n {\n if($name!=null){\n return view('admin.store',['name' => $name]);\n }else{\n $stores = Store::all();\n return view('admin.stores',['stores' => $stores]); \n }\n\n }", "function view_admin_by_username($username){\n \tglobal $db;\n\n \t//Escape strings to protect against SQL injection\n \t$username = $db->escape_string($username);\n\n \t//Query the database for the provided username and password\n \t$query = \"SELECT * FROM Administrators \";\n \t$query .= \"WHERE username = '{$username}' \";\n\n \t$result = $db->db_query($query);\n \t$admin = $db->fetch_assoc($result);\n \t$db->free_result($result);\n\n \treturn $admin;\n }", "abstract public function getAdmin_a();", "public function index()\n {\n //\n $result = \\App\\Models\\M_user::\n with('group')\n ->orderBy('id','desc')\n ->whereNotIn('username',['superadmin'])\n ->where('type_user','user_bu');\n if(!empty($request->q))\n {\n $result->where('name','like','%'.$request->q.'%');\n }\n return $result->paginate(10);\n }", "public function admin();", "public function admin_index() {\n\n\t\t$orConditions = array();\n\t\t// $andConditions = array('NOT' => array('User.role_id' => array(1)));\n\t\t$andConditions = array('User.role_id' => array(2));\n\t\t$finalConditions = array();\n\n\t\t$in = 0;\n\t\t$per_page_show = $this->Session->read('user.per_page_show');\n\t\tif (empty($per_page_show)) {\n\t\t\t$per_page_show = ADMIN_PAGING;\n\t\t}\n\n\t\tif (isset($this->data['User']['keyword'])) {\n\t\t\t$keyword = trim($this->data['User']['keyword']);\n\t\t} else {\n\t\t\t$keyword = $this->Session->read('user.keyword');\n\t\t}\n\n\t\tif (isset($this->data['UserDetail']['country_id']) && !empty($this->data['UserDetail']['country_id'])) {\n\t\t\t$county = trim($this->data['UserDetail']['country_id']);\n\t\t\t$this->Session->write('user.country', $county);\n\t\t\t$in = 1;\n\t\t\t$andConditions1 = array(\n\t\t\t\t'UserDetail.country_id LIKE' => '%' . $county . '%',\n\t\t\t);\n\n\t\t\t$andConditions = array_merge($andConditions, $andConditions1);\n\t\t}\n\t\t//pr($keyword); die;\n\n\t\tif (isset($keyword)) {\n\t\t\t$this->Session->write('user.keyword', $keyword);\n\t\t\t$keywords = explode(\" \", $keyword);\n\t\t\tif (isset($keywords[0]) && !empty($keywords[0]) && count($keywords) < 2) {\n\t\t\t\t$keyword = $keywords[0];\n\t\t\t\t$in = 1;\n\t\t\t\t$orConditions = array('OR' => array(\n\t\t\t\t\t'User.email LIKE' => '%' . $keyword . '%',\n\t\t\t\t\t'UserDetail.first_name LIKE' => '%' . $keyword . '%',\n\t\t\t\t\t'UserDetail.last_name LIKE' => '%' . $keyword . '%',\n\t\t\t\t\t//'UserDetail.country_id LIKE' => '%' . $county . '%'\n\t\t\t\t));\n\t\t\t} else if (!empty($keywords) && count($keywords) > 1) {\n\t\t\t\t$first_name = $keywords[0];\n\t\t\t\t$last_name = $keywords[1];\n\t\t\t\t$in = 1;\n\t\t\t\t$andConditions = array('AND' => array(\n\t\t\t\t\t'UserDetail.first_name LIKE' => '%' . $first_name . '%',\n\t\t\t\t\t'UserDetail.last_name LIKE' => '%' . $last_name . '%',\n\t\t\t\t\t//'UserDetail.country_id LIKE' => '%' . $county . '%'\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t\tif (isset($this->data['User']['status'])) {\n\t\t\t$status = $this->data['User']['status'];\n\t\t} else {\n\t\t\t$status = $this->Session->read('user.status');\n\t\t}\n\n\t\tif (isset($status)) {\n\t\t\t$this->Session->write('user.status', $status);\n\t\t\tif ($status != '') {\n\t\t\t\t$in = 1;\n\t\t\t\t$andConditions = array_merge($andConditions, array('User.status' => $status));\n\t\t\t}\n\t\t}\n\n\t\tif (isset($this->data['User']['per_page_show']) && !empty($this->data['User']['per_page_show'])) {\n\t\t\t$per_page_show = $this->data['User']['per_page_show'];\n\t\t}\n\n\t\tif (!empty($orConditions)) {\n\t\t\t$finalConditions = array_merge($finalConditions, $orConditions);\n\t\t}\n\n\t\tif (!empty($andConditions)) {\n\t\t\t$finalConditions = array_merge($finalConditions, array('AND' => $andConditions));\n\t\t}\n\n\t\t//pr($finalConditions); die;\n\n\t\t//pr($this->paginate('User'));die;\n\t\t$allusers = $this->User->find('all', array('conditions' => $finalConditions));\n\t\t$count = $this->User->find('count', array('conditions' => $finalConditions));\n\n\t\t$this->set('count', $count);\n\t\t$this->set('title_for_layout', __('All Internal IdeasCast Users', true));\n\t\t$this->Session->write('user.per_page_show', $per_page_show);\n\t\t$this->User->recursive = 0;\n\t\t$this->paginate = array('conditions' => $finalConditions, \"limit\" => $per_page_show, \"order\" => \"User.created DESC\");\n\t\t$this->set('users', $this->paginate('User'));\n\t\t$this->set('in', $in);\n\t}", "function LogovanjeAdmin($id) {\n\t\t\t$sql1 = \"SELECT * FROM administrator WHERE email_admin LIKE '%\".$id.\"%' \";\n\t\t\t$result1 = $this->conn->query($sql1);\t\t\t\t\t\t\n\t\t\treturn $result1;\n\t\t}", "public static function usersAutoComplete($name='') {\n $sql= 'SELECT Drugname AS label FROM product WHERE title LIKE :name';\n $name = $name.'%';\n var_dump($sql);\n exit();\n return Yii::app()->db->createCommand($sql)->queryAll(true,array(':name'=>$name));\n \n // Not Recommended: Simple Way for those who can't understand the above way.\n // Uncomment the below and comment out above 3 lines \n /*\n $sql= \"SELECT id ,title AS label FROM users WHERE title LIKE '$name%'\";\n return Yii::app()->db->createCommand($sql)->queryAll();\n */\n \n }", "function LogovanjeAdmin($id) {\r\n\t\t\t$sql1 = \"SELECT * FROM administrator WHERE email_admin LIKE '%\".$id.\"%' \";\r\n\t\t\t$result1 = $this->conn->query($sql1);\t\t\t\t\t\t\r\n\t\t\treturn $result1;\r\n\t\t}", "function get_super_admins()\n{\n}", "public static function admin()\n {\n return static::find(static::$defaultRoles['admin']);\n }", "public function searchAction(Request $request)\n {\n if ($request->query->get('name'))\n {\n $q = $request->query->get('name');\n $em = $this->getDoctrine()->getManager();\n $users = $em->getRepository('FilRougeBundle:User')->findByUsername($q);\n } else {\n $users = '';\n }\n return $this->render('admin/roles.html.twig', array(\n 'users' => $users\n ));\n }", "public function getAdminName()\n {\n return $this->adminName;\n }", "public function actionIndex($name='')\n {\n $query=Role::find();\n if(!empty($name)){\n $query->where(\" name like concat('%',:name,'%')\",[':name'=>$name]);\n }\n \n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination'=>[\n 'pagesize'=>10,\n ]\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getAdministrator() {}", "public function search( $name)\n {\n return widget::where('name','like','%'.$name.'%')->get();\n }", "public function actionSearch() {\n\t\t$query = (string) Yii::$app->request->get('q');\n\t\t$result = GenreElastic::find()->query(['match' => ['name' => $query]])->all();\n\n\t\treturn $result;\n\t}", "public function getSearcher() {\n return $this->info['name'];\n }", "public function userwalikelas_terdaftar() {\n\t\treturn $this->db->query('SELECT *FROM admin WHERE hak_akses=\"walikelas\" ORDER BY username ASC');\n\t}", "protected function filterGrid()\n {\n return Admin::grid(Administrator::class, function (Grid $grid) {\n\n });\n }", "protected function search(){\n $query = \"select * from $this->table_name\n WHERE user_log_name = '$this->user_log_name'\";\n return $this->excute_query($query);\n }", "public function admin_user();", "public function actionIndex()\n {\n $searchModel = new AdminSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function admin_search($user_id = null, $user_name = null, $email = null) {\n $this->layout = 'admin';\n $this->isAdmin();\n\n //Check if atleast one input has a value\n if((is_null($user_id) || $user_id == '') && (is_null($user_name) || $user_name == '') && (is_null($email) || $email == '')) {\n $products = null;\n }\n else {\n $find_array = array(\n 'limit' => 20,\n 'conditions' => array('OR' => array()), \n );\n\n if((!is_null($user_id) && $user_id != '')){\n $find_array['conditions']['OR']['id'] = $user_id; \n }\n\n if((!is_null($user_name) && $user_name != '')){\n $find_array['conditions']['OR']['LOWER(first_name) LIKE'] = '%' . strtolower($user_name) . '%'; \n $find_array['conditions']['OR']['LOWER(last_name) LIKE'] = '%' . strtolower($user_name) . '%'; \n }\n\n if((!is_null($email) && $email != '')){\n $find_array['conditions']['OR']['LOWER(email)'] = strtolower($email); \n }\n\n $this->Paginator->settings = $find_array;\n $users = $this->Paginator->paginate($this->User);\n\n }\n $user_id = is_null($user_id) || $user_id == 'null' ? '' : $user_id;\n $user_name = is_null($user_name) || $user_name == 'null' ? '' : $user_name;\n $email = is_null($email) || $email == 'null' ? '' : $email;\n $this->set(compact('users', 'user_id', 'user_name', 'email'));\n }", "function admin() ;", "function find_admin_by_username($username) {\n global $db;\n\n $sql = \"SELECT * FROM admins \";\n $sql .= \"WHERE username='\" . db_escape($db, $username) . \"' \";\n $sql .= \"LIMIT 1\";\n \n $result = mysqli_query($db, $sql);\n confirm_result_set($result);\n $admin = mysqli_fetch_assoc($result);\n mysqli_free_result($result);\n return $admin; // returns an assoc. array\n }", "public function index(Request $request)\n {\n $params = $request->all();\n $uname = $request->input('uname','');\n $auth = $request->input('auth','_');\n $condition[] = ['uname','like','%'.$uname.'%'];\n $condition[] = ['auth','like',$auth];\n $admins = Admin::where($condition)->paginate(3);\n return view('admin/admin/index',['title'=>'管理员列表','params'=>$params,'admins'=>$admins]);\n }", "public function index(Request $request)\n {\n //管理员列表\n $k = $request->input(\"keywords\");\n $user = DB::table(\"admin\")->where(\"admin_name\",\"like\",\"%\".$k.\"%\")->paginate(5);\n return view(\"Admin.Admin.index\",[\"user\"=>$user,\"request\"=>$request->all()]);\n }", "public function getAdminName(): string\n {\n return $this->adminName;\n }", "public function admin_manage() {\n\t\t\n\t\t$this->News->recursive = 0;\n\t\t\n\t\t$conditions = \"News.status != 2\";\n\t\tif ( !empty($this->request->query['keyword']))\n\t\t{\n\t\t\t$keyword = strtolower(trim($this->request->query['keyword']));\n\t\t\t$conditions\t.= \" AND ( LOWER(News.title)) LIKE '%\" . $keyword . \"%' \";\n\t\t}\n\t\t\n\t\t$this->paginate = array(\n\t\t\t'conditions' => $conditions,\n\t\t\t'order' => 'News.id desc',\n\t\t\t'limit' => ADMIN_PAGE_LIMIT\n\t\t);\n\t\t\n\t\t$news = $this->paginate('News');\n\t\t$this->set('news', $news);\t\t\n\t}", "public function index(Request $request)\n {\n $keyword = $request->input('keyword','');\n $num = $request->input('num', 20);\n// ->where('phone','like','%'.$keyword.'%')\n// ->orWhere('username','like','%'.$keyword.'%')\n $admins = Admin::orderBy('id','desc')\n ->where(function($query) use($keyword){\n if($keyword){\n $query->where('phone','like','%'.$keyword.'%')\n ->orWhere('username','like','%'.$keyword.'%');\n }\n })->paginate($num);\n $params = [\n 'keyword'=>$keyword,\n 'num'=>$num\n ];\n return view('admin.admins.index', compact('admins','params'));\n }", "public function admin_search_page() {\n $this->layout = false;\n if (isset($this->data) && !empty($this->data)) {\n\n $searchData = trim($this->data['mssg']);\n $cond = array();\n if (!empty($searchData)) {\n $cond[] = array(\n 'or' => array(\n \"Page.title LIKE\" => \"%\" . $searchData . \"%\",\n \"Page.id\" => $searchData,\n //\"Page.views\" => $searchData,\n ));\n }\n\n $this->paginate = array('recursive' => -1,\n 'conditions' => $cond,\n 'order' => array('Page.id' => 'DESC'),\n 'limit' => 100);\n $data = $this->paginate('Page');\n $this->set('all', $data);\n }\n }", "function fetch_adminname($adminid)\n{\n global $ilance, $phrase, $myapi, $phrase;\n \n $sql = $ilance->db->query(\"\n SELECT username\n FROM \" . DB_PREFIX . \"users\n WHERE user_id = '\" . intval($adminid) . \"'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql) > 0)\n {\n $res = $ilance->db->fetch_array($sql);\n return stripslashes($res['username']);\n }\n \n return $phrase['_unknown'];\n}", "public function search_user($search_data) {\n if ($search_data['name'] == '' && $search_data['role'] == '') {\n $this->db->select('admin_users.*, user_roles.role as user_role');\n $this->db->from('admin_users');\n $this->db->join('user_roles', 'admin_users.role = user_roles.id');\n } elseif ($search_data['name'] != '' && $search_data['role'] != '') {\n $this->db->select('admin_users.*, user_roles.role as user_role');\n $this->db->from('admin_users');\n $this->db->join('user_roles', 'admin_users.role = user_roles.id');\n $this->db->like('admin_users.name', $search_data['name']);\n $this->db->where('admin_users.role', $search_data['role']);\n } elseif ($search_data['name'] != '' && $search_data['role'] == '') {\n $this->db->select('admin_users.*, user_roles.role as user_role');\n $this->db->from('admin_users');\n $this->db->join('user_roles', 'admin_users.role = user_roles.id');\n $this->db->like('admin_users.name', $search_data['name']);\n } elseif ($search_data['name'] == '' && $search_data['role'] != '') {\n $this->db->select('admin_users.*, user_roles.role as user_role');\n $this->db->from('admin_users');\n $this->db->join('user_roles', 'admin_users.role = user_roles.id');\n $this->db->where('admin_users.role', $search_data['role']);\n } else {\n $this->db->select('admin_users.*, user_roles.role as user_role');\n $this->db->from('admin_users');\n $this->db->join('user_roles', 'admin_users.role = user_roles.id');\n }\n $query = $this->db->get();\n $query_result = $query->result();\n return $query_result;\n }", "public function searchAction()\n {\n $app_user = $this->getUser();\n die();\n }", "public function in_admin($admin = \\null)\n {\n }", "function Getadmin() {\n\t\treturn $this->db->query(\"select *from tbl_admin order by id_admin asc\");\n\t}", "static function admin_list(){\n return self::$db->where(array('role_id' => 1,'activated' => 1))->get('users')->result();\n }", "public function getAdmin($data){\n $this->db->from('admin_user');\n $this->db->where($data);\n return $this->db->get()->result();\n }", "abstract public function admin();", "public function search_names($name, $status = 1) {\n $this->like('searchname', text::searchable($name)); \n $this->where('site_id', kohana::config('chapterboard.site_id'));\n $this->where('status', $status);\n foreach ($this->find_all() as $user) {\n $results[] = array(\n 'id' => $user->id,\n 'name' => $user->name(),\n );\n }\n return $results;\n }", "public function searchConfiguration()\n {\n $search = new Manager($this);\n $search->like('username', [\n 'before' => true,\n 'after' => true,\n 'field' => [$this->aliasField('username')]\n ]);\n return $search;\n }", "public function listItemAdmin() {\n $user = Yii::app()->user->id;\n $command = Yii::app()->db->createCommand('SELECT support_id, support_name, support_nameen, support_phone, support_value, support_order, support_type FROM ' . $this->tableName() . ' WHERE dos_usernames_username=:user');\n $command->bindParam(\":user\", $user, PDO::PARAM_STR);\n return $command->queryAll();\n }", "public function search() {\r\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\r\n\t\tif(!$this->canAccess($parishID)){\r\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\r\n\t\t}\r\n\t\t\n\t\t$this->title = \"Search house\";\n\t\t$this->list = $this->Results();\t\r\n return $this->renderWith(array('House_results', 'App'));\r\n }", "function get_admins() {\n\n global $CFG;\n\n return get_records_sql(\"SELECT u.*\n FROM {$CFG->prefix}user u,\n {$CFG->prefix}user_admins a\n WHERE a.userid = u.id\n ORDER BY u.id ASC\");\n}", "function admin_index() {\r\n\t\t$result = $this->paginate('User');\r\n\t\t//$data = $this->afterFind($result);\r\n\t\t$this->set('users', $result);\r\n\t}", "public function admin_model() {\n return \"admin\";\n }", "public function search()\n {\n $permission = $this->checkPermission();\n if (is_array($permission)) {\n $this->_handleResponse($permission);\n return;\n }\n\n $keyword = $this->request->query('keyword');\n\n $customers = $this->Customers->find()\n ->where([\n 'shops_id' => $permission->shops_id,\n 'OR' => [\n 'first_name LIKE' => '%'.$keyword.'%',\n 'last_name LIKE' => '%'.$keyword.'%'\n ]\n ]);\n\n $customers = $this->paginate($customers);\n\n $this->set('customers', $customers);\n $this->set('_serialize', 'customers');\n }" ]
[ "0.7254315", "0.6956809", "0.6902788", "0.67070204", "0.66880816", "0.66742784", "0.6588434", "0.6578965", "0.6512255", "0.64174885", "0.64141697", "0.64109737", "0.6408075", "0.640226", "0.6349702", "0.633511", "0.62447137", "0.6207265", "0.61916727", "0.6177404", "0.6149559", "0.61326486", "0.61287886", "0.6113713", "0.61035335", "0.61028373", "0.61028373", "0.6091248", "0.6086968", "0.6086498", "0.6067719", "0.6052834", "0.6046245", "0.6043844", "0.59729105", "0.5959059", "0.59577507", "0.59418154", "0.59412223", "0.59191906", "0.59085166", "0.5895246", "0.58893925", "0.58837205", "0.5875086", "0.587146", "0.58637863", "0.5852411", "0.5851508", "0.5850171", "0.58447134", "0.58435345", "0.58416086", "0.5841408", "0.5835754", "0.5824353", "0.58178616", "0.58170986", "0.58152664", "0.5793084", "0.57879806", "0.5774499", "0.57596654", "0.5753784", "0.5746164", "0.5736928", "0.573594", "0.5730979", "0.57237047", "0.5715138", "0.57088715", "0.57022464", "0.5698886", "0.56890845", "0.56882185", "0.56765103", "0.567568", "0.56737477", "0.5671354", "0.5671335", "0.56697744", "0.5661423", "0.5658811", "0.56544614", "0.5653778", "0.5653425", "0.56521666", "0.5650568", "0.5644158", "0.5641555", "0.56342155", "0.5627665", "0.5627355", "0.5623964", "0.5618395", "0.56171954", "0.56083685", "0.5605684", "0.56028754", "0.5600157" ]
0.7335398
0
Search admin by NIC
Поиск администратора по НИКу
public function ajxSearchAdminNic($nic) { $escaped_name = addcslashes($nic, '%'); $sql = "SELECT user.*, group_concat(user_tel.tel_no) AS telNos FROM user JOIN user_tel on user.user_id =user_tel.user_id WHERE user.role = 'admin' AND user.nic LIKE :nic GROUP BY user.user_id"; $st = $this->db->prepare($sql); // print_r($sql); $st->execute(array( ':nic' => "$nic%" )); return $st->fetchAll(PDO::FETCH_ASSOC); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ajxSearchOfficerNic($nic)\n {\n $escaped_name = addcslashes($nic, '%');\n $sql = \"SELECT user.*, group_concat(user_tel.tel_no) AS telNos FROM user JOIN user_tel on user.user_id =user_tel.user_id WHERE user.role = 'officer' AND user.nic LIKE :nic GROUP BY user.user_id\";\n $st = $this->db->prepare($sql);\n // print_r($sql);\n $st->execute(array(\n ':nic' => \"$nic%\"\n ));\n\n return $st->fetchAll(PDO::FETCH_ASSOC);\n }", "public function searchNat() {\n if ($this->session->userdata('role') == 99) {\n $this->magenti->searchNat();\n }\n }", "public function searchAdmin()\n {\n // should not be searched.\n $lookup_type = 'minatpekerjaan';\n $criteria=new CDbCriteria;\n\n\t\t\tif(!empty($this->lookup_id)){\n\t\t\t\t$criteria->addCondition(\"lookup_id = \".$this->lookup_id);\t\t\t\n\t\t\t}\n $criteria->compare('LOWER(lookup_name)',strtolower($this->lookup_name),true);\n $criteria->compare('LOWER(lookup_value)',strtolower($this->lookup_value),true);\n $criteria->compare('LOWER(lookup_type)',strtolower($lookup_type),true);\n $criteria->compare('lookup_urutan',$this->lookup_urutan);\n $criteria->compare('LOWER(lookup_kode)',strtolower($this->lookup_kode),true);\n $criteria->compare('lookup_aktif',isset($this->lookup_aktif)?$this->lookup_aktif:true);\n $criteria->order = 'lookup_type, lookup_urutan';\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "public function admin_search() {\n $this->search();\n }", "function dsadmin(){\n\n\t\t\t$input = array();\n\t\t\t$input['like'] = array('username' => 'h');\n\t\t\t$list = $this->admin_model->get_list($input);\n\t\t\n\t\t\tpre($list);\n\t\t}", "public function whereApi()\n {\n\n $db = \\Config\\Database::connect();\n $builder = $db->table( 'router_table' );\n\n $builder->where( 'IP', '2.0.2.2' );\n\n $query = $builder->get();\n foreach ( $query->getResult() as $row )\n {\n echo $row->name.'=======';\n echo $row->IP;\n echo '<br>';\n }\n\n }", "public function ajxSearchAdminName($adminName)\n {\n $escaped_name = addcslashes($adminName, '%');\n $sql = \"SELECT user.*, group_concat(user_tel.tel_no) AS telNos FROM user JOIN user_tel on user.user_id =user_tel.user_id WHERE user.role = 'admin' AND (user.first_name LIKE :first_name OR user.last_name LIKE :first_name) GROUP BY user.user_id\";\n $st = $this->db->prepare($sql);\n // print_r($sql);\n $st->execute(array(\n ':first_name' => \"$adminName%\"\n ));\n\n return $st->fetchAll(PDO::FETCH_ASSOC);\n }", "function searchforadminuser(){\t//die('here');\n\t\t\t$this->layout = false;\n\t\t\t$id=$this->Session->read('User.id');\n\t\t\t$q=$_REQUEST['searchword'];\n\t\t\t//pr($q);die;\n\t\t\t$search=$this->User->query(\"select id,firstname,lastname,email,image from users where(firstname like '%$q%' or lastname like '%$q%' or email like '%$q%') order by id LIMIT 3\");\n\t\t//pr($search); die;\n\t\t$this->set('search',$search);\n\t\t$this->set('q',$q);\n\t\t$html=$this->render();\n\t\techo $html;\n\t\tdie;\n\t}", "public function getAdministrators(){\n\t\t$this->sql = $this->conn->prepare(\"Select broncoNetID, name FROM administrators\");\n\t\t$this->sql->execute();\n\t\treturn $this->sql->fetchAll(PDO::FETCH_NUM); //return indexes as keys\n }", "function admin_index() {\n\t\t$type = isset($this->params['type']) == '' ? $this->params['named']['type'] : $this->params['type'];\n\t\t//escaping from the initial search session\n\t\tif(!empty($this->params['page']) and intval($this->params['page']) <=0) {\n\t\t\tif(isset($_SESSION['search'])) unset($_SESSION['search']);\n\t\t\t$this->redirect(array('type'=>$type,'action'=>'index'));\n\t\t}\n\t\t\n\t\tif((isset($this->params['type']) && $this->params['type']<>\"\") or (isset($this->params['named']['type']) && $this->params['named']['type']<>\"\")) {\n\t\t\t$type = isset($this->params['type'])=='' ? $this->params['named']['type'] :$this->params['type'];\n\t\t\tif($type=='clients') {\n\t\t\t\t$tm = 'Client';\n\t\t\t\t$condition[] = array('User.type'=>'C');\n\t\t\t\t$containmodels = array('Client');\n\t\t\t\t$fields = array('User.id','User.username','User.status','User.created','Client.first_name','Client.last_name','Client.company','Client.of_zip','Client.created');\n\t\t\t} else {\n\t\t\t\t$tm = 'Notary';\n\t\t\t\t$condition[] = array('User.type'=>'N');\n\t\t\t\t$containmodels = array('Notary');\n\t\t\t\t$fields = array('User.id','User.username','User.status','User.created','Notary.first_name','Notary.last_name','Notary.userstatus','Notary.zipcode','Notary.dd_zip','Notary.created');\n\t\t\t\t$this->set('notaryoptions', $this->_notaryoptions());\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(isset($_SESSION['search']['condition']) and !empty($_SESSION['search']['condition'])) {\n\t\t\t$condition[] = array(implode(' AND ', @$_SESSION['search']['condition']));\n\t\t}\n\t\t$this->User->Behaviors->attach('Containable');\n\t\t$this->paginate = array('contain'=>$containmodels, 'conditions'=>@$condition, 'order'=>'User.created DESC', 'fields'=>$fields);\n\t\t$this->set('users', $this->paginate('User'));\n\t\t$this->set('statusoptions', $this->_statusOptions());\n\t\t$this->set('yesnooptions', $this->_ynoptns());\n\t\t$this->set('usertype', $type);\n\t\t$this->set('usermodel', $tm);\n\t\t$this->set('statusoptns', $this->_statusOptions('p'));\n\t\t$this->set('states', $this->_stateoptions());\n\t\t$this->set('langoptions', $this->_langoptions());\n\t}", "public function searchOzsn() {\r\n $this->checkRole();\r\n $this->checkMessages();\r\n \r\n echo new \\view\\Main(array(\r\n \"body\" => new \\view\\administrator\\OzsnSearch(array(\r\n \"errorMessage\" => $this->errorMessage,\r\n \"resultMessage\" => $this->resultMessage\r\n )),\r\n \"title\" => 'Pretraga'\r\n ));\r\n }", "public function searchAdmin()\n {\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('author_name',$this->author_name,true);\n\t\t$criteria->compare('link',$this->link);\n\t\t$criteria->compare('insert_date',$this->insert_date,true);\n\t\t$criteria->compare('user_ip',$this->user_ip,true);\n\t\t$criteria->compare('is_university_document',$this->is_university_document);\n\t\t$criteria->compare('status',$this->status);\n $criteria->compare('user_id',$this->user_id);\n \n //$criteria->compare('status', 2);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n }", "public function adminsearch()\n {\n $search_text = $_GET['admin_search'];\n $adminsearch = Personal::where('unique_id', 'like', '%'.$search_text.'%')->first();\n return view('admin.form.search', compact('adminsearch'));\n }", "public function admin_index() {\n\n\t\t$orConditions = array();\n\t\t// $andConditions = array('NOT' => array('User.role_id' => array(1)));\n\t\t$andConditions = array('User.role_id' => array(2));\n\t\t$finalConditions = array();\n\n\t\t$in = 0;\n\t\t$per_page_show = $this->Session->read('user.per_page_show');\n\t\tif (empty($per_page_show)) {\n\t\t\t$per_page_show = ADMIN_PAGING;\n\t\t}\n\n\t\tif (isset($this->data['User']['keyword'])) {\n\t\t\t$keyword = trim($this->data['User']['keyword']);\n\t\t} else {\n\t\t\t$keyword = $this->Session->read('user.keyword');\n\t\t}\n\n\t\tif (isset($this->data['UserDetail']['country_id']) && !empty($this->data['UserDetail']['country_id'])) {\n\t\t\t$county = trim($this->data['UserDetail']['country_id']);\n\t\t\t$this->Session->write('user.country', $county);\n\t\t\t$in = 1;\n\t\t\t$andConditions1 = array(\n\t\t\t\t'UserDetail.country_id LIKE' => '%' . $county . '%',\n\t\t\t);\n\n\t\t\t$andConditions = array_merge($andConditions, $andConditions1);\n\t\t}\n\t\t//pr($keyword); die;\n\n\t\tif (isset($keyword)) {\n\t\t\t$this->Session->write('user.keyword', $keyword);\n\t\t\t$keywords = explode(\" \", $keyword);\n\t\t\tif (isset($keywords[0]) && !empty($keywords[0]) && count($keywords) < 2) {\n\t\t\t\t$keyword = $keywords[0];\n\t\t\t\t$in = 1;\n\t\t\t\t$orConditions = array('OR' => array(\n\t\t\t\t\t'User.email LIKE' => '%' . $keyword . '%',\n\t\t\t\t\t'UserDetail.first_name LIKE' => '%' . $keyword . '%',\n\t\t\t\t\t'UserDetail.last_name LIKE' => '%' . $keyword . '%',\n\t\t\t\t\t//'UserDetail.country_id LIKE' => '%' . $county . '%'\n\t\t\t\t));\n\t\t\t} else if (!empty($keywords) && count($keywords) > 1) {\n\t\t\t\t$first_name = $keywords[0];\n\t\t\t\t$last_name = $keywords[1];\n\t\t\t\t$in = 1;\n\t\t\t\t$andConditions = array('AND' => array(\n\t\t\t\t\t'UserDetail.first_name LIKE' => '%' . $first_name . '%',\n\t\t\t\t\t'UserDetail.last_name LIKE' => '%' . $last_name . '%',\n\t\t\t\t\t//'UserDetail.country_id LIKE' => '%' . $county . '%'\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t\tif (isset($this->data['User']['status'])) {\n\t\t\t$status = $this->data['User']['status'];\n\t\t} else {\n\t\t\t$status = $this->Session->read('user.status');\n\t\t}\n\n\t\tif (isset($status)) {\n\t\t\t$this->Session->write('user.status', $status);\n\t\t\tif ($status != '') {\n\t\t\t\t$in = 1;\n\t\t\t\t$andConditions = array_merge($andConditions, array('User.status' => $status));\n\t\t\t}\n\t\t}\n\n\t\tif (isset($this->data['User']['per_page_show']) && !empty($this->data['User']['per_page_show'])) {\n\t\t\t$per_page_show = $this->data['User']['per_page_show'];\n\t\t}\n\n\t\tif (!empty($orConditions)) {\n\t\t\t$finalConditions = array_merge($finalConditions, $orConditions);\n\t\t}\n\n\t\tif (!empty($andConditions)) {\n\t\t\t$finalConditions = array_merge($finalConditions, array('AND' => $andConditions));\n\t\t}\n\n\t\t//pr($finalConditions); die;\n\n\t\t//pr($this->paginate('User'));die;\n\t\t$allusers = $this->User->find('all', array('conditions' => $finalConditions));\n\t\t$count = $this->User->find('count', array('conditions' => $finalConditions));\n\n\t\t$this->set('count', $count);\n\t\t$this->set('title_for_layout', __('All Internal IdeasCast Users', true));\n\t\t$this->Session->write('user.per_page_show', $per_page_show);\n\t\t$this->User->recursive = 0;\n\t\t$this->paginate = array('conditions' => $finalConditions, \"limit\" => $per_page_show, \"order\" => \"User.created DESC\");\n\t\t$this->set('users', $this->paginate('User'));\n\t\t$this->set('in', $in);\n\t}", "function LogovanjeAdmin($id) {\r\n\t\t\t$sql1 = \"SELECT * FROM administrator WHERE email_admin LIKE '%\".$id.\"%' \";\r\n\t\t\t$result1 = $this->conn->query($sql1);\t\t\t\t\t\t\r\n\t\t\treturn $result1;\r\n\t\t}", "function qruqsp_43392_deviceFieldSearch($ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'start_needle'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Search String'),\n 'limit'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Limit'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Check access to tnid as owner, or sys admin.\n //\n ciniki_core_loadMethod($ciniki, 'qruqsp', '43392', 'private', 'checkAccess');\n $rc = qruqsp_43392_checkAccess($ciniki, $args['tnid'], 'qruqsp.43392.deviceFieldSearch');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Get the list of fields\n //\n $strsql = \"SELECT qruqsp_43392_device_fields.id, \"\n . \"qruqsp_43392_device_fields.device_id, \"\n . \"qruqsp_43392_device_fields.fname, \"\n . \"qruqsp_43392_device_fields.name, \"\n . \"qruqsp_43392_device_fields.flags, \"\n . \"qruqsp_43392_device_fields.last_value, \"\n . \"qruqsp_43392_device_fields.last_date \"\n . \"FROM qruqsp_43392_device_fields \"\n . \"WHERE qruqsp_43392_device_fields.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND (\"\n . \"name LIKE '\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR name LIKE '% \" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \") \"\n . \"\";\n if( isset($args['limit']) && is_numeric($args['limit']) && $args['limit'] > 0 ) {\n $strsql .= \"LIMIT \" . ciniki_core_dbQuote($ciniki, $args['limit']) . \" \";\n } else {\n $strsql .= \"LIMIT 25 \";\n }\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'qruqsp.43392', array(\n array('container'=>'fields', 'fname'=>'id', \n 'fields'=>array('id', 'device_id', 'fname', 'name', 'flags', 'last_value', 'last_date')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['fields']) ) {\n $fields = $rc['fields'];\n $field_ids = array();\n foreach($fields as $iid => $field) {\n $field_ids[] = $field['id'];\n }\n } else {\n $fields = array();\n $field_ids = array();\n }\n\n return array('stat'=>'ok', 'fields'=>$fields, 'nplist'=>$field_ids);\n}", "function is_network_admin()\n{\n}", "function LogovanjeAdmin($id) {\n\t\t\t$sql1 = \"SELECT * FROM administrator WHERE email_admin LIKE '%\".$id.\"%' \";\n\t\t\t$result1 = $this->conn->query($sql1);\t\t\t\t\t\t\n\t\t\treturn $result1;\n\t\t}", "public function adminSearch()\n {\n $cars = (new Search)->query(new Car, ['brand', 'carModel', 'plates'], 5);\n return view('car.index')->with('cars', $cars);\n }", "public function searchMember() {\r\n \t$this->auth()->setRequirements('roles', ['Admin']);\r\n \t$this->auth()->setRequirements('rights', ['ManageMembers','ManageRights']);\r\n \t$this->redirectNotAuthorized();\r\n \t\r\n \tif(!isset($_POST['search'])){\r\n \t\t$this->layout()->render('admin/members/search.php');\r\n \t\t\r\n \t}else{ \t\t\r\n \t\t$this->memberlist();\r\n \t}\r\n \t\r\n }", "public function getAdmins();", "public function in_admin($admin = \\null)\n {\n }", "function authorizedAction()\n{\n\tglobal $oImmocaster, $aSearchParameter;\t\n\t$res = $oImmocaster->regionSearch($aSearchParameter); \n\techo '<pre>'.print_r( $res,true).'</pre>'; \n}", "public static function inAdmin() {}", "public function list_admin()\n {\n return $this->db->get_where(\"admin\");\n }", "public function search() {}", "function get_admin_users()\n\t{\n\t\tlog_message('debug', '_messenger/get_admin_users');\n\t\treturn server_curl(IAM_URL, array('__action'=>'get_users_in_group_type', 'group_type'=>'admin', 'offset'=>'0', 'limit'=>'1000'));\n\t}", "public function search($controller = null) {\n\n $controller = \"Guest\";\n parent::search($controller);\n }", "public function filterByIstadmin($istadmin = null, $comparison = null)\n {\n if (is_string($istadmin)) {\n $istadmin = in_array(strtolower($istadmin), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;\n }\n\n return $this->addUsingAlias(BenutzerPeer::ISTADMIN, $istadmin, $comparison);\n }", "function ciniki_customers_emailSearch($ciniki) {\n // \n // Find all the required and optional arguments\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), \n// 'customer_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Customer'), \n 'email'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Email'),\n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n \n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'customers', 'private', 'checkAccess');\n $rc = ciniki_customers_checkAccess($ciniki, $args['tnid'], 'ciniki.customers.emailSearch', 0); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQuote');\n\n $strsql = \"SELECT id, customer_id, email \"\n . \"FROM ciniki_customer_emails \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n// . \"AND customer_id = '\" . ciniki_core_dbQuote($ciniki, $args['customer_id']) . \"' \"\n . \"AND email = '\" . ciniki_core_dbQuote($ciniki, $args['email']) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQuery');\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.customers', 'email');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['rows']) && $rc['num_rows'] > 1 ) {\n return array('stat'=>'ambiguous', 'err'=>array('code'=>'ciniki.customers.78', 'msg'=>'Multiple emails found'));\n }\n if( !isset($rc['email']) ) {\n return array('stat'=>'noexist', 'err'=>array('code'=>'ciniki.customers.79', 'msg'=>'Email not found'));\n }\n\n return array('stat'=>'ok', 'email'=>$rc['email']);\n}", "public function users_search()\n {\n if($this->session->userdata('logged_in_admin'))\n {\n $this->load->view('admin/users/search.php');\n }else{\n $this->login();\n }\n }", "public function searchIpa($parameter)\r\n\t\t{\r\n\t\t\t\r\n\t\t\t$query = \"SELECT ipa FROM ips WHERE ipa LIKE '\".$parameter.\"%'\";\r\n\t\t\t$result = $this->db->query($query) or trigger_error($this->db->error.\"[$query]\");\r\n\t\t\t\r\n\t\t\treturn $result;\r\n\t\t\t\r\n\t\t}", "public function admin_index() {\n\n\t\tif (isset($this->request->data['User']['search'])) {\n\t\t\t$keyword = $this->request->data['User']['search'];\n\t\t\t//pr($keyword);die();\n\t\t} else {\n\t\t\t$keyword = '';\n\t\t}\n\t\t$this->paginate = array(\n\t\t\t'limit' => 6,\n\t\t\t'recursive' => 2,\n\t\t\t'order' => array('id' => 'desc'),\n\t\t\t'conditions' => array(\n\t\t\t\t'OR' => array('first_name LIKE' => '%' . $keyword . '%'),\n\t\t\t),\n\t\t);\n\t\t$users = $this->paginate('User');\n\n\t\t$this->set('users', $users);\n\n\t}", "public function limitApi()\n {\n $db = \\Config\\Database::connect();\n $builder = $db->table( 'router_table' );\n $query = $builder->get( 0, 2 );\n\n // var_dump( $query );\n\n foreach ( $query->getResult() as $row )\n {\n echo $row->name.'=======';\n echo $row->IP;\n echo '<br>';\n }\n\n }", "abstract public function getAdmin_a();", "function ciniki_subscriptions_searchCustomers($ciniki) {\n // \n // Find all the required and optional arguments\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), \n 'subscription_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Subscription'), \n 'start_needle'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Search String'), \n 'limit'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Limit'), \n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n \n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'subscriptions', 'private', 'checkAccess');\n $rc = ciniki_subscriptions_checkAccess($ciniki, $args['tnid'], 'ciniki.subscriptions.searchCustomers'); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n //\n // Search for the customer in the customers module, but also check if they are subscribed to the \n // subscription or not\n //\n $strsql = \"SELECT customers.id AS customer_id, \"\n . \"customers.display_name, \"\n . \"IFNULL(sc.status, 0) AS status, \"\n . \"sc.subscription_id, \"\n . \"emails.email AS emails \"\n . \"FROM ciniki_customers AS customers \"\n . \"LEFT JOIN ciniki_subscription_customers AS sc ON (\"\n . \"sc.subscription_id = '\" . ciniki_core_dbQuote($ciniki, $args['subscription_id']) . \"' \"\n . \"AND customers.id = sc.customer_id \"\n . \"AND sc.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"LEFT JOIN ciniki_customer_emails AS emails ON (\"\n . \"customers.id = emails.customer_id \"\n . \"AND emails.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"WHERE customers.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND customers.status < 60 \"\n . \"AND ( customers.first LIKE '\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR customers.first LIKE '% \" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR customers.last LIKE '\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR customers.last LIKE '% \" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR customers.company LIKE '\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR customers.company LIKE '% \" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \") \"\n . \"\";\n $strsql .= \"ORDER BY customers.sort_name \";\n if( isset($args['limit']) && is_numeric($args['limit']) && $args['limit'] > 0 ) {\n $strsql .= \"LIMIT \" . ciniki_core_dbQuote($ciniki, $args['limit']) . \" \"; // is_numeric verified\n }\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryTree');\n $rc = ciniki_core_dbHashQueryTree($ciniki, $strsql, 'ciniki.subscriptions', array(\n array('container'=>'customers', 'fname'=>'customer_id', 'name'=>'customer',\n 'fields'=>array('customer_id', 'display_name', 'status', 'emails'),\n 'dlists'=>array('emails'=>','),\n ),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['customers']) ) {\n return array('stat'=>'ok', 'customers'=>array());\n }\n\n return $rc;\n\n// ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbRspQuery');\n// return ciniki_core_dbRspQuery($ciniki, $strsql, 'ciniki.subscriptions', 'customers', 'customer', array('stat'=>'ok', 'customers'=>array()));\n}", "public function index(Request $request)\n {\n $keyWord = $request->input(\"key_word\",\"\");\n if($keyWord){\n $adminRes = Admin::where(\"real_name\",\"like\",\"%{$keyWord}%\")->paginate(20);\n }else{\n $adminRes = Admin::paginate(20);\n }\n return view(\"admin.admin_list\",['adminRes'=>$adminRes]);\n }", "function search($filter = \"\") {\n return $this->manager->search($this->ou . ',' . $this->dc, $filter);\n }", "function admin_index()\n\t{\n\t\t$search = (isset($this->params['named']['search']))\n\t\t\t? $this->params['named']['search']\n\t\t\t: '';\n\t\t\t\n\t\t$conditions = array();\n\t\t\n\t\tif(!empty($search)) {\n\t\t\t$conditions['OR'] = array(\n\t\t\t\t'Content.id =' => $search,\n\t\t\t\t'Content.name LIKE' => '%'.$search.'%',\n\t\t\t\t'Content.title LIKE' => '%'.$search.'%',\n\t\t\t\t'Content.body LIKE' => '%'.$search.'%',\n\t\t\t\t'Content.slug LIKE' => '%'.$search.'%',\n\t\t\t);\n\t\t}\n\n\t\t$contain = array();\n\n\t\t$this->set('search', $search);\n\t\t\n\t\t$this->data = $this->paginate('Content', $conditions);\n\t}", "function ciniki_ags_locationSearch($ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'start_needle'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Search String'),\n 'limit'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Limit'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Check access to tnid as owner, or sys admin.\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'ags', 'private', 'checkAccess');\n $rc = ciniki_ags_checkAccess($ciniki, $args['tnid'], 'ciniki.ags.locationSearch');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Get the list of locations\n //\n $strsql = \"SELECT ciniki_ags_locations.id, \"\n . \"ciniki_ags_locations.name, \"\n . \"ciniki_ags_locations.category, \"\n . \"ciniki_ags_locations.flags, \"\n . \"ciniki_ags_locations.address1, \"\n . \"ciniki_ags_locations.address2, \"\n . \"ciniki_ags_locations.city, \"\n . \"ciniki_ags_locations.province, \"\n . \"ciniki_ags_locations.postal, \"\n . \"ciniki_ags_locations.country, \"\n . \"ciniki_ags_locations.latitude, \"\n . \"ciniki_ags_locations.longitude, \"\n . \"ciniki_ags_locations.primary_image_id, \"\n . \"ciniki_ags_locations.synopsis \"\n . \"FROM ciniki_ags_locations \"\n . \"WHERE ciniki_ags_locations.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND (\"\n . \"name LIKE '\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR name LIKE '% \" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \") \"\n . \"\";\n if( isset($args['limit']) && is_numeric($args['limit']) && $args['limit'] > 0 ) {\n $strsql .= \"LIMIT \" . ciniki_core_dbQuote($ciniki, $args['limit']) . \" \";\n } else {\n $strsql .= \"LIMIT 25 \";\n }\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.ags', array(\n array('container'=>'locations', 'fname'=>'id', \n 'fields'=>array('id', 'name', 'category', 'flags', 'address1', 'address2', 'city', 'province', 'postal', 'country', 'latitude', 'longitude', 'primary_image_id', 'synopsis')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['locations']) ) {\n $locations = $rc['locations'];\n $location_ids = array();\n foreach($locations as $iid => $location) {\n $location_ids[] = $location['id'];\n }\n } else {\n $locations = array();\n $location_ids = array();\n }\n\n return array('stat'=>'ok', 'locations'=>$locations, 'nplist'=>$location_ids);\n}", "function controlAdmin($con, $dni){\n\n\t\t\t$result = mysqli_query($con, \"select * from coordinador where persona='\".$dni.\"'\");\n\t\t\n\t\twhile($fila = mysqli_fetch_array($result)){\n\t\t\t$coordinadores[] = $fila;\n\t\t}\n\t\treturn $coordinadores;\n\t\t}", "protected function user_search(){\n $cari = null;\n if(isset($_GET['cari'])){\n $cari = str_replace(\"'\",\"\", $_GET['cari']);\n }\n $query = $this->query(\"select * from user where (username like '%$cari%' or phone_number like '%$cari%' or address like '%$cari%') and role_id = '2' \");\n $row = mysqli_num_rows($query);\n if($row > 0){\n while($show = mysqli_fetch_assoc($query)){\n $build[] = $show;\n }\n }else{\n echo \"<script>\n alert('data tidak ditemukan!');\n window.location='allmember.php';\n </script>\n \";\n return false;\n }\n return $build;\n }", "public function search();", "public function search();", "public function index(Request $request)\n {\n $keyword = $request->input('keyword','');\n $num = $request->input('num', 20);\n// ->where('phone','like','%'.$keyword.'%')\n// ->orWhere('username','like','%'.$keyword.'%')\n $admins = Admin::orderBy('id','desc')\n ->where(function($query) use($keyword){\n if($keyword){\n $query->where('phone','like','%'.$keyword.'%')\n ->orWhere('username','like','%'.$keyword.'%');\n }\n })->paginate($num);\n $params = [\n 'keyword'=>$keyword,\n 'num'=>$num\n ];\n return view('admin.admins.index', compact('admins','params'));\n }", "public function Get_By_Admin()\n {\n\n $users = $this->Get(\"WHERE `is_admin`=1\");\n if(count($users) > 0)\n {\n return $users;\n }\n return FALSE;\n }", "function search_users_only($params)\n\t{\n\n\t\t$context = $GLOBALS['phpgw_info']['server']['ldap_context']; //$params['context'];\n\t\t$filtro = $params['filtro'];\n\t\t$tipo = $params['tipo'];\n\t\t// $recursive = $params['recursive'];\n\n\t\t$justthese = array(\"cn\", \"uidNumber\", \"mail\");\n\n\t\tif($tipo == \"adm_maillist\")\n\t\t{\n\t\t\t$users_filter=\"(&(phpgwAccountType=u)(phpgwAccountStatus=A)(|(cn=*$filtro*)(mail=*$filtro*)))\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$users_filter=\"(&(phpgwAccountStatus=A)(|(cn=*$filtro*)(mail=*$filtro*)))\";\n\t\t}\n\n\t\t$users = Array();\n\n\t// if ($recursive == 'true')\n\t// {\n\t\t$users_search = ldap_search($this->ldap, $context, $users_filter, $justthese);\n\t// }\n\t// else\n\t// {\n\t// $users_search = ldap_list($this->ldap, $context, $users_filter, $justthese);\n\t// }\n\n\t\t$users_entries = ldap_get_entries($this->ldap, $users_search);\n\t\tfor ($i=0; $i<$users_entries[\"count\"]; $i++)\n\t\t{\n\t\t\t\t$u_tmp[$users_entries[$i][\"uidnumber\"][0]] = $users_entries[$i][\"cn\"][0] . \" [\" .$users_entries[$i][\"mail\"][0] . \"]\";\n\t\t}\n\n\t\tif(count($u_tmp) == 0) {\n\t\t\t$options .= '<option value=\"-1\" disabled>------&nbsp;&nbsp;&nbsp;USUARIO INVALIDO OU NAO CRIADO NO EXPRESSO&nbsp;&nbsp;&nbsp;------</option>'.\"\\n\";\n\t\t}\n\n\t\tif (count($u_tmp))\n\t\t\tnatcasesort($u_tmp);\n\n\t\t$i = 0;\n\t\t$users = array();\n\n\t\t$options .= '<option value=\"-1\" disabled>-----------------------------&nbsp;&nbsp;&nbsp;&nbsp;Usuarios&nbsp;&nbsp;&nbsp;&nbsp;---------------------------- </option>'.\"\\n\";\n\t\tif (count($u_tmp))\n\t\t{\n\t\t\tforeach ($u_tmp as $uidnumber => $cn)\n\t\t\t{\n\t\t\t\t$options .= \"<option value=$uidnumber class='line-above'>$cn</option>\";\n\t\t\t}\n\n\t\t\tunset($u_tmp);\n\t\t}\n\n\t\treturn $options;\n\t}", "function searchDisplay($term) {\n $p = new PDOAgent(\"mysql\",DBUSER,DBPASSWD,\"localhost\", DBNAME);\n $p->connect();\n $bindParams = [];\n $results = $p->query(\"SELECT * FROM Owners;\",$bindParams);\n\n $p->disconnect();\n\n $term = strtolower($term);\n $searchList = [];\n\n foreach($results as $result) {\n if(strpos(strtolower($result->Name), $term) !== false){\n $searchList[] = $result;\n }elseif(strpos(strtolower($result->City), $term) !== false){\n $searchList[] = $result;\n }elseif(strpos(strtolower($result->Gender), $term) !== false){\n $searchList[] = $result;\n }elseif(strpos(strtolower($result->FamilySize), $term) !== false){\n $searchList[] = $result;\n }elseif(strpos(strtolower($result->OwnerID), $term) !== false){\n $searchList[] = $result;\n }\n }\n return $searchList;\n }", "function ciniki_fatt_aedFieldSearch($ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'field'=>array('required'=>'yes', 'blank'=>'no', 'validlist'=>array('make', 'model'), 'name'=>'Field'),\n 'start_needle'=>array('required'=>'yes', 'blank'=>'yes', 'name'=>'Search String'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Check access to tnid as owner, or sys admin.\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'fatt', 'private', 'checkAccess');\n $rc = ciniki_fatt_checkAccess($ciniki, $args['tnid'], 'ciniki.fatt.aedFieldSearch');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Get the list of aeds\n //\n if( $args['field'] == 'make' ) {\n $strsql = \"SELECT DISTINCT \"\n . \"ciniki_fatt_aeds.make, \"\n . \"ciniki_fatt_aeds.model \"\n . \"FROM ciniki_fatt_aeds \"\n . \"WHERE ciniki_fatt_aeds.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND (\"\n . \"make LIKE '\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR make LIKE '% \" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \") \"\n . \"\";\n } elseif( $args['field'] == 'model' ) {\n $strsql = \"SELECT DISTINCT \"\n . \"'' AS make, \"\n . \"ciniki_fatt_aeds.model \"\n . \"FROM ciniki_fatt_aeds \"\n . \"WHERE ciniki_fatt_aeds.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND (\"\n . \"model LIKE '\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR model LIKE '% \" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \") \"\n . \"\";\n } else {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.fatt.150', 'msg'=>'No search field specified'));\n }\n if( isset($args['limit']) && is_numeric($args['limit']) && $args['limit'] > 0 ) {\n $strsql .= \"LIMIT \" . ciniki_core_dbQuote($ciniki, $args['limit']) . \" \";\n } else {\n $strsql .= \"LIMIT 25 \";\n }\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.fatt', 'result');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['rows']) ) {\n $aeds = $rc['rows'];\n } else {\n $aeds = array();\n }\n\n return array('stat'=>'ok', 'results'=>$aeds);\n}", "public function listAsAdmin();", "function sed_build_ipsearch($ip)\r\n{\r\n\tglobal $sys;\r\n\tif(!empty($ip))\r\n\t{\r\n\t\treturn '<a href=\"'.sed_url('admin', 'm=tools&p=ipsearch&a=search&id='.$ip.'&x='.$sys['xk']).'\">'.$ip.'</a>';\r\n\t}\r\n\treturn '';\r\n}", "public function searchAction() {\n $auth = Zend_Auth::getInstance();\n if (!($auth->getIdentity()->account_type_id < 3)) {\n $this->_helper->redirector('index', 'index');\n }\n if ($this->getRequest()->isPost()) {\n $search = $this->getRequest()->getPost('id');\n $request = new Application_Model_DbTable_Request();\n $this->view->request = $request->getRequest($search);\n }\n }", "public function index()\n {\n $admin_name=request()->admin_name;\n $where=[];\n if($admin_name){\n $where[]=['admin_name','like',\"%$admin_name%\"];\n }\n $pageSize=config('app.pageSize');\n $cate=Admin::where($where)->orderby('admin_id','desc')->paginate($pageSize);\n return view('admin.index',['cate'=>$cate,'admin_name'=>$admin_name]);\n }", "public function searchAdmin()\n {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n\n $criteria->compare('created_at', $this->created_at, true);\n\n $criteria->compare('updated_at', $this->updated_at, true);\n\n $criteria->compare('table_name', $this->table_name, true);\n\n $criteria->compare('column_name', $this->column_name, true);\n\n $criteria->compare('old_value', $this->old_value, true);\n\n $criteria->compare('new_value', $this->new_value, true);\n\n $criteria->compare('user_id', $this->user_id);\n\n $criteria->compare('emp_id', $this->emp_id);\n\n $criteria->compare('trans_type', $this->trans_type);\n\n $criteria->compare('is_deleted', $this->is_deleted);\n\n $criteria->order = 'id desc';\n\n return new CActiveDataProvider('AuditTrails', array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => self::PAGE_SIZE)\n ));\n }", "public function index(Request $request)\n {\n if ($request->has('cari')) {\n $data_admin = \\App\\User::where('role','admin')\n ->where('name', 'LIKE', '%' . $request->cari . '%')->get();\n } else {\n $data_admin = \\App\\User::where('role','admin')->get();\n }\n return view('admin.index', ['data_admin' => $data_admin]);\n }", "function adminUserList() {\n $arrClms = array(\n 'pkAdminID',\n 'AdminUserName',\n 'AdminCountry',\n 'AdminRegion'\n );\n $varWhr = \"AdminType = 'user-admin'\";\n $varOrderBy = 'AdminUserName ASC ';\n $arrRes = $this->select(TABLE_ADMIN, $arrClms, $varWhr);\n //pre($arrRes);\n return $arrRes;\n }", "function Getadmin() {\n\t\treturn $this->db->query(\"select *from tbl_admin order by id_admin asc\");\n\t}", "public function actionAdmin()\n\t{\n\t\t$this->inserta();\n\n\t$model=new Noticias('searchtablon');\n\n\t\tif(isset($_GET['Noticias']))\n\t\t\t$model->attributes=$_GET['Noticias'];\n $proveedor=$model->searchtablon();\n\t\t$this->render('admin',array(\n\t\t\t'model'=>$model,\n\t\t\t'proveedor'=>$proveedor,\n\t\t\t'titulo'=>'Avisos Vigentes',\n\t\t));\n\t}", "public function index(Request $request)\n {\n $params = $request->all();\n $uname = $request->input('uname','');\n $auth = $request->input('auth','_');\n $condition[] = ['uname','like','%'.$uname.'%'];\n $condition[] = ['auth','like',$auth];\n $admins = Admin::where($condition)->paginate(3);\n return view('admin/admin/index',['title'=>'管理员列表','params'=>$params,'admins'=>$admins]);\n }", "public function search() : void\n\t{\n\t\tif (empty($this->query)) {\n\t\t\t$this->resetSearch();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$this->eligebleForPermission = $this->getAction()->search($this->query)->get();\n\t\t$this->isSearching = true;\n\t}", "public function searchImunisasi()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\tif(!empty($this->diagnosa_id)){\n\t\t\t$criteria->addCondition(\"diagnosa_id = \".$this->diagnosa_id);\t\t\t\n\t\t}\n\t\t$criteria->compare('LOWER(diagnosa_kode)',strtolower($this->diagnosa_kode),true);\n\t\t$criteria->compare('LOWER(diagnosa_nama)',strtolower($this->diagnosa_nama),true);\n\t\t$criteria->compare('LOWER(diagnosa_namalainnya)',strtolower($this->diagnosa_namalainnya),true);\n\t\t$criteria->compare('LOWER(diagnosa_katakunci)',strtolower($this->diagnosa_katakunci),true);\n\t\t$criteria->condition = \"diagnosa_imunisasi = true\";\n\t\t//$criteria->with=array('dtdDiagnosa');\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n// 'pagination'=>10,\n\t\t));\n\t}", "function ciniki_sapos_invoiceItemSearch(&$ciniki) {\n // \n // Find all the required and optional arguments\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), \n 'start_needle'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Search String'), \n 'invoice_id'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'0', 'name'=>'Invoice'), \n 'limit'=>array('required'=>'no', 'blank'=>'no', 'default'=>'15', 'name'=>'Limit'), \n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n\n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'sapos', 'private', 'checkAccess');\n $rc = ciniki_sapos_checkAccess($ciniki, $args['tnid'], 'ciniki.sapos.invoiceItemSearch'); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n }\n $modules = $rc['modules'];\n\n //\n // Load invoice details\n //\n if( isset($args['invoice_id']) ) {\n $strsql = \"SELECT invoice_type \"\n . \"FROM ciniki_sapos_invoices \"\n . \"WHERE id = '\" . ciniki_core_dbQuote($ciniki, $args['invoice_id']) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.sapos', 'invoice');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sapos.55', 'msg'=>'Unable to load invoice', 'err'=>$rc['err']));\n }\n $invoice = isset($rc['invoice']) ? $rc['invoice'] : array();\n }\n\n //\n // Load the tenant settings\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbDetailsQueryDash');\n $rc = ciniki_core_dbDetailsQueryDash($ciniki, 'ciniki_sapos_settings', 'tnid', $args['tnid'], 'ciniki.sapos', 'settings', '');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sapos.39', 'msg'=>'Unable to load settings', 'err'=>$rc['err']));\n }\n $settings = isset($rc['settings']) ? $rc['settings'] : array();\n \n //\n // Load tenant INTL settings\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'intlSettings');\n $rc = ciniki_tenants_intlSettings($ciniki, $args['tnid']);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $intl_timezone = $rc['settings']['intl-default-timezone'];\n $intl_currency_fmt = numfmt_create($rc['settings']['intl-default-locale'], NumberFormatter::CURRENCY);\n $intl_currency = $rc['settings']['intl-default-currency'];\n\n //\n // Setup the array for the items\n //\n $items = array();\n\n //\n // Check for modules which have searchable items\n //\n foreach($modules as $module => $m) {\n if( $m['module_status'] != 1 && $m['module_status'] != 2 ) {\n continue;\n }\n list($pkg, $mod) = explode('.', $module);\n $rc = ciniki_core_loadMethod($ciniki, $pkg, $mod, 'sapos', 'itemSearch');\n if( $rc['stat'] != 'ok' ) {\n continue;\n }\n $search_function = $pkg . '_' . $mod . '_sapos_itemSearch';\n if( !is_callable($search_function) ) {\n continue;\n }\n $rc = $search_function($ciniki, $args['tnid'], array(\n 'start_needle'=>$args['start_needle'], \n 'invoice_id'=>$args['invoice_id'],\n 'limit'=>$args['limit']));\n if( $rc['stat'] != 'ok' ) {\n continue;\n }\n if( isset($rc['items']) ) {\n $items = array_merge($items, $rc['items']);\n }\n }\n\n //\n // Check existing items in invoices, but only if owner/employee\n //\n if( count($items) == 0 \n && (!isset($ciniki['tenant']['user']['perms'])\n || ($ciniki['tenant']['user']['perms']&0x03) > 0\n )\n ) {\n $strsql = \"SELECT DISTINCT \" \n . \"CONCAT_WS('-', ciniki_sapos_invoice_items.description, ciniki_sapos_invoice_items.unit_amount) AS id, \"\n . \"ciniki_sapos_invoice_items.flags, \"\n . \"ciniki_sapos_invoice_items.object, \"\n . \"ciniki_sapos_invoice_items.object_id, \"\n . \"ciniki_sapos_invoice_items.description, \"\n . \"ciniki_sapos_invoice_items.quantity, \"\n . \"ciniki_sapos_invoice_items.unit_amount, \"\n . \"ciniki_sapos_invoice_items.unit_discount_amount, \"\n . \"ciniki_sapos_invoice_items.unit_discount_percentage, \"\n . \"ciniki_sapos_invoice_items.unit_donation_amount, \"\n . \"ciniki_sapos_invoice_items.taxtype_id, \"\n . \"ciniki_sapos_invoice_items.notes \"\n . \"FROM ciniki_sapos_invoice_items \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND object = '' \"\n . \"AND (description LIKE '\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \"OR description LIKE ' %\" . ciniki_core_dbQuote($ciniki, $args['start_needle']) . \"%' \"\n . \") \"\n . \"\";\n if( isset($args['limit']) && $args['limit'] > 0 ) {\n $strsql .= \"LIMIT \" . ciniki_core_dbQuote($ciniki, $args['limit']) . \" \";\n } else {\n $strsql .= \"LIMIT 15 \";\n }\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryTree');\n $rc = ciniki_core_dbHashQueryTree($ciniki, $strsql, 'ciniki.sapos', array(\n array('container'=>'items', 'fname'=>'id', 'name'=>'item',\n 'fields'=>array('id', 'flags', 'object', 'object_id', 'description', 'quantity',\n 'unit_amount', 'unit_discount_amount', 'unit_discount_percentage', 'unit_donation_amount', 'taxtype_id', 'notes')),\n ));\n if( $rc['stat'] != 'ok' ) { \n return $rc;\n }\n if( isset($rc['items']) ) {\n $items = array_merge($rc['items'], $items);\n }\n }\n\n foreach($items as $i => $item) {\n $items[$i]['item']['unit_amount'] = numfmt_format_currency($intl_currency_fmt, \n $item['item']['unit_amount'], $intl_currency);\n $items[$i]['item']['unit_discount_amount'] = numfmt_format_currency($intl_currency_fmt, \n $item['item']['unit_discount_amount'], $intl_currency);\n if( isset($items[$i]['item']['unit_donation_amount']) && $items[$i]['item']['unit_donation_amount'] > 0 ) {\n $items[$i]['item']['unit_donation_amount'] = numfmt_format_currency($intl_currency_fmt, \n $item['item']['unit_donation_amount'], $intl_currency);\n }\n $items[$i]['item']['quantity'] = (float)$item['item']['quantity'];\n if( !isset($item['item']['flags']) ) {\n $items[$i]['item']['flags'] = 0;\n }\n if( isset($item['item']['synopsis']) && $item['item']['synopsis'] != '' && $item['item']['notes'] == '' \n && isset($settings['quote-notes-product-synopsis']) && $settings['quote-notes-product-synopsis'] == 'yes'\n && isset($invoice['invoice_type']) && $invoice['invoice_type'] == 90 \n ) {\n $items[$i]['item']['notes'] = $item['item']['synopsis']; \n }\n }\n\n return array('stat'=>'ok', 'items'=>$items);\n}", "public function get_admin_by_username($username){\n $this->db->from($this->table);\n $this->db->where('username',$username);\n $this->db->where('privilege <=', 4);\n // fetch seluruh hasil pada db berupa array\n return $this->db->get();\n }", "public function search()\n\t{\n\t\t$request = array(\"name\" => $this->input->get(\"search\", TRUE));\n\n\t\t$data[\"members\"] = $this->Member->find_by($request);\n\t\t$data[\"main_content\"] =\t\"members/index\";\n\n\t\t$this->load->view(\"admin/template\", $data);\n\t}", "function _admin_search_query()\n{\n}", "public static function getInfoAboutAdmin(){\n $db = Db::getConnection();\n \n $sql = 'select * from users where status = \"admin\" ';\n \n $result = $db->query($sql);\n $result = $result->fetch_assoc();\n \n $db->close();\n \n return $result;\n }", "public function findApiIdAdmin()\n {\n $data = $this->getRequest()->getData();\n $ApiId = $data['api_id'];\n $LoginApi = $data['login_api'];\n $users = $this->Users->find('all', [\n 'conditions' => [\n 'Users.api_id' => $ApiId,\n 'Users.login_api' => $LoginApi,\n 'Users.is_admin' => 1\n ]\n ]\n );\n $this->set('users', $users);\n $this->render('/Users/json/template');\n }", "public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('admin_id', $this->admin_id);\n $criteria->compare('admin_name', $this->admin_name, true);\n $criteria->compare('admin_username', $this->admin_username, true);\n $criteria->compare('admin_password', $this->admin_password, true);\n $criteria->compare('admin_email', $this->admin_email, true);\n $criteria->compare('admin_status', $this->admin_status);\n $criteria->compare('admin_created', $this->admin_created, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "public static function GetAdmin($search=\"\",$start,$length,$column_id,$column_order){\n $column_name = array('first_name','first_name','email','phone','status','status');\n if($search){\n $usersdata = UserAdminModel::where('role_id',1)->where(function ($query) use ($search) {\n })->where(function ($query) use ($search) {\n $query->where('users.first_name', 'LIKE', '%'.$search.'%')\n ->orWhere('users.email', 'LIKE', '%'.$search.'%')\n ->orWhere('users.phone', 'LIKE', '%'.$search.'%')\n ->orWhere('users.status', 'LIKE', '%'.$search.'%');\n })->orderBy($column_name[$column_id],$column_order)->limit($length)->offset($start)->get();\n }else{\n\t\tif($column_order){\n\t\t\t$usersdata = UserAdminModel::where('role_id',1)->orderBy($column_name[$column_id],$column_order)->limit($length)->offset($start)->get();\n\t\t}else{\n\t\t\t$usersdata = UserAdminModel::where('role_id',1)->orderBy('id','desc')->limit($length)->offset($start)->get();\n\t\t} \n }\n if(empty($usersdata)){\n return false;\n }\n return $usersdata;\n }", "function search($server, $port, $search, $level = false, $more = false);", "public static function search(){\n \n }", "protected function filterGrid()\n {\n return Admin::grid(Administrator::class, function (Grid $grid) {\n\n });\n }", "public function basicSearch()\n\t{\n\t\t\n\t}", "public function admin_index($type=NULL) {\n\t\t$this->bulkactions();\n\t\t/* code to perform search functionality */\n\t\tif(isset($this->data) && !empty($this->data['User']['searchval'])){\n\t\t\t$this->Session->write('searchval',$this->data['User']['searchval']);\n\t\t\t$this->conditions\t= array(\"OR\"=>array(\"User.username like\"=>\"%\".$this->data['User']['searchval'].\"%\"));\n\t\t}\n\t\t\n\t\tif(isset($this->params['named']['page'])){\n\t\t\t\n\t\t\tif($this->Session->read('searchval')){\n\t\t\t\t$this->conditions\t= array(\"OR\"=>array(\"User.username like\"=>\"%\".$this->Session->read('searchval').\"%\"));\n\t\t\t\t$this->data['User']['searchval'] = $this->Session->read('searchval');\n\t\t\t}\n\t\t}elseif(empty($this->conditions)){\n\t\t\t$this->Session->delete('searchval');\n\t\t}\n\t\t/* end of code to perform search functionality */\n\t\t$this->User->recursive = 0;\n\t\t$this->set('users', $this->paginate($this->conditions));\n\t}", "function search()\n\t{\n\t\t$search=$this->input->post('search');\n\t\t$data_rows=get_admissions_manage_table_data_rows($this->Customer->search($search),$this);\n\t\techo $data_rows;\n\t}", "public function actionAdmin()\n {\n if(!Yii::$app->user->can('entreprise-admin')){\n return $this->permissionRedirect();\n }\n $searchModel = new EntrepriseSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n if(!Yii::$app->user->identity->isAdmin)\n $dataProvider->query->andWhere('user_id ='.Yii::$app->user->id);\n return $this->render('admin', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "function opc_sel_prov($busqueda, $ini, $cant, $opcs) {\n $sql = \"select * from contacto_cliente CC where CC.nom_comp LIKE '%$opcs%'\";\n $consulta = $this->db->query($sql);\n\n return($consulta);\n }", "protected function search_komplain(){\n $cari = null;\n if(isset($_GET['cari'])){\n $cari = str_replace(\"'\",\"\",$_GET['cari']);\n }\n $query = $this->query(\"select * from komplain where username like '%$cari%' \");\n $row = mysqli_num_rows($query);\n if($row > 0){\n while($show = mysqli_fetch_assoc($query)){\n $build[] = $show;\n }\n }else{\n \n return false;\n }\n return $build;\n }", "public function show(admin $admin)\n {\n //\n }", "public function show(admin $admin)\n {\n //\n }", "function superadmin_index() {\n\t\n\tif($this->request->url == 'superadmin') \n\t{\n\t\tif($this->Session->read('param_search')) \n\t\t\t{\n\t\t\t\t$this->Session->delete('param_search');\n\t\t\t}\n\t\tif($this->Session->read('data_search')) \n\t\t\t{\n\t\t\t\t$this->Session->delete('data_search');\n\t\t\t}\n\t}\t\n\t\n\t\t$this->set('meta_title','Admin users');\n\t\t$search = '';\n\t\t$act = '';\n\t\t$active = '';\n\t\t$argArr = array();\n\t\t$cond = '';\t\t\n\tif(isset($this->params['pass'][0]) && isset($this->params['pass'][1]) && $this->params['pass'][1] == 'page_record') {\n\t\t$this->Session->write('per_page_record',$this->params['pass'][0]);\n\t}\t\t\n\t\t/* Search conditon for text value */\n\t\t\n\t\t\n\t\tif(!empty($this->request->data)) {\n\t\t\t$search = $this->request->data['Adminuser']['search'];\n\t\t\t$act = $this->request->data['Adminuser']['act'];\n\t\t\t$this->Session->write('data_search',$this->data['Adminuser']);\n\t\t\t\tif($this->Session->read('param_search')) {\n\t\t\t\t\t$this->Session->delete('param_search');\n\t\t\t\t}\t\t\t\n\t\t}\n\t\telse if(isset($this->params['named']['search']) && $this->params['named']['search']) {\n\t\t\t $search = $this->params['named']['search'];\n\t\t\t $act = $this->params['named']['act'];\n\t\t\t $this->Session->write('param_search',$this->params['named']);\n\t\t\t\t if($this->Session->read('data_search')) {\n\t\t\t\t\t$this->Session->delete('data_search');\n\t\t\t\t}\t\t\t\t \n\t\t}\n\t\telse if($this->Session->read('data_search')) {\n\t\t\t$search = $this->Session->read('data_search.search');\n\t\t\t$act = $this->Session->read('data_search.act');\n\t\t\t\tif($this->Session->read('param_search')) {\n\t\t\t\t\t$this->Session->delete('param_search');\n\t\t\t\t}\t\t\n\t\t}\n\t\telse if($this->Session->read('param_search')) {\n\t\t\t$search = $this->Session->read('param_search.search');\n\t\t\t$act = $this->Session->read('param_search.act');\n\t\t\t\t if($this->Session->read('data_search')) {\n\t\t\t\t\t$this->Session->delete('data_search');\n\t\t\t\t}\t\t\n\t\t}\t\t\n\t\t\n\t\tif($search) {\n\t\t\t$argArr['search'] = $search;\n\t\t\t$argArr['act'] = $act;\n\t\t switch($search) {\n\t\t \tcase 'name' : \n\t\t\t \t\t$cond[] = array('OR'=>array('Adminuser.first_name LIKE'=>'%'.$search.'%','Adminuser.last_name LIKE'=>'%'.$search.'%'));\n\t\t\t \tbreak;\n\t\t\t \tcase 'email' : \n\t\t\t \t \t$cond[] = array('Adminuser.email LIKE'=>'%'.$search.'%');\n\t\t\t \tbreak;\t\n\t\t\t \tcase 'role' : \n\t\t\t \t \t$cond[] = array('Role.role_name LIKE'=>'%'.$search.'%');\n\t\t\t \tbreak;\t\t \n\t\t\t \tdefault :\t \n\t\t \t\t$cond[] = array('OR'=>array('Adminuser.first_name LIKE'=>'%'.$search.'%','Adminuser.last_name LIKE'=>'%'.$search.'%','Adminuser.username LIKE'=>'%'.$search.'%','Adminuser.email LIKE'=>'%'.$search.'%','Role.role_name LIKE'=>'%'.$search.'%'));\n\t\t\t }\n\t\t}\n\t\t\n\t\t$this->set('search', $search); \n\t\t$this->set('active', $active); \n\t\t$this->set('act', $act); \n\t\t$this->set('argArr', $argArr);\n\t\t/* End Search conditon for text value */\n\t\t/* Search conditon for Active status */\n\t\tif(isset($this->data['Adminuser']['active']) && $this->data['Adminuser']['active']) {\n\t\t\t$active = $this->data['Adminuser']['active'];\n\t\t}\n\t\telse if(isset($this->params['named']['active']) && $this->params['named']['active']) {\n\t\t\t$active = $this->params['named']['active'];\n\t\t}\n\t\telse {\n\t\t\t$active = ($this->Session->read('data_search.active')) ? $this->Session->read('data_search.active') : $this->Session->read('param_search.active');\n\t\t}\t\t\n\t\tif($active) {\n\t\t \t$this->set('active',$active);\n\t\t $cond[] = array('Adminuser.active'=>$active);\n\t\t}\n\t\n\t\t//all active and inactive records for paging.\n\t\t$active_record = $this->Adminuser->find('count',array('conditions'=>array('Adminuser.active'=>'yes',$cond)));\n\t\t$inactive_record = $this->Adminuser->find('count',array('conditions'=>array('Adminuser.active'=>'no',$cond)));\n\t\t$this->set('active_record',$active_record);\n\t\t$this->set('inactive_record',$inactive_record);\t\t\t\n\t\t/* End Search conditon for Active status */\n\t\t$condition = $cond;\n\t\t$record = ($this->Session->read('per_page_record')) ? $this->Session->read('per_page_record') : ADMIN_PER_PAGE_RECORD;\t\t\n\t\t$this->paginate = array('limit' => $record,'order' => array('Adminuser.first_name'=>'ASC'));\n\t\t$data = $this->paginate('Adminuser', $condition);\n\t\t\n\t\t $this->set('data',$data);\n\t\t\n\t }", "private function isIPInAdminWhitelist()\n\t{\n\t\tif ($this->cparams->getValue('ipwl', 0) == 1)\n\t\t{\n\t\t\t$db = $this->container->db;\n\t\t\t$sql = $db->getQuery(true)\n\t\t\t ->select($db->qn('ip'))\n\t\t\t ->from($db->qn('#__admintools_adminiplist'))\n\t\t\t;\n\n\t\t\t$db->setQuery($sql);\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$ipTable = $db->loadColumn();\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\t$ipTable = null;\n\t\t\t}\n\n\t\t\tif (!empty($ipTable))\n\t\t\t{\n\t\t\t\tif (AtsystemUtilFilter::IPinList($ipTable))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "function searching()\n{\n\tglobal $__BRD_SUM__;\n\n\t$sflag = '$Server';\n\t$eflag = '------';\n\t$str = `/my_tools/gwping eth0 list 2> /dev/null`;\n\n\twhile($str) {\n\t\t$find = strstr($str,$sflag);\n\t\tif(!$find) break;\n\n\t\t$pos = strpos($find,$eflag);\n\t\tif(!$pos) break;\n\n\t\t$section = substr($find,0,$pos);\n\t\tif(!$section) break;\n\n\t\t$allsection[] = $section;\n\n\t\t$str = substr($find,$pos);\n\t}\n\n\tif(!isset($allsection)) return false;\n\n\tforeach( $allsection as $section ) {\n\t\t$line = explode(\"\\n\",$section);\n\t\tif(is_array($line)) {\n\t\t\t$mac = '';\n\t\t\t$productname = '';\n\t\t\t$slotnum = '';\n\t\t\t$ip = '';\n\t\t\tforeach($line as $each) {\n\t\t\t\tif(($pos = strpos($each,'$Server '))!==false) {\n\t\t\t\t\t$mac = trim(substr($each,$pos+strlen('$Server ')));\n\t\t\t\t} else if(($pos = strpos($each,'serverinfo:productname='))!==false) {\n\t\t\t\t\t$productname = trim(substr($each,$pos+strlen('serverinfo:productname=')));\n\t\t\t\t} else if(($pos = strpos($each,'serverinfo:slotnum='))!==false) {\n\t\t\t\t\t$slotnum = trim(substr($each,$pos+strlen('serverinfo:slotnum=')));\n\t\t\t\t} else if(($pos = strpos($each,'serverinfo:ip='))!==false) {\n\t\t\t\t\t$ip = trim(substr($each,$pos+strlen('serverinfo:ip=')));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif( $mac && $productname && $slotnum && $ip && $slotnum > 1 && $slotnum <= $__BRD_SUM__ && $productname == 'OpenVox 4 port GSM Gateway') {\n\t\t\t\tif(isset($ret[$slotnum]['mac'])) {\n\t\t\t\t\techo \"(((Please turn off the other gateways while scanning the network ..<br/>)))\\n\";\n\t\t\t\t\texit(1);\n\t\t\t\t}\n\t\t\t\t$ret[$slotnum]['mac'] = $mac;\n\t\t\t\t$ret[$slotnum]['productname'] = $productname;\n\t\t\t\t$ret[$slotnum]['slotnum'] = $slotnum;\n\t\t\t\t$ret[$slotnum]['ip'] = $ip;\n\t\t\t}\n\t\t}\n\t}\n\n\tif(isset($ret)) {\n\t\tksort($ret);\n\t\treturn $ret;\n\t}\n\n\treturn false;\n}", "function is_admin($identifiant)\n{\n try {\n global $bdd;\n $req = $bdd->prepare('SELECT admin FROM utilisateurs WHERE identifiant = ?');\n $req->execute(array($identifiant));\n $admin = $req->fetchAll(PDO::FETCH_COLUMN, 0); // Récupère la valeur de la première colonne\n\n if ($admin[0] == 1) {\n return true;\n } else {\n return false;\n }\n } catch (Exception $e) {\n die('Erreur : ' . $e->getMessage());\n }\n}", "public function Admin(Request $request){\n //cada vez que ingrese al panel un usuario que me guarde su IP\n\n try\n {\n $characters = DB::connection('externa')->table('characters')->where('account_name','=',Auth::user()->login)->paginate(7);\n }\n catch(\\PDOException $e)\n {\n $characters = \"\";\n flash('no se puedo realizar la conexion a la BD.')->error();\n \n }\n\n $link = \"home\";\n // dd($request->ips());\n return view ('lineage.admin.index',compact('characters','link','xml'));\n }", "public function getAdminsList(){\n return $this->_get(5);\n }", "function readAdmins()\n {\n\t\t$sql = \"SELECT * FROM user WHERE user_type_id=2\";\n\n\t\t$result = $this->dbh->query($sql);\n\t\tif ($result->num_rows > 0){\n\t\t\treturn $result;\n\t\t}\n\t\telse \n {\n\t\t\treturn false;\n\t\t}\n\t}", "public function index()\n {\n //\n $result = \\App\\Models\\M_user::\n with('group')\n ->orderBy('id','desc')\n ->whereNotIn('username',['superadmin'])\n ->where('type_user','user_bu');\n if(!empty($request->q))\n {\n $result->where('name','like','%'.$request->q.'%');\n }\n return $result->paginate(10);\n }", "function consulta_Todos_Usuarios()\n\t\t{\n\t\t\t$this->sql=\"SELECT * FROM usuario \";\n\t\t\t$this->sql.=\"inner join inf_personal \";\n\t\t\t$this->sql.=\"where inf_personal.ip_id = usuario.ip_id\";\n\t\t\treturn parent::ejecutaQUERY();\n\t\t}", "public function autosearch(){\n\t\n\t\tif(!isset($_SESSION['username'])){\n\t\t\theader(\"Location: index.php?c=login&a=index\", TRUE, 302);\n\t\t}\n\t\t$this->loadview('snmp/autosearch');\n\t}", "function GetData_Where ($nip){\n\n // perintah GET data\n return $this->MPegawai->GET_Where($nip);\n }", "public function IndexAdmin(Request $request)\n {\n $per_page = 100;\n\n if(!empty($request->input('search'))){\n $data = DB::table('t_bahasa')\n ->where('indo', 'LIKE', \"%\".$request->search.\"%\")\n ->orWhere('jawa', 'LIKE', \"%\".$request->search.\"%\")\n ->orWhere('sunda', 'LIKE', \"%\".$request->search.\"%\")\n ->orderBy('created_at', 'DESC')\n ->paginate($per_page);\n\n $links = $data->appends(['search' => $request->search])->links();\n } else {\n $data = DB::table('t_bahasa')\n ->orderBy('created_at', 'DESC')\n ->paginate($per_page);\n\n $links = $data->links();\n }\n\n $dataResult = [\n 'data' => $data,\n 'links' => $links,\n ];\n\n if (count($data) == 0) {\n return Responses::sendError($dataResult, 'Kamus Is Empty');\n }\n\n return Responses::sendResponse($dataResult, 'Kamus Retrieved Successfully');\n }", "public function search()\n\t{\n\t\tif($this->session->userdata('uid')==1){\n\t\t\t$data['authorized']=true;\n\t\t}else{\n\t\t\t$data['authorized']=false;\n\t\t}\n\t\tif(isset($_GET['find'])){\n\t\t\t$data['query']=$_GET['find'];\n\t\t}else{\n\t\t\t$data['query']=\"\";\n\t\t}\n\n\t\t$this->load->view('result',$data);\n\t\t$this->load->view('common/footer');\n\t}", "public function getLoginAdmin()\n\t{\n\t\treturn $this->db\n\t\t->where('username',$this->input->post('username'))\n\t\t->where('password',$this->input->post('password'))\n\t\t->get('admin');\n\t}", "public function findAdmins(): array{\n $query = <<<SQL\n select admins.id, admins.username, admins.password, admins.type, organizations.name organization_name\n from admins \n left join organizations on admins.organization_id = organizations.id\n where admins.type=\"admin\"\n order by organizations.name;\nSQL;\n $query = $this->db->query($query);\n return $query->fetchAll() ?: [];\n }", "protected function search(){\n $query = \"select * from $this->table_name\n WHERE user_log_name = '$this->user_log_name'\";\n return $this->excute_query($query);\n }", "function se_admin($admin_unique = Array('0', '')) {\n\t global $DBH,$class_admin;\n\n\t // SET VARS\n\t $this->is_error = 0;\n\t $this->error_message = \"\";\n\t $this->admin_exists = 0;\n\t $this->admin_info['admin_id'] = 0;\n\n\t // VERIFY admin_ID/admin_adminNAME/admin_EMAIL IS VALID AND SET APPROPRIATE OBJECT VARIABLES\n\t if(@$admin_unique[0] != 0 | @$admin_unique[1] != \"\") {\n\n\t // SET adminNAME AND EMAIL TO LOWERCASE\n\t $admin_login = strtolower(@$admin_unique[1]);\n\t if($admin_login == \"\"){ $admin_login = \"0\";}\n\t // SELECT admin USING SPECIFIED SELECTION PARAMETER\n\t //$sql = \"SELECT * FROM `admin` WHERE `id`='\".intval($admin_unique[0]).\"' OR `login` = '\".$admin_login.\"' LIMIT 1\";\n\t //echo $sql;\n\t //$admin = $database->database_query($sql);\n /*\n if($database->database_num_rows($admin) == 1) {\n\t $this->admin_exists = 1;\n\t $this->admin_info = $database->database_fetch_assoc($admin);\n }\n */\t \n //$sql = \"SELECT * FROM `admins` WHERE `id`='\".intval($admin_unique[0]).\"' OR `login` = '\".$admin_login.\"' LIMIT 1\";\n\t $sql = \"SELECT * FROM `admins` WHERE `id`= :admin_uniq OR `login` = :admin_login LIMIT 1\";\n //echo $sql;\n //var_dump(intval($admin_unique[0]),$admin_login);\n\t $admin_res = $DBH->prepare($sql);\n\t $admin_arr = Array('admin_uniq' => intval($admin_unique[0]),'admin_login' => $admin_login);\n\t $admin_res->execute($admin_arr);\n //$admin = $admin_res->fetch();\n\n if($admin_res->rowCount() == 1){\n $this->admin_exists = 1;\n //$this->admin_info['admin_id'] = 1;\n //$this->admin_info['password'] = 'yapass';\n $this->admin_info = $admin_res->fetch();\n\t\t\t\t\t\t\t$this->admin_info['password_star'] = \"\";\n\t\t\t\t\t\t\tfor($i=0; $i<strlen($this->admin_info['password']); $i++){\n\t\t\t\t\t\t\t $this->admin_info['password_star'] .= \"*\";\t\n\t\t\t\t\t\t\t}\n\t //$this->admin_info = $database->database_fetch_assoc($admin);\n }\n }\n\n\t}", "public function search()\r\n {\r\n }", "public function admin_index() {\n\t\t$emailAccounts = $this->Paginator->paginate(null, $this->Filter->filter);\n\n\t\t$filterOptions = $this->Filter->filterOptions;\n\n\t\t$filterOptions['fields'] = array(\n\t\t\t'name',\n\t\t\t'username',\n\t\t\t'email',\n\t\t\t'type' => $this->EmailAccount->types\n\t\t);\n\n\t\t$this->set(compact('emailAccounts', 'filterOptions'));\n\t}", "function search()\n\t{\n\t\t$search=$this->input->post('search');\n\t\t$data_rows=get_people_manage_table_data_rows($this->Customer->search($search,$this->config->item('number_of_items_per_page') ? (int)$this->config->item('number_of_items_per_page') : 20),$this);\n\t\techo $data_rows;\n\t}" ]
[ "0.6976208", "0.6172626", "0.608168", "0.60680014", "0.5933701", "0.5898829", "0.58181214", "0.57064575", "0.57007575", "0.5676884", "0.5657286", "0.5621871", "0.5551557", "0.5481166", "0.5451713", "0.5451045", "0.54403055", "0.5423367", "0.54198116", "0.5379471", "0.53743625", "0.5318066", "0.53138995", "0.5300185", "0.5290439", "0.5264396", "0.52540654", "0.52532715", "0.5249579", "0.5218941", "0.52097726", "0.51904136", "0.5148461", "0.51323444", "0.51313454", "0.51151603", "0.5109202", "0.5106642", "0.5094479", "0.50941706", "0.50914365", "0.5079078", "0.50701267", "0.50701267", "0.5066934", "0.50587857", "0.50544286", "0.5053652", "0.5052211", "0.5052177", "0.5047818", "0.5045749", "0.50317734", "0.5023779", "0.50175524", "0.50111896", "0.5003041", "0.49979553", "0.49958402", "0.4994172", "0.49891528", "0.4986163", "0.49732852", "0.49731347", "0.49728143", "0.49726424", "0.4971479", "0.49670196", "0.496459", "0.49625668", "0.49589756", "0.49578714", "0.49558264", "0.49558198", "0.49534628", "0.49504986", "0.49491838", "0.49303395", "0.49256304", "0.49256304", "0.49241516", "0.4922081", "0.49202657", "0.491699", "0.49139076", "0.4908656", "0.49068692", "0.49028927", "0.4898404", "0.4898163", "0.48931664", "0.4891676", "0.48907092", "0.48890352", "0.4885591", "0.4882112", "0.4879062", "0.48774773", "0.4874239", "0.48742014" ]
0.75962716
0
Creates a new item from $assocArray and inserts into DB
Создает новый элемент из $assocArray и вставляет в БД
public function addNewItem($assocArray) { $item = \Entity\Entity::factory()->create(); foreach ($assocArray as $field=>$value) { $item->set($field,is_bool($value) ? (int) $value : $value); } $item->save(); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function insertCar($carArray){\n// $carArray[self::CAR] = $carNumber;\n $cars = new Cars();\n $cars->carNumber = (int)$carArray[self::CAR];\n $cars->driver = $carArray[self::DRIVER];\n $cars->save();\n }", "public function insert(array $item);", "public function insertAssoc(Array $record)\n\t\t{\n\t\t\t// container for the place holders (\"?\")\n\t\t\t// Note: they may be wrapped in function calls,\n\t\t\t// so store in an array temporarily\n\t\t\t$placeHoldersSQL = array();\n\n\t\t\tforeach($record as $key => $value) {\n\n\t\t\t\t// define the default place holder\n\t\t\t\t$placeHolder = '?';\n\n\t\t\t\t// if the value is an array with specific keys, \n\t\t\t\t// \t\t1) update the place holder\n\t\t\t\t// \t\t2) update the value\n\t\t\t\tif(is_array($value) && isset($value[MvcQuery::MVC_QUERY_PLACE_HOLDER]))\n\t\t\t\t{\n\t\t\t\t\t$placeHolder = $value[MvcQuery::MVC_QUERY_PLACE_HOLDER];\n\t\t\t\t\t$record[$key] = $value[MvcQuery::MVC_QUERY_VALUE];\n\t\t\t\t}\n\n\t\t\t\t$placeHoldersSQL[] = $placeHolder;\n\t\t\t}\n\n\t\t\t$keysSQL = '`' . implode('`,`', array_keys($record)) . '`';\n\n\t\t\t$placeHoldersSQL = implode(',', $placeHoldersSQL);\n\n\t\t\t$dbPrefix = $this->getDbPrefix();\n\t\t\t$query = <<<SQL\nINSERT INTO {$dbPrefix}`{$this->model->name}`\n\t({$keysSQL})\nVALUES\n\t({$placeHoldersSQL});\nSQL;\n\t\t\treturn $this->model->db->insert($query, array_values($record));\n\t\t}", "public function createItem(array $data);", "function as_new_item(){\n\t\t$database = new As_Dbconn();\t\t\t\n\t\t$New_Item_Details = array(\n\t\t\t'item_name' => trim($_POST['name']),\n\t\t\t'item_code' => trim($_POST['code']),\n\t\t\t'item_description' => trim($_POST['description']),\n\t\t\t'item_unit' => trim($_POST['unit']),\n\t\t\t'item_created' => date('Y-m-d H:i:s'),\n\t\t);\n\t\t\t\n\t\t$add_query = $database->as_insert( 'as_item', $New_Item_Details ); \n\t}", "private function insertArray( &$array )\n\t\t{\n\t\t\tif ( Database::isArray2D($array) ) {\n\t\t\t\tforeach ( $array as $arr ) {\n\t\t\t\t\t$this->insertArray( $arr );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$newValues = array();\n\t\t\t\tforeach ( $array as $key => $value ) {\n\t\t\t\t\t$newValues[ $key ] = $value;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( isset($this->activerecord['insert']) ) {\n\t\t\t\t\t$this->activerecord['insert'][] = $newValues;\n\t\t\t\t} else {\n\t\t\t\t\t$this->activerecord['insert'] = array( $newValues );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function initialInsert($company_id){\n foreach ($this->settingsArray as $id => $row) {\n $data = array(\n 'company_id' => $company_id,\n 'key' => $row['key'],\n 'value' => $row['value'],\n 'descr' => $row['descr'],\n 'default_value' => $row['value'],\n 'admin' => $row['admin'],\n 'type' => $row['type'],\n );\n $this->create($data);\n }\n }", "public static function insert($arr) {\n\t\tglobal $wtcDB, $query;\n\n\t\t$db = $wtcDB->massInsert($arr);\n\n\t\tnew Query($query['announce']['insert'], Array(1 => $db['fields'], 2 => $db['values']), 'query', false);\n\t}", "public function insertItem(array $input){\n\t\treturn $this->db->insertItem($input);\n\t}", "public abstract function insert(array $data);", "public function addToInsertSQLArray();", "function orchardAlbumInsert($album_array) {\r\n //insert the data else\r\n $insert_album['primary_release_date'] = $album_array['primary_release_date'];\r\n $insert_album['duration'] = $album_array['duration'];\r\n $insert_album['language'] = $album_array['language'];\r\n\r\n $insert_album['product_name'] = $album_array['product_name'];\r\n $insert_album['primary_sales_start_date'] = $album_array['primary_sales_start_date'];\r\n $insert_album['cline'] = $album_array['cline'];\r\n\r\n $insert_album['label'] = $album_array['label'];\r\n $insert_album['primary_genre'] = $album_array['primary_genre'];\r\n $insert_album['volume_count'] = $album_array['volume_count'];\r\n $insert_album['track_count'] = $album_array['track_count'];\r\n\r\n $insert_album['date_created'] = $album_array['date_created'];\r\n $insert_album['delivery_type'] = $album_array['delivery_type'];\r\n\r\n $insert_album['created_at'] = date('Y-m-d h:i:s');\r\n $insert_album['updated_at'] = date('Y-m-d h:i:s');\r\n $insert_album['patch_name'] = $album_array['patch_name'];\r\n $insert_album['upc'] = $album_array['upc'];\r\n $this->insertTableQuery($insert_album, 'album');\r\n }", "public function _add($arr){\n\n $ret = $this->insertGetId($arr);\n return $ret;\n }", "public function insert($djangoOpenidAuthAssociation);", "public function insert_db($array)\r\n\t{\r\n\t\t$this->insert($array, 'users_list');\r\n\t}", "public function createFromArray ($array) {\n\t\t\t$this->setId( $array['id'] );\n\t\t\t$this->setItems( $array['items'] );\n\t\t\t$this->setDate( $array['date'] );\n\t\t\t$this->setShippingFee( $array['shippingFee'] );\n\t\t\t$this->setCustomer( $array['customer'] );\n\t\t\t$this->setNewCustomer( $array['newCustomer'] );\n\t\t}", "public function insert($item);", "public function insert(array $data);", "public function insert(array $data);", "private function insertInDatabase()\n {\n $this->created_at = date(\"Y-m-d H:i:s\");\n $this->updated_at = date(\"Y-m-d H:i:s\");\n\n $db = Application::getInstance()->databaseConnection()->pdo();\n\n $attributes = implode(', ', $this->attributes);\n $values = '';\n $executeValues = [];\n\n foreach ($this->attributes as $attribute) {\n if ($values != '') {\n $values .= ', ';\n }\n\n $values .= '?';\n $executeValues[] = $this->{$attribute};\n }\n\n $stmt = $db->prepare('INSERT INTO ' . static::$table . '(' . $attributes . ') VALUES (' . $values . ')');\n $stmt->execute($executeValues);\n }", "public function insert(array $arr)\n {\n //inserts multiple records\n $this->patientSymptom->insert($arr);\n }", "public function insertItem(array $cartItem){\n //dd($user);\n Cart::insert($cartItem);\n }", "abstract protected function _insert(array $properties);", "function agregar($arr) {\n $res = $this->mdl->insert($arr);\n return $res;\n }", "public function createItem($item)\n {\n $this->db->insert('items', $item);\n }", "function add_item($record_array) {\n\tglobal $item_tbl, $category_tbl, $user_tbl, $bid_tbl;\n\t\n\t$connection = open_mysql_db();\n\t$query = \"INSERT INTO $item_tbl\";\n\t\n\tif (count($record_array) > 5) {\n\t\t$query .= \" (name, description, category_id, manufacturer, starting_price, expiration_date, seller_username_id) \" .\n\t\t\"VALUES ( '\" . $record_array['name'] . \"', '\" . $record_array['description'] . \"', '\" . $record_array['item_category'] . \"', '\" . \n\t\t\t\t\t$record_array['manufacturer'] . \"', '\" . $record_array['starting_price'] . \"', '\" . $record_array['expiration_date'] . \"', \" .\n\t\t\t\t\t\"'\". (int) $record_array['seller_username_id'] . \"' )\";\n\t\n\t} else {\n echo \"Record array incorrect length: <br/> $query <br />\";\n echo var_dump($record_array);\n die();\n\t}\n\t//echo \"<p style='color: white'>\" . $query . \"</p>\";\n\t\n\t$results = mysql_query($query, $connection) or show_mysql_errors(); \n\t$id = mysql_insert_id();\n\t\n\tmysql_close($connection) or show_mysql_errors();\n\t\n\treturn $id;\n}", "function as_add_new_record(){\n\t\t$database = new As_Dbconn();\t\t\t\n\t\t$New_Item_Details = array(\n\t\t\t'record_item' => trim($_POST['itemid']),\n\t\t\t'record_place' => trim($_POST['place']),\n\t\t\t'record_time' => trim($_POST['time']),\n\t\t\t'record_date' => trim($_POST['date']),\n\t\t\t'record_measure' => trim($_POST['measure']),\n\t\t 'record_posted' => date('Y-m-d H:i:s'),\n\t\t\t'record_postedby' => \"1\",\n\t\t);\n\t\t\t\n\t\t$add_query = $database->as_insert( 'as_record', $New_Item_Details ); \n\t}", "function insert($array) {\n\t\t$data = array();\n\t\t$data['entity_id'] = $array['entity_id'];\n\t\t$data['first_name'] = $array['first_name'];\n\t\t$data['last_name'] = $array['last_name'];\n\t\tif(isset($array['birthday']))\n\t\t\t$data['birthday'] = date( 'Y-m-d H:i:s', $array['birthday']/1000);\n\t\tif(isset($array['gender']))\n\t\t\t$data['gender'] = substr($array['gender'], 0, 1);\n\t\tif(isset($array['phone_number']))\n\t\t\t$data['phone_number'] = $array['phone_number'];\t\n\t\tif($array['user_type'] == \"PUBLIC\" || $array['user_type'] == \"DIGNITARY\") {\n\t\t\t$data['occupation'] = $array['occupation'];\n\t\t}\n\t\tif($array['user_type'] == \"DIGNITARY\") {\n\t\t\t\n\t\t\t$this->load->model('Location_perm', 'loc');\n\t\t\tif(!$this->loc->addLocation(array('id'=>$array['entity_id'], 'lat'=>$array['lat'], 'lon'=>$array['lon'], 'address'=>$array['address']))) //if this fails\n\t\t\t\treturn false; //return false here, don't bother inserting other info\n\t\t}\n\t\treturn $this->db->insert('person_info', $data);\t\n\t}", "public function insert_entry(){\n\t\t\t$test = array(\"title\"=>'aaa11',\"name\"=>'bbb');\n\t\t\t$this->db->insert('test',$test);\t\n\t\t}", "function addArray ($array)\n {\n $parent_row = $this->insertNewResult(&$metadata);\n $this->DoArray2Xml($array,$parent_row);\n }", "public static function add($requestArray, $applicant, $file){ \n\n $tertiary_institution_record = new TertiaryInstitutionRecord();\n $tertiary_institution_record->fill($requestArray);\n $tertiary_institution_record->applicant()->associate($applicant); \n\n if($tertiary_institution_record->save()){\n return 1; //i.e record successfully created\n }else{\n //delete uploaded file from disk if record wasn't saved to database\n Storage::delete($path);\n return 0; //Unable to create record\n }\n }", "public function _insert($array)\r\n {\r\n $this->_database = new UploadDatabase();\r\n $this->_database->connect();\r\n $values = array_values($array);\r\n //format fields string\r\n $fields = implode(',', array_keys($array));\r\n return $this->_database->insert('files', $values, $fields);\r\n }", "public function add($formArray)\n {\n $specie_name = $_POST['specie_name'];\n $gender = $_POST['gender'];\n $color = $_POST['color'];\n $weight = $_POST['weight'];\n \n $dao = new Database();\n \n $conn = $dao->openConnection();\n \n $sql = \"INSERT INTO `tb_member`(`specie_name`, `gender`, `color`, `weight`) VALUES ('\" . $specie_name . \"','\" . $gender . \"','\" . $color . \"','\" . $weight . \"')\";\n $conn->query($sql);\n $dao->closeConnection();\n }", "public function create($array) {\n \n }", "private function dbInsertTweetArray(array $tweetArray)\n {\n $entityManager = &$this->entityManager;\n foreach ($tweetArray as $tweet) {\n $entityManager->persist($tweet);\n }\n $entityManager->flush();\n }", "function insert($object, $object_array) {\n $count = 0;\n $fields = '';\n $con = $this->open();\n foreach ($object_array as $col => $val) {\n if ($count++ != 0)\n $fields .= ', ';\n $col = mysqli_real_escape_string($con, $col);\n $val = mysqli_real_escape_string($con, $val);\n $fields .= \"`$col` = '$val'\";\n }\n $query = \"INSERT INTO `$object` SET $fields\";\n if (mysqli_query($con, $query)) {\n $this->close($con);\n return 1;\n } else {\n return 0;\n }\n }", "public function insertRow(Array $data);", "public static function insert($arr) {\n\t\tglobal $wtcDB, $query;\n\n\t\t$db = $wtcDB->massInsert($arr);\n\n\t\tnew Query($query['moderator']['insert'], Array(1 => $db['fields'], 2 => $db['values']), 'query', false);\n\t\t\n\t\tnew Cache('Moderators');\n\t}", "function DB_create( $table, $field, $value ) {\r\n global $con;\r\n $value = \"'\".implode(\"', '\", $value).\"'\"; // A miraculous method to convert an array into string ex: 'itemname', 'description'\r\n $stmt = $con->prepare(\"INSERT INTO $table ($field) VALUES ($value)\");\r\n $stmt->execute();\r\n\r\n if($stmt->rowCount() > 0)\r\n return true;\r\n else\r\n return false;\r\n}", "public function add($primary_key, $item) \n {\n #add item to array\n $this->items[$primary_key] = $item; \n }", "function addToDb($statusArr)\n {\n if($statusArr == 'true'){\n $this->status = 1;\n \n $insert = 'name, phone, city, secession, weight, cost, status, np_status, np_id, created_at';\n $value = \"'\".$this->post['name'].\"', '\".$this->post['phone'].\"', '\".$this->post['city'].\"', '\".$this->post['npNumb'].\"', '\".$this->post['weight'].\"', '\".$this->post['cost'].\"', '$this->status', '$statusArr', '$this->ttn', '$this->created'\";\n\n $sth = $this->dbh->prepare(\"INSERT INTO orders (\".$insert.\") VALUES (\".$value.\")\");\n $sth->execute();\n }\n\n }", "public function create($row){\r\n\t\t$fields = array();\r\n\t\t$values = array();\r\n\r\n\t\tforeach ($row as $key => $item){\r\n\t\t\t$fields[] = $key;\r\n\t\t\t$values[] = $this->db->FilterValue($item);\r\n\t\t}\r\n\r\n\t\t$field_str = join('`,`',$fields);\r\n\t\t$value_str = join(',',$values);\r\n\r\n\t\t$sql = \"INSERT INTO \".$this->get_tableName().\" (`$field_str`) VALUES ($value_str) \";\r\n\t\t$this->db->ExecuteQuery($sql);\r\n\r\n\t\treturn $this->db->LastInsertID();\r\n\t}", "public function create() {\n\t\t\tglobal $db;\n\t\t\n\t\t\t$attributes = $this->sanitized_attributes();\n\t\t\t\t\t\n\t\t\t$sql = \"INSERT INTO \" . self::$table . \" (\";\n\t\t\t$sql .= join(\", \", array_keys($attributes)); \n\t\t\t$sql .= \") VALUES ('\";\n\t\t\t$sql .= join(\"', '\", array_values($attributes));\n\t\t\t$sql .= \"')\";\n\t\t\tif ($db->query($sql)) {\n\t\t\t\t$this->id = $db->insert_id();\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public static function insertSupplier(array $array) {\n $prodSupplier = new ProductSuppliers();\n\n $prodSupplier->supplier_entity = $array['entity'];\n $prodSupplier->product_id = $array['item'];\n $prodSupplier->price = $array['price'];\n\n $prodSupplier->save();\n }", "public function insert($dataArray){\r\n\r\n $this->name = $dataArray['name'];\r\n $this->clinic_id = $dataArray['clinic_id'];\r\n $this->phone_code = $dataArray['phone_code'];\r\n $this->phone_number = $dataArray['phone_number'];\r\n $this->message = $dataArray['message'];\r\n if($this->save()){\r\n $insertedId = $this->id;\r\n return $insertedId;\r\n }else{\r\n return false;\r\n } \r\n\r\n }", "public function createItem(array $item_data, $group_id);", "function add($record)\n {\n\t// convert object to associative array, if needed\n\tif (is_object($record))\n\t{\n\t $data = get_object_vars($record);\n\t} else\n\t{\n\t $data = $record;\n\t}\n\t// update the DB table appropriately\n\t$key = $data[$this->_keyField];\n\t$object = $this->db->insert($this->_tableName, $data);\n }", "public function create($array)\n {\n }", "protected function create()\n\t{\n\t\tglobal $database;\n\t\t\n\t\t$attributes = $this->attributes();\n\t\t$keys = array_keys($attributes);\n\t\t$values = array_values($attributes);\n\t\t\n\t\t$sql = \"INSERT INTO \". static::$table_name .\"(\";\n\t\t$sql .= implode(\", \", $keys );\n\t\t$sql .= \") VALUES (\";\n\t\t$sql .= implode( \", \", array_fill(0, count($attributes) ,'?' ) );\n\t\t$sql .= \")\";\n\t\t\n\t\tif($database->execute($sql, $values)){\n\t\t\tif( property_exists($this, 'id') ){\n\t\t\t\t$this->id = $database->last_insert_id();\n\t\t\t}\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function insertIntoDb($newEvent) {\n $this->dbMocker[$newEvent[0]][] = $newEvent;\n }", "public function insert(array $attributes)\n {\n $collection = $this->collectionInstance();\n $collection->insert($attributes);\n $this->saveCollectionToSession($collection);\n\n }", "function insertObject( $table, &$object, $keyName = NULL )\n\t{\n\t\t$fmtsql = 'INSERT INTO '.$this->nameQuote($table).' ( %s ) VALUES ( %s ) ';\n\t\t$fields = array();\n\t\tforeach (get_object_vars( $object ) as $k => $v) {\n\t\t\tif (is_array($v) or is_object($v) or $v === NULL) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($k[0] == '_') { // internal field\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$fields[] = $this->nameQuote( $k );\n\t\t\t$values[] = $this->isQuoted( $k ) ? $this->Quote( $v ) : (int) $v;\n\t\t}\n\t\t$this->setQuery( sprintf( $fmtsql, implode( \",\", $fields ) , implode( \",\", $values ) ) );\n\t\tif (!$this->query()) {\n\t\t\treturn false;\n\t\t}\n\t\t$id = $this->insertid();\n\t\tif ($keyName && $id) {\n\t\t\t$object->$keyName = $id;\n\t\t}\n\t\treturn true;\n\t}", "function array_push_assoc($array, $key, $value){\n $array[$key] = $value;\n return $array;\n }", "function array_push_assoc($array, $key, $value){\n $array[$key] = $value;\n return $array;\n }", "function insertTweets($client, array $answers) {\n //Retrieve tweet content to store in columns of\n //tweets table\n foreach($filteredArray as $tweet) {\n //Clean the inputs before storing\n $twitterId = addslashes($tweet['twitter_id']);\n $text = addslashes($tweet['text']);\n $screen_name = addslashes($tweet['screen_name']);\n $profile_image_url = addslashes($tweet['profile_image_url']);\n $followers_count = addslashes($tweet['followers_count']);\n $sentiment = addslashes($tweet['sentiment']);\n $location = addslashes($tweet['location']);\n \n //indexId and the created_at time\n $indexId = $tweet['indexId'];\n $rangeId = $tweet['rangeId'];\n $created_at = $tweet['created_at'];\n\n //Name of the DynamoDB table which stored\n //filtered tweet content\n $tableName = 'tweets';\n\n //We store the new post in the database, to be able to read it later\n //Insert into AWS dynamoDb\n $insertResult = $client->putItem(array(\n 'TableName' => $tableName,\n 'Item' => array(\n 'indexId' => array('S' => $indexId),\n 'rangeId' => array('N' => $rangeId),\n 'twitter_id' => array('N' => $twitterId),\n 'created_at' => array('S' => $created_at ),\n 'text' => array('S' => $text),\n 'screen_name' => array('S' => $screen_name),\n 'profile_image_url' => array('S' => $profile_image_url),\n 'followers_count' => array('N' => $followers_count),\n 'sentiment' => array('S' => $sentiment),\n 'location' => array('S' => $location)\n ),\n ));\n }\n}", "function insertRecord($array) {\n\n\t\t$columns = implode(\", \", ($this->columns));\n\n\t\t$tamanhoArray = count($array);\n\t\t$contador = 0;\n\t\t$dados = \"\";\n\n\t\tforeach ($array as $cadaUm => $value) {\n\n\t\t\t$contador++;\n\n\t\t\tif ($contador < $tamanhoArray) {\n\n\t\t\t\t$dados = $dados . \"'\" . $value . \"'\" . \", \";\n\n\t\t\t} else {\n\n\t\t\t\t$dados = $dados . \"'\" . $value . \"'\";\n\n\t\t\t}\n\n\t\t}\n\n\t\t$sql = \"INSERT INTO $this->tableName($columns)VALUES($dados)\";\n\n\t\t$this->conexao($sql);\n\n\t\t$sql = \"SELECT MAX(id) FROM $this->tableName\";\n\n\t\t$id_inserido = $this->conexao($sql);\n\n\t\t$return = array();\n\n\t\twhile ($row_user = mysqli_fetch_assoc($id_inserido)) {\n\t\t\t$return[] = $row_user;\n\t\t}\n\n\t\tforeach ($return as $cadaUm) {\n\t\t\treturn $cadaUm[\"id\"];\n\t\t}\n\n\t}", "public function insertItem(string $table, array $data): bool;", "abstract protected function createEntity(array $row);", "function add_to_sql($db, $array)\r\n{\r\n\t$sql = 'INSERT INTO `products`(`id`, `category_id`, `title`, `description`, `price_new`, `price_old`, `image`, `status`, `sticker_new`) \r\n\tVALUES (' . $array[\"id\"] . ',' . $array[\"category_id\"] . ',\"' . $array[\"title\"] . '\",\"' . $array[\"description\"] . '\",\"' . $array[\"price_new\"] . '\",\"' . $array[\"price_old\"] . '\",\"' . $array[\"image\"] . '\",' . $array[\"status\"] . ',' . $array[\"sticker_new\"] . ')';\r\n\r\n\t// $rs = mysqli_query($db, $sql);\r\n\tif (mysqli_query($db, $sql)) {\r\n\t\techo \"New record created successfully\";\r\n\t} else {\r\n\t\techo \"Error: \" . $sql . \"<br>\" . mysqli_error($db);\r\n\t}\r\n\t// mysqli_close($db);\r\n}", "public function create(){\n\t\tforeach (get_object_vars($this) as $k => $v){\n\t\t\tif(!in_array($k,$this->arraysys) AND $v !== null AND (is_array($this->primaryKey) OR ($k != $this->primaryKey OR !$this->primarySerial))){\n $varKey[] = $k;\n\t\t\t\t$varValue[\":\".$k] = $v;\n\t\t\t}\n }\n if(isset($this->created)){\n if(!in_array(\"created\",$varKey)) {\n $varKey[] = \"created\";\n }\n $varValue[\":created\"] = date('Y-m-d H:i:s');\n }\n if(isset($this->updated)){\n\t\t if(!in_array(\"updated\",$varKey)) {\n $varKey[] = \"updated\";\n }\n $varValue[\":updated\"] = date('Y-m-d H:i:s');\n }\n\t\t$req = \"INSERT INTO \\\"$this->table\\\" (\\\"\".implode(\"\\\",\\\"\",$varKey).\"\\\") VALUES (:\".implode(\",:\",$varKey).\")\";\n//\t\tforeach($varValue as $k => $v){\n//\t\t $req = str_replace($k,\"'\".$v.\"'\",$req);\n// }\n//\t\techo $req;\n $this->connect();\n\t\t$res = $this->db->prepare($req);\n\t\t$bool = $res->execute($varValue);\n\t\t$this->disconnect();\n\t\treturn($bool);\n\t}", "function addPurchase($purchaseArray){\n\tglobal $pdo;\n\t$stmt = $pdo->prepare(\"INSERT INTO pos.purchases (total, CustomerID, DateTime) VALUES (?, ?, NOW())\");\n\t$total = $purchaseArray['total'];\n\t$customerID = $purchaseArray['CustomerID'];\n\tif($purchaseArray['CustomerID'] == 0){\n\t\t$customerID = 'NULL';\n\t}\n\t$stmt ->execute([$total, $customerID]);\n\t$stmt = null;\n\t\n\t//A: adding to purchase details.\n\t//A: selecting the most recent purchase\n\t$purchaseID = $pdo->lastInsertID();\n\tforeach($purchaseArray['Details'] as $details => $line){\n\t\tif($line['ProductID'] == '') {return;}\n\t\t$stmt = $pdo->prepare(\"INSERT INTO pos.purchase_details(PurchaseID, PurchaseLine, ProductID, discount, quantity) VALUES (?,?,?,?,?)\");\n\t\t$purchaseLine = $line['PurchaseLine'];\n\t\t$productID = $line['ProductID'];\n\t\t$discount = $line['Discount'];\n\t\t$quantity = $line['Quantity'];\n\t\t$stmt ->execute([$purchaseID, $purchaseLine, $productID, $discount, $quantity]);\n\t\t$stmt = null;\n\t} \n}", "public function testAssociationsV2InsertNew()\n {\n }", "private function insert($record) {\n\t\t\t$keys = array_keys($record);\n\t\t\t\t\n\t\t\t$attributes = implode(', ', $keys);\n\t\t\t$values = ':' . implode(', :', $keys);\n\t\t\t\t\n\t\t\t$query = 'INSERT INTO ' . $this->tableName . ' (' . $attributes . ') VALUES (' . $values . ')';\n\n\t\t\t$stmt = $this->pdo->prepare($query);\n\t\t\t$stmt->execute($record);\n\t\t}", "function create($formArray)\n {\n try{\n $row = $this->db->select('*')\n ->from('recently_viewed_products')\n ->where('cus_id', $formArray['cus_id'])\n ->where('pro_id', $formArray['pro_id'])\n ->get()->result_array();\n \n if(!empty($row)){\n $this->db->where('cus_id',$formArray['cus_id']);\n $this->db->where('pro_id',$formArray['pro_id']);\n $row = $this->db->delete('recently_viewed_products');\n }\n\n $this->db->insert('recently_viewed_products', $formArray);\n return true;\n }catch(Exception $e){\n return false;\n }\n }", "public abstract function insertModel(array $data);", "private function insert($item)\n {\n try {\n $database = $this->database;\n $detail = array();\n foreach ($item as $field => $value) {\n if (is_array($value)) {\n\n // foreach on fetch items\n for ($i = 0; $i < count($value); $i++) {\n // if value is arraY\n if (is_array($value[$i])) {\n foreach ($value[$i] as $val2Key => $val2Val) {\n $fieldName = 'RMI_' . $field . \"_\" . $i . \"_\" . $val2Key;\n $detail['field'][] = $fieldName;\n if (!in_array($fieldName, $this->fieldList, true)) {\n $this->changeTableField($fieldName);\n array_push($this->fieldList, $fieldName);\n }\n $detail['data'][] = $val2Val;\n }\n // if value is not array\n } else {\n $fieldName = 'RMI_' . $field . \"_\" . $i;\n $detail['field'][] = $fieldName;\n if (!in_array($fieldName, $this->fieldList, true)) {\n $this->changeTableField($fieldName);\n array_push($this->fieldList, $fieldName);\n }\n $detail['data'][] = $value[$i];\n }\n\n }\n\n // if value is not array\n } else {\n $fieldName = 'RMI_' . $field;\n $detail['field'][] = $fieldName;\n if (!in_array($fieldName, $this->fieldList, true)) {\n $this->changeTableField($fieldName);\n array_push($this->fieldList, $fieldName);\n }\n\n $detail['data'][] = $value;\n }\n\n }\n\n $fieldlist = implode(',', $detail['field']);\n $dataList = $detail['data'];\n $qs = str_repeat(\"?,\", count($detail['data']) - 1);\n // insert query for new row\n $sql = \"insert into $database.rmi($fieldlist) VALUES (${qs}?) \";\n $q = $this->connection->prepare($sql);\n $q->execute($dataList);\n } catch (Exception $e) {\n echo 'Caught exception--All: ', $e->getMessage(), \"\\n\";\n }\n }", "function _install_from_db_insert_before_key($originalArray, $originalKey, $insertKey, $insertValue) {\n $newArray = array();\n $inserted = false;\n foreach ($originalArray as $key => $value) {\n if (!$inserted && ($key === $originalKey)) {\n $newArray[$insertKey] = $insertValue;\n $inserted = true;\n }\n $newArray[$key] = $value;\n }\n return $newArray;\n}", "public function createObjKeyArray(array $keyArray){\n\tif (isset($keyArray[\"id\"])) $this->id = $keyArray[\"id\"];\n\tif (isset($keyArray[\"name\"])) $this->name = $keyArray[\"name\"];\n\tif (isset($keyArray[\"text\"])) $this->text = $keyArray[\"text\"];\n}", "public function addItem(array $item)\n {\n foreach($this->item_array as $item_item) {\n if($item_item['id'] == $item['id']) {\n throw new \\Exception(\"Duplicate item id not allowed. id [\".$item['id'].\"] already exists\", 1);\n }\n }\n\n if( str_contains($item['id'], '.') )\n {\n throw new \\Exception(\"dot [.] is not allowed in id\", 1); \n }\n\n $before_id = isset($item['before_id']) ? $item['before_id'] : null;\n if ($before_id != null) {\n $before_id_index = null;\n for ($i = 0; $i < count($this->item_array); $i++) {\n if($before_id == $this->item_array['id']) {\n $before_id_index = $i;\n break;\n }\n }\n\n if($before_id_index != null) {\n // insert at specific index\n // https://stackoverflow.com/a/3797526/5013099\n array_splice( $this->item_array, $before_id_index, 0, $item );\n }\n } else {\n array_push($this->item_array, $item);\n }\n }", "public function pushInsert($table, $value_array) {\n\t\t$table_keys = $this->makeTableKeys($value_array);\n\t\t$table_values = $this->makeTableValues($value_array);\n\t\t$query = \"INSERT INTO $table ($table_keys) VALUES ($table_values)\";\n\t\t$this->mysql->query($query);\n\t\t//echo $query . \"\\n\";\n\t}", "function addNewReview(PDO $db, array $new_review) : bool {\n\n $query = $db->prepare(\"INSERT INTO `reviews` (`burger_name`, `restaurant`, `visit_date`, `price`, `patty_rating`, `topping_rating`, `sides_rating`, `value_rating`, `total_score`)\n VALUES(:burger_name, :restaurant, :visit_date, :price, :patty_rating, :topping_rating, :sides_rating, :value_rating, :total_score)\");\n\n $query->bindParam(':burger_name', $new_review['burger_name']);\n $query->bindParam(':restaurant', $new_review['restaurant']);\n $query->bindParam(':visit_date', $new_review['visit_date']);\n $query->bindParam(':price', $new_review['price']);\n $query->bindParam(':patty_rating', $new_review['patty_rating']);\n $query->bindParam(':topping_rating', $new_review['topping_rating']);\n $query->bindParam(':sides_rating', $new_review['sides_rating']);\n $query->bindParam(':value_rating', $new_review['value_rating']);\n $query->bindParam(':total_score', $new_review['total_score']);\n\n return $query->execute();\n\n}", "private function inserir($array, $objectResult = null) {\n\n $result = $this->loadObjectPersistInsert($array);\n\n if (!$result[0]) {\n return $result;\n }\n\n $objeto = $result[1];\n $dados = $this->mountArrayInsert($array, $objeto);\n\n if (!$dados[0]) {\n $result[0] = false;\n $result[2]['null'] = \"N�o existe dados a ser inserido\";\n return $result;\n }\n\n // Campos a serem inserido na base de dados\n $inserir = $dados[1];\n\n //nome de referencia do id da tabela\n $id_colmap = $this->getIdColmap();\n\n if (isset($inserir['entity'])) {\n\n $campos = implode(\", \", array_keys($inserir['entity']));\n $values = \":\" . implode(\", :\", array_keys($inserir['entity']));\n $insert_query = \"INSERT INTO {$this->schema}.{$this->tabela} ({$campos}) VALUES ({$values}) RETURNING {$id_colmap}\";\n\n unset($campos);\n unset($values);\n\n if (isset($inserir['OneToMany'])) {\n\n foreach ($inserir['OneToMany'] as $atributo => $values) {\n\n $strategy = StrategyORM::getStrategy($this->propAtributos[$atributo]['OneToMany']['objeto']);\n foreach ($values as $key => $row) {\n\n $k = $row;\n $k[$id_colmap] = \"\";\n $campos = implode(\", \", array_keys($k));\n $values = \":\" . implode(\", :\", array_keys($k));\n\n # Query\n $insertOneToMany[$atributo][$key]['@query'] = \"INSERT INTO \" . $strategy->getSchema() . \".\" . $strategy->getTable() . \" ({$campos}) VALUES ({$values})\";\n\n # Montar BindValue\n foreach ($row as $atrib => $value) {\n $insertOneToMany[$atributo][$key][$atrib] = $value;\n }\n\n # Limpar variaveis\n unset($k);\n unset($campos);\n unset($values);\n }\n\n unset($strategy);\n }\n }\n\n if (isset($inserir['ManyToMany'])) {\n\n foreach ($inserir['ManyToMany'] as $atributo => $values) {\n\n $relationship = $this->propAtributos[$atributo]['ManyToMany'];\n $reflectionRelationship = new ReflectionORM($relationship['objeto']);\n $id_relationship = $reflectionRelationship->getPropAnnotations('id', '@Colmap');\n\n # Verifica schema\n if (isset($relationship['schema'])) {\n $insertManyToMany[$atributo]['@query'] = \"INSERT INTO {$relationship['schema']}.{$relationship['table']} ({$id_colmap},{$id_relationship}) VALUES (:{$id_colmap},:{$id_relationship})\";\n } else {\n $insertManyToMany[$atributo]['@query'] = \"INSERT INTO {$this->schema}.{$relationship['table']} ({$id_colmap},{$id_relationship}) VALUES (:{$id_colmap},:{$id_relationship})\";\n }\n\n foreach ($values as $value) {\n $insertManyToMany[$atributo][$id_relationship][] = $value;\n }\n\n\n unset($relationship);\n unset($reflectionRelationship);\n unset($id_relationship);\n }\n }\n } else {\n $result[0] = false;\n $result[2]['null'][] = \"Não existe dados a ser inserido\";\n return $result;\n }\n\n // Inserir na base de dados\n try {\n\n #iniciar transação\n $this->conn->beginTransaction();\n\n $prepare = $this->conn->prepare($insert_query);\n\n foreach ($inserir['entity'] as $k => $v) {\n $prepare->bindValue(\":$k\", $v);\n }\n\n $prepare->execute();\n\n $id_entity = $prepare->fetch(PDO::FETCH_ASSOC);\n $id_entity = $id_entity[$id_colmap];\n\n if (isset($insertOneToMany)) {\n\n foreach ($insertOneToMany as $atributo => $array) {\n foreach ($array as $colunas) {\n $prepare = $this->conn->prepare($colunas['@query']);\n $prepare->bindValue(\":{$id_colmap}\", $id_entity);\n foreach ($colunas as $indice => $value) {\n if ($indice != \"@query\") {\n $prepare->bindValue(\":{$indice}\", $value);\n }\n }\n $prepare->execute();\n }\n }\n }\n\n if (isset($insertManyToMany)) {\n\n foreach ($insertManyToMany as $atributo => $array) {\n foreach ($array as $indice => $idRelationship) {\n if ($indice != \"@query\") {\n foreach ($idRelationship as $value) {\n // Preparar query\n $prepare = $this->conn->prepare($array['@query']);\n $prepare->bindValue(\":$id_colmap\", $id_entity);\n $prepare->bindValue(\":$indice\", $value);\n $prepare->execute();\n }\n }\n }\n }\n }\n\n $this->conn->commit();\n } catch (Exception $e) {\n $this->conn->rollBack();\n $result[0] = false;\n $result[2]['sql'] = $e->getMessage();\n // Gravar Log\n $dados = $inserir['entity'];\n $collection = (isset($insertManyToMany)) ? $insertManyToMany : null;\n\n SatelliteHelper::gerarLogInsert($conn, $e->getMessage(), $insert_query, $dados, $collection);\n LogErroORM::gerarLogInsert($e->getMessage(), $insert_query, $dados, $collection);\n return $result;\n }\n $result[1] = $this->obterPorId($id_entity, $objectResult);\n return $result;\n }", "public function insert(array $data)\n {\n // add a timestamp\n $data['gallery_added']\t= date('Y-m-d H:i:s');\n\t\t$data['gallery_code']\t\t= $this->createReference();\n\t\t$data['campaign_code']\t= $this->_campaign->_campaigncode;\n\t\t\n\t\treturn parent::insert($data);\n\t\t\n }", "function insertar($ARRAY){\n\t\t\t//es importante asociar la llave del array con el nombre de la tabla dentro de nuestra db\n\t\t\t//en este caso, el array que viene desde el controlador es el mismo $_POST de nuestra vista\n\t\t\t//2.0 vue y MVC\n\t\t\t//es hora de modificar un poco insert, con el json entrante crearemos directamente un nuevo array dentro de insert, donde los datos seran sacados de nuestro json\n\t\t\t$this->db->insert('blog_posts',array(\n\t\t\t\t'TITULO_POST'=>$ARRAY['TITULO_POST'],\n\t\t\t\t'DESCRIPCION_POST'=>$ARRAY['DESCRIPCION_POST'],\n\t\t\t 'CONTENIDO_POST'=>$ARRAY['CONTENIDO_POST']));\n\t\t\t}", "public static function insertQry($table,$assocarray,$onduplicateupdate = array()){\n\t\tif(is_array($assocarray) && !empty($table)){\n\t\t\t$fields = self::joinFields(array_keys($assocarray));\n\t\t\t$vals = self::joinValues($assocarray);\n\t\t\tif(!empty($fields) && !empty($vals)){\n\t\t\t\t$sql = \"INSERT INTO $table($fields) VALUES($vals)\";\n\t\t\t\t$sql.= self::onDuplicate($onduplicateupdate);\n\t\t\t\treturn db::write($sql);\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function addIfNotExists($array, $table, $column, $key, $id) {\n if (array_key_exists($key, $array)) {\n\n $count = $this->checkifExists($array, $table, $column, $key);\n\n //echo $count;die;\n if ($count > 0) {\n $results = $this->db->get_where($table, array($column => $array[$key]));\n foreach ($results->result_array() as $field) {\n $array[$key] = $field[$id];\n }\n } else {\n $data = array($column => $array[$key]);\n $this->db->insert($table, $data);\n $results = $this->db->get_where($table, array($column => $array[$key]));\n foreach ($results->result_array() as $field) {\n $array[$key] = $field[$id];\n }\n }\n } else {\n }\n return $array;\n\n //echo '<pre>';print_r($array); echo '</pre>';\n\n }", "public function inserir($array) {\n\t\t$this->executarComando($this->gerarComandoInserir($array));\n\t}", "function add_category($record_array) {\n\tglobal $category_tbl;\n\t\n\t$connection = open_mysql_db();\n\t$query = \"INSERT INTO $category_tbl\";\n\n\tif (count($record_array) == 2) {\n\t\t$query .= \" (name, description) \" .\n\t\t\t\"VALUES ( '\" . $record_array['name'] . \"', '\" . $record_array['description'] . \"' )\";\n\t\t\t\n\t} else {\n\t\techo \"Record array incorrect length: <br/> $query <br />\";\n echo var_dump($record_array);\n die();\n\t}\t\n\t//echo \"<p style='color: white'>\" . $query . \"</p>\";\n\n\t$results = mysql_query($query, $connection) or show_mysql_errors();\n\t$id = mysql_insert_id();\n\t\n\tmysql_close($connection) or show_mysql_errors();\n\t\n\treturn $id;\n}", "private function create()\n {\n $attributes = static::$dbFields;\n\n try {\n $sql = 'INSERT INTO '.static::$tableName.' (';\n $sql .= implode(', ', $attributes);\n $sql .= ') VALUES (';\n for ($ii = 0;$ii < count($attributes);++$ii) {\n $sql .= '?';\n if ($ii !== (count($attributes) - 1)) {\n $sql .= ', ';\n }\n }\n $sql .= ')';\n\n $results = $this->db->prepare($sql);\n\n for ($ii = 1;$ii <= count($attributes);++$ii) {\n $attribute = $attributes[$ii - 1];\n if(is_bool($this->$attribute)) {\n $results->bindParam($ii, $this->$attribute, PDO::PARAM_BOOL);\n } else {\n $results->bindParam($ii, $this->$attribute);\n }\n }\n $results->execute();\n\n $this->id = $this->db->lastInsertId();\n } catch (Exception $e) {\n die($e->getMessage());\n }\n }", "public function insertRecord(array $pramArray)\n {\n //$log_file = fopen('/var/www/html/jimfuqua/tutor/logs/AssignmentsClass-insertRecord.log', 'w');\n //$v = var_export($pramArray, true);\n //$string = __LINE__.' AC $result = '.$v.\"\\n\\n\";\n //fwrite($log_file, $string);\n// one record dropped\n $pramArrayProcessed = $this->removeUnneededColumns($pramArray);\n //$v = var_export($pramArrayProcessed, true);\n //$string = __LINE__.' $pramArrayProcessed = '.$v.\"\\n\\n\";\n //fwrite($log_file, $string);\n $PDO_Connection = $this->_connectToDb();\n $sql = $this->_arrayToSQLstring($pramArrayProcessed);\n //$string = __LINE__.' AC $sql = '.$sql.\"\\n\\n\";\n //fwrite($log_file, $string);\n $result = $PDO_Connection->exec($sql);\n // Warning This function may return Boolean FALSE,\n // but may also return a non-Boolean value which evaluates to FALSE.\n // Returns number of rows affected. If that is 0 affected it will be seen as FALSE.\n return $result;\n\n }", "function insertEvent($eventArray){\n\n\t\t$eventId=0;\n\n\t\t//prevent sql injection\n\t\t$tempOwnerId =mysql_real_escape_string( $eventArray['event']['owner']['id']);\n\t\t$description = mysql_real_escape_string($eventArray['event']['description']);\n\t\t$locationId = mysql_real_escape_string($eventArray['event']['location']['id']);\n\t\t$startDateTime = mysql_real_escape_string($eventArray['event']['datetime']);\n\t\t$endTime = mysql_real_escape_string($eventArray['event']['endtime']);\n\t\t$staffNotes = mysql_real_escape_string($eventArray['event']['staffNotes']);\n\n\t\t//build sql statement\n\t\t$sqlStatement = \"insert into events (owner_userID, description, locationId,start_time,end_time,\n\t\t\t\tstaff_notes,created,status) values ('\".$tempOwnerId.\"','\".$description.\"','\"\n\t\t\t\t.$locationId.\"','\".$startDateTime.\"','\".$endTime.\"','\".$staffNotes.\"',now(),'pending');\";\n\t\t$dbhandle = connectDB();\n\n\t if(mysqli_connect_errno($dbhandle)) { // check if error occurs\n\n\t return \"Error on connecting to db.\";\n\t }\n\t else{\n\n\t //do database operations\n\t if(!mysqli_query($dbhandle, $sqlStatement)){\n\t \treturn mysqli_error($dbhandle); //return error\n\n\t }\n\n\t //get inserted event id\n\t $eventId = mysqli_insert_id($dbhandle);\n\t closeDBConnection($dbhandle);\n\t \n\t }\n\t //call utillity function to update tree and attendee table\n\t insertTrees($eventArray,$eventId);\t\t\n\t insertAttendees($eventArray,$eventId);\n\t\t\n\t}", "protected abstract function insert();", "function insert($table, $array){\n $link = connect();\n $keys = join(\",\",array_keys($array));\n $values=\"'\".join(\"','\",array_values($array)).\"'\";\n $sql = \"INSERT INTO $table ($keys) VALUES ($values)\";\n mysqli_query($link, $sql);\n return mysqli_insert_id($link);\n}", "public function testInsertUpdateLiveEventRecord(array $eventDataArray)\n {\n foreach ($eventDataArray as $eventData) {\n $eventData = $eventData[0];\n\n self::$eventRecord->record($eventData);\n\n self::assertEquals(1, $this->getConnection()->getRowCount('live_event'));\n\n $eventEntity = self::$em->getRepository('SocialTrackerBundle:LiveEvent')->findOneBy(['originId' => $eventData->getId()]);\n\n self::assertEquals($eventEntity->getActive(), $eventData->getActive());\n self::assertEquals($eventEntity->getName(), $eventData->getName());\n }\n }", "public function insert(string $table, array $array);", "public function guardarDB( $db, $tabla, $assocArray){\n\t\t$sqlInsert = DBHelper::sqlInsert($tabla,$assocArray);\n\t\t// print $sqlInsert;\n\t\t$sqlArgs = DBHelper::arrayValues($assocArray);\n\t\t$ret = $db->insert($sqlInsert, $sqlArgs);\n\t\t$this->error = $db->error_db;\n\t\treturn $ret;\n\t}", "function addAssocObject($object) {\r\n\t\tarray_push($this->assocObjects, $object);\r\n\t}", "function add_new_row($fields, $mysql_table_name){\n global $mysqli ;\n $keys = array_keys($fields) ;\n $query_keys = '' ;\n $query_values = '' ;\n for($i=0 ; $i<count($keys) ; $i++){\n if($i!=0){\n $query_keys = $query_keys . ',' ;\n $query_values = $query_values . ',' ;\n }\n $query_keys = $query_keys . '' . $keys[$i] . '' ;\n $query_values = $query_values . '\"' . $mysqli->escape_string($fields[$keys[$i]]) . '\"' ;\n }\n $query = 'INSERT INTO ' . $mysql_table_name . ' (' . $query_keys . ') VALUES (' . $query_values . ')' ;\n $mysqli->query($query) or die(\"Error: \" . $mysqli->error . ' ' . $query) ;\n return get_highest_id($mysql_table_name) ;\n}", "public function create($multiArray) {\n\n $table = 'books';\n $columns = array('title', 'primary_author');\n $columns2 = implode(\",\",$columns);\n $pdo = $this->connectDb;\n $pdo->beginTransaction();\n $sql = \"insert into $table ($columns2) values \";\n\n $paramArray = array();\n $sqlArray = array();\n\n foreach($multiArray as $row)\n {\n $sqlArray[] = '(' . implode(',', array_fill(0, count($row), '?')) . ')';\n foreach($row as $element)\n {\n $paramArray[] = $element;\n }\n }\n\n $sql .= implode(',', $sqlArray);\n $stmt = $pdo->prepare($sql);\n try {\n $stmt->execute($paramArray);\n $count = $stmt->rowCount();\n $pdo->commit();\n\n return print(\"rows CREATED successfully $count \\n\");\n } catch (PDOException $e){\n $pdo->rollBack();\n echo $e->getMessage();\n }\n $pdo = null;\n }", "protected function save()\n {\n $dbTable = DbModelDefinition::getTableName($this->baseClass, $this->collectionClass);\n $sql = '';\n foreach($this->items as $key => $item)\n {\n $sql .= \"\n Insert Into \" . (string)$dbTable . \"\n (\". $this->baseClass . \"Id, \" . $this->collectionClass . \"Id)\n Values (\" . (int)$this->baseClassId . \", \" . (int)$key . \")\n Where Not Exists \n (\n Select * From \" . $dbTable . \" \n Where \" . $this->collectionClass . \"Id = \" . $key . \"\n And \" . $this->baseClass . \"Id = \" . $this->baseClassId . \"\n )\n \";\n }\n }", "function addRecord( )\n {\n \n global $raceEditArray;\n // Add the new information into the array\n // items stacked for readability\n $raceEditArray[ ] = array(\n $_POST['txtraceName'],\n $_POST['txtraceCourse']\n );\n \n // The sort will be on the first column so we will use this to re-order the displays\n sort($raceEditArray);\n // Save the updated array in its session variable\n $_SESSION['serializedArray'] = urlencode(serialize($raceEditArray));\n \n foreach ($raceEditArray as $editRace)\n {\n $sql = \"INSERT INTO race (raceID, raceName, raceCourse)\"\n . \"VALUES ('\" . null . \"','\"\n . $_POST['txtraceName'] . \"', '\"\n . $_POST['txtraceCourse'] . \"')\";\n runQuery($sql, \"Record inserted for: \" . $_POST['txtraceName'], false);\n }//end of foreach\n }", "public function insertNewItem(){\r\n global $database;\r\n $udaje = array( \r\n \"name\" => $this->name ,\r\n \"popis\" => $this->popis ,\r\n \"count\" => $this->count,\r\n \"min_stav\" => $this->min_stav); \r\n $database->insert(\"tovar\", $udaje);\r\n }", "function addSimpleArrayItem($item, $arrayType){\n\t\t $item = trim($item);\n\t\t \n\t\t $okTypes = array(\"linkedPersons\",\n\t\t\t\t\t\"userTags\",\n\t\t\t\t\t\"userTagCreators\",\n\t\t\t\t\t\"creators\",\n\t\t\t\t\t\"contributors\",\n\t\t\t\t\t\"subjects\",\n\t\t\t\t\t\"coverages\",\n\t\t\t\t\t\"classes\",\n\t\t\t\t\t\"alphaNotes\");\n\t\t \n\t\t if(in_array($arrayType, $okTypes)){\n\t\t\t\t$actArray = $this->$arrayType;\n\t\t\t\tif(!$actArray){\n\t\t\t $actArray = array();\n\t\t\t\t}\n\t\t\t\tif(!in_array($item, $actArray)){\n\t\t\t $actArray[] = $item;\n\t\t\t $this->$arrayType = $actArray;\n\t\t\t\t}\n\t\t\t\t\n\t\t }\n }", "abstract protected function insertNew($row, $key);", "public function createItem();", "public function create(array $atribute)\n {\n }", "public function createOrUpdate($arrayData = array(), $id = null){\n\t\tif( is_null($id) ) {\n\t\t\t//create\n\t\t\t$obj = new \\SMSSent\\SMSSent;\n\t\t}else{\n\t\t\t//update\n\t\t\t$obj = \\SMSSent\\SMSSent::find($id);\n\t\t}\n\t\tif( count($arrayData) > 0 ){\n\t\t\tforeach($arrayData as $key=>$val){\n\t\t\t\t$obj->$key = $val;\n\t\t\t}\n\t\t\t$obj->save();\n\t\t\treturn $obj;\n\t\t}\n\t}", "function create($formArray)\n { \n try {\n $boolResponse = $this->db->insert('admin', $formArray);\n return $boolResponse;\n }\n catch (Exception $e) {\n // echo $e->getMessage();\n return false;\n }\n }", "private function createProductAttributeValues(array $productAttributeValues)\n {\n ProductAttributeValue::insert($productAttributeValues);\n }", "function insert_pair($field_pair_arry, $table=''){\n if(!is_array($field_pair_arry)) die(\"should pass a files_pair_arry\");\n $sql=\"INSERT INTO $table SET \";\n $i = 0;\n while (list($key, $val) = each($field_pair_arry)) {\n if($i++) $sql .= ', ';\n if($val == \"now()\"){\n $field_type = $this->get_field_type($table, $key);\n if( $field_type == \"date\" or $field_type == \"datetime\" or $field_type == \"timestamp\" or $field_type == \"time\"){\n $sql .= \"$key=$val\";\n continue;\n }\n }\n $sql .= \"$key='$val'\";\n \n }\n //echo $sql;\n return $this->insert($sql);\n }" ]
[ "0.617941", "0.60906285", "0.5967284", "0.5937875", "0.5935488", "0.5795357", "0.5770633", "0.5763998", "0.57589686", "0.5755001", "0.57496864", "0.57464373", "0.5733892", "0.5691879", "0.5689302", "0.568698", "0.5656346", "0.5642834", "0.5642834", "0.56291413", "0.5626443", "0.5622536", "0.55930287", "0.5589354", "0.5587065", "0.55863047", "0.5585902", "0.558318", "0.55603063", "0.5556681", "0.55564415", "0.5550177", "0.55169874", "0.5513285", "0.5498364", "0.54947776", "0.54613566", "0.5426662", "0.5425465", "0.5425238", "0.5423567", "0.5422619", "0.5415797", "0.54123825", "0.5394463", "0.5394178", "0.53890926", "0.53872645", "0.5386996", "0.53836024", "0.53745466", "0.53593755", "0.53584266", "0.53584266", "0.5356461", "0.53563666", "0.53548", "0.53477985", "0.53396904", "0.5338836", "0.53327316", "0.53287566", "0.53287375", "0.53254485", "0.5322501", "0.53220934", "0.53125566", "0.5304975", "0.53038746", "0.5298272", "0.52911067", "0.528868", "0.52858746", "0.5276433", "0.52731967", "0.5265999", "0.52562517", "0.52536076", "0.52531224", "0.52407044", "0.5232515", "0.52319956", "0.5229482", "0.5229091", "0.52275753", "0.5226221", "0.52209765", "0.52207154", "0.5219456", "0.52083033", "0.52074295", "0.5205467", "0.52052695", "0.52048975", "0.52021635", "0.5200742", "0.52001375", "0.51958096", "0.5188876", "0.5187495" ]
0.7032333
0
/ Get tb_am_user by id_asset
/ Получить tb_am_user по id_asset
function get_tb_am_user($id_asset) { return $this->db->get_where('tb_im_users',array('id_asset'=>$id_asset))->row_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserID($asset_id)\n\t{\n\t\treturn $Asset=Asset::find($asset_id)->user_id;\n\t}", "function update_tb_am_user($id_asset,$params)\n {\n $this->db->where('id_asset',$id_asset);\n return $this->db->update('tb_im_users',$params);\n }", "function delete_tb_am_user($id_asset)\n {\n return $this->db->delete('tb_im_users',array('id_asset'=>$id_asset));\n }", "public function getSpecificUser($user_id = 0);", "public function getAssetById($asset_id) {\n $sql = 'SELECT assets.*,\n attributes.attribute_label,\n attributes_values.attribute_value,\n locations.longitude,\n locations.latitude,\n asset_types.type_value,\n media.images,\n media.voice_memo\n FROM assets \n LEFT JOIN asset_types ON assets.type_id = asset_types.asset_type_id\n LEFT JOIN attributes_indexes ON assets.asset_id = attributes_indexes.asset_id\n LEFT JOIN attributes ON attributes_indexes.attribute_id = attributes.attribute_id\n LEFT JOIN attributes_values ON attributes_indexes.attribute_value_id = attributes_values.attribute_value_id\n LEFT JOIN media ON assets.asset_id = media.asset_id\n LEFT JOIN locations ON assets.asset_id = locations.asset_id\n WHERE (assets.asset_id = ?)';\n $q = self::$pdo->prepare($sql);\n $q->execute(array($asset_id));\n \n return $q->fetch(PDO::FETCH_ASSOC);\n }", "public function getAsset($asset){\n $this->connect();\n $sql = \"SELECT `asset_id`, `asset_name`, `asset_type`, `asset_rooms`, `asset_double_beds`,\";\n $sql .= \" `asset_single_beds`, `asset_sofa_bed`, `asset_persons`, `asset_address`\";\n $sql .= \" FROM `assets` WHERE `asset_id` = ?\";\n $res = $this->execute( $sql , [$asset->asset_id]);\n $row = $res->fetch();\n $asset->asset_id = $row['asset_id'];\n $asset->asset_name = $row['asset_name'];\n $asset->asset_type = $row['asset_type'];\n $asset->asset_rooms = $row['asset_rooms'];\n $asset->asset_double_beds = $row['asset_double_beds'];\n $asset->asset_single_beds = $row['asset_single_beds'];\n $asset->asset_sofa_bed = $row['asset_sofa_bed'];\n $asset->asset_persons = $row['asset_persons'];\n $asset->asset_address = $row['asset_address'];\n }", "function get_user($id)\n{\nreturn Import::getCreatedBy($id);\n}", "public function find_user($id);", "function getUserByID($id)\n {\n return $this->fetchRow($this->select()->where('id = ?', $id));\n }", "public function getUserByID($id);", "function get_user_by_id($id) \n\t{\n\t\treturn parent::get_by_id($this->tbl, $id);\n\t}", "public function getUser()\n\t{\n $app = JFactory::getApplication();\n\n $option\t= $app->input->get('option', '', 'word');\n $view = $app->input->get('view', '', 'word');\n $id = $app->input->get('id', '', 'int');\n \n if ($option == 'com_hwdmediashare' && $view == 'user' && $id)\n {\n return $id;\n }\n\n if ($option == 'com_hwdmediashare' && $view == 'mediaitem')\n {\n JTable::addIncludePath(JPATH_ADMINISTRATOR.'/components/com_hwdmediashare/tables');\n $table = JTable::getInstance('Media', 'hwdMediaShareTable');\n if ($table->load($id))\n { \n $properties = $table->getProperties(1);\n $media = JArrayHelper::toObject($properties, 'JObject');\n $author = (int) $media->created_user_id; \n return $author;\n }\n }\n \n return false;\n\t}", "public function loadByUserAndAssetId($member_id, $asset_id)\n\t{\n\t\t$db = $this->_db;\n\t\t$query = 'SELECT *';\n\t\t$query .= ' FROM '.$this->_tbl;\n\t\t$query .= ' WHERE `scope` = \"asset\" AND `member_id` = ' . $db->quote($member_id) . ' AND `scope_id` = ' . $db->quote($asset_id);\n\t\t$db->setQuery( $query );\n\n\t\tif ($result = $db->loadAssoc())\n\t\t{\n\t\t\treturn $this->bind($result);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->setError($db->getErrorMsg());\n\t\t\treturn false;\n\t\t}\n\t}", "public function getUserById($id){\n return $this->dm->getRepository('BBBLoadBalancerUserBundle:User')->find($id);\n }", "function getUserById() {\n\t\t$ids = FSInput::get ( 'id', array (), 'array' );\n\t\t$id = isset ( $ids [0] ) ? $ids [0] : 0;\n\t\t$query = \" SELECT *\n\t\t\t\t\t\t FROM fs_users\n\t\t\t\t\t\t WHERE id = $id \";\n\t\t\n\t\tglobal $db;\n\t\t$sql = $db->query ( $query );\n\t\t$result = $db->getObject ();\n\t\treturn $result;\n\t}", "function getMemberAssets($userId) {\n global $db;\n \n try {\n $query = \"SELECT * FROM MemberAssets WHERE user_id = :user_id\";\n $stmt = $db->prepare($query);\n $stmt->bindParam(':user_id', $userId);\n $stmt->execute();\n $member_assets = $stmt->fetch(PDO::FETCH_ASSOC);\n return $member_assets;\n } catch (\\Exception $e) {\n throw $e;\n }\n}", "public function getUser($id);", "public function getUser($id);", "public function getuser($id){\n\t\t$query= $this->db->get_where('barang', array('id_barang' => $id ));\n\t\treturn $query->row_array();\n\t}", "public function getUser($id) {\r\n\t\treturn self::get(intval($id));\r\n\t}", "public function getUser($id) {\r\n\t\treturn self::get(intval($id));\r\n\t}", "public function lookup_user($id);", "function getActivityUser($activity_id) {\n for($i=0;$i<count($this->activities);$i++) {\n if($this->activities[$i]['activity_id']==$activity_id) {\n return $this->activities[$i]['user'];\n }\n } \n return false;\n }", "public function user($id) {\n $data = $this->db->select(\"SELECT * FROM user WHERE id_user = :id_user\", array(\n \":id_user\" => $id\n ));\n return $data[0];\n }", "public function getUserById($id);", "function get_account_owner($accountid) {\n $conn = db_connect();\n $sql = \"select userid from dulaney_stewart_accounts where accountid = $accountid\";\n $query_result = mysqli_query($conn, $sql);\n $row = mysqli_fetch_assoc($query_result);\n \n $sql = \"select name from dulaney_stewart_users where userid = \" . $row[\"userid\"];\n $query_result = mysqli_query($conn, $sql);\n $row = mysqli_fetch_assoc($query_result);\n return $row[\"name\"];\n}", "public function getByUser($id)\n {\n return $this->where(['usuarioid' => $id]);\n }", "function get_user($id_user)\n {\n return $this->db->get_where('tbl_users', array('id_user' => $id_user))->row_array();\n }", "public function get_user_by_id($id){\n\t\t$query = $this->db->get_where('api_users', array('id' => $id));\n\t\treturn $result = $query->row_array();\n\t}", "function get_user_by_id($id)\n\t{\n\t\t$this->db->where('id', $id);\n\n\t\t$query = $this->db->get($this->table_name);\n\t\tif ($query->num_rows() == 1) return $query->row();\n\t\treturn NULL;\n\t}", "public function getAssetStorageAccount($asset);", "function get_all_tb_am_users($params = array())\n {\n $this->db->order_by('id_asset', 'desc');\n if(isset($params) && !empty($params))\n {\n $this->db->limit($params['limit'], $params['offset']);\n }\n return $this->db->get('tb_im_users')->result_array();\n }", "public function find($id)\n {\n return $this->um->findUserBy(['id'=>$id]);\n }", "public function findUser($id)\n {\n return $this->model->whereId($id)->first();\n }", "public function findUser($id)\n {\n return $this->model->whereId($id)->first();\n }", "public function findUser($id)\n {\n return $this->model->whereId($id)->first();\n }", "public function getUserById($id){\n return User::where('id', $id)->get()->first();\n }", "public function findByUser($id) {\n\t\t$sql = \"SELECT * FROM *PREFIX*\".self::$table.\" WHERE lower(uid) = lower(?)\";\n\t\treturn $this->findEntity($sql, [$id]);\n\t}", "function getOwnerName($id)\n\t{\n\t\tglobal $ilDB;\n\t\n\t\t$q =\" select A.login from usr_data A, object_data B where A.usr_id=B.owner and B.obj_id = \".$ilDB->quote($id ,'integer');\n\t\t$res = $this->ilias->db->query($q);\n\t\t$result = $res->fetchRow();\n\t\treturn $result[0];\n\t}", "public function getUserById($id) {\n $stmt = $this->conn->prepare(\"SELECT u.id, u.name, u.status, u.changed_at, a.filename_icon, a.filename_avatar, a.filename_full FROM users u LEFT OUTER JOIN avatars a ON u.avatar = a.id WHERE u.id = ?\");\n $stmt->bind_param(\"i\", $id);\n if ($stmt->execute()) {\n \n\t $stmt->store_result();\n if($stmt->num_rows==0)return NULL;\n \n $stmt->bind_result($id,$name, $status, $changed_at, $icon, $avatar,$full); \n \n $stmt->fetch();\n \n\t $res= array();\n\t $res[\"id\"] = $id;\n\t $res[\"name\"] = $name;\n\t $res[\"status\"] = $status;\n\t $res[\"changed_at\"] = $changed_at;\t\n\t \n\t $avatars=array();\n\t \n\t if($full) $avatars['full']=URL_HOME.path_fulls.$full;\n\t if($avatar) $avatars['avatar']=URL_HOME.path_avatars.$avatar;\n\t if($icon) $avatars['icon']=URL_HOME.path_icons.$icon;\n\t \n\t $res['avatars']=$avatars;\n\t \n \n $stmt->close();\n return $res;\n } else {\n return NULL;\n }\n }", "public function findUser($id);", "function get_user_by_id()\n\t{\n\t\t$query = $this->db->get('users');\n\t\treturn $query->result(); \n\t\t\n\t}", "function get_user($id)\n\t{\n\t\t$this->CI->load->module_model(COURSE_FOLDER, 'blog_users_model');\n\t\t$this->CI->blog_users_model->readonly = TRUE;\n\t\t$where['active'] = 'yes';\n\t\t$where['fuel_user_id'] = $id;\n\t\t$user = $this->CI->blog_users_model->find_one($where);\n\t\treturn $user;\n\t}", "function get_user($id_user)\n {\n\n return $this->builder->getWhere(['id_user'=>$id_user])->getResultArray();\n }", "function getuserbyid($id)\n\t{\n\t\t$sql=\"select m.age,m.gender,u.userid,u.mobile,u.name,u.email,u.inviteid,u.special from king_users as u join fb_miscusers as m on m.id=u.userid where userid=?\";\n\t\t$q=$this->db->query($sql,array($id));\n\t\tif($q->num_rows()==1)\n\t\t\treturn $q->row_array();\n\t\treturn false;\n\t}", "abstract public function getUserId($id);", "function getUser ($id) {\n $user = R::load( 'user', $id );\n return $user;\n }", "function get_asset_name_from_id($asset_id) \n{\n\tglobal $found_assets;\t\n\t\n\tif (array_key_exists($asset_id, $found_assets))\n\t{\t//it is already in the array, had already been queried previously\n\t\treturn $found_assets [$asset_id];\n\t}\n\t$sql \t= \"SELECT asset FROM assetlist WHERE asset_id='$asset_id'\";\n\t$query \t= mysql_query($sql);\n\t$set \t= mysql_fetch_row($query);\n\t$asset = $set[0];\n\n\t//store in the array\t\n\t$found_members[$asset_id] = $asset;\n\treturn $asset;\n}", "public function getusernamewithid($id) {\n $tmptab = $this->tab;\n for ($i = 0; $i < count($this->tab); $i++) {\n if (strcmp($tmptab[$i]->id, $id) == 0) {\n return $tmptab[$i]->username;\n }\n }\n }", "function smfapi_getUserById($id='')\n{\n global $smcFunc;\n\n if ('' == $id || !is_numeric($id)) {\n return false;\n } else{\n $id = intval($id);\n if (0 == $id) {\n return false;\n }\n }\n\n $request = $smcFunc['db_query']('', '\n\t\t\tSELECT *\n\t\t\tFROM {db_prefix}members\n\t\t\tWHERE id_member = {int:id_member}\n\t\t\tLIMIT 1',\n\t\t\tarray(\n\t\t\t\t'id_member' => $id,\n\t\t\t)\n\t\t);\n\t$results = $smcFunc['db_fetch_assoc']($request);\n\t$smcFunc['db_free_result']($request);\n\n if (empty($results)) {\n return false;\n\t} else {\n\t // return all the results.\n\t return $results;\n }\n}", "function get_userById($id){\n\t\tglobal $helpers;\n\t\t$sql = $helpers->sqlSelect(\"*\", \"users\", false, \"WHERE users_id = '$id'\");\n\t\treturn $sql;\n\t}", "function selectUrlImgAvatarByUserId()\n{\n $db = connectionDb();\n $req = $db->prepare('SELECT url_img_avatar_user FROM user WHERE id_user = :id_user'); \n $req->execute(array(\n 'id_user' => $_SESSION['id_user']\n ));\n $urlImgAvatar = $req->fetch();\n $req->closeCursor();\n return $urlImgAvatar;\n}", "public function getUserById($id) {\n $stmt = $this->conn->prepare(\"SELECT u.id, u.name, u.status, u.changed_at, a.filename_icon, a.filename_avatar, a.filename_full FROM users u LEFT OUTER JOIN avatars a ON u.avatar = a.id WHERE u.id = ?\");\n $stmt->bind_param(\"i\", $id);\n if ($stmt->execute()) {\n \n\t $stmt->store_result();\n if($stmt->num_rows==0)return NULL;\n \n $stmt->bind_result($id,$name, $status, $changed_at, $icon, $avatar,$full); \n \n $stmt->fetch();\n \n\t $res= array();\n\t $res[\"id\"] = $id;\n\t $res[\"name\"] = $name;\n\t $res[\"status\"] = $status;\n\n\t $timestamp_object = DateTime::createFromFormat('Y-m-d H:i:s', $changed_at);\n\t\t\t\t$res[\"changed_at\"] = $timestamp_object->getTimestamp();\t\n\t \n\t $avatars=array();\n\t \n\t if($full) $avatars['full']=URL_HOME.path_fulls.$full;\n\t if($avatar) $avatars['avatar']=URL_HOME.path_avatars.$avatar;\n\t if($icon) $avatars['icon']=URL_HOME.path_icons.$icon;\n\t \n\t\t\t\tif(count($avatars))\n\t\t\t\t\t$res['avatars']=$avatars;\n\t \n \n $stmt->close();\n return $res;\n } else {\n return NULL;\n }\n }", "function get_user_by_id($field){\n\t\t\tglobal $bdd;\n\t\t\t$q = $bdd->prepare(\"SELECT name, pseudo, email,sex,city,country,twitter,available_for_hiring, github, bio,avatar FROM users WHERE id = ?\");\n\t\t\t$q->execute([$field]);\n\t\t\t// current ici bas va me servir ne pas recuperer chaque objet par sa cle;\n\t\t\t$data = $q->fetch(PDO::FETCH_OBJ);\n\t\t\t$q->closeCursor();\n\t\t\treturn $data;\n\n\t}", "protected static function findUser($id) {\n $statement = \"SELECT * FROM USERS WHERE accountId=?\";\n try {\n $db=new databaseController();\n $statement = $db->getConnection()->prepare($statement);\n $statement->execute(array($id));\n $result = $statement->fetch(\\PDO::FETCH_ASSOC);\n return $result;\n } catch (\\PDOException $e) {\n exit($e->getMessage());\n }\n }", "function get_user($id)\n {\n return $this->db->get_where('users',array('id'=>$id))->row_array();\n }", "public function GetUser($id){\n $query = \"SELECT * FROM \".$this->table.\" WHERE id = ? ;\";\n $row = $this->getRow($query, array($id));\n \n return $row;\n }", "public function getUserPorId($id){\n\t\t\t$stmt = $this->con->prepare(\"SELECT `usu_usuario` FROM `usuarios` WHERE `id` = $id\");\n\t\t\t$stmt->execute();\n\t\t\t$user = $stmt->get_result()->fetch_assoc();\n\t\t\treturn $user['usu_usuario'];\n\t\t}", "function get_user_by_id($id) {\n\t\t$this->db->where('user_id', $id);\n\t\t$query = $this->db->get('user');\n\t\treturn $query->result();\n }", "public function getUser($id='')\n {\n $this->db->select('su_id, su_name,su_email');\n $this->db->where('su_is_active', '1');\n $this->db->where('su_id', $id);\n return $this->db->get('user')->row();\n }", "function find_user_by_id($id=0) {\n global $db;\n $sql = \"SELECT * FROM users WHERE id='\" . $id . \"' LIMIT 1;\";\n $users_result = db_query($db, $sql);\n return $users_result;\n }", "function _findUserId($id, $field_name = 'PROFILEID')\r\n\t{\r\n\t\t$db = JFactory::getDBO();\r\n\t\t$keyword = $field_name . \" = \" . $id; \r\n\t\t\r\n\t\t$q = \"SELECT created_by \"\t\r\n\t\t . \"FROM #__Tienda_orderpayments \"\r\n\t\t . \"WHERE orderpayment_type = \" . $db->quote($this->_plugin_type) . \" \"\r\n\t\t . \"AND transaction_details LIKE '%\" . addcslashes($db->getEscaped($keyword), '%_') . \"%'\" \r\n\t\t ;\r\n\r\n\t\t$db->setQuery($q);\r\n\t\treturn $db->loadResult();\r\n\t}", "public function findByUser(User $user)\n {\n return $user->assets()->get()->first();\n }", "public function getUser($id){\n return User::find($id);\n }", "public function getUserById($id)\n {\n return $this->getTable()->where('id', $id)->fetch();\n }", "function f_getUserFromId($uid)\n\t{\n\t\tglobal $db;\n\t\t$sql_query = \"select user_name as name from user where user_id = $uid limit 1\";\n\t\t$result = $db->query($sql_query) or die($db->error);\n\t\t$row = $result->fetch_assoc();\n\t\treturn $row['name'];\n\t}", "function getUserRowFromID($id){\n //Create database object\n $database = new db();\n //Connect to database\n $database->connect();\n //Query as prepared statement\n $stmt = $database->prepare(\"SELECT * FROM user WHERE userID = ? LIMIT 1\");\n $stmt->bind_param(\"i\", $id);\n $stmt->execute();\n $result = $stmt->get_result();\n //Check to see if query successful\n check_query($result, $database);\n if($user = mysqli_fetch_assoc($result)){\n return $user;\n }\n else{\n return null;\n }\n }", "function get_tbl_user($id_user)\n {\n return $this->db->get_where('tbl_user',array('id_user'=>$id_user))->row_array();\n }", "function getUserByID($id) {\n $query = \"SELECT id, email, username, department_id FROM User WHERE id = ?;\";\n $stmt = mysqli_prepare($this->connection, $query);\n \n if (!$stmt) {\n throw new Exception(\"Error while preparing Statment\");\n }\n\n mysqli_stmt_bind_param($stmt, \"s\", $id);\n mysqli_stmt_execute($stmt);\n $result = mysqli_stmt_get_result($stmt);\n $user = mysqli_fetch_assoc($result);\n mysqli_stmt_close($stmt);\n return $user;\n }", "public function getUserName($id) {\n }", "public function getUserById($dbcon, $id) {\n\n $query = \"SELECT * FROM users, user_roles \n WHERE users.user_role_id = user_roles.id \n AND users.id = :id\";\n $pdostm = $dbcon->prepare($query);\n $pdostm->bindParam(':id', $id);\n $pdostm->execute();\n\n $patient = $pdostm->fetch(\\PDO::FETCH_OBJ);\n return $patient;\n }", "function getAvatar($id)\r\n\t{\r\n\t\t$avatar = '';\r\n\t\t$found = false;\r\n\t\tCitruscart::load( 'CitruscartHelperAmbra', 'helpers.ambra' );\r\n\t\t$helper_ambra = CitruscartHelperBase::getInstance( 'Ambra' );\r\n\r\n\t\t//check if ambra installed\r\n\t\tif($helper_ambra->isInstalled() && !$found)\r\n\t\t{\r\n\t\t\tif ( !class_exists('Ambra') )\r\n\t\t\t{\r\n\t\t\t\tJLoader::register( \"Ambra\", JPATH_ADMINISTRATOR.\"/components/com_ambra/defines.php\" );\r\n\t\t\t}\r\n\t\t\t//Get Ambra Avatar\r\n\t\t\tif($image = Ambra::getClass( \"AmbraHelperUser\", 'helpers.user' )->getAvatar( $id ))\r\n\t\t\t{\r\n\t\t\t\t$link = JRoute::_( JURI::root().'index.php?option=com_ambra&view=users&id='.$id, false );\r\n\t\t\t\t$avatar .= \"<a href='{$link}' target='_blank'>\";\r\n\t\t\t\t$avatar .= \"<img src='{$image}' style='max-width:80px; border:1px solid #ccccce;' />\";\r\n\t\t\t\t$avatar .= \"</a>\";\r\n\t\t\t}\r\n\t\t\t$found = true;\r\n\t\t}\r\n\t\t//check if jomsocial installed\r\n\t\tif( DSC::getApp()->isComponentInstalled( 'com_community' ) && !$found)\r\n\t\t{\r\n\t\t\t//Get JomSocial Avatar\r\n\t\t\t$database = JFactory::getDBO();\r\n\t\t\t$query = \"\r\n\t\t\tSELECT\r\n\t\t\t\t*\r\n\t\t\tFROM\r\n\t\t\t\t#__community_users\r\n\t\t\tWHERE\r\n\t\t\t\t`userid` = '\".$id.\"'\r\n\t\t\t\";\r\n\t\t\t$database->setQuery( $query );\r\n\t\t\t$result = $database->loadObject();\r\n\t\t\tif (isset($result->thumb ))\r\n\t\t\t{\r\n\t\t\t\t$image = JURI::root().$result->thumb;\r\n\t\t\t}\r\n\t\t\t$link = JRoute::_( JURI::root().'index.php?option=com_community&view=profile&userid='.$id, false );\r\n\t\t\t$avatar .= \"<a href='{$link}' target='_blank'>\";\r\n\t\t\t$avatar .= \"<img src='{$image}' style='max-width:80px; border:1px solid #ccccce;' />\";\r\n\t\t\t$avatar .= \"</a>\";\r\n\t\t\t$found = true;\r\n\t\t}\r\n\t\t//check if community builder is installed\r\n\t\tif( DSC::getApp()->isComponentInstalled( 'com_comprofiler' ) && !$found)\r\n\t\t{\r\n\t\t\t//Get JomSocial Avatar\r\n\t\t\t$database = JFactory::getDBO();\r\n\t\t\t$query = \"\r\n\t\t\tSELECT\r\n\t\t\t\t*\r\n\t\t\tFROM\r\n\t\t\t\t#__comprofiler\r\n\t\t\tWHERE\r\n\t\t\t\t`id` = '\".$id.\"'\r\n\t\t\t\";\r\n\t\t\t$database->setQuery( $query );\r\n\t\t\t$result = $database->loadObject();\r\n\t\t\tif (isset($result->avatar))\r\n\t\t\t{\r\n\t\t\t\t$image = JURI::root().'images/comprofiler/'.$result->avatar;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$image = JRoute::_( JURI::root().'components/com_comprofiler/plugin/templates/default/images/avatar/nophoto_n.png');\r\n\t\t\t}\r\n\t\t\t$link = JRoute::_( JURI::root().'index.php?option=com_comprofiler&userid='.$id, false );\r\n\t\t\t$avatar .= \"<a href='{$link}' target='_blank'>\";\r\n\t\t\t$avatar .= \"<img src='{$image}' style='max-width:80px; border:1px solid #ccccce;' />\";\r\n\t\t\t$avatar .= \"</a>\";\r\n\t\t\t$found = true;\r\n\t\t}\r\n\r\n\t\treturn $avatar;\r\n\r\n\t}", "public function userOfId($id)\n {\n return $this->model->findOrFail($id);\n }", "public function getUserById($id){\n $this->db->query('SELECT * FROM users WHERE id = :id');\n // Bind value\n $this->db->bind(':id', $id);\n\n $row = $this->db->single();\n\n return $row;\n }", "public function getUserById($id)\r\n\t{\r\n\t\t$this->db->query('SELECT * FROM ' . $this->table . ' WHERE id=:id');\r\n\t\t$this->db->bind('id',$id);\r\n\t\treturn $this->db->single();\r\n\t}", "public function getUsernameByUserId($id);", "public function getOwnerOfPhotoInTaggedAlbum($photoid){\n\n$cow = $this->db->query(\"select `userid` from \".tbl_photos.\" where `id`='{$photoid}' limit 1\");\n$cow = $cow->fetch_array(MYSQLI_ASSOC);\n\nreturn $cow['userid'];\n\n}", "function getUserById($id){\n\t\tglobal $db;\n\t\t$query = \"SELECT * FROM user WHERE idUser=\" . $id;\n\t\t$result = mysqli_query($db, $query);\n\n\t\t$user = mysqli_fetch_assoc($result);\n\t\treturn $user;\n\t}", "public function user_by_id() {\n return auth()->id() ;\n\n\n }", "public static function getByID($id) { return self::table(__CLASS__)->selectFirstObject('*', 'user_id=\\''.self::escape($id).'\\''); }", "public function get_user(){\n\t\treturn $this->db->get('master_utama');\n\t}", "function get_user_by_liberatid($url) {\n\tglobal $wpdb;\n\treturn $wpdb->get_var( $wpdb->prepare('SELECT user_id FROM '.liberatid_identity_table().' WHERE url = %s', $url) );\n}", "public function get_username($id){\n $sql3 = \"SELECT username FROM users WHERE id= $id\";\n $result = pg_query($db ,$sql3);\n $user_data = pg_fetch_row($result);\n echo$user_data['username'];\n }", "public static function userId()\n\t\t\t {\n\t\t\t\t \n\t\t\t\t \t$endpoint = 'https://api.instagram.com/v1/users/' . self::$id . '/?access_token=' . self::$access_token;\n\t\t\t\t \n\t\t\t\t return json_decode(CurlHelper::getCurl($endpoint));\n\n\t\t\t\t \n\t\t\t }", "public function GetUserId($id){\n \t$user = User::find($id);\n \treturn $user;\n }", "function get_user_by_id($user_id)\n {\n \t$query = $this->db->get_where('users', array('id' => $user_id));\n \t$result=$query->result();\n \tif(!empty($result)){\n \treturn $result[0]->first_name;\n \t}\n }", "public function get_user_by_id($id)\n\t{\n\t\t$st = $this->db->select('*')\n\t\t\t->from('users')\n\t\t\t->where('id',$id)\n\t\t\t->get()\n\t\t\t->result_array();\n\t\treturn $st[0];\n\t}", "function getUser($id){\n\t\t$this->db->where('id', $id);\n\t\treturn $user = $this->db->get('users')->row_array(); // select * from users where user_id = ?\n\t}", "function getUserById($userId);", "public function getUserBy($args){\n return $this->dm->getRepository('BBBLoadBalancerUserBundle:User')->findOneBy($args);\n }", "public function getUserById($id) {\n\t\treturn $this->repository->findOneBy(['id' => $id]);\n\t}", "function get_user_by_id($id){\n\t\tglobal $db, $prefix, $querydb;\n\t\t\n\t\tif(!isset($querydb['get_user_by_id_1'])){\n\t\t\t$query = $db->DoQuery(\"SELECT id,username FROM {$prefix}users\");\n\t\t\twhile($row = $db->Do_Fetch_Row($query)){\n\t\t\t\t$querydb['get_user_by_id_1'][$row[0]] = $row[1];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn @$querydb['get_user_by_id_1'][$id];\n\t}", "public static function getById($id) {\n\t\tif($id==0)\n\t\t\treturn self::getCommonAccount();\n\t\treturn self::model()->findByAttributes(array('id'=>$id,'user_id'=>Yii::app()->user->id));\n\t}", "public function getUser($id)\n {\n return $this->db->query(\"SELECT *FROM users WHERE id = $id\")->row();\n }", "private function get_user() {\n\t\tif ( isset( $this->utente ) && is_numeric( $this->utente ) )\n\t\t\t$this->utente = KYSS_User::get_user_by( 'id', $this->utente );\n\t}", "function getUserIdFromBid($bid)\n\t\t{\n\t\t\t$proRow = $this->manage_content->getValue_where(\"bid_info\",\"*\",\"bid_id\",$bid);\n\t\t\treturn $proRow[0]['user_id'];\n\t\t}", "function getUser($id) {\r\n\t\t\t$data = $this->fetch(\"SELECT * FROM `\" . $this->prefix . \"users` WHERE id = '$id'\");\r\n\t\t\t return $data;\r\n\t\t}", "public static function getUserById($id){\n return self::getUsers('id = '.$id)->fetchObject(self::class);\n }", "function search_solo_user($bdd,$id) \n {\n $id = $_SESSION['id'];\n $reponse = $bdd->prepare('select username, firstname, lastname, email, password, apropos, id \n from authors\n where id=?');\n \n $reponse->execute(array($id));\n\n $user = $reponse->fetch();\n \n return $user;\n }", "function get_user_row($id) {\n\t\t$this->load->model(array('user'));\n\t\tif ($id == 'add_user') {\n\t\t\techo '{}';\n\t\t\treturn;\n\t\t} \n\t\t$r1 = $this->user->get_users($id);\n\t\techo json_encode($r1[0]); //NWASAP\n\t\t\n\t}" ]
[ "0.7403394", "0.6598887", "0.6487585", "0.62845427", "0.62229496", "0.61919236", "0.61524796", "0.6144985", "0.6127395", "0.61155236", "0.61130875", "0.61032766", "0.6097282", "0.6075978", "0.6075782", "0.6061625", "0.6055334", "0.6055334", "0.60349035", "0.60205424", "0.60205424", "0.60181206", "0.5997333", "0.597719", "0.5930797", "0.58955956", "0.5886092", "0.587993", "0.58765674", "0.5869464", "0.58634484", "0.5856409", "0.58562803", "0.5849343", "0.5849343", "0.5849343", "0.5838172", "0.58360463", "0.5833594", "0.5827494", "0.5826883", "0.5821798", "0.5820433", "0.5819062", "0.58157086", "0.58122396", "0.5811581", "0.58066", "0.580499", "0.5796867", "0.57928526", "0.57901555", "0.5788597", "0.5780634", "0.5779307", "0.5772308", "0.57715374", "0.576173", "0.57616353", "0.5759624", "0.57448626", "0.57448065", "0.574432", "0.57392305", "0.57304233", "0.57257086", "0.571718", "0.57169425", "0.57103693", "0.5705972", "0.5704131", "0.57022995", "0.5697406", "0.56931514", "0.56899154", "0.56894934", "0.568783", "0.56858593", "0.5684152", "0.5668154", "0.56668675", "0.56668305", "0.5663096", "0.56608725", "0.56564367", "0.5656337", "0.5655246", "0.5654132", "0.56533736", "0.56507814", "0.5646945", "0.56450355", "0.5636298", "0.5635152", "0.56350565", "0.5628693", "0.5628671", "0.56207687", "0.56172544", "0.5616292" ]
0.8643089
0
/ Get all tb_am_users count
/ Получить количество tb_am_users
function get_all_tb_am_users_count() { $this->db->from('tb_im_users'); return $this->db->count_all_results(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUsersCount();", "public function countAllUsers(){\n $totalusers = self::count_all();\n return $totalusers;\n \n }", "function get_all_tbl_user_count()\n {\n $this->db->from('tbl_user');\n return $this->db->count_all_results();\n }", "public function countUsers();", "public function count_users() {\n return $this->db->get_var(\"SELECT COUNT(*) FROM `crm.interesado`;\");\n }", "public function getAllCount() {\r\n\t\treturn $this->db->query('SELECT COUNT(*) FROM `users`;')->fetchColumn();\r\n\t}", "function qa_db_count_users()\n{\n\treturn qa_db_read_one_value(qa_db_query_sub(\n\t\t'SELECT COUNT(*) FROM ^users'\n\t));\n}", "public function getCountUser()\n {\n return $this->db->table(\"users\")->countAll();\n }", "public function countAll() {\n $req = $this->db->prepare(\n 'SELECT COUNT(*)\n FROM user');\n\n $req->execute();\n $result = $req->fetch();\n\n return $result;\n }", "public function getUserCount()\n {\n $this->db->where('status', '1');\n $this->db->from('user');\n return $this->db->count_all_results();\n }", "function UserCount()\n\t{\n\t\t$R=jf::SQL(\"SELECT COUNT(*) AS Result FROM {$this->TablePrefix()}xuser AS XU\");\n\t\treturn $R[0]['Result'];\n\t}", "public static function count(){\n return executeQuery(\n \"SELECT\n Count(idUser) as count\n FROM t_user;\"\n );\n }", "public function countUsersStatistic()\n {\n return $this->getEntityManager()->createQuery(\n 'SELECT u.id, SUM(p.quantity) AS pr, COUNT( DISTINCT ca.id) AS me\n FROM AppBundle:User u INDEX BY u.id\n LEFT JOIN u.carts c\n LEFT JOIN c.contracts co\n LEFT JOIN co.contractArtist ca\n LEFT JOIN co.purchases p\n LEFT JOIN u.user_conditions uc\n LEFT JOIN uc.conditions cond\n WHERE u.yb = FALSE \n AND ca.successful = TRUE\n AND u.deleted = FALSE\n AND co.refunded = FALSE\n AND c.paid = TRUE\n GROUP BY u.id\n ')\n ->getResult(Query::HYDRATE_ARRAY);\n }", "public function userCount()\n {\n $sql4=\"SELECT * from user\";\n $result=mysqli_query($this->db,$sql4);\n $user_data=mysqli_fetch_array($result);\n $count_row=$result->num_rows;\n echo \"<span class='badge'>\".$count_row.\"</span>\";\n }", "public function getCount(){\n return User::count();\n }", "public function getUsersCount()\n {\n return DB::select(DB::raw(\"SELECT COUNT(*) as memberCount from `es_member`\")); \n }", "function total_users()\n\t{\n\t\tglobal $db;\n\n\t\t$query = $db->query(\"SELECT COUNT(*) as count FROM uplus.users\") or trigger_error($db->error);\n\t\treturn $query->fetch_assoc()['count'];\n\t}", "function UserCount()\n{\n global $log;\n $log->debug(\"Entering UserCount() method ...\");\n global $adb, $table_prefix;\n $result=$adb->pquery(\"select id from \".$table_prefix.\"_users where deleted =0\", array()); // crmv@39110\n $user_count=$adb->num_rows($result);\n $result=$adb->pquery(\"select id from \".$table_prefix.\"_users where deleted =0 AND is_admin != 'on'\", array()); // crmv@39110\n $nonadmin_count = $adb->num_rows($result);\n $admin_count = $user_count-$nonadmin_count;\n $count=array('user'=>$user_count,'admin'=>$admin_count,'nonadmin'=>$nonadmin_count);\n $log->debug(\"Exiting UserCount method ...\");\n return $count;\n}", "public function count_all(){\n\t\t\t$this->db->select('UR.UUID_USER_ROLE, UR.UUID_USER, ROLE.ROLE_NAME');\n\t\t\t$this->db->from($this->table);\n\t\t\t$this->db->join(\"ROLE AS ROLE\", \"UR.UUID_ROLE = ROLE.UUID_ROLE\", \"LEFT\");\n\t\t\t$this->db->where('UR.UUID_USER', $this->input->post('user_uuid'));\n\t\t\t\n\t\t\treturn $this->db->count_all_results();\n\t\t}", "private static function get_users_count()\n {\n return User::where('role', '!=', 'admin')->count();\n }", "function get_number_of_users()\r\n{\r\n\t$curso = $_SESSION['curso']; \r\n\t$user_table = Database :: get_main_table(TABLE_MAIN_USER);\r\n\t$course_table = Database :: get_main_table(TABLE_MAIN_COURSE_USER_FD);\r\n\t\t\t\r\n\t$sql=\"SELECT count(u.user_id) as num_alumnos FROM \".$course_table .\" c, \".$user_table.\" u\r\n WHERE c.user_id = u.user_id and u.status = 5 and c.course_code = '\".$curso.\"'\";\r\n\t\r\n\t$res = api_sql_query($sql, __FILE__, __LINE__);\r\n\t$alumno = Database::fetch_array($res);\r\n\treturn $alumno['num_alumnos'];\r\n}", "public static function countAll() {\n\t\treturn self::users()->count();\n\t}", "public function getUsersCount()\n {\n $query = \"SELECT COUNT(id) AS count FROM users WHERE \" . $this->getExcludeSystemUsersWhere();\n return $this->db->getOne($query, false, 'fetching all users count');\n }", "public function real_user_count(){\n \t\treturn count($this->real_users()->select('users.id')->get());\n \t}", "public static function getUsersCount(){\n $query = self::getUserQuery()\n -> select(DB::raw('count(*) as user_count'));\n\n //self::queryLogger($query);\n return $query->count();\n }", "public function userCount() {\n\t\t$this->db->select('COUNT(*) AS count');\n\t\t$this->db->where('status', 1);\n\t\t$query = $this->db->get('users');\n\t\treturn $query->row();\n\t}", "public function total_active_user()\n {\n return User::where(\"is_ban\",true)->where(\"role_id\",\"=\",3)->count();\n }", "public function countUsers()\n\t{\n\t\t$req=$this->_bdd->query('SELECT Count(*) AS nbUsers From Users');\n\t\t$data=$req->fetch();\n\t\t$req->closeCursor();\n\t\t$nbUsers=$data['nbUsers'];\n\n\t\treturn $nbUsers;\n\t}", "public function countUsers()\n {\n //Prepare the query.\n $this->db->where('user_type', 'user');\n $this->db->from('tbl_registration');\n $result = $this->db->count_all_results();\n return $result;\n }", "function total_no_of_users(){ \n $query = $this->db\n ->from('table_user')\n ->get();\n return $query->result();\n }", "public function getUsersCount() {\n\t\t$this->db->select('COUNT(*) AS count');\n\t\t$query = $this->db->get('users');\n\t\treturn $query->result()[0]->count;\n\t}", "private static function get_user_counts()\n {\n }", "function getUserCount()\r\n {\r\n return 0;\r\n }", "function act_usercount(){\n\tglobal $w, $tsUser;\n\t$query = mysql_query('SELECT COUNT(usuario_id) AS total FROM usuarios WHERE user_vip =\"1\" AND rango_vip=\"0\" ');\n\t$data = result_array($query);\n\n\t//\n\treturn $data;\n\t}", "public function getTotalOfUsers()\n {\n $id_admin = ID_ADMIN;\n $sql = 'SELECT COUNT(id_user) as counter\n FROM users\n WHERE id_user != :id_admin AND bin != \"yes\"\n ';\n $users = $this->dbConnect($sql, array(\n ':id_admin' => \"$id_admin\"\n ));\n $this->users_count = $users->fetch(\\PDO::FETCH_ASSOC);\n $total_users_count = $this->users_count['counter'];\n return $total_users_count;\n }", "public function getNbUserActif()\n {\n $nbUser = DB::table('user')\n ->where('enabled', 1)\n ->count() ;\n\n return $nbUser;\n }", "function getUserCount() {\r\n\t\t$db = JFusionFactory::getDatabase($this->getJname());\r\n\t\t$query = 'SELECT count(*) from #__users';\r\n\t\t$db->setQuery($query);\r\n\t\t//getting the results\r\n\t\t$no_users = $db->loadResult();\r\n\t\treturn $no_users;\r\n\t}", "public function countAll(){\n\t // query to select all user records\n\t $query = \"SELECT id FROM \" . $this->table_name . \"\";\n\t // prepare query statement\n\t $stmt = $this->conn->prepare($query);\n\t // execute query\n\t $stmt->execute();\n\t // get number of rows\n\t $num = $stmt->rowCount();\n\t // return row count\n\t return $num;\n\t}", "public function count_all()\n\t{\n $user_id = $this->session->userdata('logged_in')['users_id'];\n\n $this->db->from($this->table);\n $this->db->where('user_id',$user_id);\n\t\treturn $this->db->count_all_results();\n }", "public function countAll ()\n {\n\n // query to select all user records\n $query = \"SELECT id FROM \" . $this -> table_name . \"\";\n\n // prepare query statement\n $stmt = $this -> conn -> prepare ( $query );\n\n // execute query\n $stmt -> execute ();\n\n // get number of rows\n $num = $stmt -> rowCount ();\n\n // return row count\n return $num;\n }", "public function getUsersCount()\n {\n $this->filterUsers();\n return $this->builder->where('role !=', 'admin')->countAllResults();\n }", "public function getTotalUsers(){\n\t\t$this->db->query('SELECT * FROM users');\n\t\t$rows = $this->db->resultset();\n\t\treturn $this->db->rowCount();\n\t}", "public function getTotalUsers()\n {\n $active_user_count = User::where('is_active', '=', true)\n ->where('role_id', '>', config('constants.ConstUserTypes.Admin'))\n ->count();\n return $active_user_count;\n }", "public function getTotalUsers(){\n $this->db->query('select * from users');\n $result = $this->db->resultset();\n return $this->db->rowCount();\n }", "public function countUserAmbassadoratStatistic(){\n return $this->getEntityManager()->createQuery(\n 'SELECT u.id, COUNT(s.id) as amb\n FROM AppBundle:User u INDEX BY u.id\n LEFT JOIN u.sponsorships s\n LEFT JOIN s.target_invitation st\n LEFT JOIN s.contract_artist sca\n LEFT JOIN st.carts stc\n LEFT JOIN stc.contracts stco\n WHERE sca.successful = TRUE\n AND u.yb = FALSE\n AND u.deleted = FALSE\n AND st.deleted = FALSE\n AND stco.refunded = FALSE\n AND stc.paid = TRUE \n GROUP BY u.id\n ')\n ->getResult(Query::HYDRATE_ARRAY);\n }", "public function getUsersCount() {\n return $this->manager->createQuery('SELECT COUNT(u) FROM App\\Entity\\User u')->getSingleScalarResult();\n }", "public function getActiveUsersCount()\n {\n $query = \"SELECT COUNT(id) AS total FROM users WHERE \" . $this->getActiveUsersWhere();\n return $this->db->getOne($query, false, 'fetching active users count');\n }", "public function countUsers() {\n $users = count_users();\n return $users['total_users'];\n }", "public static function get_count()\n\t{\n\t\treturn \\lib\\db\\config::public_get_count('users', ...func_get_args());\n\t}", "public function getTotalUsers(){\r\n $this->db->query('SELECT * FROM users');\r\n $rows = $this->db->resultset();\r\n return $this->db->rowCount();\r\n }", "public function count()\n {\n return count($this->_users);\n }", "static function count_users(){\n $query = self::$PDO->prepare('SELECT '.self::$prefix.'count_users()');\n $query->execute(array());\n return intval($query->fetchAll()[0][0]);\n }", "public function howManyUsers()\n\t{\n\t\t$thisMany = $this->databank->checkUserCount();\n\t\t$userCount = count($thisMany);\n\t\t$this->session->set_userdata('userNum', $userCount);\n\t\treturn;\n\t}", "function get_amount_of_users($conn) {\n\t$result = $conn->query(\"SELECT COUNT(`user_id`) as count FROM `users`\");\n\n\treturn $result->fetch(PDO::FETCH_ASSOC)['count'];\n}", "public function count_users()\n {\n return $this->db->get('users')->num_rows();\n }", "public function getUserStat()\n {\n $userTerdaftar = \\stjo\\Model\\User::all()->count();\n\n\n return $userTerdaftar;\n\n }", "function get_numusers() {\n global $CFG;\n\n $countsql = \"SELECT COUNT(DISTINCT u.id)\n FROM {$CFG->prefix}grade_grades g RIGHT OUTER JOIN\n {$CFG->prefix}user u ON u.id = g.userid\n LEFT JOIN {$CFG->prefix}role_assignments ra ON u.id = ra.userid\n $this->groupsql\n WHERE ra.roleid in ($this->gradebookroles)\n $this->groupwheresql\n AND ra.contextid \".get_related_contexts_string($this->context);\n return count_records_sql($countsql);\n }", "public function total_ban_user()\n {\n return User::where(\"is_ban\",false)->where(\"role_id\",\"=\",3)->count();\n }", "function getTotalUsers(){\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db\n\t\t->getQuery(true)\n\t\t->select('COUNT(*)')\n\t\t->from($db->quoteName('#__questions_userprofile'))\n\t\t->where($db->quoteName('blocked') . \" = 0\");\n\t\t$db->setQuery( $query );\n\t\t$totalquestions = $db->loadResult();\n\t \treturn $totalquestions;\n }", "public static function NumberOfUsers(){\n $db_pdo = DB::connection();\n $sql=$db_pdo->prepare(\"SELECT COUNT(uid) AS count FROM users\");\n $sql->execute();\n if($sql->rowCount() > 0){\n $row = $sql->fetchAll();\n return $row;\n }else{\n return FALSE;\n } \n }", "public function getAllWithUserCount()\n {\n return Auth::user()->seminars()->withCount('users')->get();\n }", "function countadttaluser($conn){\n\t\t\t\n\t\t\t$sql=\"SELECT COUNT(id) FROM `user`\";\n\t\t\t$result=$conn-> query($sql);\n\t\t\twhile ($data = mysqli_fetch_assoc($result)) {\n \t\t$row[] = $data;\n \t}\n \treturn $row;\n\n\t\t}", "function get_all_categorie_user_count()\n {\n $this->db->from('categorie_user');\n return $this->db->count_all_results();\n }", "function vasthtml_total_users() {\r\n global $wpdb;\r\n\techo $wpdb->get_var(\"SELECT COUNT(*) FROM $wpdb->users;\");\r\n}", "public function record_count() {\n return $this->db->count_all(\"users\");\n }", "public static function user_count() {\r\n\t\tif (is_array(self::$users))\r\n\t\t\treturn sizeof(self::$users);\r\n\t\tself::$users = [];\r\n\t\treturn 0;\r\n\t}", "public function record_count() {\n\treturn $this->db->count_all(\"users\");\n\t}", "function count()\n {\n return $this->db->count_all('user');\n /*\n $query=$this->db\n ->from(\"article\")\n ->count_all_results();\n return $query;\n */\n }", "public function getTotalUsers()\r\n {\r\n $this->db->query('SELECT * FROM users');\r\n $rows = $this->db->resultset();\r\n return $this->db->rowCount();\r\n }", "public static function count_total_users() {\n global $DB, $CFG;\n static $cached = null;\n if ($cached === null) {\n $cached = $DB->count_records_select('user', 'deleted = 0 AND id <> ?', [$CFG->siteguest]);\n }\n return $cached;\n }", "public function CountUsers() {\n\t\t\tif ((is_null($this->intId)))\n\t\t\t\treturn 0;\n\n\t\t\treturn User::CountByCompany($this->intId);\n\t\t}", "public function getNumUsers(){\n\t\t\t$sql = \"SELECT username FROM user\";\n\t\t\n\t\t\t$resultado = $this->connection->prepare($sql);\n\t\t\n\t\t\t$resultado->execute(array());\n\t\t\t$num = $resultado->rowCount();\t\n\t\t\t\n\t\t\t$resultado->closeCursor();\n\t\t\t\n\t\t\treturn $num;\n\t\t}", "public function count()\n {\n//\n// $result = $query->result_array();\n//\n// return $result;\n\n $this->db->select('count(*) as total ');\n $this->db->from('user');\n $query = $this->db->get();\n\n return $query->result_array();\n }", "public function size()\n {\n return count( $this->data['users'] );\n }", "public function countUsers()\n\t\t{\n\t\t\t$STM = $this->dbo->prepare(\"SELECT count(*) as count FROM user_masterlist WHERE is_deleted='n'\");\n\t\t\tif (!$STM->execute())\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t$record = $STM->fetch(PDO::FETCH_ASSOC);\n\t\t\treturn $record['count'];\n\t\t}", "function calcNumActiveUsers(){\n $q = \"SELECT * FROM \".TBL_ACTIVE_USERS;\n $result = mysql_query($q, $this->connection);\n $this->num_active_users = mysql_numrows($result);\n }", "public function action_count() {\n if (Input::method() != 'GET') { $this->response($this->no_access); return; }\n\n $params = Input::get();\n $user = $this->user_login->user;\n\n $res = self::countStuff($params, $user);\n\n $data = array('data' => array('count' => $res[\"count\"]), 'meta' => $res[\"meta\"]);\n $this->response($data);\n }", "public function getCount()\n {\n return Table\\Accounts::getTotal();\n }", "public static function getNumberOfUsers(): int\n\t{\n\t\tif (Cache::has('NumberOfUsers', '')) {\n\t\t\treturn Cache::get('NumberOfUsers', '');\n\t\t}\n\t\t$count = (new Db\\Query())->from('vtiger_users')->where(['status' => 'Active'])->andWhere(['<>', 'id', 1])->count();\n\t\tCache::save('NumberOfUsers', '', $count, Cache::LONG);\n\t\treturn $count;\n\t}", "public function getNumOfUsers()\r\n\r\n\t{\r\n\r\n\t\treturn $this->NumOfUsers;\r\n\r\n \t}", "function getUserCount() {\n global $connection;\n \n $query = \"SELECT * FROM users \";\n\n $result = mysqli_query( $connection, $query );\n \n confirmQuery( $result );\n \n $count = mysqli_num_rows($result);\n\n return $count;\n }", "public static function get_number_of_users_tracking_overview()\n {\n // database table definition\n $main_user_table = Database :: get_main_table(TABLE_MAIN_USER);\n return Database::count_rows($main_user_table);\n }", "public function countUsers()\n {\n $query = $this->getEntityManager()\n ->createQuery(\"\n\t SELECT COUNT(user) FROM TBSBundle:User user\"\n );\n \n return $query->getSingleScalarResult();\n }", "public function getUserCount( $filterBy = null )\n {\n return BeMaverick_User::getUserCount( $filterBy );\n }", "public function getUserCount()\n {\n return $this->family->count();\n }", "public static function count_all() {\n global $database;\n $sql = \"SELECT COUNT(*) FROM user_configuration\";\n $result_set = $database->query($sql);\n $row = $database->fetch_array($result_set);\n return array_shift($row);\n }", "function securitycenter_userapi_countitems()\n{\n return DBUtil::selectObjectCount('sc_anticracker');\n}", "public function getUsermetaCount()\n {\n return $this->count(self::USERMETA);\n }", "function user_count($conn) {\n\treturn $conn->query(\"SELECT COUNT(`user_id`) FROM `users`\")[0];\n\t//return mysql_result(mysql_query(\"SELECT COUNT(`user_id`) FROM `users` WHERE `active` = 1\"), 0);\n}", "function get_members()\n\t{\n\t\treturn $this->connection->query_value('users','COUNT(*)');\n\t}", "public function countPersonne(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"count\"));\n\t\t\t\t\t }", "public function countUser(){\n $user = User::count();\n return $user;\n }", "public function getTotalUser(){\n $this->db->query('SELECT * FROM users');\n\n $rows = $this->db->resultset();\n\n return $this->db->rowCount();\n }", "public function getUsersCountAttribute()\n {\n return cache()->rememberForever($this->usersCountCacheKey, function () {\n return $this->codes()\n ->join('code_user', 'code_user.code_id', '=', 'codes.id')\n ->count();\n });\n }", "function get_number_of_users() {\n\tglobal $_configuration;\n\t$user_table = Database::get_main_table ( VIEW_USER_DEPT );\n\t$course_user_table = Database::get_main_table ( TABLE_MAIN_COURSE_USER );\n\t\n\t$sql = \"SELECT\tCOUNT(*) FROM $user_table u\tWHERE u.user_id NOT IN (\n\t\t\tSELECT cu.user_id FROM $course_user_table cu WHERE cu.course_code='\" . api_get_course_code () . \"')\n\t\t\tAND u.username NOT \" . Database::create_in ( $_configuration ['default_administrator_name'] );\n\t\n\t$sql_where = get_sqlwhere ();\n\tif ($sql_where) $sql .= $sql_where;\n\t\n\treturn Database::get_scalar_value ( $sql );\n}", "public function size(){\n\t\treturn count($this->users);\n\t}", "public function getTotalCount();", "public function getTotalCount();", "public function getTotalCount();", "public function getTotalCount();" ]
[ "0.81133425", "0.8034314", "0.80024785", "0.79542047", "0.7828262", "0.77696705", "0.7673436", "0.7636951", "0.7620449", "0.75866085", "0.75822216", "0.7549424", "0.75413334", "0.7514459", "0.7499681", "0.74942774", "0.7481643", "0.74518466", "0.7433878", "0.7433672", "0.7412931", "0.7389732", "0.73891884", "0.7381364", "0.7372624", "0.7361734", "0.73523563", "0.7344134", "0.7332295", "0.7329108", "0.7317188", "0.7310567", "0.7289179", "0.727672", "0.7269989", "0.72684467", "0.7263399", "0.72490585", "0.7248793", "0.7242816", "0.72331977", "0.7186256", "0.71762764", "0.7160804", "0.7160048", "0.71546954", "0.7146174", "0.7126862", "0.71123683", "0.71109104", "0.7089689", "0.7088578", "0.7088218", "0.70758575", "0.7062105", "0.7057818", "0.7055872", "0.7055844", "0.70494324", "0.7036382", "0.7031564", "0.70300245", "0.70237875", "0.7022824", "0.700136", "0.6999201", "0.69951797", "0.6993159", "0.6988289", "0.69846934", "0.6961306", "0.6954293", "0.69532883", "0.6950801", "0.694943", "0.69399345", "0.6930843", "0.69192684", "0.69186926", "0.6917312", "0.69086576", "0.69075716", "0.690664", "0.6904214", "0.6902581", "0.6893772", "0.6890183", "0.68871135", "0.68811685", "0.68739015", "0.6868891", "0.6861453", "0.6856003", "0.68429285", "0.684209", "0.6839023", "0.68368405", "0.68368405", "0.68368405", "0.68368405" ]
0.8799576
0
This Environment class instance represents the Zoho CRM Sandbox Environment in US Domain.
Экземпляр класса Environment представляет среду Zoho CRM Sandbox в зоне US.
public static function SANDBOX() { self::$US = new USDataCenter(); if (USDataCenter::$SANDBOX == null) { USDataCenter::$SANDBOX = DataCenter::setEnvironment("https://sandbox.zohoapis.com", self::$US->getIAMUrl(), self::$US->getFileUploadUrl()); } return USDataCenter::$SANDBOX; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function environment();", "public function environment()\n {\n // TODO: Implement environment() method.\n }", "public function get_environment() {\n\t\treturn 'sandbox' === $this->environment ? 'sandbox' : 'live';\n\t}", "public static function environment() {\n\t\t\tstatic $environment = null;\n\t\t\tif ( is_null($environment) ) {\n\t\t\t\tforeach(array(\"development\", \"testing\", \"production\") as $env) {\n\t\t\t\t\tif ( ($settings = Settings::get(sprintf(\"application.environment.%s.enabled\", $env))) === true ) {\n\t\t\t\t\t\t$environment = new stdClass;\n\t\t\t\t\t\t$environment->env = $env;\n\t\t\t\t\t\t$environment->settings = clean_object(Settings::get(sprintf(\"application.environment.%s\", $env)));\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\treturn $environment;\n\t\t}", "public function getSandbox() {\r\n\t return $this->sandbox;\r\n\t}", "public function getEnvironment()\n {\n return Config::get('paypal.environment', 'sandbox');\n }", "public static function PRODUCTION()\n {\n self::$US = new USDataCenter();\n \n if (USDataCenter::$PRODUCTION == null)\n {\n USDataCenter::$PRODUCTION = DataCenter::setEnvironment(\"https://www.zohoapis.com\", self::$US->getIAMUrl(), self::$US->getFileUploadUrl());\n }\n \n return USDataCenter::$PRODUCTION;\n }", "public function enableSandbox()\n {\n $this->setEndpoint(self::SANDBOX_ENDPOINT);\n $this->setJsApiUrl(self::SANDBOX_JSAPI_URL);\n }", "public function getSandboxMode()\n {\n return $this->sandbox_mode;\n }", "public static function setPayUEnvironment()\n {\n \\PayU::$apiKey = static::getApiKey();\n \\PayU::$apiLogin = static::getApiLogin();\n \\PayU::$merchantId = static::getMerchantId();\n \\PayU::$isTest = static::isAccountInTesting();\n \\PayU::$language = \\SupportedLanguages::ES;\n if (static::isAppInTesting() == 'local') {\n \\Environment::setPaymentsCustomUrl(\n \"https://sandbox.api.payulatam.com/payments-api/4.0/service.cgi\"\n );\n \\Environment::setReportsCustomUrl(\n \"https://sandbox.api.payulatam.com/reports-api/4.0/service.cgi\"\n );\n \\Environment::setSubscriptionsCustomUrl(\n \"https://sandbox.api.payulatam.com/payments-api/rest/v4.9/\"\n );\n } else {\n \\Environment::setPaymentsCustomUrl(\n \"https://api.payulatam.com/payments-api/4.0/service.cgi\"\n );\n \\Environment::setReportsCustomUrl(\n \"https://api.payulatam.com/reports-api/4.0/service.cgi\"\n );\n \\Environment::setSubscriptionsCustomUrl(\n \"https://api.payulatam.com/payments-api/rest/v4.9/\"\n );\n }\n }", "public function sandbox()\n {\n $this->getHttpClient()->addConfigOption('sandbox');\n\n return $this;\n }", "public static function DEVELOPER()\n {\n self::$US = new USDataCenter();\n \n if (USDataCenter::$DEVELOPER == null)\n {\n USDataCenter::$DEVELOPER = DataCenter::setEnvironment(\"https://developer.zohoapis.com\", self::$US->getIAMUrl(), self::$US->getFileUploadUrl());\n }\n \n return USDataCenter::$DEVELOPER;\n }", "public function environment()\n\t{\n\t\treturn $this->_environment;\n\t}", "public function getEnvironment();", "public function getEnvironment();", "public function getMode()\n {\n return config('cashbill.mode', 'sandbox');\n }", "public function setup_environment()\n {\n }", "public function environment()\n {\n return 'prod';\n }", "protected static function simulateFrontendEnvironment() {}", "protected function simulateFrontendEnvironment() {}", "public function get_environment_info()\n {\n }", "public function useSandbox() {\n $this->use_sandbox = true;\n }", "public function getSiteEnvironment() {\n return $this->siteEnvironment;\n }", "public function environment($env){\n if($env == 'production')\n {\n return Config::get('dotpay.Services.production');\n }\n elseif($env == 'test')\n {\n return Config::get('dotpay.Services.test');\n }\n else\n {\n return false;\n }\n }", "public function Environment()\n {\n return $this->environment;\n }", "private static function setup_environment()\n {\n }", "public function __construct() {\n\n if ($this->isAcquiaServer()) {\n\n $this->getAcquiaServerSettings();\n $this->environment = $this->getEnvFromVars();\n }\n elseif ($this->isAcquiaDesktop()) {\n\n // There is no good way to determine working env on Acquia desktop at this\n // time. Assume dev as that is the most likely case.\n $this->environment = 'dev';\n }\n }", "protected function getEnvironmentMode() {}", "protected function getEnvironmentMode() {}", "public function checkIsSandbox()\n\t{\n\t\treturn $this->config['mode'] === 'sandbox';\n\t}", "public function useSandbox()\n {\n $this->base_url = $this->base_url_sandbox;\n }", "public function __construct(){\n \\Midtrans\\Config::$serverKey = env('MIDTRANS_SERVERKEY');\n // Set to Development/Sandbox Environment (default). Set to true for Production Environment (accept real transaction).\n \\Midtrans\\Config::$isProduction = false;\n // Set sanitization on (default)\n \\Midtrans\\Config::$isSanitized = true;\n // Set 3DS transaction for credit card to true\n \\Midtrans\\Config::$is3ds = true;\n }", "public function environment()\n {\n $host = env('DB_HOST');\n $database = env('DB_DATABASE');\n $username = env('DB_USERNAME');\n $password = env('DB_PASSWORD');\n return view('vendor.installer.environment', compact('host', 'database', 'username', 'password'));\n }", "private function setConfiguration()\n {\n $this->environmentType = $this->scopeConfig->getValue(\n 'vesta_protection/general/environment_type', \n ConfigurationScope::SCOPE_STORE\n );\n if ($this->environmentType == 'sandbox') {\n $this->userName = $this->scopeConfig->getValue(\n 'vesta_protection/general/sandbox_account_name',\n ConfigurationScope::SCOPE_STORE\n );\n $this->password = $this->scopeConfig->getValue(\n 'vesta_protection/general/sandbox_password',\n ConfigurationScope::SCOPE_STORE\n );\n $this->endPointUrl = $this->scopeConfig->getValue(\n 'vesta_protection/general/sandbox_end_point_url',\n ConfigurationScope::SCOPE_STORE\n );\n $this->merchantRoutingID = $this->scopeConfig->getValue(\n 'vesta_protection/general/sandbox_merchant_routing_id',\n ConfigurationScope::SCOPE_STORE\n );\n } else {\n $this->userName = $this->scopeConfig->getValue(\n 'vesta_protection/general/production_account_name',\n ConfigurationScope::SCOPE_STORE\n );\n $this->password = $this->scopeConfig->getValue(\n 'vesta_protection/general/production_password',\n ConfigurationScope::SCOPE_STORE\n );\n $this->endPointUrl = $this->scopeConfig->getValue(\n 'vesta_protection/general/production_end_point_url',\n ConfigurationScope::SCOPE_STORE\n );\n $this->merchantRoutingID = $this->scopeConfig->getValue(\n 'vesta_protection/general/production_merchant_routing_id',\n ConfigurationScope::SCOPE_STORE\n );\n }\n $this->autoDisposition = $this->scopeConfig->getValue(\n 'vesta_protection/general/autodisposition',\n ConfigurationScope::SCOPE_STORE\n );\n $this->acquirerCD = $this->scopeConfig->getValue(\n 'vesta_protection/general/acquirer_cd',\n ConfigurationScope::SCOPE_STORE\n );\n }", "function use_sandbox() {\n\treturn (defined( 'SEARS_USE_SANDBOX_ASSETS' ) && SEARS_USE_SANDBOX_ASSETS );\n}", "private function createEnvironment()\n {\n $loader = new FilesystemLoader($this->basePath);\n $this->twig = new Environment($loader, config('document_templates.twig.environment'));\n\n $policy = new SecurityPolicy(\n config('document_templates.template_sandbox.allowedTags'),\n config('document_templates.template_sandbox.allowedFilters'),\n config('document_templates.template_sandbox.allowedMethods'),\n config('document_templates.template_sandbox.allowedProperties'),\n config('document_templates.template_sandbox.allowedFunctions')\n );\n $this->sandbox = new SandboxExtension($policy);\n $this->twig->addExtension($this->sandbox);\n }", "public function environment()\n {\n if ($this->environment) {\n return $this->environment;\n }\n\n if (!$this->environmentProvider) {\n $this->environment = static::PRODUCTION;\n return $this->environment;\n }\n\n $this->setEnvironment(call_user_func($this->environmentProvider, $this));\n\n return $this->environment;\n }", "public static function getEnvironment();", "public function __construct(){\n $client = Config::get('services.paypal.clientid');\n $secret = Config::get('services.paypal.secret');\n $this->$enviroment = new SandboxEnviroment($clienid,$secret);\n //servicio de produccion o sandbox , connection\n $this->client = new PayPalHttpClient($this->$enviroment);\n }", "private function getEnvironment()\n\t{\n\t\treturn $this->moip->setEnvironment($this->config->environment);;\n\t}", "protected function environmentInstance(): EnvironmentTypeInterface\n {\n return PxApp::getEnvironmentInstance();\n }", "public function getEnvironmentName()\n {\n return CRAFT_ENVIRONMENT;\n }", "public function __construct() {\n parent::__construct(WS_PHIS_PATH, \"environments\");\n }", "public static function environment(){\n if (isset($_SERVER['SERVER_NAME'])) {\n if (in_array($_SERVER['SERVER_NAME'], self::$DEV_SERVER)){\n return 'dev';\n } elseif (in_array($_SERVER['SERVER_NAME'], self::$TEST_SERVER)) {\n return 'test';\n } else {\n return 'prod';\n }\n } else {\n return 'dev';\n }\n }", "public function setSandbox($sandbox = true)\n {\n $this->sandbox = (bool)$sandbox;\n return $this;\n }", "public function getEnvironment()\n {\n $env = parent::getEnvironment();\n if (false === strpos($env, '_')) {\n $env = $env.'_dk';\n }\n\n return $env;\n }", "public function environmentProvider()\n {\n return [\n ['production', ['a' => 0, 'b' => ['c' => 'd']]],\n ['development', ['a' => 0, 'b' => ['c' => 'e']]],\n ['test', ['a' => 1, 'b' => ['c' => 'e', 'f' => 'g'], 'h' => 'i']],\n ];\n }", "public function is_sandbox() {\n\t\treturn \"yes\" == $this->sandbox;\n\t}", "public function getDefaultEnvironment();", "public function domainEnvironment($domainEnvironment = NULL)\n\t{\n\t\tif ($domainEnvironment === NULL)\n\t\t{\n\t\t\t// Act as a getter\n\t\t\treturn self::$domain_environment;\n\t\t}\n\n\t\t// Act as a setter\n\t\tself::$domain_environment = (string) $domainEnvironment;\n\n\t\treturn $this;\n\t}", "public function isSandbox()\n {\n return $this->scopeConfig->getValue(self::XML_PATH_PAUMENT_PAGSEGURO_SANDBOX, ScopeInterface::SCOPE_WEBSITE);\n }", "public function setIsSandbox(bool $isSandbox = true): Autentique\n {\n $this->isSandbox = var_export($isSandbox, true);\n return $this;\n }", "public function getEnvironments()\n {\n return ['local','testing','production'];\n }", "public function environment()\n {\n $env_config = $this->getEnvContent();\n return view( 'admin.install.environment', compact( 'env_config' ) );\n }", "protected function setUpBasicFrontendEnvironment() {}", "protected function setUpBasicFrontendEnvironment() {}", "public static function set()\r\n\t\t{\r\n\t\t\t$json = file_get_contents(SERVER_BASE . 'site/config/settings.php', null, null, 15);\t\t\t\r\n\t\t\tself::$env = json_decode($json);\r\n\t\t\tself::$env->array = json_decode($json, true);\r\n\t\t}", "public function testDefaultEnvironmentsRead()\n {\n $environmentName = 'dev';\n\n $this->factory->create($environmentName, null);\n }", "public function envTwig(){\n // define the Environment options in all Environments\n $environment = array(\n 'charset' => 'utf-8',\n 'strict_variables' => true,\n 'autoescape' => 'html'\n );\n // get Dotenv\n $dotenv = Dotenv::createImmutable('../');\n $dotenv->load();\n // define the Environment options in Dev-Environment\n if($_ENV['ENV'] === 'Dev') {\n $environment['debug'] = true;\n $environment['auto_reload'] = false;\n $environment['cache'] = false;\n } else {\n $environment['auto_reload'] = true;\n $environment['cache'] = '../cache/compilation_cache';\n $environment['debug'] = false;\n }\n return $environment;\n }", "static protected function _setup_enviroment($domain=null)\n\t{\n\t\tif (!is_object($GLOBALS['egw_setup']))\n\t\t{\n\t\t\trequire_once(EGW_INCLUDE_ROOT.'/setup/inc/class.setup.inc.php');\n\t\t\t$GLOBALS['egw_setup'] = new setup(true,true);\n\t\t}\n\t\tself::$egw_setup = $GLOBALS['egw_setup'];\n\t\tself::$egw_setup->ConfigDomain = $domain;\n\n\t\tif (isset($GLOBALS['egw_info']['server']['header_admin_user']) && !isset($GLOBALS['egw_domain']) &&\n\t\t\tis_object($GLOBALS['egw']) && $GLOBALS['egw'] instanceof egw)\n\t\t{\n\t\t\t// we run inside eGW, not setup --> read egw_domain array from the header via the showheader cmd\n\t\t\t$cmd = new setup_cmd_showheader(null);\t// null = only header, no db stuff, no hashes\n\t\t\t$header = $cmd->run();\n\t\t\t$GLOBALS['egw_domain'] = $header['egw_domain'];\n\n\t\t\tif (is_object($GLOBALS['egw']->accounts) && is_null(self::$egw_accounts_backup))\n\t\t\t{\n\t\t\t\tself::$egw_accounts_backup = $GLOBALS['egw']->accounts;\n\t\t\t\tunset($GLOBALS['egw']->accounts);\n\t\t\t}\n\t\t\tif ($this->config) self::$egw_setup->setup_account_object($this->config);\n\t\t}\n\t\tif (is_object($GLOBALS['egw']->db) && $domain)\n\t\t{\n\t\t\t$GLOBALS['egw']->db->disconnect();\n\t\t\t$GLOBALS['egw']->db = new egw_db($GLOBALS['egw_domain'][$domain]);\n\n\t\t\t// change caching to managed instance\n\t\t\tegw_cache::unset_instance_key();\n\t\t}\n\t}", "public function enableSandboxMode()\n {\n $this->setSandboxMode(true);\n }", "function setAccessPoint()\n {\n \t$_env = '';\n \t$domain_srv = 'mws2.safetypay.com';\n\n if ( $this->conf['Environment'] )\n \t$_env = '/sandbox';\n\n $this->conf['CreateExpressToken'] = strtolower( $this->conf['Protocol'] )\n . '://' . $domain_srv\n . \"$_env/express/ws/v.3.0/Post/CreateExpressToken\";\n $this->conf['CreateRefund'] = strtolower( $this->conf['Protocol'] )\n . '://' . $domain_srv\n . \"$_env/express/ws/v.3.0/Post/CreateRefundProcess\";\n $this->conf['GetOperation'] = strtolower( $this->conf['Protocol'] )\n . '://' . $domain_srv\n . \"$_env/express/ws/v.3.0/Post/GetOperation\";\n }", "public function getEnvironment()\n {\n return $this->environment;\n }", "public function getEnvironment()\n {\n return $this->environment;\n }", "public function getEnvironment()\n {\n return $this->environment;\n }", "public function getEnvironment()\n {\n return $this->environment;\n }", "public function getEnvironment()\n {\n return $this->environment;\n }", "public function getEnvironment()\n {\n return $this->environment;\n }", "public function getEnvironment()\n {\n return $this->environment;\n }", "public function getEnvironment()\n {\n return $this->environment;\n }", "public function getEnvironment()\n {\n return $this->environment;\n }", "public function getEnvironment()\n {\n return $this->_environment;\n }", "public function getEnvironment()\n {\n return $this->_environment;\n }", "public function getEnv(){ return $this->getField('env',''); }", "public function SetEnvironment($e){\n\t\t$this->environment = $e;\n\t\treturn $this;\n\t}", "private function setCredentials() {\n $this->Credentials = $this->getJsonToArray(getenv(self::SNAM_ENV));\n }", "private function saveEnvironmentData()\n {\n $this->env->log(\"Preparing environment specific data.\");\n\n $this->initRoutes();\n\n $relationships = $this->env->getRelationships();\n $var = $this->env->getVariables();\n\n $this->dbHost = $relationships[\"database\"][0][\"host\"];\n $this->dbName = $relationships[\"database\"][0][\"path\"];\n $this->dbUser = $relationships[\"database\"][0][\"username\"];\n $this->dbPassword = $relationships[\"database\"][0][\"password\"];\n\n $this->adminUsername = isset($var[\"ADMIN_USERNAME\"]) ? $var[\"ADMIN_USERNAME\"] : \"admin\";\n $this->adminFirstname = isset($var[\"ADMIN_FIRSTNAME\"]) ? $var[\"ADMIN_FIRSTNAME\"] : \"John\";\n $this->adminLastname = isset($var[\"ADMIN_LASTNAME\"]) ? $var[\"ADMIN_LASTNAME\"] : \"Doe\";\n $this->adminEmail = isset($var[\"ADMIN_EMAIL\"]) ? $var[\"ADMIN_EMAIL\"] : \"john@example.com\";\n $this->adminPassword = isset($var[\"ADMIN_PASSWORD\"]) ? $var[\"ADMIN_PASSWORD\"] : \"admin12\";\n $this->adminUrl = isset($var[\"ADMIN_URL\"]) ? $var[\"ADMIN_URL\"] : \"admin\";\n $this->enableUpdateUrls = isset($var[\"UPDATE_URLS\"]) && $var[\"UPDATE_URLS\"] == 'disabled' ? false : true;\n\n $this->cleanStaticViewFiles = isset($var[\"CLEAN_STATIC_FILES\"]) && $var[\"CLEAN_STATIC_FILES\"] == 'disabled' ? false : true;\n $this->staticDeployExcludeThemes = isset($var[\"STATIC_CONTENT_EXCLUDE_THEMES\"])\n ? $var[\"STATIC_CONTENT_EXCLUDE_THEMES\"] : [];\n $this->adminLocale = isset($var[\"ADMIN_LOCALE\"]) ? $var[\"ADMIN_LOCALE\"] : \"en_US\";\n\n if (isset($var[\"STATIC_CONTENT_THREADS\"])) {\n $this->staticDeployThreads = (int)$var[\"STATIC_CONTENT_THREADS\"];\n } else if (isset($_ENV[\"STATIC_CONTENT_THREADS\"])) {\n $this->staticDeployThreads = (int)$_ENV[\"STATIC_CONTENT_THREADS\"];\n } else if (isset($_ENV[\"MAGENTO_CLOUD_MODE\"]) && $_ENV[\"MAGENTO_CLOUD_MODE\"] === 'enterprise') {\n $this->staticDeployThreads = 3;\n } else { // if Paas environment\n $this->staticDeployThreads = 1;\n }\n $this->doDeployStaticContent = isset($var[\"DO_DEPLOY_STATIC_CONTENT\"]) && $var[\"DO_DEPLOY_STATIC_CONTENT\"] == 'disabled' ? false : true;\n // Can use environment variable to always disable. Default is to deploy static content if it was not deployed in the build step.\n if (isset($var[\"DO_DEPLOY_STATIC_CONTENT\"]) && $var[\"DO_DEPLOY_STATIC_CONTENT\"] == 'disabled') {\n $this->doDeployStaticContent = false;\n $this->env->log(' Flag DO_DEPLOY_STATIC_CONTENT is set to disabled');\n } else {\n $this->doDeployStaticContent = !$this->env->isStaticDeployInBuild();\n $this->env->log(' Flag DO_DEPLOY_STATIC_CONTENT is set to ' . $this->doDeployStaticContent);\n }\n\n $this->magentoApplicationMode = isset($var[\"APPLICATION_MODE\"]) ? $var[\"APPLICATION_MODE\"] : false;\n $this->magentoApplicationMode =\n in_array($this->magentoApplicationMode, array(self::MAGENTO_DEVELOPER_MODE, self::MAGENTO_PRODUCTION_MODE))\n ? $this->magentoApplicationMode\n : self::MAGENTO_PRODUCTION_MODE;\n\n if (isset($relationships['redis']) && count($relationships['redis']) > 0) {\n $this->redisHost = $relationships['redis'][0]['host'];\n $this->redisPort = $relationships['redis'][0]['port'];\n }\n\n $this->setAmqpData($relationships);\n\n $this->verbosityLevel = isset($var['VERBOSE_COMMANDS']) && $var['VERBOSE_COMMANDS'] == 'enabled' ? ' -vvv ' : '';\n }", "public function getEnvironments()\n {\n if (empty($this->_environments)) {\n /** The mock environment provides our basic test scenario */\n $this->_environments = array(self::ENVIRONMENT_MOCK);\n $testing = getenv('KOLAB_TEST');\n if (!empty($testing)) {\n $this->_environments[] = array(self::ENVIRONMENT_REAL);\n }\n }\n return $this->_environments;\n }", "public function environment() {\n // get the value of the server uri\n $uri = $_SERVER['REQUEST_URI'];\n\n if (strpos($uri, 'phppreview') !== false) {\n $environment = 'cms';\n } else {\n $environment = 'live';\n }\n\n return $environment;\n }", "public function environment() {\n // get the value of the server uri\n $uri = $_SERVER['REQUEST_URI'];\n\n if (strpos($uri, 'phppreview') !== false) {\n $environment = 'cms';\n } else {\n $environment = 'live';\n }\n\n return $environment;\n }", "public function getEnvironment()\n\t\t{\n\t\t\treturn $this->environment;\n\t\t}", "public function getEnvironment()\n\t\t{\n\t\t\treturn $this->environment;\n\t\t}", "public function getEnv() {\n return YII_ENV;\n }", "public function setEnvironment($env,$merchantPrefix,$currency,$url){\r\n $this->ApiUrl=$url;\r\n \r\n $this->currencyISO=$currency;\r\n if($env==\"E\"){\r\n $this->clientID=$merchantPrefix.'E'.$currency;\r\n $this->environment=\"ECommerce\"; \r\n }\r\n else{\r\n $this->clientID=$merchantPrefix.'M'.$currency;\r\n $this->environment=\"MOTO\";\r\n }\r\n $stringToHash .=$this->clientID;\r\n\r\n }", "public function GetEnvironment(){\n\t\tif(!isset($this->environment)){\n\t\t\t$this->environment = $this->GetConfig(\"general/use_environment\");\n\t\t}\n\t\treturn $this->environment;\n\t}", "public function __construct($apiKey, $config, $name, $isSandboxMode)\r\n {\r\n $this->apiKey = $apiKey;\r\n $this->config = $config;\r\n $this->name = $name;\r\n $this->baseClient = new BaseClient($apiKey, $isSandboxMode ? BaseClient::ENV_STAGE : BaseClient::ENV_PROD, $this->isDebugMode());\r\n }", "public function getEnvironment(): EnvironmentModel\n {\n return $this->environment;\n }", "public function env()\n {\n return $this->env;\n }", "public function findEnvironment(): Environment\n {\n return $this->client->getEnvironment();\n }", "protected function getEnvironments()\r\n {\r\n return ['dev'];\r\n }", "public function testEnvironmentGetterWorksInAurex()\n {\n $aurex = new Aurex($env = $this->factory->create('dev'), new Injector, []);\n\n $this->assertSame($env, $aurex->getEnvironment());\n }", "public function getEnvironment()\n {\n return $this->env;\n }", "public function getEnvironment()\n {\n return $this->env;\n }", "public function testNowEnvLoadsEnvGlobals()\n {\n $nowenv = new NowEnv($this->_fixturesFolder, 'now-normal.json');\n $nowenv->load();\n\n $this->assertSame('Kitties go Meow', $_ENV['KITTIES']);\n $this->assertSame('Doggies go Woof', $_ENV['DOGGIES']);\n $this->assertSame('Hiding in the Woods', $_ENV['FOXES']);\n $this->assertEmpty($_ENV['NULL']);\n }", "public function envCommand()\n {\n $info = [\n 'phpVersion' => PHP_VERSION,\n 'env' => 'test',\n 'debug' => true,\n ];\n\n Interact::panel($info);\n\n echo Helper::printVars($_SERVER);\n }", "public function getEnvironment() {\n\t\treturn $this->environment;\n\t}", "public function get_sandbox() {\n global $CFG;\n $sandbox = $this->sandbox; // Get the specified sandbox (if question has one).\n if ($sandbox === null) { // No sandbox specified. Use best we can find.\n $sandboxinstance = qtype_coderunner_sandbox::get_best_sandbox($this->language);\n if ($sandboxinstance === null) {\n throw new qtype_coderunner_exception(\"Language {$this->language} is not available on this system\");\n }\n } else {\n $sandboxinstance = qtype_coderunner_sandbox::get_instance($sandbox);\n if ($sandboxinstance === null) {\n throw new qtype_coderunner_exception(\"Question is configured to use a non-existent or disabled sandbox ($sandbox)\");\n }\n }\n\n return $sandboxinstance;\n }", "public function environment()\n {\n return $this->belongsTo('App\\Environment');\n }", "private function __construct() {\n $this->_applicationName = 'Billing';\n $this->_backend = new Billing_Backend_AccountSystem();\n $this->_modelName = 'Billing_Model_AccountSystem';\n $this->_currentAccount = Tinebase_Core::getUser();\n $this->_purgeRecords = FALSE;\n $this->_doContainerACLChecks = FALSE;\n $this->_config = isset(Tinebase_Core::getConfig()->billing) ? Tinebase_Core::getConfig()->billing : new Zend_Config(array());\n }", "protected function _getEndpointDomain()\n {\n if ($this->isTestMode()) {\n $return = self::TEST_ENVIRONMENT_DOMAIN;\n } else {\n $return = self::PROD_ENVIRONMENT_DOMAIN;\n }\n return $return;\n }" ]
[ "0.64204216", "0.6368073", "0.61984587", "0.60643154", "0.5932573", "0.5919779", "0.57946247", "0.5679766", "0.5604337", "0.5561302", "0.55369765", "0.55354", "0.5488249", "0.54832673", "0.54832673", "0.54487705", "0.5440723", "0.5430773", "0.539919", "0.5383877", "0.5369295", "0.53485006", "0.53309196", "0.52837926", "0.5278238", "0.52745324", "0.52723664", "0.5265359", "0.5265359", "0.52574676", "0.5250106", "0.52430904", "0.5241516", "0.5240606", "0.5232048", "0.52302563", "0.52224827", "0.52202827", "0.5216432", "0.52097625", "0.5172762", "0.51710856", "0.51624006", "0.5148486", "0.5138624", "0.5134753", "0.5129132", "0.51255417", "0.51215494", "0.50978965", "0.5068635", "0.5052715", "0.5052683", "0.50524205", "0.5043065", "0.5043065", "0.50421333", "0.5040427", "0.5037818", "0.5030098", "0.5029896", "0.5024299", "0.5022692", "0.5022692", "0.5022692", "0.5022692", "0.5022692", "0.5022692", "0.5022692", "0.5022692", "0.5022692", "0.50223774", "0.50223774", "0.5017938", "0.5015324", "0.50066346", "0.5002487", "0.5001975", "0.4993544", "0.4993544", "0.49720874", "0.49720874", "0.4967803", "0.49551946", "0.4953431", "0.49484742", "0.49466833", "0.4938623", "0.4934363", "0.49341375", "0.49308062", "0.49276003", "0.49276003", "0.4926502", "0.49250147", "0.49113363", "0.49096054", "0.4905573", "0.49020052", "0.4894425" ]
0.7041577
0
Check if seasons api works
Проверьте, работает ли API сезонов
public function testGetSeasons() { $championship = Championship::first(); $response = $this->get('/api/seasons/' . $championship->id); if ($response->getStatusCode() == 200 || $response->getStatusCode() == 204) { if ($response->getStatusCode() == 200) { $response->assertJsonStructure([ '*' => [ 'id', 'name' ] ]); } else { $this->assertTrue(true); } } else { $this->assertTrue(false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateSeason() {\n $this->season = 'ALL';\n }", "function get_seasonal_animes(){\n $url = \"https://api.jikan.moe/v3/season/\";\n $year = date(\"Y\");\n $season = get_season((int)date(\"m\"));\n $url_build = $url.$year.\"/\".$season;\n\n $contents = file_get_contents($url_build);\n return json_decode($contents);\n}", "function get_season($date=\"\", $hemisphere=\"northern\") {\r\n\r\n // Set $date to today if no date specified\r\n if ($date==\"\") { $date = date(\"Y-m-d\"); }\r\n\r\n // Specify the season names\r\n $season_names = array('Winter', 'Spring', 'Summer', 'Autumn');\r\n\r\n // Get year of date specified\r\n $date_year = date(\"Y\", strtotime($date));\r\n\r\n // Declare season date ranges\r\n switch (strtolower($hemisphere)) {\r\n case \"northern\": {\r\n if (\r\n strtotime($date)<strtotime($date_year.'-03-21') ||\r\n strtotime($date)>=strtotime($date_year.'-12-21')\r\n ) {\r\n return $season_names[0]; // Must be in Winter\r\n }elseif (strtotime($date)>=strtotime($date_year.'-09-23')) {\r\n return $season_names[3]; // Must be in Fall\r\n }elseif (strtotime($date)>=strtotime($date_year.'-06-21')) {\r\n return $season_names[2]; // Must be in Summer\r\n }elseif (strtotime($date)>=strtotime($date_year.'-03-21')) {\r\n return $season_names[1]; // Must be in Spring\r\n }\r\n break;\r\n }\r\n case \"southern\": {\r\n if (\r\n strtotime($date)<strtotime($date_year.'-03-21') ||\r\n strtotime($date)>=strtotime($date_year.'-12-21')\r\n ) {\r\n return $season_names[2]; // Must be in Summer\r\n }elseif (strtotime($date)>=strtotime($date_year.'-09-23')) {\r\n return $season_names[1]; // Must be in Spring\r\n }elseif (strtotime($date)>=strtotime($date_year.'-06-21')) {\r\n return $season_names[0]; // Must be in Winter\r\n }elseif (strtotime($date)>=strtotime($date_year.'-03-21')) {\r\n return $season_names[3]; // Must be in Fall\r\n }\r\n break;\r\n }\r\n case \"australia\": {\r\n if (\r\n strtotime($date)<strtotime($date_year.'-03-01') ||\r\n strtotime($date)>=strtotime($date_year.'-12-01')\r\n ) {\r\n return $season_names[2]; // Must be in Summer\r\n }elseif (strtotime($date)>=strtotime($date_year.'-09-01')) {\r\n return $season_names[1]; // Must be in Spring\r\n }elseif (strtotime($date)>=strtotime($date_year.'-06-01')) {\r\n return $season_names[0]; // Must be in Winter\r\n }elseif (strtotime($date)>=strtotime($date_year.'-03-01')) {\r\n return $season_names[3]; // Must be in Fall\r\n }\r\n break;\r\n }\r\n default: { echo \"Invalid hemisphere set\"; }\r\n }\r\n\r\n }", "public function seasonOver()\n {\n //\n }", "function in_active_season($series_id){\n//returns TRUE if season is currently active\n//returns FALSE if season is not currently active\n//assumes $db_conn conntect is already connected to database\nglobal $db_conn;\n\n}", "function list_seasons() {\n $sql = \"SELECT * FROM `saisonzeiten`;\";\n return query_reiseDB($sql);\n }", "function getSeasons()\n {\n $this->jsmquery->clear();\n $this->jsmquery->select(array('id', 'name'))\n ->from('#__sportsmanagement_season')\n ->order('name DESC');\n\n try{\n $this->jsmdb->setQuery($this->jsmquery);\n $result = $this->jsmdb->loadObjectList();\n\n foreach ($result as $season)\n {\n $season->name = Text::_($season->name);\n }\n return $result;\n }\n catch (Exception $e)\n {\n $this->jsmapp->enqueueMessage(Text::_($e->getMessage()), 'error');\n return false;\n }\n }", "public function testGettingSalesSeason()\n {\n // 2010 autumn\n $this->assertSame('2010/1', $this->groschen->getSalesSeason());\n\n // Product with the fall sales season 2013 autumn\n $groschen = new Groschen('9789510374665');\n $this->assertSame('2013/2', $groschen->getSalesSeason());\n\n // Product with the fall sales season 2013 autumn\n $groschen = new Groschen('9789520418120');\n $this->assertSame('2021/1', $groschen->getSalesSeason());\n\n // Product without sales season\n $groschen = new Groschen('9789510102893');\n $this->assertNull($groschen->getSalesSeason());\n\n // Product that has season but no period\n $groschen = new Groschen('9789513130855');\n $this->assertNull($groschen->getSalesSeason());\n\n // Product that has season period but no year\n $groschen = new Groschen('9789510451663');\n $this->assertNull($groschen->getSalesSeason());\n }", "public function actionReadSeasons($id) {\n self::checkAdmin();\n $serial = Catalog::getSerial($id);\n $seasons = AdminRead::getSeasons($id);\n require_once(ROOT . '/views/admin/seasons.php');\n return true;\n }", "function getTeams($year, $apiV, $apiKey) {\n\t\t//$standingsJSON = file_get_contents(\"http://api.sportsdatallc.org/nba-t\".$apiV.\"/seasontd/\".$year.\"/REG/standings.json?api_key=\".$apiKey);\n\t\t$standingsJSON = file_get_contents(\"http://api.sportradar.us/nba-t\".$apiV.\"/seasontd/\".$year.\"/REG/standings.json?api_key=\".$apiKey);\n\n\t\techo $standingsJSON;\n\t}", "public function validate() {\n//\t\tif( intval($this->params[\"startYear\"] < date(\"yyyy\"))) $this->add_validation_error(\"Season cannot exist in the past.\");\n\t}", "function svc_startSeason($title, $game, $method, $placements){\n\twriteLog(TRACE, \"Entering startSeason...\");\n\tglobal $db;\n\t$query1 = \"INSERT INTO season_data (season_title, season_game, season_start_date) VALUES ('$title', '$game', NOW())\";\n\tif (mysqli_query($db, $query1)){\n\t\t$seasonid = mysqli_insert_id($db);\n\t\twriteLog(TRACE, \"Insert query successful, new season ID is \".$seasonid);\n\t\tsvc_putSetting(\"CurrentSeasonNumber\", $seasonid);\n\t\tsvc_putSetting(\"InitialPlacementMatches\", $placements);\n\t\tif (svc_populateInitRanks($method, $placements, $game)){\n\t\t\twriteLog(INFO, \"User \".$_SESSION['name'].\" started a new season: \".$title);\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false; //Init ranks method will have already logged the error\n\t\t}\n\t} else {\n\t\twriteLog(SEVERE, \"startSeason failed!\");\n\t\twriteLog(SEVERE, \"Query: \".$query1);\n\t\twriteLog(SEVERE, \"MySQL Error: \".mysqli_error($db));\n\t}\n}", "public function inNPBHighSeason() {\n \n }", "function checkTodaySeason1()\r\n{\r\n $todayMonth = date(\"n\");\r\n\r\n if ($todayMonth == 1 || $todayMonth == 2 || $todayMonth == 12) {\r\n $season = 'Winter';\r\n } elseif($todayMonth == 3 || $todayMonth == 4 || $todayMonth == 5) {\r\n $season = 'Spring';\r\n } elseif($todayMonth == 6 || $todayMonth == 7 || $todayMonth == 8) {\r\n $season = 'Summer';\r\n } elseif($todayMonth == 9 || $todayMonth == 10 || $todayMonth == 11) {\r\n $season = 'Automn';\r\n } else {\r\n $season = 'Unknown';\r\n }\r\n return $season;\r\n}", "public function is_running()\n {\n return is_null($this->next_season());\n }", "public static function getSeasonsBySerialId($id){\t\n\t\t$seasons = Serial::getSeasonsBySerialId($id);\n\t\t$HTMLtitle = Serial::getSerialName($id);\n\t\tif(!$seasons){\n\t\t\theader(\"Location: error404\");\n\t\t}\n\t\tController::link(false, Serial::getSerialName($id), false, false);\n\t\tinclude_once \"view/pages/seasons.php\";\n\t}", "public function noSeasonsMessage(AcceptanceTester $I)\n {\n $I->wantTo('Verify the No Seasons message appears on a series without seasons. - C15556');\n if(SeriesEditCest::$environment == 'staging')\n {\n $guid = TestContentGuids::$seriesViewMinimumData_staging;\n }\n else //proto0\n {\n $guid = TestContentGuids::$seriesViewMinimumData_proto0;\n }\n $I->amOnPage(ContentPage::$contentUrl . $guid);\n $I->waitForText('There are no seasons attached to this media.');\n }", "public static function getSeason(){\n $query=Connection::getInstance()->connect()->prepare(\"SELECT season FROM season WHERE endseason > '\" . date('Y-m-d') . \"' LIMIT 1\");\n $query->execute();\n $query->setFetchMode(PDO::FETCH_OBJ);\n $data=$query->fetch();\n return $data->season;\n }", "public function seasonAdmin()\n {\n }", "public function testGettingBacklistSalesSeason()\n {\n $this->assertNull($this->groschen->getBacklistSalesSeason());\n\n // Product with the fall sales season 2013/3\n $groschen = new Groschen('9789513129071');\n $this->assertSame('2016 Autumn', $groschen->getBacklistSalesSeason());\n }", "public function show(Season $season)\n {\n //\n }", "public function get_seasons_available_forteam($league_id,$team_id)\n {\n\t\t//same basic query as this->get_seasons , but withtout search, and with teamid check\n $sql = \"SELECT s.season_id, s.season_name, x.league_id, x.league_name, \n s.effective_range_start, s.effective_range_end ,s.isactive\n , ( SELECT COUNT(*) FROM schedule.league_season_schedule lss \n\t\t\t\t\t\t\t INNER JOIN schedule.schedule sch ON sch.schedule_id = lss.schedule_id AND sch.deleted_flag='f' \n\t\t\t\t\t\t\t\t AND lss.league_id=x.league_id AND lss.season_id=s.season_id \n\t\t\t\t\t\t\t\t) AS schedule_count,\n\t\t\t\t\t\t\t r.is_enabled, r.effective_range_start as reg_range_start, r.effective_range_end as reg_range_end, \n\t\t\t\t\t\t\t r.deposit_status,r.deposit_amount,r.fees_status,r.fees_amount\n FROM public.league x \n INNER JOIN public.season s \n \tON x.league_id = s.league_id AND s.deleted_flag = 'f' AND x.deleted_flag = 'f' \n \t\t\t\t\t\t\t\t\t\tAND x.league_id = ? \n LEFT OUTER JOIN public.registration r\n \tON\t\t r.season_id = s.season_id\n WHERE \n s.season_id NOT IN (SELECT ts.season_id FROM public.team_season ts WHERE ts.team_id = ? AND ts.deleted_flag=FALSE)\n ORDER BY s.effective_range_start DESC\n \";// AND \".USER_CAN_ACCESS.\" \";\n return $this->db->query($sql,array($league_id,$team_id))->result_array();\n }", "public function setBaseSeason(){\n for($i = 0; $i < sizeof($this->_seasonList); $i++){\n if($this->_seasonList[$i]->getCurrentMonth()->getMonthId() <= $this->_currentSeason->getCurrentMonth()->getMonthId()){\n $this->_currentSeason = $this->_seasonList[$i];\n }\n }\n }", "function getSeasons() {\n $sql = \"SELECT * FROM season ORDER BY year ASC\";\n $res = $this->_mysqli->query($sql);\n \n $data = $this->fetch_all($res, MYSQLI_ASSOC);\n \n return $data;\n }", "public function testShowGames()\n {\n $show_response =\n $this->json('get', '/api/v3/game/list/1,2');\n\n $show_response\n ->assertStatus(200);\n }", "public function displayExistingSeasons()\n {\n $em = $this->getDoctrine()->getManager();\n $seasons = $em->getRepository(\"EventsBundle:Season\")->findAll();\n foreach($seasons as $season){\n $campaignsForSeason = $em->getRepository(\"EventsBundle:Campaign\")->findBySeasonId($season->getSeasonId());\n $season->campaigns = count($campaignsForSeason);\n }\n\n $data = array();\n $data['seasons'] = $seasons;\n $data['totalcount'] = count($seasons);\n $data['newbuild'] = $this->get('app.app_status')->isNewBuild();\n\n return $this->render('campaignsapp/showseasons.html.twig', $data);\n\n }", "public function testGetMatchdays()\n {\n $season = Season::first();\n\n $response = $this->get('/api/matchdays/' . $season->id);\n\n if ($response->getStatusCode() == 200 || $response->getStatusCode() == 204) {\n if ($response->getStatusCode() == 200) {\n $response->assertJsonStructure([\n '*' => [\n 'id',\n 'matchday'\n ]\n ]);\n } else {\n $this->assertTrue(true);\n }\n } else {\n $this->assertTrue(false);\n }\n }", "function upcoming_season($series_id){\n//returns the number of the next upcoming season\n//this will return the next season even if we are currently in an active season.\n//this is not the season ID number\n//assumes $db_conn conntect is already connected to database\nglobal $db_conn;\n\n}", "public static function getSeason($id) {\n $res = DB::get(DB::T(DB::SEASON), $id);\n if ($res !== null)\n return $res;\n\n $res = DB::getAll(DB::T(DB::SEASON), new DBCond('url', $id));\n return (count($res) == 0) ? null : $res[0];\n }", "public function fetchAllSemesterTest()\n {\n $this->json('GET', 'api/semesters', ['Accept' => 'application/json'])\n ->assertStatus(200);\n }", "function get_current_season() {\n\tswitch(SEASON_NAME) {\n\t\tcase WINTER:\n\t\t\treturn [\n\t\t\t\t1=>'January',\n\t\t\t\t2=>'February',\n\t\t\t\t3=>'March',\n\t\t\t\t4=>'April',\n\t\t\t];\n\n\t\tcase SPRING:\n\t\tcase SUMMER:\n\t\t\treturn [\t\n\t\t\t\t5=>'May',\n\t\t\t\t6=>'June',\n\t\t\t\t7=>'July',\n\t\t\t\t8=>'August'\n\t\t\t];\n\n\t\tcase FALL:\n\t\t\treturn [\n\t\t\t\t9=>'September',\n\t\t\t\t10=>'October',\n\t\t\t\t11=>'November',\n\t\t\t\t12=>'December'\n\t\t\t];\n\n\t\tcase 'test':\n\t\t\treturn [\n\t\t\t\t1=>'January',\n\t\t\t];\n\t}\n}", "public function getSeason() {\n return $this->season;\n }", "public function get_current_season($league_id) {\n\t\n\t\t$league_id = $this->sanitize( $league_id );\n\t\t$season = array();\n\t\t$data = $this->fetch(\"SELECT * FROM `\" . $this->prefix . \"seasons` WHERE league_id = '$league_id' ORDER BY season DESC LIMIT 1\");\n\t\tif( $data ) {\n\t\t\t$season = array(\n\t\t\t\t\t'season'\t=> $data['0']['season'],\n\t\t\t\t\t'start'\t\t=> $data['0']['start'],\n\t\t\t\t\t'end'\t\t=> $data['0']['end']\n\t\t\t);\n\t\t\treturn $season;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\n\t}", "public function testStationsStationIdRainfallGet()\n {\n }", "public function getSeason()\n {\n return $this->season;\n }", "public function testSeasonalHolidays(): void\n {\n $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_SEASON);\n }", "public function testSeasonalHolidays(): void\n {\n $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_SEASON);\n }", "public function test_api_returns_valid_response()\n {\n $events = GetEvents::execute();\n\n $this->assertNotFalse($events);\n }", "function getSeasonById($id) {\n $sql = \"SELECT * FROM season WHERE season_id = '\" . $id . \"'\";\n $res = $this->_mysqli->query($sql);\n\n $data = $res->fetch_array();\n return $data;\n }", "public function seasonListDisplayed(AcceptanceTester $I)\n {\n $I->wantTo('Verify Season List is displayed on the Edit Series page. - C15551');\n if(SeriesEditCest::$environment == 'staging')\n {\n $guid = TestContentGuids::$seriesViewData_staging;\n }\n else //proto0\n {\n $guid = TestContentGuids::$seriesViewData_proto0;\n }\n $I->amOnPage(ContentPage::$contentUrl . $guid);\n\n $I->expect('Season List is displayed.');\n $I->waitForElementVisible(ContentPage::$clickableTable, 30);\n $I->see('SEASONS');\n $I->see('Season View Filled Data For Automation', ContentPage::$seasonsTable);\n }", "function current_season($series_id){\n//returns the number of the current season.\n//this is not the season ID number but just the current number of the season. \n//assumes $db_conn conntect is already connected to database\nglobal $db_conn;\n\n}", "function getSeason($today){ // Where $today is previously made via epochTime.\n $easter = floor(easter_date(date(\"Y\"))/86400);\n $christmas = floor(mktime(0,0,0,12,24,date(\"Y\")) / 86400);\n \n // Lent\n if( ($today >= $easter-46) && ($today < $easter) )\n return \"lent\";\n else if( ($today >= $easter) && ($today < $easter+50) )\n return \"easter\";\n else{\n $i = 24;\n while( 4 != date(\"w\", mktime(0, 0, 0, 11, $i, date(\"Y\"))) ){\n $i++;\n }\n $advent = mktime(0, 0, 0, 11, $i, date(\"Y\"));\n $advent = floor($advent/86400);\n $advent += 3;\n if( ($today >= $advent) && ($today < $christmas) )\n \t return \"advent\";\n else if($today == $christmas) return \"christmas1\";\n else if($today == $christmas+1) return \"christmas2\";\n else if($today == $christmas+2) return \"christmas3\";\n else if($today == $christmas+3) return \"christmas4\";\n else if($today == $christmas+4) return \"christmas5\";\n else if($today == $christmas+5) return \"christmas6\";\n else if($today == $christmas+6) return \"christmas7\";\n else if($today == $christmas+7) return \"christmas8\";\t\n\telse{\n\t $today += 4;\n $week = $today / 7;\n\t if($week % 4 == 0) return \"gen1\";\n else if($week % 4 == 1) return \"gen2\";\n else if($week % 4 == 2) return \"gen3\";\n else if($week % 4 == 3) return \"gen4\";\n\t}\n } \n \n // There has been a failure of divine proportions.\n return \"Failed to generate season.\";\n}", "function get_postseason(){\n\t\n\tglobal $wpdb;\n\t$getplayoffs = $wpdb->get_results(\"select * from wp_playoffs\", ARRAY_N);\n\t\n\tforeach ($getplayoffs as $revisequery){\n\t\t$playoffs[] = array(\n\t\t\t'playoffid' => $revisequery[0], \n\t\t\t'year' => $revisequery[1], \n\t\t\t'week' => $revisequery[2], \n\t\t\t'playerid' => $revisequery[3], \n\t\t\t'score' => $revisequery[4],\n\t\t\t'team' => $revisequery[5],\n\t\t\t'versus' => $revisequery[6],\n\t\t\t'overtime' => $revisequery[7],\n\t\t\t'result' => $revisequery[8]\n\t\t);\n\t}\n\t\n\treturn $playoffs;\n}", "public function getAllSeasons($id)\r\n\t{\t\r\n\t\tif (isset($this->raw['seasons']))\r\n\t\t{\r\n\t\t\t\r\n\t\t\t//exlude special episodes '0' season\r\n \t\t\tforeach ($this->raw['seasons'] as $k => $v)\r\n \t\t\t{\r\n \t\t\t\tif (isset($v['season_number']) && $v['season_number'] === 0 || $v['season_number'] == null)\r\n \t\t\t\t{\r\n \t\t\t\t\tunset($this->raw['seasons'][$k]);\r\n \t\t\t\t}\r\n \t\t\t}\r\n\r\n\t\t\treturn $this->compileSeasons($this->raw['seasons'], $id);\r\n\t\t}\r\n\t}", "public static function getAllSeasons(): array\n {\n return elgg_get_entities([\n 'type' => 'object',\n 'subtype' => 'season',\n 'limit' => 999,\n ]);\n }", "function getSchedule($year, $apiV, $apiKey) {\n\t\t$scheduleJSON = file_get_contents(\"http://api.sportsdatallc.org/nba-t\".$apiV.\"/games/\".$year.\"/REG/schedule.json?api_key=\".$apiKey);\n\t\techo $scheduleJSON;\n\t}", "public function index()\n {\n $seasons = Season::all();\n\n if (request()->expectsJson())\n {\n return $seasons;\n }\n\n return view('track.seasons.index', compact('seasons'));\n }", "public function show($id)\n {\n return $this->season->getSeason($id);\n }", "public function run()\n {\n $season = new App\\Season([\n\t\t\t'year' => '2012',\n\t\t\t'game_count' => 22,\n\t\t\t'drop_count' => 2,\n\t\t\t'player_count_id' => 14,\n\t\t\t'buy_in_id' => 7\n\t\t]);\n\t\t$season->save();\n\t\t\n\t\t$season = new App\\Season([\n\t\t\t'year' => '2013',\n\t\t\t'game_count' => 20,\n\t\t\t'drop_count' => 4,\n\t\t\t'player_count_id' => 10,\n\t\t\t'buy_in_id' => 7\n\t\t]);\n\t\t$season->save();\n\t\t\n\t\t$season = new App\\Season([\n\t\t\t'year' => '2014',\n\t\t\t'game_count' => 20,\n\t\t\t'drop_count' => 4,\n\t\t\t'player_count_id' => 11,\n\t\t\t'buy_in_id' => 7\n\t\t]);\n\t\t$season->save();\n\t\t\n\t\t$season = new App\\Season([\n\t\t\t'year' => '2015',\n\t\t\t'game_count' => 20,\n\t\t\t'drop_count' => 4,\n\t\t\t'player_count_id' => 10,\n\t\t\t'buy_in_id' => 7\n\t\t]);\n\t\t$season->save();\n\t\t\n\t\t$season = new App\\Season([\n\t\t\t'year' => '2016',\n\t\t\t'game_count' => 20,\n\t\t\t'drop_count' => 4,\n\t\t\t'player_count_id' => 12,\n\t\t\t'buy_in_id' => 7\n\t\t]);\n\t\t$season->save();\n\t\t\n\t\t$season = new App\\Season([\n\t\t\t'year' => '2017',\n\t\t\t'game_count' => 20,\n\t\t\t'drop_count' => 4,\n\t\t\t'player_count_id' => 11,\n\t\t\t'buy_in_id' => 7\n\t\t]);\n\t\t$season->save();\n\t\t\n\t\t$season = new App\\Season([\n\t\t\t'year' => '2018',\n\t\t\t'game_count' => 20,\n\t\t\t'drop_count' => 4,\n\t\t\t'player_count_id' => 13,\n\t\t\t'buy_in_id' => 7\n\t\t]);\n\t\t$season->save();\n }", "function getSeasonNew(){\n $today = epochTime();\n\n $easter = floor(easter_date(date(\"Y\"))/86400);\n \n $christmas = floor(mktime(0, 0, 0, 12, 24, date(\"Y\")) / 86400); // Christmas Eve.\n \n // Lent is 46 days prior to Easter.\n if( ($today >= $easter-46) && ($today < $easter) )\n return \"lent\";\n \n // Easter lasts 50 days.\n if( ($today >= $easter) && ($today < $easter+50) )\n return \"easter\";\n \n // Advent is the four weeks prior to the first Sunday of Christmas.\n // This falls on any date between 27 Nov and 3 Dec. Find which one of these is a Thursday, then Advent starts three days later.\n $i = 24;\n while( 4 != date(\"w\", mktime(0, 0, 0, 11, $i, date(\"Y\"))) ){\n $i++;\n }\n $advent = mktime(0, 0, 0, 11, $i, date(\"Y\"));\n $advent = floor($advent/86400);\n $advent += 3;\n \n if( ($today >= $advent) && ($today < $christmas) ){\n return \"advent\";\n }\n \n // Christmas season lasts 12 days. I'll be nice and return which day of the Christmas season it's on.\n // Christmas season is actually a very annoying edge case. So long as the date is between Dec. 24 and Dec. 31, we have no problems.\n if($today == $christmas) return \"christmas1\";\n if($today == $christmas+1) return \"christmas2\";\n if($today == $christmas+2) return \"christmas3\";\n if($today == $christmas+3) return \"christmas4\";\n if($today == $christmas+4) return \"christmas5\";\n if($today == $christmas+5) return \"christmas6\";\n if($today == $christmas+6) return \"christmas7\";\n if($today == $christmas+7) return \"christmas8\";\n \n // Once we're Jan. 1 through Jan. 6, we need to try a more manual approach. It's just easier, if less pretty.\n if($today == (floor(mktime(0,0,0,1,1,date(\"Y\"))/86400 ))) return \"christmas9\";\n if($today == (floor(mktime(0,0,0,1,2,date(\"Y\"))/86400 ))) return \"christmas10\";\n if($today == (floor(mktime(0,0,0,1,3,date(\"Y\"))/86400 ))) return \"christmas11\";\n if($today == (floor(mktime(0,0,0,1,4,date(\"Y\"))/86400 ))) return \"christmas12\";\n if($today == (floor(mktime(0,0,0,1,5,date(\"Y\"))/86400 ))) return \"christmas13\";\n if($today == (floor(mktime(0,0,0,1,6,date(\"Y\"))/86400 ))) return \"christmas14\";\n \n // The very last thing we do. Find which general/Epiphany week we are in.\n $today += 4;\n $week = $today / 7;\n \n if($week % 4 == 0) return \"gen1\";\n if($week % 4 == 1) return \"gen2\";\n if($week % 4 == 2) return \"gen3\";\n if($week % 4 == 3) return \"gen4\";\n \n // This shouldn't happen.\n return \"Error: Did not correctly compute season.\";\n \n}", "public function show(Season $season)\n {\n $permission = session('permissions');\n if (isset($permission['seasons']['check']) && $permission['seasons']['check']=== \"1\") {\n return view('sportfans.seasons.show',compact('season'));\n } else {\n return view('errors.unauthorized');\n }\n\n \n }", "public function getSeason()\n\t{\n\t\treturn $this->season;\n\t}", "public function new_season($season_name,$start_date,$end_date,$isactive,$reg_needed,$reg_start_date,$reg_end_date,$reg_deposit_status,$reg_deposit_amount,$reg_fees_status,$reg_fees_amount)\n { \n $a_u_id= $this->permissions_model->get_active_user();\n $a_o_id= $this->permissions_model->get_active_org();\n \n //------------------------------------------------------------------------ \n $sql=\"SELECT public.new_season(?,?,?,?,?,?,?,?,?,?,?,?,?)\" ;\n $params = array($season_name,$start_date,$end_date,$isactive\n ,$reg_needed,$reg_start_date,$reg_end_date,$reg_deposit_status,$reg_deposit_amount,$reg_fees_status,$reg_fees_amount \n ,$a_u_id,$a_o_id) ;\n return $this->db->query($sql ,$params)->first_row()->new_season;\n }", "public function checkApi() {\n\t\tif( !isset ( $this->params ['apiKey'] )){\n\t\t\t$this->responseData = null;\n\t\t\t$this->setData($this->apiKey);\n\t\t}\n\t\tif( $this->test ){\n\t\t\t$this->setData($this->test);\n\t\t}\n\t}", "public function get_seasons($league_id)\n {\n $search_criteria =(string) $this->input->get_post('query');\n\n //-----------------------------------------------------------------\n $sql = \"SELECT s.season_id, s.season_name, x.league_id, x.league_name, \n s.effective_range_start, s.effective_range_end ,s.isactive\n , ( SELECT COUNT(*) FROM schedule.league_season_schedule lss \n\t\t\t\t\t\t\t INNER JOIN schedule.schedule sch ON sch.schedule_id = lss.schedule_id AND sch.deleted_flag='f' \n\t\t\t\t\t\t\t\t AND lss.league_id=x.league_id AND lss.season_id=s.season_id \n\t\t\t\t\t\t\t\t) AS schedule_count,\n\t\t\t\t\t\t\t r.is_enabled, r.effective_range_start as reg_range_start, r.effective_range_end as reg_range_end, r.deposit_status,r.deposit_amount,r.fees_status,r.fees_amount\n FROM public.league x \n INNER JOIN public.season s \n \tON x.league_id = s.league_id \n LEFT OUTER JOIN public.registration r\n \tON\t\t r.season_id = s.season_id\n WHERE x.league_id = ? \n AND s.deleted_flag = 'f' \n AND x.deleted_flag = 'f' \n and \n (\n lower(s.season_name) like '%'||lower(?)||'%'\n )\n ORDER BY s.effective_range_start DESC \n \";// AND \".USER_CAN_ACCESS.\" \";\n return $this->db->query($sql,array($league_id,$search_criteria))->result_array();\n }", "public function getSeason() {\n\t\treturn $this->season;\n\t}", "protected function ensureAPIData() {\n if (!isset($this->apiData)) {\n $client = new GuzzleHttp\\Client();\n try {\n $res = $client->request('GET', 'http://digital2.library.unt.edu/edtf/isValid.json', array(\n 'timeout' => 10,\n 'query' => array(\n 'date' => $this->dateString,\n ),\n ));\n }\n catch (GuzzleHttp\\Exception\\GuzzleException $guzzle_exception) {\n\n }\n if (isset($res) && $res->getStatusCode() == 200) {\n $this->apiData = $res->getBody();\n $this->apiDataJson = json_decode($this->apiData, TRUE);\n $this->valid = $this->apiDataJson['validEDTF'] === TRUE;\n }\n }\n }", "public function CheckSeason($sn, $aSeasons, $token) {\n\t\t$s = '';\n\t\tforeach($aSeasons as $k => $v) { \n\t\t\tif ($sn==$k){\n\t\t\t $s.= '<li><a><font color=yellow>'.$v.'</font></a></li>';\n\t\t\t}else{\n\t\t\t $s.='<li><a href=\"index.php?route=vis/aroutes&token='.$token.'&setseason='.$k.'\">'.$v.'</a></li>';\n\t\t\t}\n\t\t}\n\t\treturn $s;\n\t}", "public function nextSeason(){\n $nextSeasonInList = 0;\n if($this->_currentSeason->nextMonth() ==0){\n for($i = 0; $i < sizeof($this->_seasonList); $i++){\n if($this->_currentSeason == $this->_seasonList[$i]){\n if($i == sizeof($this->_seasonList)-1){\n $nextSeasonInList = 0;\n }\n else{\n $nextSeasonInList = $i+1;\n }\n }\n }\n $this->_currentSeason = $this->_seasonList[$nextSeasonInList];\n }\n }", "public function seasons()\n {\n return $this->morphMany(SeasonCompetition::class, 'organization');\n }", "public function getSeason(int $seasonNumber):?Season{\n $result = array_filter($this->seasons, function(Season $season) use ($seasonNumber){\n return $season->getSeasonNumber() === $seasonNumber;\n });\n\n if(is_null($result) || !$result){\n throw new Exception('Season info not found.', 134);\n }\n return array_shift($result);\n }", "public function testAreAnyGamesInProgressSuccessfulResponse()\n {\n $this->assertEquals('200', static::$sResponse->getStatusCode());\n }", "public function testSeriesNotOnline()\n {\n // add data to DB\n $oSeries = new \\Series();\n $oCollection = new \\Collection();\n $oCollection->setCategoryId(1);\n $oCollection->setName('Test series offline');\n $oCollection->setDescription('Test series offline');\n $oCollection->setStatus('offline');\n $seriesId = $oSeries->Add($oCollection);\n\n $this->assertGreaterThan(0, $seriesId);\n\n // init and mock\n $oMockController = $this->initController('/index.php/website/series');\n $oMockController->expects($this->once())->method('redirect404')->willReturn(true);\n $this->setGET(\n [\n 'series_id' => $seriesId,\n 'series_name' => 'Test-series-offline'\n ],\n $oMockController\n );\n\n // the test\n $oMockController->series();\n }", "function showStandings($atts, $widget = false)\n {\n global $leaguemanager;\n\n // Extract attributes\n extract(shortcode_atts(array(\n 'league_id' => 0,\n 'league_name' => '',\n 'season' => false,\n ), $atts ));\n\n // Get the league\n $league = $leaguemanager->getLeague($league_id);\n\n // Allow season as an argument\n if(isset($_GET['season']) && isset($league->seasons[$_GET['season']])) {\n $season = $_GET['season'];\n }\n\n // Get the league, session, and teams\n $session = new my5280_Session($league_id, $season);\n $teams = $session->listTeams();\n\n // Build the season list\n $seasons = array();\n $seasonIds = array_keys($league->seasons);\n rsort($seasonIds);\n foreach($seasonIds as $id) {\n $split = strpos($id, '-');\n if($split !== false) {\n $name = substr($id, $split + 1);\n } else {\n $name = $id;\n }\n $seasons[$id] = $name;\n }\n\n // Sort the teams on total points\n uasort($teams, function($a, $b) {\n if($a->getRank() < $b->getRank()) {\n return -1;\n } elseif($a->getRank() > $b->getRank()) {\n return 1;\n } else {\n return 0;\n }\n });\n\n // Calculate player information\n $players = array(); $doubles = array();\n foreach($session->listMatches(true) as $match) {\n foreach($match->listPlayerPoints() as $playerId => $points) {\n if(!isset($players[$playerId]) && !isset($doubles[$playerId])) {\n $player = my5280::$instance->getPlayer($playerId);\n if($player) {\n if($player->getType() != 'family') {\n $players[$playerId] = $points;\n $players[$playerId]['id'] = $playerId;\n $players[$playerId]['name'] = $player->getName();\n $players[$playerId]['win%'] = round($players[$playerId]['wins'] / $players[$playerId]['games'] * 100, 2);\n } else {\n $doubles[$playerId] = $points;\n $doubles[$playerId]['id'] = $playerId;\n $doubles[$playerId]['name'] = $player->getName();\n $doubles[$playerId]['win%'] = round($doubles[$playerId]['wins'] / $doubles[$playerId]['games'] * 100, 2);\n }\n }\n } elseif(isset($players[$playerId])) {\n $players[$playerId]['games'] += $points['games'];\n $players[$playerId]['points'] += $points['points'];\n $players[$playerId]['wins'] += $points['wins'];\n $players[$playerId]['win%'] = round($players[$playerId]['wins'] / $players[$playerId]['games'] * 100, 2);\n } else {\n $doubles[$playerId]['games'] += $points['games'];\n $doubles[$playerId]['points'] += $points['points'];\n $doubles[$playerId]['wins'] += $points['wins'];\n $doubles[$playerId]['win%'] = round($doubles[$playerId]['wins'] / $doubles[$playerId]['games'] * 100, 2);\n }\n }\n }\n\n // Sort players on win %\n uasort($players, function($a, $b) {\n if($a['win%'] > $b['win%']) {\n return -1;\n } elseif($a['win%'] < $b['win%']) {\n return 1;\n } elseif($a['games'] > $b['games']) {\n return -1;\n } elseif($a['games'] < $b['games']) {\n return 1;\n } else {\n return strcasecmp($a['name'], $b['name']);\n }\n });\n\n // Sort doubles on win %\n uasort($doubles, function($a, $b) {\n if($a['win%'] > $b['win%']) {\n return -1;\n } elseif($a['win%'] < $b['win%']) {\n return 1;\n } else {\n return 0;\n }\n });\n\n // Display overall standings\n include(MY5280_PLUGIN_DIR . '/templates/standings.php');\n }", "public function get_seasons()\n\t\t{\n\t\t\t$retArr = null;\n\n\t\t\t// Scaffolding Code For Array:\n\t\t\t$objs = $this->obj->find_all();\n\t\t\tforeach($objs as $obj)\n\t\t\t{\n\t\t\t\t$retArr[] = $obj->getBasics();\n\t\t\t} \n\n\t\t\treturn $retArr;\n\t\t}", "function get_all_teams_by_season(){ \n\t$thestandings = get_all_standings();\n\tforeach ($thestandings as $key => $value){\n\t\tif(is_array($value)){\t\n\t\t\t$i = 0;\n\t\t\tforeach ($value as $k => $v){\n\t\t\t\t$standbyyear[$key][$v['teamid']] = $v['division'];\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$standbyyear[$key]['count'] = $i;\n\t\t\t$standbyyear[$key]['games'] = ($i / 2) * 14;\n\t\t}\n\t}\n\treturn $standbyyear;\n}", "public static function isApiConnected()\n {\n return SL::isConnected();\n }", "function get_all_standings(){\n\tglobal $wpdb;\n\t$seasons = the_seasons();\n\t\n\tforeach ($seasons as $season){\n\t\t$allstandings[$season] = get_standings($season);\n\t}\t\n\treturn $allstandings;\n}", "protected function is_rest_api_loaded()\n {\n }", "function get_team_postseason($team){\n\t\n\tglobal $wpdb;\n\t$getplayoffs = $wpdb->get_results(\"select * from wp_playoffs where team = '$team'\", ARRAY_N);\n\t\n\tforeach ($getplayoffs as $revisequery){\n\t\t$playoffs[] = array(\n\t\t\t'playoffid' => $revisequery[0], \n\t\t\t'year' => $revisequery[1], \n\t\t\t'week' => $revisequery[2], \n\t\t\t'playerid' => $revisequery[3],\n\t\t\t'position' => substr($revisequery[3], -2), \n\t\t\t'score' => $revisequery[4],\n\t\t\t'team' => $revisequery[5],\n\t\t\t'versus' => $revisequery[6],\n\t\t\t'overtime' => $revisequery[7],\n\t\t\t'result' => $revisequery[8]\n\t\t);\n\t}\n\t\n\treturn $playoffs;\n}", "public function seasonsListing(Request $request){\n $filters = $request->all();\n $seasons = Season::getAll($filters);\n $seasons_list = view('partials.seasons_list', compact('seasons'));\n $response = [\n 'status'=> 'success',\n 'data' => $seasons_list->render()\n ];\n return json_encode($response);\n }", "public function store(GameSeasonRequest $request)\n {\n // check for overlapping seasons\n $allSeasons = Season::where('game_id', $request->input('game_id'))->get();\n foreach ($allSeasons as $season) {\n if (($request->input('start_date') >= $season->start_date) &&\n ($request->input('start_date') <= $season->end_date) ||\n ($request->input('end_date') >= $season->start_date) &&\n ($request->input('end_date') <= $season->end_date)) {\n return response('{\"start_date\":[\"The dates overlap with an existing season.\"],\"end_date\":[\"The dates overlap with an existing season.\"]}', 422);\n }\n }\n\n // create season\n $created = Season::create($request->all());\n\n // assign sessions to season\n GameSession::where('date', '>=', $created->start_date)->where('date', '<=', $created->end_date)->\n where('game_id', $created->game_id)->update(['season_id' => $created->id]);\n\n // recalculate ELO for new and 'none' season\n App('App\\Http\\Controllers\\PointController')->recalculateGame($created->game_id, 0);\n App('App\\Http\\Controllers\\PointController')->recalculateGame($created->game_id, $created->id);\n\n return response()->json($created);\n }", "private function _isApiCall() {\n\t\tif (strpos($this->httpRequest->getUrl(), '/api/') > 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function isValidStation($apiKey) {\r\n $stmt = $this->con->prepare(\"SELECT idEstacao from estacao WHERE apiKey=?\");\r\n $stmt->bind_param(\"s\", $apiKey);\r\n $stmt->execute();\r\n $stmt->store_result();\r\n $num_rows = $stmt->num_rows;\r\n $stmt->close();\r\n return $num_rows > 0;\r\n }", "public function show_current_season() {\n $roster = $this->set_current_season();\n function get_stats(array $roster) {\n return iterator_to_array(new \\RecursiveIteratorIterator(new \\RecursiveArrayIterator($roster)), false);\n }\n $stats = get_stats($roster);\n return $stats;\n }", "public function getSeasonCount()\n {\n return $this->seasonCount;\n }", "function getSeasonsWithRevision() {\n $sql = \"SELECT s.season_id as season_id, s.year as year \"\n . \"FROM checkup as c \"\n . \"LEFT JOIN season as s ON c.season_id = s.season_id \"\n . \"GROUP BY c.season_id \"\n . \"ORDER BY c.season_id ASC\";\n \n $res = $this->_mysqli->query($sql);\n $data = $this->fetch_all($res, MYSQLI_ASSOC);\n \n return $data;\n }", "function seasonOfChristmas($info, $endDate)\n {\n $dates = array();\n $startDate = mktime (0,0,0,1,1,$info->getYear());\n \n $cal = new calendary($startDate);\n\n $sundays = 0;\n if ($cal->getDayOfWeek() == 0)\n $sundays++;\n \n $key = 'maryMotherOfGod';\n $cal->setLiteralDay('maryMotherOfGod');\n $cal->setRank('SOLEMNITY');\n $cal->setLiturgicalWeek($sundays);\n $cal->setLiturgicalColor('WHITE');\n $cal->setLiturgicalSeason('CHRISTMAS');\n $cal->setPsalterWeek($cal->getLiturgicalWeek()%4);\n $cal->setSundayCycle(($cal->getYear() - 1963) % 3);\n $cal->setWeekdayCycle(($cal->getYear() % 2)); \n\n $dates[$key] = array\n (\n $startDate,\n $cal\n ); \n\n \n if ($info->isEpiphanyOnSix())\n $endDate = mktime(0,0,0,1,6,$info->getYear());\n else\n {\n $endDate = strtotime ('+'.(7-$cal->getDayOfWeek()).' days', $startDate);\n }\n \n\n $startDate = strtotime ('+1 day', $startDate);\n\n while ( $startDate < $endDate)\n {\n \n $cal = new Calendary($startDate);\n \n if ($cal->getDayOfWeek() == 0)\n {\n $key = 'secondSundayOfChristmas';\n $cal->setLiteralDay('Second Sunday of Christmas');\n $cal->setRank('SUNDAY');\n $sundays++;\n $cal->setLiturgicalWeek($sundays);\n }\n else \n {\n $key = $cal->getLiteralDow().'BeforeEpiphany';\n $cal->setLiteralDay($cal->getLiteralDow().' before Epiphany');\n $cal->setRank('WEEKDAY_OF_EPIPHANY');\n $cal->setLiturgicalWeek($sundays+1);\n }\n\n $cal->setLiturgicalColor('WHITE');\n $cal->setLiturgicalSeason('CHRISTMAS');\n $cal->setPsalterWeek($cal->getLiturgicalWeek()%4);\n $cal->setSundayCycle(($cal->getYear() - 1963) % 3);\n $cal->setWeekdayCycle(($cal->getYear() % 2)); \n\n $dates[$key] = array\n (\n $startDate,\n $cal\n ); \n \n $startDate = strtotime ('+1 day', $startDate);\n }\n\n $cal = new calendary($startDate);\n \n $key = 'epiphanyOfOurLord';\n $cal->setLiteralDay('Epiphany of Our Lord');\n $cal->setRank('SOLEMNITY');\n if ($cal->getDayOfWeek() == 0)\n $sundays++;\n $cal->setLiturgicalWeek($sundays);\n $cal->setLiturgicalColor('WHITE');\n $cal->setLiturgicalSeason('CHRISTMAS');\n $cal->setPsalterWeek($cal->getLiturgicalWeek()%4);\n $cal->setSundayCycle(($cal->getYear() - 1963) % 3);\n $cal->setWeekdayCycle(($cal->getYear() % 2)); \n\n $dates[$key] = array\n (\n $startDate,\n $cal\n ); \n \n if ($cal->getDay() == 7 || $cal->getDay() == 8)\n {\n $endDate = strtotime ('+1 days', $startDate);\n }\n else\n {\n $endDate = strtotime ('+'.(7-$cal->getDayOfWeek()).' days', $startDate);\n }\n \n $startDate = strtotime ('+1 day', $startDate);\n\n while ( $startDate < $endDate)\n {\n \n $cal = new Calendary($startDate);\n \n $key = $cal->getLiteralDow().'AfterEpiphany';\n $cal->setLiteralDay($cal->getLiteralDow().' after Epiphany');\n $cal->setRank('WEEKDAY_OF_EPIPHANY');\n $cal->setLiturgicalWeek($sundays);\n $cal->setLiturgicalColor('WHITE');\n $cal->setLiturgicalSeason('CHRISTMAS');\n $cal->setPsalterWeek($cal->getLiturgicalWeek()%4);\n $cal->setSundayCycle(($cal->getYear() - 1963) % 3);\n $cal->setWeekdayCycle(($cal->getYear() % 2)); \n\n $dates[$key] = array\n (\n $startDate,\n $cal\n ); \n \n $startDate = strtotime ('+1 day', $startDate);\n } \n\n $cal = new calendary($startDate);\n \n $key = 'baptismOfTheLord';\n $cal->setLiteralDay('Baptism of the Lord');\n $cal->setRank('SOLEMNITY');\n if ($cal->getDayOfWeek() == 0)\n $sundays++;\n $cal->setLiturgicalWeek($sundays);\n $cal->setLiturgicalColor('WHITE');\n $cal->setLiturgicalSeason('CHRISTMAS');\n $cal->setPsalterWeek($cal->getLiturgicalWeek()%4);\n $cal->setSundayCycle(($cal->getYear() - 1963) % 3);\n $cal->setWeekdayCycle(($cal->getYear() % 2)); \n\n $dates[$key] = array\n (\n $startDate,\n $cal\n ); \n \n return ($dates);\n \n }", "public function allSeasons(): View\n {\n $dates = PoolDate::withCount('events')->orderBy('cycle', 'desc')->orderBy('date')->get();\n $list = [];\n $current = '';\n foreach ($dates as $date) {\n if ($date->cycle != $current) {\n $current = $date->cycle;\n $carbon = Carbon::make(new DateTime($date->date));\n $league = $carbon->dayName.' League';\n $season = $carbon->format('F Y');\n $list[$date->cycle] = ['count' => $date->events_count, 'league' => $league, 'season' => $season];\n } else {\n $list[$current]['count'] = (int) $list[$current]['count'] + (int) $date->events_count;\n }\n }\n\n return view('pool::seasons', compact('list'));\n }", "public function get_playerSeasons() {\n require_once (\"com/tcshl/global/Season.php\");\n $humanReadableSeason = null;\n $seasonIDs = $this->get_playerSeasonIDs();\n $seasonNames = array();\n if ($seasonIDs != 0) {\n foreach ($seasonIDs as $seasonID) {\n $humanReadableSeason = new Season($seasonID);\n $seasonNames[] = $humanReadableSeason->get_humanReadableSeason();\n }\n } else {\n $seasonNames[] = 'N/A - Either this player has never been assigned to a roster or they are D.R.I.L. only.';\n }\n return $seasonNames;\n }", "protected function test() {\n $output = true;\n $results = $this->env->post_to_api(\"get-news-feed\");\n if (!$results) {\n $output = false;\n } else if (property_exists($results, \"error\")) {\n echo \"{$results->error}\\n\";\n echo \"Failed to get news feed.\\n\";\n $output = false;\n } else if (count($results->posts) !== $this->state[\"num_posts\"]) {\n echo \"Failed to get the right number of news feed posts.\\n\";\n $output = false;\n }\n return $output;\n }", "function soccr_get_availible_teams() {\r\n $SoccrCore = new SoccrCore();\r\n $teams = $SoccrCore->GetAvailibleTeams($_GET[\"leagueShortcut\"], $_GET[\"season\"]);\r\n $i = 0;\r\n foreach ($teams as $team):\r\n $arr[$i][\"optionValue\"] = $team->teamID;\r\n $arr[$i][\"optionDisplay\"] = $team->teamName;\r\n $i = $i + 1;\r\n endforeach;\r\n echo json_encode($arr);\r\n die();\r\n }", "public function post_addseason()\n\t\t{\n\t\t\t$retArr = array();\n \n\n\t\t\t// Scaffolding Code For Single:\n\t\t\t$retArr = $this->obj->getBasics();\n\n\t\t\treturn $retArr;\n\t\t}", "private function fillSeason(Season $season) {\n $today = new DateTime();\n $today->setTime(0, 0);\n $tomorrow = new DateTime('tomorrow');\n $tomorrow->setTime(0, 0);\n\n $regs = $this->regattasBySeasonId[$season->id];\n $total = count($regs);\n $current = array(); // regattas happening NOW\n $past = array(); // past regattas from the current season\n $coming = array(); // upcoming schedule\n $placement = array(); // what place in which regatta, indexed by\n // regatta ID\n\n foreach ($regs as $reg) {\n if ($reg->dt_status === null || $reg->dt_status == Regatta::STAT_SCHEDULED)\n continue;\n if ($reg->start_time < $tomorrow && $reg->end_date >= $today) {\n $current[] = $reg;\n }\n if ($reg->end_date < $today) {\n $past[] = $reg;\n }\n if ($reg->start_time >= $tomorrow) {\n $coming[] = $reg;\n }\n\n $manager = $reg->getRpManager();\n $rps = $manager->getParticipation($this->sailor);\n $team = null;\n $placement[$reg->id] = 'N/A';\n foreach ($rps as $rp) {\n // If a sailor has participated in multiple teams, which\n // should not happen, merely report their place for the first\n // team encountered.\n if ($team === null) {\n $team = $rp->team;\n if ($team->dt_rank !== null) {\n $place = $team->dt_rank;\n $num_teams = count($reg->getTeams());\n\n $placement[$reg->id] = sprintf('%d/%d', $place, $num_teams);\n }\n }\n }\n }\n\n // ------------------------------------------------------------\n // SAILOR sailing now\n if (count($current) > 0) {\n usort($current, 'Regatta::cmpTypes');\n $this->addSection($p = new XPort(\"Sailing now\", array(), array('id'=>'sailing')));\n $p->add($tab = new SailorRegattaTable($this->sailor));\n\n foreach ($current as $row => $reg) {\n $tab->addRegattaRow($reg);\n }\n }\n // ------------------------------------------------------------\n // SAILOR coming soon: ONLY if there are no current ones\n elseif (count($coming) > 0) {\n usort($coming, 'Regatta::cmpTypes');\n $this->addSection($p = new XPort(\"Coming soon\"));\n $p->add($tab = new XQuickTable(\n array('class'=>'coming-regattas'),\n array(\"Name\", \"Host\", \"Type\", \"Scoring\", \"Start time\")));\n foreach ($coming as $reg) {\n $tab->addRow(\n array(\n new XA($reg->getURL(), $reg->name),\n $reg->getHostVenue(),\n $reg->type,\n $reg->getDataScoring(),\n $reg->start_time->format('m/d/Y @ H:i')));\n }\n }\n\n // ------------------------------------------------------------\n // SAILOR past regattas\n $season_link = new XA($season->getURL(), $season->fullString());\n $this->addSection($p = new XPort(array(\"Season history for \", $season_link)));\n $p->set('id', 'history');\n\n if (count($past) > 0) {\n $p->add($tab = new SailorRegattaTable($this->sailor));\n\n foreach ($past as $row => $reg) {\n $tab->addRegattaRow($reg);\n }\n }\n else {\n $p->add(\n new XP(\n array('class'=>'notice'),\n sprintf(\n \"It appears %s has not participated in any regattas this season.\",\n $this->sailor->getName()\n )\n )\n );\n }\n\n // ------------------------------------------------------------\n // SCHOOL season summary\n $school_link = new XA($this->sailor->school->getURL(), $this->sailor->school->nick_name);\n $conference_link = $this->sailor->school->conference;\n if (DB::g(STN::PUBLISH_CONFERENCE_SUMMARY) !== null) {\n $conference_link = new XA($this->sailor->school->conference->url, $conference_link);\n }\n $table = array(\n \"Graduation Year\" => $this->sailor->year,\n \"School\" => $school_link,\n DB::g(STN::CONFERENCE_TITLE) => $conference_link,\n \"Number of Regattas\" => $total);\n $this->setHeader($this->sailor->getName(), $table, array('itemprop'=>'name'));\n }", "public function test_scorm_check_and_require_available() {\n global $DB;\n\n $this->setAdminUser();\n\n // User override case.\n $this->scorm->timeopen = time() + DAYSECS;\n $this->scorm->timeclose = time() - DAYSECS;\n list($status, $warnings) = scorm_get_availability_status($this->scorm, true, $this->context);\n $this->assertEquals(true, $status);\n $this->assertCount(0, $warnings);\n\n // Now check with a student.\n list($status, $warnings) = scorm_get_availability_status($this->scorm, true, $this->context, $this->student->id);\n $this->assertEquals(false, $status);\n $this->assertCount(2, $warnings);\n $this->assertArrayHasKey('notopenyet', $warnings);\n $this->assertArrayHasKey('expired', $warnings);\n $this->assertEquals(userdate($this->scorm->timeopen), $warnings['notopenyet']);\n $this->assertEquals(userdate($this->scorm->timeclose), $warnings['expired']);\n\n // Reset the scorm's times.\n $this->scorm->timeopen = $this->scorm->timeclose = 0;\n\n // Set to the student user.\n self::setUser($this->student);\n\n // Usual case.\n list($status, $warnings) = scorm_get_availability_status($this->scorm, false);\n $this->assertEquals(true, $status);\n $this->assertCount(0, $warnings);\n\n // SCORM not open.\n $this->scorm->timeopen = time() + DAYSECS;\n list($status, $warnings) = scorm_get_availability_status($this->scorm, false);\n $this->assertEquals(false, $status);\n $this->assertCount(1, $warnings);\n\n // SCORM closed.\n $this->scorm->timeopen = 0;\n $this->scorm->timeclose = time() - DAYSECS;\n list($status, $warnings) = scorm_get_availability_status($this->scorm, false);\n $this->assertEquals(false, $status);\n $this->assertCount(1, $warnings);\n\n // SCORM not open and closed.\n $this->scorm->timeopen = time() + DAYSECS;\n list($status, $warnings) = scorm_get_availability_status($this->scorm, false);\n $this->assertEquals(false, $status);\n $this->assertCount(2, $warnings);\n\n // Now additional checkings with different parameters values.\n list($status, $warnings) = scorm_get_availability_status($this->scorm, true, $this->context);\n $this->assertEquals(false, $status);\n $this->assertCount(2, $warnings);\n\n // SCORM not open.\n $this->scorm->timeopen = time() + DAYSECS;\n $this->scorm->timeclose = 0;\n list($status, $warnings) = scorm_get_availability_status($this->scorm, true, $this->context);\n $this->assertEquals(false, $status);\n $this->assertCount(1, $warnings);\n\n // SCORM closed.\n $this->scorm->timeopen = 0;\n $this->scorm->timeclose = time() - DAYSECS;\n list($status, $warnings) = scorm_get_availability_status($this->scorm, true, $this->context);\n $this->assertEquals(false, $status);\n $this->assertCount(1, $warnings);\n\n // SCORM not open and closed.\n $this->scorm->timeopen = time() + DAYSECS;\n list($status, $warnings) = scorm_get_availability_status($this->scorm, true, $this->context);\n $this->assertEquals(false, $status);\n $this->assertCount(2, $warnings);\n\n // As teacher now.\n self::setUser($this->teacher);\n\n // SCORM not open and closed.\n $this->scorm->timeopen = time() + DAYSECS;\n list($status, $warnings) = scorm_get_availability_status($this->scorm, false);\n $this->assertEquals(false, $status);\n $this->assertCount(2, $warnings);\n\n // Now, we use the special capability.\n // SCORM not open and closed.\n $this->scorm->timeopen = time() + DAYSECS;\n list($status, $warnings) = scorm_get_availability_status($this->scorm, true, $this->context);\n $this->assertEquals(true, $status);\n $this->assertCount(0, $warnings);\n\n // Check exceptions does not broke anything.\n scorm_require_available($this->scorm, true, $this->context);\n // Now, expect exceptions.\n $this->expectException('moodle_exception');\n $this->expectExceptionMessage(get_string(\"notopenyet\", \"scorm\", userdate($this->scorm->timeopen)));\n\n // Now as student other condition.\n self::setUser($this->student);\n $this->scorm->timeopen = 0;\n $this->scorm->timeclose = time() - DAYSECS;\n\n $this->expectException('moodle_exception');\n $this->expectExceptionMessage(get_string(\"expired\", \"scorm\", userdate($this->scorm->timeclose)));\n scorm_require_available($this->scorm, false);\n }", "public function showSeason($url)\n {\n $season = Season::where('url', $url)->first();\n if(empty($season)){\n abort(404, 'Invalid URL');\n }\n $episodes = $season->episodes;\n $episodes_list = view('partials.episodes_list', compact('episodes'));\n return view('season_detail', compact('season', 'episodes_list'));\n }", "function get_standings($season_id, $division_id)\n{\n\theader('Content-Type: application/json');\n\t$db_connection = db_open();\n\t\n\t/*\n\t * Get standings\n\t */\n\t$query =\n\t'SELECT player_games.player, games, COALESCE(wins, 0) AS wins, COALESCE(games-wins, games) AS losses FROM ' .\n\t\t'(SELECT player, SUM(games) AS games FROM ' .\n\t\t\t'(SELECT player1_id AS player, COUNT(*) AS games FROM matches WHERE division_id=3 GROUP BY player1_id ' .\n\t\t\t' UNION ' .\n\t\t\t' SELECT player2_id AS player, COUNT(*) AS games FROM matches WHERE division_id=3 GROUP BY player2_id) AS player_union ' .\n\t\t'GROUP BY player) AS player_games ' .\n\t'LEFT JOIN ' .\n\t\t'(SELECT winner_id as player, COUNT(*) As wins FROM matches WHERE division_id=' . $division_id . ' GROUP BY winner_id) AS player_wins ' .\n\t'ON player_games.player=player_wins.player ' .\n\t'ORDER BY wins DESC';\t\t\n\t\t\n\tif ($result = $db_connection->query($query))\n\t{\n\t\techo '[';\n\t\t$is_first = TRUE;\n\t\t/* fetch associative array */\n\t\twhile ($row = $result->fetch_assoc())\n\t\t{\n\t\t\tif (!$is_first)\n\t\t\t{\n\t\t\t\techo ',';\n\t\t\t}\n\t\t\t$is_first = FALSE;\n\t\n\t\t\techo '{';\n\t\t\techo '\"player\": ';\n\t\t\techo player_id_to_ref_response($db_connection, $row['player']) . ',';\n\t\t\techo '\"wins\": ' . json_encode($row['wins'], JSON_NUMERIC_CHECK) . ',';\n\t\t\techo '\"losses\": ' . json_encode($row['losses'], JSON_NUMERIC_CHECK);\n\t\t\techo '}';\n\t\t}\n\t\n\t\t/* free result set */\n\t\t$result->free();\n\t\techo ']';\n\t}\n\telse\n\t{\n\t\thttp_response_code(400);\n\t\techo \"Failed query to MySQL: (\" . $db_connection->errno . \") \" . $db_connection->error;\n\t}\t\t\n\t\n\tdb_close($db_connection);\n}", "public function clickSeason(AcceptanceTester $I)\n {\n $I->wantTo('Verify we are taken to the right page when clicking a season listing. - C11006');\n if(SeriesEditCest::$environment == 'staging')\n {\n $guid = TestContentGuids::$seriesViewData_staging;\n }\n else //proto0\n {\n $guid = TestContentGuids::$seriesViewData_proto0;\n }\n $I->amOnPage(ContentPage::$contentUrl . $guid);\n $I->waitForElementVisible(ContentPage::$attributesList, 30);\n $I->scrollTo(\"//span[text()='Season View Filled Data For Automation']\");\n $I->click(\"//span[text()='Season View Filled Data For Automation']\");\n\n $I->expect('We are taken to the page for season content.');\n $I->waitForElementVisible(ContentPage::$attributesList, 30);\n $I->waitForElementVisible(ContentPage::$clickableTable, 30);\n $I->seeInField(ContentPage::$seasonTitleRow_editable, 'Season View Filled Data For Automation');\n $I->see('EPISODES');\n }", "function get_season_id() {\n\t$start_date = 'September 1st, 2007, 12pm';\n\t$start = new DateTime($start_date);\n\n\t$now = new DateTime();\n\t$diff = date_diff($start, $now);\n\n\t$out = ($diff->y * 3) + floor($diff->m / 3);\n\treturn $out;\n}", "public function allSeasons() {\n $startYear = 2013;\n while($startYear <= $this->seasonStart){\n $endYear = $startYear + 1;\n $seasons[] = \"$startYear-$endYear\";\n $startYear++;\n }\n\n //create a list of distances within each season\n $results = [];\n foreach($seasons as $season) {\n $startYear = explode(\"-\", $season)[0];\n $endYear = explode(\"-\", $season)[1];\n $startDate = \"$startYear-09-01\";\n $endDate = \"$endYear-06-01\";\n\n $stmt = $this->db->prepare(\"SELECT SUM(e.distance) as kms, e.username,\n (SELECT colorgroup FROM users WHERE username=e.username LIMIT 1) as colorgroup\n FROM entries e\n WHERE e.date>=:startDate AND e.date<=:endDate\n GROUP BY e.username HAVING kms > 0\n ORDER BY kms DESC\");\n\n $stmt->execute([\n 'startDate' => $startDate,\n 'endDate' => $endDate\n ]);\n\n while($row = $stmt->fetch()) {\n $result = $row;\n $result['lastUpdate'] = $season;\n $results[] = $result;\n }\n }\n\n //sort the resulting list by total kms\n array_multisort( array_column($results, \"kms\"), SORT_DESC, $results );\n\n //add 'place' column\n $i = 0;\n foreach($results as $row) {\n $place = $i + 1;\n $results[$i]['place'] = $place;\n $i++;\n }\n\n $results2['list'] = $results;\n\n return $results2;\n }", "protected function _detectSeason($keyOnly = false)\n {\n // foreach ($this->_seasons as $key => $season)\n // {\n // // list($startDate, $endDate) = $this->_parseSeason($season);\n\n // // if ($this->now->gte($startDate) && $this->now->lte($endDate))\n // if ($this->now->between($startDate, $endDate))\n // {\n // if ($keyOnly)\n // {\n // return $key;\n // }\n\n // return array($startDate, $endDate);\n // }\n // }\n\n // return false;\n\n switch ($this->_getFilter()) {\n case 'season1':\n $season = 0;\n break;\n\n default:\n $season = 1;\n break;\n }\n\n return $this->_parseSeason($this->_seasons[$season]);\n }", "public function get_season_data($season_id)\n {\n\t\t$sql = \"SELECT s.season_id, s.season_name, x.league_id, x.league_name, \n s.effective_range_start, s.effective_range_end\n FROM public.league x\n INNER JOIN public.season s \n \tON s.league_id = x.league_id \n WHERE s.season_id = ? \n AND s.deleted_flag = 'f' \n AND x.deleted_flag = 'f' LIMIT 1 \";// AND \".USER_CAN_ACCESS.\" \";\n return $this->db->query($sql,$season_id)->result_array();\n }", "public function getSeasonMatches($season = null, $league = null)\n {\n // Endpoint for matches\n $endpoint = 'fixtures';\n if ($season === null) {\n // default = 2021\n $season = $this->params->get('api.default_season');\n }\n if ($league === null) {\n // default = 61 => ligue 1\n $league = $this->params->get('api.default_league');\n }\n\n $parameters = array('season' => $season, 'league' => $league);\n\n return $this->getApi($endpoint, $parameters);\n }", "public function testGetChampionships()\n {\n $sport = Sport::first();\n\n $response = $this->get('/api/championships/' . $sport->id);\n\n if ($response->getStatusCode() == 200 || $response->getStatusCode() == 204) {\n\n if ($response->getStatusCode() == 200) { // Test json response structure\n $response->assertJsonStructure([\n '*' => [\n 'id',\n 'name'\n ]\n ]);\n } else {\n $this->assertTrue(true);\n }\n\n } else {\n $this->assertTrue(false);\n }\n\n }", "function callSportsAPI($ApiUrl) {\n $AccessToken = $this->getAccessToken();\n $Response = json_decode($this->ExecuteCurl($ApiUrl . $AccessToken), TRUE);\n if (@$Response['status'] == 'unauthorized' || @$Response['status_code'] == 403) {\n //$AccessToken = $this->generateAccessToken();\n // $Response = json_decode($this->ExecuteCurl($ApiUrl . $AccessToken), TRUE);\n }\n return $Response;\n }", "private function _isApi()\n {\n $requestUri = App::getInstance()\n ->getSuperGlobalVariable()\n ->getServerValue('REQUEST_URI');\n\n if ($requestUri === null) {\n return false;\n }\n\n $requestUri = trim($requestUri, '/');\n if (strpos($requestUri, AbstractAjax::API_PREFIX) === 0) {\n return true;\n }\n\n return false;\n }", "public function isApiReady() {\n return $this->is_api_ready;\n }", "public function isApiError($string) {\n $api_errors = array(sfConfig::get('app_eway_api_error_codes',array(06,22,40,92,96)));\n return in_array($string, $api_errors) ? true : false;\n }", "function svc_getSeasonsByGame($game){\n\tglobal $db;\n\t$query = \"SELECT season_id FROM season_data\";\n\tif ($game!=0){\n\t\t$query .= \" WHERE season_game in ('$game', 0)\";\n\t}\n\twriteLog(4, \"getSeasonsByGame Query: \".$query);\n\t$result = array();\n\t$rs = mysqli_query($db, $query);\n\twriteLog(4, \"getSeasonsByGame returned \".mysqli_num_rows($rs).\" rows\");\n\t$i=0;\n\twhile ($row = mysqli_fetch_assoc($rs)){\n\t\t$result[$i] = $row['season_id'];\n\t\t$i++;\n\t}\n\treturn $result;\n}", "public function get_humanReadableSeason() {\n require_once (\"com/tcshl/global/Season.php\");\n $humanReadableSeason = new Season($this->playerSeasonID);\n return $humanReadableSeason->get_humanReadableSeason();\n }" ]
[ "0.6505487", "0.6454913", "0.61530226", "0.6060564", "0.60341495", "0.5924521", "0.59197", "0.5896501", "0.5891313", "0.58434415", "0.5843438", "0.5799296", "0.57882285", "0.5783515", "0.5774735", "0.5733099", "0.56977075", "0.5625272", "0.55929226", "0.558735", "0.55581045", "0.5551188", "0.5550674", "0.5550378", "0.55454725", "0.5539303", "0.5538716", "0.55094004", "0.5498656", "0.5485569", "0.54693437", "0.5466857", "0.54637045", "0.54539055", "0.5438843", "0.5433064", "0.5433064", "0.5404308", "0.5400006", "0.5395279", "0.53935534", "0.5391446", "0.537845", "0.5372668", "0.5370545", "0.53696877", "0.53476745", "0.5341581", "0.53403246", "0.53395516", "0.53390366", "0.5328745", "0.53250605", "0.53128535", "0.5312398", "0.5306151", "0.52984315", "0.529669", "0.52771884", "0.52766764", "0.52734566", "0.5271478", "0.52710474", "0.526379", "0.5255109", "0.5254054", "0.52276", "0.5226309", "0.521619", "0.521591", "0.52082705", "0.5201894", "0.5197746", "0.5189778", "0.5189195", "0.5171082", "0.5157516", "0.51571095", "0.5147441", "0.51327693", "0.5132497", "0.5113415", "0.51127017", "0.51116765", "0.51047474", "0.5095021", "0.5085192", "0.5083388", "0.5077432", "0.5061939", "0.50599796", "0.5056841", "0.50557244", "0.5052396", "0.5051607", "0.50478464", "0.5034701", "0.50291747", "0.50212514", "0.50051147" ]
0.7163228
0
Test if matchdays api works
Проверить, работает ли API матчдэйсов
public function testGetMatchdays() { $season = Season::first(); $response = $this->get('/api/matchdays/' . $season->id); if ($response->getStatusCode() == 200 || $response->getStatusCode() == 204) { if ($response->getStatusCode() == 200) { $response->assertJsonStructure([ '*' => [ 'id', 'matchday' ] ]); } else { $this->assertTrue(true); } } else { $this->assertTrue(false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWeekly()\n {\n $response = $this->get('/ringkasan-mingguan');\n\n $response->assertStatus(200);\n }", "public function UpcomingResultYesterday () {\n // die('ok');\n $resultInclude = array(\n 'homeTeam' , 'awayTeam' , 'odds'\n );\n $matches = $this->CI->soccerama->matches($resultInclude)->oneDate(date('Y-m-d' , strtotime(\"-1 days\")));\n\t\t\n\n// $matches = json_decode(file_get_contents(API_DIR . \"backup/matches.json\"));\n// dd($matches);\n return $this->checkResultUpComing($matches);\n }", "public function testDateTimeGetPublicHolidays()\n {\n }", "public function test_should_calculate_business_days()\n {\n $startDate = clone $this->date;\n $endDate = $this->date->addMonth()->format('Y-m-d');\n\n $noOfBusinessDays = $this->calculateBusinessDays();\n\n $response = $this->get('calculate/business-days/?start_date=' . $startDate->format('Y-m-d') . '&end_date=' . $endDate);\n $response->assertSuccessful();\n $this->assertEquals($noOfBusinessDays, $response->getContent());\n }", "public function is_day()\n {\n }", "public function actionTestApi(){\n// \t\t$platform = 'dhgate';\n// \t\t$day = \\eagle\\modules\\tracking\\helpers\\TrackingHelper::getPlatformGetHowLongAgoOrderTrackNo($platform);\n// \t\tvar_dump($day);\n\t\t\n\t\t$ignor = \\eagle\\modules\\tracking\\helpers\\TrackingHelper::getUserIgnoredCheckCarriers();\n\t\tvar_dump($ignor);\n\t\texit();\n\t}", "public function test_api_returns_valid_response()\n {\n $events = GetEvents::execute();\n\n $this->assertNotFalse($events);\n }", "public function getDay($day='') \n\t{\n\t\t$matchs=[];\n\t \t$request = \"SELECT * FROM days WHERE day=?\";\n\t \t$results = $this->requestExec($request,array($day));\n\t \twhile ($data = $results->fetch())\n\t \t{\n\t \t\t//RECUPERATION DES DONNEES DES EQUIPES POUR L AFFICHAGE\n\t \t\t$home_team = $this->teammanager->getTeam($data['home_team']);\n\t \t\t$home_name = $home_team->getName();\n\t \t\t$home_flag = $home_team->getFlag();\n\t \t\t$home_alias = $home_team->getAlias();\n\t \t\t$outside_team = $this->teammanager->getTeam($data['outside_team']);\n\t \t\t$outside_name = $outside_team->getName();\n\t \t\t$outside_flag = $outside_team->getFlag();\n\t \t\t$outside_alias = $outside_team->getAlias();\n\t \t\t$deadline = $data['deadline'];\n\t \t\t$deadline = date(\"d-m-Y H:i:s\", strtotime($deadline));\n\t \t\t$score= $data['score'];\n\t \t\t//\n\t \t\tif($score==0)\n\t \t\t{\n\t \t\t\t$score=\"<img src=\\\"assets/img/design/pasdeprono.png\\\" alt=\\\"Pas de score\\\"/>\";\n\t \t\t}\n\t \t\telseif($score==1)\n\t \t\t{\n\t \t\t\t$score=\"<img src=\\\"assets/img/design/victoire.png\\\" alt=\\\"Victoire\\\"/>\";\n\t \t\t}\n\t \t\telseif($score==2)\n\t \t\t{\n\t \t\t\t$score=\"<img src=\\\"assets/img/design/match_nul.png\\\" alt=\\\"Match nul\\\"/>\";\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\t$score=\"<img src=\\\"assets/img/design/defaite.png\\\" alt=\\\"Defaite\\\"/>\";\n\t \t\t}\n\t \t\t$data['home_team']=\"<img src=\\\"$home_flag\\\" title=\\\"$home_name\\\" alt=\\\"$home_name\\\"><span class=\\\" d-none d-lg-inline-block\\\">\" .$home_name.\"</span><span class=\\\" d-inline-block d-lg-none\\\">\" .$home_alias.\"</span>\";\n\t \t\t$data['score'] = $score;\n\t \t\t$data['deadline']= $deadline;\n\t \t\t$data['outside_team']=\"<span class=\\\" d-none d-lg-inline-block\\\">\" .$outside_name.\"</span><img src=\\\"$outside_flag\\\" title=\\\"$outside_name\\\" alt=\\\"$outside_name\\\"><span class=\\\" d-inline-block d-lg-none\\\">\" .$outside_alias.\"</span>\";\n\t \t$matchs[]=new day($data);\n\t \t}\n\t \t// ON RETOURNE UN TABLEAU DES MATCHS D UNE JOURNEE POUR L AFFICHAGE\n\t \t\n\t \treturn $matchs;\n\t}", "public function testgetMatches()\n {\n // Invoque api\n $response = $this->json('GET', '/api/match');\n\n // Assert Json Structure\n $response->assertJsonStructure([$this->structure]);\n // Assert Status Code\n $response->assertStatus(200);\n }", "public function testGetFiveDaysForecast()\n {\n $input = 'sydney';\n $result = $this->service->getFiveDaysForecast($input);\n\n $this->assertCount(5, $result['data']);\n\n $forecast = $result['data'][0];\n\n $this->assertArrayHasKey('datetime', $forecast);\n $this->assertArrayHasKey('weather', $forecast);\n $this->assertArrayHasKey('high_temp', $forecast);\n $this->assertArrayHasKey('low_temp', $forecast);\n $this->assertArrayHasKey('pop', $forecast);\n }", "private function my_availability() {\n\t\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\t//if(isset($_GET['doc_id'])) {\n\t\t\t\t\tif(!isset($_POST['start_date'])) {\n\t\t\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter start_Date is required\");\n\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t\t}\n\t\t\t\t\tif(!isset($_POST['end_date'])) {\n\t\t\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter To end_date is required\");\n\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t\t}\n\t\t\t\t\tif(!isset($_POST['from_time'])) {\n\t\t\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter from_time is required\");\n\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t\t}\n\t\t\t\t\tif(!isset($_POST['to_time'])) {\n\t\t\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter to_time is required\");\n\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t\t}\n\t\t\t\t\tif(!isset($_POST['address_to_visit'])) {\n\t\t\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter address_to_visit is required\");\n\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t\t}\n\t\t\t\t\tif(!isset($_POST['doct_visit_state'])) {\n\t\t\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter doct_visit_state is required\");\n\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t\t}\n\t\t\t\t\tif(!isset($_POST['doct_visit_city'])) {\n\t\t\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter doct_visit_city is required\");\n\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t\t}\n\t\t\t\t\tif(!isset($_POST['doct_visit_district'])) {\n\t\t\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter doct_visit_district is required\");\n\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t\t}\n\t\t\t\t\tif(!isset($_POST['doct_visit_pincode'])) {\n\t\t\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter doct_visit_pincode is required\");\n\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t\t}\n\t\t\t\t\tif(!isset($_POST['doc_id'])) {\n\t\t\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter doct_visit_pincode is required\");\n\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t\t}\n\n\t\t\t\t\t$doc_id = $this->_request['doc_id'];\n\t\t\t\t\t$start_date = isset($this->_request['start_date']) ? $this->_request['start_date'] : '';\n\t\t\t\t\t$end_date = isset($this->_request['end_date']) ? $this->_request['end_date'] : '';\n\t\t\t\t\t$from_time = isset($this->_request['from_time']) ? $this->_request['from_time'] : '';\n\t\t\t\t\t$to_time = isset($this->_request['to_time']) ? $this->_request['to_time'] : '';\n\t\t\t\t\t$doct_visit_address = isset($this->_request['address_to_visit']) ? $this->_request['address_to_visit'] : '';\n\t\t\t\t\t$doct_visit_state = isset($this->_request['doct_visit_state']) ? $this->_request['doct_visit_state'] : '';\n\t\t\t\t\t$doct_visit_city = isset($this->_request['to_time']) ? $this->_request['doct_visit_city'] : '';\n\t\t\t\t\t$doct_visit_district = isset($this->_request['to_time']) ? $this->_request['doct_visit_district'] : '';\n\t\t\t\t\t$doct_visit_pincode = isset($this->_request['to_time']) ? $this->_request['doct_visit_pincode'] : '';\n\t\t\t\t\t$created_at = date('Y-m-d H:i:s');\n\t\t\t\t\t$updated_at = date('Y-m-d H:i:s');\n\t\t\t\t\t$dateRange = $this->createDateRangeArray($start_date, $end_date);\n\n\n\t\t//Count date in difference\n\t\t\t/*$diff = abs(strtotime($end_date) - strtotime($start_date));\n\t\t\t$years = floor($diff / (365*60*60*24));\n\t\t\t$months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24));\n\t\t\t$days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));*/\n\t\t\t\t\tif(!empty($start_date) && !empty($end_date) && !empty($from_time) && !empty($to_time) && !empty($doct_visit_address) && !empty($doct_visit_state) && !empty($doct_visit_city) && !empty($doct_visit_pincode) ) {\n\t\t\t\t\t\t$sql = \"SELECT `doctor_availability`.`start_date`, `doctor_availability`.`end_date`, `doctor_availability`.`from_time`, `doctor_availability`.`to_time`, `doctor_availability_place`.`doc_id` FROM doctor_availability INNER JOIN `doctor_availability_place` ON `doctor_availability_place`.`id` = `doctor_availability`.`doc_ava_pla_id` WHERE `doctor_availability_place`.`doc_id` = \".$doc_id.\" and `doctor_availability`.`start_date`='\".$start_date.\"' LIMIT 1\";\n\t\t\t\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\t\t\t$stmt->execute();\n\t\t\t\t\t $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t\t\t/*$check_doctor_availability = \"SELECT doc_id,end_date FROM doctor_availability WHERE doc_id = \".$doc_id.\" AND is_delete='0' LIMIT 1\";\n\t\t\t\t\t\t$stmt = $this->db->prepare($check_doctor_availability);\n\t\t\t\t\t\t$stmt->execute();\n\t\t\t\t\t $records = $stmt->fetchAll(PDO::FETCH_ASSOC);*/\n\t\t\t\t\t\t$fetch_end_date = !empty($results) ? strtotime($results[0]['end_date']) : '';\n\t\t\t\t\t\t$fetch_doc_id = !empty($results) ? strtotime($results[0]['doc_id']) : '';\n\t\t\t\t\t\t$today_date = strtotime(date(\"Y-m-d\"));\n\t\t\t\t\t\tif($today_date > $fetch_end_date){\n\t\t\t\t\t\t\t$date_query = \"UPDATE doctor_availability SET `is_delete`='1' \";\n\t\t\t\t\t\t\t$execute = $this->db->query($date_query);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(empty($results)) {\n\t\t\t\t\t\t\tif(count($this->createDateRangeArray($start_date, $end_date))=='1') {\n\t\t\t\t\t\t\t\t$sql = \"INSERT INTO doctor_availability_place (`doc_id`, `doct_visit_address`, `doct_visit_district`,`doct_visit_city`, `doct_visit_state`, `doct_visit_pincode`)\n\t\t\t\t\t\t\t\t\t\t\t\tVALUES (\".$doc_id.\", '\".$doct_visit_address.\"', '\".$doct_visit_district.\"', '\".$doct_visit_state.\"' , '\".$doct_visit_city.\"' , '\".$doct_visit_pincode.\"' )\";\n\t\t\t\t\t\t\t\t$execute = $this->db->query($sql);\n\t\t\t\t\t\t\t\t$sql = \"SELECT id FROM doctor_availability_place ORDER BY id DESC LIMIT 1\";\n\t\t\t\t\t\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\t\t\t\t\t$searchResult = $stmt->execute();\n\t\t\t\t\t\t\t\t$results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t\t\t\t\t$doctor_availability_place_id = $results[0]['id'];\n\n\t\t\t\t\t\t\t\t$sql = \"INSERT INTO doctor_availability (`doc_ava_pla_id`, `start_date`, `end_date`, `from_time`, `to_time`, `created_at`, `updated_at`)\n\t\t\t\t\t\t\t\t\t\t\t\tVALUES (\".$doctor_availability_place_id.\",'\".$start_date.\"','\".$end_date.\"', '\".$from_time.\"', '\".$to_time.\"', '\".$created_at.\"', '\".$updated_at.\"' )\";\n\t\t\t\t\t\t\t\t$execute = $this->db->query($sql);\n\t\t\t\t\t\t\t\t/*$sql_query = \"INSERT doctor_availability_place SET `doct_visit_address`='\".$doct_visit_address.\"', `doct_visit_city`='\".$doct_visit_city.\"', `doct_visit_district`='\".$doct_visit_district.\"',`doct_visit_state`='\".$doct_visit_state.\"',`doct_visit_pincode`='\".$doct_visit_pincode.\"' \";\n\t\t\t\t\t\t\t\t$execute = $this->db->query($sql_query);*/\n\t\t\t\t\t\t\t\t$error = array('status' => \"Success\", \"msg\" => \"Data inserted successfully\");\n\t\t\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t\t\t\t} else{\n\t\t\t\t\t\t\t\t$sql = \"INSERT INTO doctor_availability_place (`doc_id`, `doct_visit_address`, `doct_visit_district`,`doct_visit_city`, `doct_visit_state`, `doct_visit_pincode`)\n\t\t\t\t\t\t\t\t\t\t\t\tVALUES (\".$doc_id.\", '\".$doct_visit_address.\"', '\".$doct_visit_district.\"', '\".$doct_visit_state.\"' , '\".$doct_visit_city.\"' , '\".$doct_visit_pincode.\"' )\";\n\t\t\t\t\t\t\t\t$execute = $this->db->query($sql);\n\t\t\t\t\t\t\t\t$sql = \"SELECT id FROM doctor_availability_place ORDER BY id DESC LIMIT 1\";\n\t\t\t\t\t\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\t\t\t\t\t$searchResult = $stmt->execute();\n\t\t\t\t\t\t\t\t$results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t\t\t\t\t$doctor_availability_place_id = $results[0]['id'];\n\t\t\t\t\t\t\t\tforeach($dateRange as $dr) {\n\t\t\t\t\t\t\t\t\t\t$sql = \"INSERT INTO doctor_availability\n\t\t\t\t\t\t\t\t\t\t(`doc_ava_pla_id`, `start_date`, `end_date`, `from_time`, `to_time`, `created_at`, `updated_at`)\n\t\t\t\t\t\t\t\t\t\tVALUES (\".$doctor_availability_place_id.\",'\".$dr.\"','\".$dr.\"', '\".$from_time.\"', '\".$to_time.\"', '\".$created_at.\"', '\".$updated_at.\"' )\";\n\t\t\t\t\t\t\t\t\t\t$execute = $this->db->query($sql);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/*$sql_query = \"UPDATE doctor_user SET `du_address`='\".$doct_visit_address.\"', `du_city`='\".$doct_visit_city.\"', `du_district`='\".$doct_visit_district.\"',`du_state`='\".$doct_visit_state.\"',`du_pincode`='\".$doct_visit_pincode.\"' WHERE `du_id` = \".$doc_id.\" \";\n\t\t\t\t\t\t\t\t$execute = $this->db->query($sql_query);*/\n\t\t\t\t\t\t\t\t$error = array('status' => \"Success\", \"msg\" => \"Data inserted successfully\");\n\t\t\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else{\n\t\t\t\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Data of this Date already inserted\");\n\t\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else{\n\t\t\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Please input all the fields\");\n\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t\t}\n\t\t\t/*}else{\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"No Doctor found\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}*/\n\t\t}", "protected function ensureAPIData() {\n if (!isset($this->apiData)) {\n $client = new GuzzleHttp\\Client();\n try {\n $res = $client->request('GET', 'http://digital2.library.unt.edu/edtf/isValid.json', array(\n 'timeout' => 10,\n 'query' => array(\n 'date' => $this->dateString,\n ),\n ));\n }\n catch (GuzzleHttp\\Exception\\GuzzleException $guzzle_exception) {\n\n }\n if (isset($res) && $res->getStatusCode() == 200) {\n $this->apiData = $res->getBody();\n $this->apiDataJson = json_decode($this->apiData, TRUE);\n $this->valid = $this->apiDataJson['validEDTF'] === TRUE;\n }\n }\n }", "public function day_aye()\n {\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, \"https://salamquran.com/fa/api/v6/aya/day\");\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $output = curl_exec($curl);\n\n $departed = json_decode($output, true);\n echo ($departed['result']['text']);\n }", "public abstract function get_days();", "public function testMatchExactDateFilter()\n {\n $isSuccessful = false;\n $this->_setHotelData();\n //Check if hotel data exists\n if(count($this->_hotelData) > 0) {\n //Check if first city data has more than zero city records\n $firstCityHotelsData = current($this->_hotelData);\n if(count($firstCityHotelsData) > 0) {\n $firstHotelData = current($firstCityHotelsData);\n $filters['dateRange'] = count($firstHotelData->availability) > 0 ? $firstHotelData->availability[0] : null;\n if(!is_null($filters['dateRange'])) {\n $filters['dateRange'] = $filters['dateRange']->to;\n }\n $filteredData = $this->_getFilteredData($filters);\n foreach ($filteredData as $hotelRecord) {\n $availability = count($hotelRecord->availability) ? $hotelRecord->availability[0] : null;\n\n if ( $availability <= $filters['dateRange'] || $availability >= $filters['dateRange']) {\n $isSuccessful = true;\n break;\n }\n }\n }\n }\n $this->assertTrue($isSuccessful);\n }", "public function testGetForSNCLessFecha()\n {\n $client = static::createClient();\n $client->followRedirects();\n $params = [\n 'puntoatencion' => 23,\n 'fecha' => '2017-11-03'\n ];\n\n $externalService = new SNCExternalServiceMock($this->getContainer());\n $signedParams = $externalService->getTestSignedBody($params, false);\n\n $client->request('POST', '/api/v1.0/integracion/turnos/fecha', $signedParams);\n $this->assertEquals(400, $client->getResponse()->getStatusCode());\n }", "public function checkFlightsAvailability(){\n \n }", "public function getMatchdays()\n {\n $db = $this->getDbo();\n $query = $db->getQuery(true);\n $id_system = HockeyHelper::getSezon();\n \n $query->select('m.id_kolejka')\n ->from('#__hockey_match AS m')\n ->where(' m.id_system = '.$db->quote($id_system) .' AND m.type_of_match =0')\n ->group('m.id_kolejka')\n ->order('m.id_kolejka');\n\n // Setup the query\n $db->setQuery($query);\n\n // Return the result\n return $db->loadColumn();\n }", "public function testResolvedWithFuglyUrls(){\n $client = $this->httpClient->get(self::ROUTE_FUGLY);\n $response = $client->json();\n $this->assertAlways($client, $response, __FUNCTION__);\n $this->assertContains('America/Denver', $response);\n }", "public function testInputValidation()\n {\n foreach ($this->testCases as $testCase){\n $this->get('/api/carbon-offset-schedule?subscriptionStartDate='.$testCase['input'][0].'&scheduleInMonths='.$testCase['input'][1].'', $this->headers);\n $this->assertResponseStatus($testCase['responce_code']);\n $this->assertJson(json_encode($testCase['responce']));\n }\n }", "public function testIsWeekend()\n {\n $this->assertTrue($this->getCalculator()->isWeekend('2019-05-04'));\n $this->assertTrue($this->getCalculator()->isWeekend('2019-05-05'));\n }", "public function checkFlightsAvailability();", "public function testIsHoliday()\n {\n $this->assertTrue($this->getCalculator()->isHoliday('2019-05-31'));\n $this->assertTrue($this->getCalculator()->isHoliday('2019-05-23'));\n $this->assertTrue($this->getCalculator()->isHoliday('2019-05-24'));\n }", "public function testGetNonBusinessDayById()\n {\n }", "function wpcomstats_check_days($days) {\r\n\tif ($days != 1 && $days != 7 && $days != 30) {\r\n\t\treturn 0;\r\n\t} else {\r\n\t\treturn $days;\r\n\t}\r\n}", "public function test_get_session_table()\n {\n\n $date='2018-07-13';\n $response = $this->post(route('scheduling',[\n 'start_date'=>$date,\n 'days'=>[\n 2,3,5\n ],\n 'sessions'=>2\n ]));\n\n $testDate=Carbon::createFromFormat('Y-m-d',$date)->addDay(2);\n\n $response->assertSee($testDate->format('D d-M-Y'));\n }", "public function searchAmountsByDate($date,$deputy_id)\n { \n //Transformando data para o formato \"Y/m\"\n $date = substr(str_replace(\"-\",\"/\",$date),0,-3);\n try{\n //Espera de 1 segundo para não sobrecarregar a API \n sleep(1);\n //Consumindo verbas indenizatorias de um deputado em uma data especifica\n $response = $this->client->request( 'GET', \n 'ws/prestacao_contas/verbas_indenizatorias/legislatura_atual/deputados/'\n .$deputy_id.'/'.$date);\n //Convertendo os dados de XML para string contendo a representação JSON\n $response_json_string = json_encode(simplexml_load_string($response->getBody()->getContents()));\n //Convertendo a string em um JSON\n $responses = json_decode( $response_json_string );\n $total = 0;\n\n //Verifica se a requisição foi realizada com sucesso\n if( $response->getStatusCode() == 200 ){\n /* \n * Verifica se existe um array de verbas, se existir pega cada valor reembolsado\n * e adiciona a uma variavel $total\n */ \n if(is_array($responses->resumoVerba)){\n foreach($responses->resumoVerba as $founds){\n if(is_array($founds->listaDetalheVerba->detalheVerba)){\n foreach($founds->listaDetalheVerba->detalheVerba as $found){\n $total += intval($found->valorReembolsado);\n }\n } \n }\n }else{\n if(isset($responses->resumoVerba)){\n if($responses->resumoVerba != null){\n if(is_array($responses->resumoVerba->listaDetalheVerba->detalheVerba)){\n foreach($responses->resumoVerba->listaDetalheVerba->detalheVerba as $found){\n $total += intval($found->valorReembolsado);\n }\n }else{\n $total += intval($responses->resumoVerba->listaDetalheVerba->detalheVerba->valorReembolsado);\n } \n }\n }\n }\n return $total;\n }else{\n echo \"\\nAlgum erro inesperado ocorreu ao buscar os dados dos deputados na API\\n\\n\";\n }\n }catch(RequestException $e){\n echo \\GuzzleHttp\\Psr7\\str($e->getRequest());\n if ($e->hasResponse()) {\n echo \\GuzzleHttp\\Psr7\\str($e->getResponse());\n }\n }catch (ClientException $e){\n echo \\GuzzleHttp\\Psr7\\str($e->getRequest());\n echo \\GuzzleHttp\\Psr7\\str($e->getResponse());\n }\n }", "function have_days_passed(){\n\t\t\t//$have_days_passed = (($this->days_passed() > 0) ? true : false);\n\t\t\tif($this->days_passed() > 0){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "function _noaa_weather_get_forecast($lat, $lon, $days) {\n //$url = \"http://www.weather.gov/forecasts/xml/SOAP_server/ndfdSOAPclientByDay.php?lat=$lat&lon=$lon&format=12+hourly&startDate=&numDays=$days&Submit=Submit\";\n \n $url = \"http://graphical.weather.gov/xml/SOAP_server/ndfdSOAPclientByDay.php?lat=$lat&lon=$lon&format=12+hourly&startDate=&numDays=$days&Submit=Submit\";\n \n\t$headers = array(\n\t\t\t\t'Content-Type' => 'text/xml',\n\t\t\t\t'Accept-Charset' => 'utf-8'\n\t\t\t\t);\n\t$response = drupal_http_request($url, $headers, $method = 'GET', $data = NULL, $retry = 0);\n\t\n\t\n\n\t\n\t$responsexml = preg_replace('/&/msU', '&amp;', $response->data);\n\t$responsexml = preg_replace('/[^(\\x20-\\x7F)]*/','', $responsexml);\n\t$xml = @simplexml_load_string($responsexml);\n \n $extended = variable_get('noaa_weather_forecast',array());\n //If we have a valid object, run our forecast\n if (!is_object($xml)) {\n watchdog('noaa_weather', t('NOAA Weather Extended Forecast failed to load!'),array(), WATCHDOG_ERROR, NULL); \n } else {\n \t//Set parameter and timelayout parameters from simpleXML generated from raw NOAA data\n \t$data = $xml->data;\n \t$parameters = $xml->data->parameters;\n \t$timelayout0 = $xml->data->{'time-layout'}[0];\n \t$timelayout1 = $xml->data->{'time-layout'}[1];\n \t$timelayout2 = $xml->data->{'time-layout'}[2];\n //Days.\n\t\t$dayi=0;\n foreach ($timelayout2->{'start-valid-time'} as $daytime) {\n \t$attribs = $daytime->attributes();\n \t$period_name = $attribs['period-name'];\n \t$daytime_array = explode('T', $daytime);\n \t$day_array = explode('-', $daytime_array[0]);\n \t$time_array = explode('-', $daytime_array[1]);\n \t$day_ts = mktime(0, 0, 0, (int)$day_array[1], (int)$day_array[2], (int)$day_array[0]);\n \tif ($dayi % 2) {\n\t \t$curdayi = $dayi-1;\n\t \t$extended[$curdayi/2]['period_name2'] = t(trim($period_name));\n\t \t$extended[$curdayi/2]['dayts2'] = t(trim($day_ts)); \n\t $extended[$curdayi/2]['daystr2'] = t(trim($daytime));\n\t $extended[$curdayi/2]['daystrformated2'] = t(date('l',$day_ts));\n \t} else {\n\t \t$extended[$dayi/2]['period_name1'] = t(trim($period_name));\n\t \t$extended[$dayi/2]['dayts1'] = t(trim($day_ts)); \n\t $extended[$dayi/2]['daystr1'] = t(trim($daytime));\n\t $extended[$dayi/2]['daystrformated1'] = t(date('l',$day_ts)); \n \t}\n $dayi++;\n }\n //Max daily temp.\n $max_temp_array = $parameters->temperature[0]->value;\n $maxi = 0;\n foreach ($max_temp_array as $max_temp) {\n if (!empty($max_temp)) {\n $extended[$maxi]['temperature_max'] = trim($max_temp); \n }\n\n $maxi++;\n }\n //Min daily temp.\n $min_temp_array = $parameters->temperature[1]->value;\n $mini =0 ;\n foreach ($min_temp_array as $min_temp) {\n if (!empty($min_temp)) {\n $extended[$mini]['temperature_min'] = trim($min_temp); \n }\n $mini++;\n }\n //Probability of percipitation.s\n $popi = 0;\n foreach ($parameters->{'probability-of-precipitation'}->value as $pop) {\n $popval = (array)$pop;\n if($popi%2){ \n $popi2 = ($popi-1)/2; // set index for correct day\n $extended[$popi2]['probability_of_precipitation2'] = t($popval[0]);\n }else{\n $popi1 = $popi/2; // set index for correct day\n $extended[$popi1]['probability_of_precipitation1'] = t($popval[0]);\n }\n $popi++;\n }\n //loop weather-condition obj assigning 0 and 12 hour values for each day index\n $wsi = 0;//set weather summary index \n foreach ($parameters->weather->{'weather-conditions'} as $weather_summary) {\n $wsvalarray = (array)$weather_summary;\n $wsval = $wsvalarray['@attributes']['weather-summary'];\n if($wsi%2){ \n $wsi2 = ($wsi-1)/2; // set index for correct day\n $extended[$wsi2]['weather_summary2'] = t($wsval);\n }else{\n $wsi1 = $wsi/2; // set index for correct day\n $extended[$wsi1]['weather_summary1'] = t($wsval);\n }\n $wsi++;\n }\n //loop conditions-icon obj assigning 0 and 12 hour values for each day index\n $ci = 0;//set conditions icon index \n foreach ($parameters->{'conditions-icon'}->{'icon-link'} as $conditions_icon){\n $icon = (array)$conditions_icon;\n $cipval = str_replace('http://www.nws.noaa.gov/weather/images/fcicons/','',$conditions_icon[0]);\n if($ci%2){ \n $ci2 = ($ci-1)/2;\n $extended[$ci2]['conditions_icon2'] = $cipval;\n $extended[$ci2]['local_conditions_icon2'] = $cipval;\n }else{\n $ci1 = $ci/2;\n $extended[$ci1]['conditions_icon1'] = $cipval;\n $extended[$ci1]['local_conditions_icon1'] = $cipval;\n }\n $ci++;\n }\n //Log to watchdog.\n watchdog('noaa_weather', t('NOAA Weather: Forecast loaded successfully!'), array(), WATCHDOG_NOTICE, NULL);\n //Set the Current Conditions variable\n variable_set('noaa_weather_forecast',$extended);\n }\n}", "function checkDay(){\n global $firstclass, $days, $err;\n $day_start = strtoupper(substr(date('D', (strtotime($firstclass))), 0, 2));\n if (strpos($days, $day_start) !== false){\n return true;\n }\n $err = \"ERR_DAY_MISMATCH\";\n return false;\n}", "public function testFactoy()\n {\n //given\n $url = (env('APP_URL') == \"http://localhost\") ? $this->urlApi : $this->urlProd;\n $urlsToTest = [\n 'now_playing' => $url.ViewState::NOW_PLAYING,\n 'popular' => $url.ViewState::POPULAR,\n 'upcoming' => $url.ViewState::UPCOMING,\n 'my' => $url.ViewState::MY,\n 'category' => $url.ViewState::CATEGORY,\n 'error' => $url.ViewState::ERROR,\n ];\n $headers = $this->getHeaders();\n\n //when\n $responseNowPlaying = $this->get($urlsToTest['now_playing'], $headers);\n $responsePopular = $this->get($urlsToTest['popular'], $headers);\n $responseUpcoming = $this->get($urlsToTest['upcoming'], $headers);\n $responseMy = $this->get($urlsToTest['my'], $headers);\n $responseCategory = $this->get($urlsToTest['category'], $headers);\n $responseError = $this->get($urlsToTest['error'], $headers);\n \n //then\n $responseNowPlaying->assertStatus(ResponseCode::HTTP_OK);\n $responsePopular->assertStatus(ResponseCode::HTTP_OK);\n $responseUpcoming->assertStatus(ResponseCode::HTTP_OK);\n $responseMy->assertStatus(ResponseCode::HTTP_OK);\n $responseCategory->assertStatus(ResponseCode::HTTP_OK);\n $responseError->assertStatus(ResponseCode::HTTP_NOT_FOUND);\n }", "public function testnumber_of_weekdays() {\r\n $this->assertEquals(22, $this->date_util->number_of_weekdays(\r\n new DateTime(\"2018-07-01 00:00:00\"), new DateTime(\"2018-08-01 00:00:00\"), \"days\"));\r\n // A whole calendar month minus one second\r\n $this->assertEquals(21, $this->date_util->number_of_weekdays(\r\n new DateTime(\"2018-07-01 00:00:00\"), new DateTime(\"2018-07-31 23:59:59\"), \"days\"));\r\n // A whole inverted calendar month\r\n $this->assertEquals(22, $this->date_util->number_of_weekdays(\r\n new DateTime(\"2018-08-01 00:00:00\"), new DateTime(\"2018-07-01 00:00:00\"), \"days\"));\r\n }", "function _openfec_api_get_schedules_schedule_f() {\n require_once(dirname(__DIR__) . '/api.php'); // OpenFEC api\n $openfec_api = new OpenFECAPI();\n\n if (!empty($openfec_api)) {\n // Do the API call to '/schedules/schedule_f/'\n $response = $openfec_api->call(\"/schedules/schedule_f/\");\n if (!empty($response)) {\n return $response;\n }\n }\n return FALSE;\n}", "public function checkDateNoRecursion()\n\t{\n\t\t$this->dataFromPost();\n\t\t$startTime = $this->time($this->selectedStartHour,\n\t\t\t$this->selectedStartMinute,$this->selectedMonth,\n\t\t\t$this->selectedDay, $this->selectedYear);\n\t\t$endTime = $this->time($this->selectedEndHour,\n\t\t\t$this->selectedEndMinute,$this->selectedMonth,\n\t\t\t$this->selectedDay, $this->selectedYear);\n\t\t$startDay = $this->startDay($this->selectedMonth, $this->selectedDay,\n\t\t\t$this->selectedYear);\n\t\t$endDay = $this->endDay($this->selectedMonth, $this->selectedDay,\n\t\t\t$this->selectedYear);\n\n\t\t$dayOfWeek = date('w', $startTime);\n\t\tif(6 == $dayOfWeek || 0 == $dayOfWeek)\n\t\t{\n\t\t\t$this->error['ERROR'] = ERROR_WEEKEND;\n\t\t\treturn $this->error;\n\t\t}\n\t\t$eventCurrentDay = $this->queryToDbObj->getEventSelectedDayAndRoom(\n\t\t\t$startDay, $endDay, $this->room);\n\n\t\tif(empty($eventCurrentDay))\n\t\t{\n\t\t\tif($endTime > $startTime\n\t\t\t\t&& $this->currentTime < $startTime\n\t\t\t\t&& $startTime != $endTime)\n\t\t\t{\n\t\t\t\t$arr = $this->queryToDbObj->setEvent($this->description,\n\t\t\t\t\t$this->employee, $startTime, $endTime, $this->room);\n\t\t\t\treturn $arr;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->error['ERROR_DATA'] = ERROR_WRONG_DATA;\n\t\t\t\treturn $this->error;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$cnt = 0;\n\t\t\tif ($endTime > $startTime\n\t\t\t\t&& $this->currentTime < $startTime\n\t\t\t\t&& $startTime != $endTime)\n\t\t\t{\n\t\t\t\tforeach ($eventCurrentDay as $key => $value)\n\t\t\t\t{\n\t\t\t\t\tif($value['end'] <= $startTime\n\t\t\t\t\t\t|| $value['start'] >= $endTime)\n\t\t\t\t\t{\n\t\t\t\t\t\t$cnt++;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->error['ERROR_DATA'] = ERROR_BUSY;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->error['ERROR_DATA'] = ERROR_WRONG_DATA;\n\t\t\t}\n\t\t\tif(count($eventCurrentDay) == $cnt)\n\t\t\t{\n\t\t\t\t$this->queryToDbObj->setEvent($this->description,\n\t\t\t\t\t$this->employee, $startTime, $endTime, $this->room);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn $this->error;\n\t\t\t}\n\t\t}\n\t}", "public function testAllFromWithDateTime() {\n\t\t$response = $this->getFixture( 'time-entries' );\n\t\t$expectedArray = $response['time_entries'];\n\n\t\t$updatedSince = new DateTime( '2017-06-26 00:00:00', new DateTimeZone( 'Europe/Zurich' ) );\n\n\t\t$api = $this->getApiMock();\n\t\t$api->expects( $this->once() )\n\t\t\t->method( 'get' )\n\t\t\t->with( '/time_entries', [ 'from' => $updatedSince->format( 'Y-m-d' ) ] )\n\t\t\t->will( $this->returnValue( $response ) );\n\n\t\t$this->assertEquals( $expectedArray, $api->all( [ 'from' => $updatedSince ] ) );\n\t}", "public function testGetLastSevenDaysGiftVoucherValuesForBusinessRespondWithBusinessNotFoundError(){\n $this->assertSame('Business not found', $this->LastSevenDaysReport->getLastSevenDaysGiftVoucherValuesForBusiness( 9000, \"2015-12-19\"));\n }", "public function PeriodoPaqueteTest()\n\n {\n $fechaInicio='2019-08-17';\n $intervalo='P7D';\n $fechaFinal='2019-08-25';\n \n $response=$this->\n json('GET',\n '/api/periodopaquete/'.$fechaInicio.'/'.$fechaFinal);\n $response->assertStatus(200);//Si hay respuesta\n $response->assertJson(['r'=>20]);\n \n $this->assertTrue(true);\n\n }", "public function testExample()\n {\n $this->get('/api/agenda/1')\n ->seeJsonEquals([\n 'message' => \"Nenhuma Agenda foi identificada !\",\n ]);\n\n $this->get('/api/agenda')\n ->seeJsonEquals([\n 'message' => \"Nenhuma agenda foi encontrada para o filtro executado!\",\n ]);\n\n $this->get('/api/agenda?datade=20/08/2019&dataate=22/08/2019')\n ->seeJsonEquals([\n 'message' => \"Nenhuma agenda foi encontrada para o filtro executado!\",\n ]);\n\n $this->delete('/api/agenda/123')\n ->seeJsonEquals([\n 'message' => \"Nenhuma Agenda foi identificada para a exclusao !\",\n ]);\n\n $this->delete('/api/agenda/7')\n ->seeJsonEquals([\n 'message' => \"Exclusao efetuada com sucesso !\",\n ]);\n \n $this->get('/api/agendaall')\n ->assertEquals(200,$this->response->status());\n\n $this->get('/api/agenda')\n ->assertEquals(200,$this->response->status());\n \n\n }", "public function testMissingDateThrowsError()\n {\n new \\RestorationMedia\\RestorationMediaApi(new Client(), 'EXAMPLE', 'test@example.com', '255.255.255.255', 'www.example.com', '');\n }", "public function testGetDay(): void\n {\n $model = Time::load([\n \"day\" => 46290,\n ], $this->container);\n\n $this->assertSame(46290, $model->getDay());\n }", "abstract public function isIn($day);", "public function testGetNonBusinessDayByFilter()\n {\n }", "public function testCheckAvailability($id)\n {\n $dates = json_decode(ObjectData::getCarBookingJson(), true);\n $url = '/api/rental/availability/car/'.$id.'?startDate='.$dates['startDate'].'&endDate='.$dates['endDate'];\n $this->client->request('GET', $url);\n\n $response = $this->client->getResponse();\n\n $this->assertEquals(Response::HTTP_OK, $response->getStatusCode());\n $this->assertJson($response->getContent());\n\n $result = json_decode($response->getContent(), true);\n $this->assertArrayHasKey('availability', $result);\n $this->assertEquals(false, $result['availability']);\n }", "function test_get()\n {\n $data = array('date' => $this->get('date'), 'id' => $this->get('id'));\n $this->response($data,200);\n }", "public function testValidationHolidaysOk()\n {\n $noHolidaysConstraint = new NoHolidays();\n $noHolidaysValidator = $this->initValidator();\n\n $noHolidaysValidator->validate(new \\DateTime(\"2018-12-24\"), $noHolidaysConstraint);\n\n }", "public function getDayScore($day='') \n\t{\n\t\t$matchs=[];\n\t \t$request = \"SELECT * FROM days WHERE day=?\";\n\t \t$results = $this->requestExec($request,array($day));\n\t \twhile ($data = $results->fetch())\n\t \t{\n\t \t\t\n\t \t\t$home_team = $this->teammanager->getTeam($data['home_team']);\n\t \t\t$home_name = $home_team->getName();\n\t \t\t$home_flag = $home_team->getFlag();\n\t \t\t$home_alias = $home_team->getAlias();\n\t \t\t$outside_team = $this->teammanager->getTeam($data['outside_team']);\n\t \t\t$outside_name = $outside_team->getName();\n\t \t\t$outside_flag = $outside_team->getFlag();\n\t \t\t$outside_alias = $outside_team->getAlias();\n\t \t\t$deadline = $data['deadline'];\n\t \t\t$deadline = date(\"d-m-Y H:i:s\", strtotime($deadline));\n\t \t\t$data['deadline']= $deadline;\n\t \t\t$data['home_team']=\"<img src=\\\"$home_flag\\\" title=\\\"$home_name\\\" alt=\\\"$home_name\\\"><span class=\\\" d-none d-lg-inline-block\\\">\" .$home_name.\"</span><span class=\\\" d-inline-block d-lg-none\\\">\" .$home_alias.\"</span>\";\n\t \t\t$data['outside_team']=\"<span class=\\\" d-none d-lg-inline-block\\\">\" .$outside_name.\"</span><img src=\\\"$outside_flag\\\" title=\\\"$outside_name\\\" alt=\\\"$outside_name\\\"><span class=\\\" d-inline-block d-lg-none\\\">\" .$outside_alias.\"</span>\";\n\t \t$matchs[]=new day($data);\n\t \t}\n\t \t// ON RETOURNE UN TABLEAU DES MATCHS D UNE JOURNEE POUR LE TRAITEMENT DES SCORES\n\t \treturn $matchs;\n\t}", "public function check_leave_days(){\n\t\t$this->layout ='refresh';\n\t\t$from_exp = explode('/', $this->request->query['from']);\n\t\t$from = $from_exp[2].'-'.$from_exp[1].'-'.$from_exp[0];\n\t\t$to_exp = explode('/', $this->request->query['to']);\n\t\t$to = $to_exp[2].'-'.$to_exp[1].'-'.$to_exp[0];\n\t\t// get diff b/w the dates\n\t\t$diff = $this->HrLeave->diff_date($from, $to);\t\n\t\t// get emp. holidays\n\t\t//$holidays = $this->get_user_holidays();\n\t\t// && in_array($from, $holidays) === FALSE \n\t\t$count = 0;\n\t\twhile($diff >= 0){\t\t\t\n\t\t\t//for sunday\n\t\t\t$day = date('N', strtotime($from));\n\t\t\t// get date\n\t\t\t$date = explode('-', $from);\n\t\t\tif($day == 6){ \n\t\t\t\t// get first day\n\t\t\t\t$first_day = date('N', strtotime($date[0].'-'.$date[1].'-'.'01'));\n\t\t\t\t// get first sat\n\t\t\t\t$first_sat = $this->get_first_sat($first_day);\n\t\t\t\t$second_sat = $first_sat + 7;\n\t\t\t\t$third_sat = $second_sat + 7;\n\t\t\t\t$forth_sat = $third_sat + 7;\n\t\t\t}\t\t\t\n\t\t\t// remove sundays, second, forth sat and holidays\n\t\t\tif($day != '7' && $date[2] != $second_sat && $date[2] != $forth_sat){\t\t\t\t\t\t\n\t\t\t\t$count++;\n\t\t\t}else{\n\t\t\t\t//echo $from;\n\t\t\t}\n\t\t\t$from = date('Y-m-d', strtotime($from .\" +1 days\"));\n\t\t\t$diff--;\n\t\t}\n\t\techo $count;\n\t\t$this->render(false);\n\t\tdie;\n\t}", "public function checkValue($clinic_id = null)\n {\n $check_value = new \\stdClass();\n $auth_user = auth()->user();\n\n $day = $_GET['day'];\n // if the appointment day is not existing or empty then report an error\n if ($_GET['day'] == null || !in_array($day, [0, 1, 2, 3, 4, 5, 6])) {\n $check_value->check_visit = \"true\";\n return response()->json($check_value);\n }\n\n $day_name = Config::get('lists.days')[$day][app()->getLocale() . '_name'];\n\n if ($clinic_id != null && $auth_user->role_id == self::ROLE_DOCTOR) {\n $the_clinic = ClinicRepository::getClinicById($clinic_id);\n if (!$the_clinic) {\n $check_value->check_visit = \"false\";\n return response()->json($check_value);\n }\n $working_hours = (new WorkingHourRepository())->getIdsOfWorkingHoursByClinicIdAndDay($the_clinic->id, $day);\n } else {\n // get working hours start and end if exist\n $working_hours = (new WorkingHourRepository())->getIdsOfWorkingHoursByClinicIdAndDay($auth_user->clinic_id, $day);\n }\n $today = Carbon::now('Africa/Cairo');\n // TODO move this to Reservation Repository\n // reservations that will be cancel if we changed working hours\n $reservations = Reservation::whereIn('working_hour_id', $working_hours)\n ->where('day', '>=', $today->format('Y-m-d'))\n ->whereIn('status', [0, 1])\n ->get();\n\n $check_value->reservations_count = $reservations->count();\n\n $today_day_name = $today->format('l');\n\n if (count($working_hours) > 0 && $check_value->reservations_count > 0) {\n $check_value->check_visit = 'true';\n } else {\n $check_value->check_visit = 'false';\n }\n\n // check if checked day is Today or not\n if ($today_day_name == $day_name) {\n $check_value->check_today = 'true';\n }\n\n return response()->json($check_value);\n }", "function TodayUpdateDoer(){\n\n $this->initializeEverything();\n\n\n echo(\"\\ndone and dusted\\n\");\n die();\n\n\n \n // if their are no fixtures in database then fetch features.\n if(AllFixture::all()->isEmpty()){\n echo \"initializing all fixtures...\\n\";\n $this->fetcher->getCompetitionsFixtures();\n }\n\n // if their are no scorers in database then fetch the scorers\n if(Scorer::all()->isEmpty()){\n echo \"initializing all scorers...\\n\";\n $this->fetcher->getScorers();\n }\n\n // if their are no tables in database the fetch the tables\n if(Table::all()->isEmpty()){\n echo \"initializing all scorers...\\n\";\n $this->fetcher->getTables();\n }\n\n // if their are no teams in the database then fetch the teams\n if(Team::all()->isEmpty()){\n echo \"initializing all Teams...\\n\";\n $this->fetcher->getLeagueTeams();\n }\n \n //just used for testing: count update loops\n $counter = 0;\n\n //duration of match\n $matchOffsetTime = '+180 minutes';\n\n $matchesForTodayObj = $this->getAndFilterMatchesForToday();\n\n //if no matches exists\n if(count($matchesForTodayObj) == 0){\n\n echo \"No available Matches\\n\";\n\n //then get table\n $this->fetcher->getTables();\n\n echo \"sleeping for 10 sec\\n\";\n sleep(10);\n\n //then get scorers\n $this->fetcher->getScorers();\n\n echo \"sleeping for 10 sec\\n\";\n sleep(10);\n\n //then get league teams\n $this->fetcher->getLeagueTeams();\n\n echo \"sleeping for 10 sec\\n\";\n sleep(10);\n\n //get competition fixtures.\n $this->fetcher->getCompetitionsFixtures();\n\n //stop execution of script and return.\n return;\n }\n\n //else if their are matches for the day...\n\n //get the last match for the day.\n $lastMatch = end($matchesForTodayObj);\n\n //get time match ends for the day.\n $lastMatchTime = strtotime($matchOffsetTime, strtotime($lastMatch->utcDate));\n \n //////filter the matches;\n \n echo \"available matches\\n\";\n\n //while the last match for the day has not been played..\n while($this->getTimeNow() < $lastMatchTime){\n\n //start the long loop\n echo \"sarting long loop\\n\";\n echo ++$counter.\"long loops passed\\n\";\n\n\n\n\n\n //loop through each match and check match time\n foreach($matchesForTodayObj as $data){\n\n //match time + match offset time; time to complete a match.\n $timeUpperBoundary = strtotime($matchOffsetTime, strtotime($data->utcDate));\n //match time\n $timeLowerBoundary = strtotime($data->utcDate);\n\n //if it a match is going on\n if($this->getTimeNow() > $timeLowerBoundary && $this->getTimeNow() < $timeUpperBoundary){\n\n \n $this->getMatchesInProgress($matchesForTodayObj);\n\n\n //check if match is live\n $liveMatches = $this->checkIfMatchIsInProgress($matchesForTodayObj);\n\n \n $matchesForTodayArr_prev = [];\n\n \n $tableArr_prev = [];\n $scorersArr_prev = [];\n \n while($liveMatches == true){\n\n \n\n\n echo \"live match loop\\n\";\n \n echo ++$counter.\" loop passed\\n\";\n\n //a match has finished or is added\n\n $matchesForToday = $this->getAndFilterMatchesForToday();\n\n // $prevLiveMatches = $this->checkIfMatchIsInProgress($matchesForToday);\n $matchesForTodayArr = [];\n \n \n foreach($matchesForTodayObj as $dat){\n \n $arr = [];\n $arr['match_id'] = $dat->id;\n $arr['match_day'] = $dat->matchday;\n $arr['competition_id'] = $dat->competition->id;\n $arr['status'] = $dat->status;\n $arr['utcDate'] = $dat->utcDate;\n $arr['lastUpdated'] = $dat->lastUpdated;\n $arr['homeScore'] = $dat->score->fullTime->homeTeam;\n $arr['awayScore'] = $dat->score->fullTime->awayTeam;\n $arr['homeTeam_id'] = $dat->homeTeam->id;\n $arr['awayTeam_id'] = $dat->awayTeam->id;\n\n // DB::table('all_fixtures')->where('match_id', $dat->id)->update($arr); \n array_push($matchesForTodayArr, $arr);\n \n }\n \n echo \"comparing\\n\";\n $compareMonitor = false; \n $compareMonitor = $this->fetcher->comparor($matchesForTodayArr, $matchesForTodayArr_prev, \"match_id\");\n \n if(!$compareMonitor){\n\n echo \"changed detected \\n\";\n foreach($matchesForTodayArr as $arr){\n DB::table('all_fixtures')->where('match_id', $arr['match_id'])->update($arr); \n }\n\n echo \"m_database updated\\n\"; \n\n $fetcheObject = $this->fetcher->getTables($tableArr_prev, false);\n $tableArr_prev = $fetcheObject->getArr();\n if($fetcheObject->hasArrayChanged()){\n \n sleep(2);\n echo \"table database updated\\n\";\n //update the database;\n Table::truncate();\n DB::table('tables')->insert($tableArr_prev);\n }else{\n echo \"tables database not changed\";\n }\n\n\n \n $fetcheObject = $this->fetcher->getScorers($scorersArr_prev, false); \n $scorersArr_prev = $fetcheObject->getArr();\n if($fetcheObject->hasArrayChanged()){\n \n\n sleep(2);\n echo \"scorers database updated\\n\";\n // $this->fetcher->getScorers();\n\n Scorer::truncate();\n DB::table('scorers')->insert($scorersArr_prev);\n\n }else{\n echo \"scorers database not changed\";\n }\n \n //trigger broadcast\n }else{\n echo(\"no changes detected\\n\");\n }\n\n $matchesForTodayArr_prev = $matchesForTodayArr;\n\n\n echo \"sleeping for 16 sec\\n\"; \n sleep(16);\n //end of loop for checking for live matches.\n }\n }\n }//has checked for all available matches.\n sleep(8);\n\n //end of main loop.\n }\n\n //get table\n $this->fetcher->getTables();\n\n //get league teams\n $this->fetcher->getLeagueTeams();\n\n //get competition fixtures\n $this->fetcher->getCompetitionsFixtures();\n\n //get competition scorers\n $this->fetcher->getScorers();\n\n\n }", "function isAllDay(){\r\n \r\n $ret_bool = false;\r\n $start_map = $this->start();\r\n $stop_map = $this->stop();\r\n \r\n if($this->isMidnight($start_map) && $this->isMidnight($stop_map)){\r\n \r\n list($start_year,$start_month,$start_day) = parse_date_get::nextDay(\r\n $start_map['year'],\r\n $start_map['mon'],\r\n $start_map['mday']\r\n );\r\n \r\n $ret_bool = ($start_year == $stop_map['year'])\r\n && ($start_month == $stop_map['mon'])\r\n && ($start_day == $stop_map['mday']);\r\n \r\n }//if\r\n\r\n return $ret_bool;\r\n \r\n }", "public function testPostMatch()\n {\n $sport = Sport::firstOrFail();\n $championship = $sport->championship()->first();\n $season = Season::whereChampionshipId($championship->id)->first();\n $matchday = Matchday::whereSeasonId($season->id)->first();\n $teams = Team::whereChampionshipId($championship->id)->get();\n\n $request = [\n 'sport_id' => $sport->id,\n 'championship_id' => $championship->id,\n 'season_id' => $season->id,\n 'matchday_id' => $matchday->id,\n 'first_team_id' => $teams[0]->id,\n 'second_team_id' => $teams[1]->id\n ];\n\n $response = $this->post('/api/match/', $request);\n\n if ($response->getStatusCode() == 200) {\n $response->assertJsonStructure([\n 'id',\n 'first_team_score',\n 'second_team_score'\n ]);\n\n } else {\n $this->assertTrue(true);\n }\n }", "function testDaysLate()\n {\n $year = date(\"Y\") + 1;\n // Before due date (early)\n $result = $this->EvaluationComponentTest->daysLate(1, $year.'-07-01 16:34:43');\n $this->assertEqual($result, 0);\n // On due date (on time)\n $result = $this->EvaluationComponentTest->daysLate(1, $year.'-07-02 16:34:43');\n $this->assertEqual($result, 0);\n //After due date (late)\n $result = $this->EvaluationComponentTest->daysLate(1, $year.'-07-03 16:34:43');\n $this->assertEqual($result, 1);\n }", "public function testgetMatchesById()\n {\n // Get an active Match\n $validMatch = Match::getActiveMatch();\n\n // If exists\n if($validMatch) {\n // Invoque api\n $response = $this->json('GET', '/api/match/' . $validMatch->id);\n\n // Assert Json Structure\n $response->assertJsonStructure($this->structure);\n // Assert Status Code\n $response->assertStatus(200);\n }\n\n $this->assertTrue(true);\n }", "function checkDayHasPassed()\n\t{\n\t\t$timeTable = $this->getAscending('time', 'id');\n\t\tforeach ($timeTable->result() as $row) {\n\t\t\t$dbTime = $row->time;\n\t\t}\n\t\t\n\t\t//compare the time in db and current time\n\t\t$currentTime = date(\"Y/m/d\");\n\t\t\n\t\tif ($dbTime != $currentTime) {\n\t\t\t//meaning nakakalagpas na ang isang araw\n\n\t\t\t//updated all of the teacher load into one. \n\t\t\t$teacherLoadTable = $this->get('teacher_load', 'teacher_load_id');\n\t\t\tforeach ($teacherLoadTable->result() as $row) {\n\t\t\t\t$update['attendance_status'] = 0; // pag zero meaning hindi pa siya nag rerecord\n\t\t\t\t$this->_update('teacher_load', 'teacher_load_id', $row->teacher_load_id, $update);\n\t\t\t}\n\n\t\t\t//update mo narin yung time sa database mo\n\t\t\t$dbUpdate['time'] = $currentTime;\n\t\t\t$this->_update('time', 'id', 79, $dbUpdate);\n\t\t} //if condition\n\n\t}", "function new_transfer_request_ok($team, $now) {\n if ($team->ping_user <= 0) {\n if ($team->ping_time < $now - 60 * 86400) {\n return true;\n }\n return false;\n }\n if ($team->ping_time < $now - 90 * 86400) {\n return true;\n }\n return false;\n}", "public function testOfficialHolidays(): void\n {\n $officialHolidays = [];\n\n if ($this->year >= 1949) {\n $officialHolidays[] = 'independenceMovementDay';\n $officialHolidays[] = 'liberationDay';\n $officialHolidays[] = 'nationalFoundationDay';\n $officialHolidays[] = 'newYearsDay';\n $officialHolidays[] = 'chuseok';\n $officialHolidays[] = 'christmasDay';\n\n if ($this->year >= 1950 && $this->year < 1976) {\n $officialHolidays[] = 'unitedNationsDay';\n }\n\n if ($this->year >= 1956) {\n $officialHolidays[] = 'memorialDay';\n }\n\n if ($this->year >= 1975) {\n $officialHolidays[] = 'childrensDay';\n $officialHolidays[] = 'buddhasBirthday';\n }\n\n if ($this->year >= 1976 && $this->year <= 1990) {\n $officialHolidays[] = 'armedForcesDay';\n }\n\n if ($this->year >= 1985) {\n $officialHolidays[] = 'seollal';\n }\n\n if ($this->year >= 1986) {\n $officialHolidays[] = 'dayAfterChuseok';\n }\n\n if ($this->year >= 1989) {\n $officialHolidays[] = 'dayBeforeChuseok';\n $officialHolidays[] = 'dayBeforeSeollal';\n $officialHolidays[] = 'dayAfterSeollal';\n }\n\n if ($this->year <= 1989) {\n $officialHolidays[] = 'twoDaysLaterNewYearsDay';\n }\n\n if ($this->year <= 1990 || $this->year > 2012) {\n $officialHolidays[] = 'hangulDay';\n }\n\n if ($this->year <= 1998) {\n $officialHolidays[] = 'dayAfterNewYearsDay';\n }\n\n if ($this->year <= 2005) {\n $officialHolidays[] = 'arborDay';\n }\n\n if ($this->year < 2008) {\n $officialHolidays[] = 'constitutionDay';\n }\n }\n\n $this->assertDefinedHolidays($officialHolidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL);\n }", "function get_dateRequest( $guest_date, $domain, $json_file){\r\n\t\t$guest_date = strtolower( $guest_date );\r\n\t\t$today = new DateTime( \"today\", new DateTimeZone( 'America/Vancouver'));\r\n\t\t// today\r\n\t\tif( strpos($guest_date, 'now') !== False || strpos($guest_date, 'tonight') !== False || strpos($guest_date, 'today') !== False ){\r\n\t\t\t$guest_date = $today;\r\n\t\t// tomorrow\r\n\t\t}elseif( strpos($guest_date, 'tomorrow') !== False ){\r\n\t\t\t$guest_date = new DateTime('tomorrow');\r\n\t\t// this thursday\r\n\t\t}elseif( strpos($guest_date, 'thursday') !== False || strpos($guest_date, 'thurs') !== False ){\r\n\t\t\t// find thurs date from today\r\n\t\t\t$guest_date = new DateTime('next thursday');\r\n\t\t// this friday\r\n\t\t}elseif( strpos($guest_date, 'friday') !== False || strpos($guest_date, 'fri') !== False ){\r\n\t\t\t// find friday's date from today\r\n\t\t\t$guest_date = new DateTime('next friday');\r\n\t\t// this saturday\r\n\t\t}elseif( strpos($guest_date, 'saturday') !== False || strpos($guest_date, 'sat') !== False){\r\n\t\t\t$guest_date = new DateTime('next saturday');\r\n\t\t// user selected date\r\n\t\t}else{\r\n\t\t\t$date = date_parse($guest_date);\r\n\t\t\tif (checkdate($date[\"year\"], $date[\"month\"], $date[\"day\"])){\r\n//\t\t\t\techo \"Valid date\";\r\n\t\t\t\t$guest_date = str_replace('/', '-', $guest_date);\r\n\t\t\t\t$guest_date = str_replace('/', '-', $guest_date);\r\n\t\t\t\t$guest_date = $guest_date . \" 18:00:00\";\r\n\t\t\t\t$guest_date = new DateTime($guest_date);\r\n\t\t\t}else{\r\n\t\t\t\t// parse out the json file\r\n\t\t\t\t$json_path\t= 'sms/' . $domain . '/';\r\n\t\t\t\t$json_file\t\t= $json_path . $token . \".json\";\r\n\t\t\t\t$json\t\t\t= json_decode(file_get_contents($json_file), true);\r\n\t\t\t\t$guest_date = date( \"Y-m-d H:i:s\", strtotime($today) );\r\n\t\t\t}\r\n\t\t}\r\n\t\t$rtn = $guest_date->format('Y-m-d H:i:s');\r\n\t\treturn $rtn;\r\n\t}", "public function testWorkingDays()\n {\n $this->assertEquals(23, $this->testTraitClass->getWorkingDays(5, 1, 2019));\n $this->assertEquals(20, $this->testTraitClass->getWorkingDays(5, 2, 2019));\n $this->assertEquals(23, $this->testTraitClass->getWorkingDays(5, 7, 2019));\n $this->assertEquals(19, $this->testTraitClass->getWorkingDays(4, 7, 2019));\n $this->assertEquals(5, $this->testTraitClass->getWorkingDays(1, 7, 2019));\n $this->assertEquals(10, $this->testTraitClass->getWorkingDays(2, 7, 2019));\n $this->assertEquals(15, $this->testTraitClass->getWorkingDays(3, 7, 2019));\n $this->assertEquals(19, $this->testTraitClass->getWorkingDays(4, 7, 2019));\n }", "public function testGetUpdates()\n {\n $api = new OpenExchangeRates($this->client);\n $api->getUpdates(Carbon::now());\n }", "public function testStationsStationIdRainfallGet()\n {\n }", "function fine_get_day($day) {\r\n\t$day = (int)$day;\r\n\t\r\n\treturn fine_get_common_service(\"day.\".$day);\r\n}", "private function getTodayMatches(){\n\n //get matches from today's date to today\n $datum = UpdateBringer::updateBring(function(){\n return Football::getMatches(['competitions' => '', 'dateFrom' => $this->getTodayDate(), 'dateTo' => $this->getTodayDate()])->toArray();\n });\n return $datum;\n }", "function validateReservationDate($reservationDate){\n global $config;\n if(is_string($reservationDate)){\n $sunday = DateTime::createFromFormat('Y-m-d H:i:s', $reservationDate);\n if($sunday && DateTime::getLastErrors()['warning_count'] == 0 && DateTime::getLastErrors()['error_count'] == 0){\n if($sunday->format('w') == $config['service']['dayOfWeek']){\n $today = new DateTime();\n $today->sub(new DateInterval('PT2H')); //time zone correction (-2H)\n $dayDifference = $today->diff($sunday);\n if($dayDifference->d <= ($config['service']['reserveWeeksBefore']*7) && $dayDifference->d >= $config['service']['reserveDaysAfter']){\n $valid = false;\n foreach($config['service']['serviceTime'] as $serviceTime){\n if($sunday->format('H:i') == $serviceTime){\n $valid = true;\n break;\n }\n }\n if($valid) return $sunday;\n else return false;\n\n //old code, new code needs testing\n // if($sunday->format('H:i') == '09:30') return $sunday;\n // else if($sunday->format('H:i') == '11:00') return $sunday;\n // else if($sunday->format('H:i') == '13:30') return $sunday;\n // else return false;\n } else return false;\n } else return false;\n } else return false;\n } else return false;\n}", "public function getMatch($id='')\n \t{\n \t$request = \"SELECT * FROM days WHERE id=?\";\n \t$results = $this->requestExec($request,array($id));\n \tif ($results->rowCount() == 1)\n\t \t{\n\t \t$data = $results->fetch(); \n\t \treturn new Day($data);\n\t \t}\n\t \telse\n\t \t{\n\t \t\tthrow new Exception(\"Aucun match n'a été trouvée\");\n\t \t}\n \t}", "public function test_lister_on_date_end_input()\n {\n $listing = Directory_Lister::listing(array(\n 'directory' => $this->directory,\n 'method' => 'crawl',\n 'years' => array(\n 2013,\n 2016,\n 2017,\n ),\n 'types' => array(\n 'png',\n ),\n 'date_start' => '01-12',\n 'date_end' => '01-14',\n ));\n\n $this->assertEquals(11, $listing['count']);\n $this->assertEquals(25, $listing['max']);\n }", "public function testIsWeekday()\n {\n $this->assertTrue(DateTime::createFromFormat('Y-m-d', '2021-01-01')->isWeekday());\n $this->assertFalse(DateTime::createFromFormat('Y-m-d', '2021-01-02')->isWeekday());\n $this->assertFalse(DateTime::createFromFormat('Y-m-d', '2021-01-03')->isWeekday());\n $this->assertTrue(DateTime::createFromFormat('Y-m-d', '2021-01-04')->isWeekday());\n $this->assertTrue(DateTime::createFromFormat('Y-m-d', '2021-01-05')->isWeekday());\n $this->assertTrue(DateTime::createFromFormat('Y-m-d', '2021-01-06')->isWeekday());\n $this->assertTrue(DateTime::createFromFormat('Y-m-d', '2021-01-07')->isWeekday());\n $this->assertTrue(DateTime::createFromFormat('Y-m-d', '2021-01-08')->isWeekday());\n }", "private function validateDay($data){\r\n if (!preg_match('/^[1-7]{1,7}$/', $data)){\r\n return false;\r\n }\r\n return true;\r\n }", "public function test_recurring_sunday() {\n\t\t$mock = get_week_mock(1, array(SUNDAY));\n\t\t$mock->set_start('2019-01-01 11:55');\n\t\t$mock->set_end('2019-01-01 13:00');\n\t\t$schedule = new RecurringDowntime($mock);\n\t\t$input = mock_date('2019-05-26');\n\t\t// Match week\n\t\t$this->assertTrue($schedule->match_week_interval($input));\n\t\t// Match day\n\t\t$days = $schedule->pluck_recurrence('day');\n\t\t$this->assertTrue(in_array($input->get_day_of_week(), $days));\n\t}", "public function testGetPayableTimeForMultiDay()\n {\n $calculator = new ParkingTimeCalculator();\n $parking = new Parking(strtotime('2017-02-13 14:00:00'), strtotime('2017-02-17 16:00:00'));\n $periodStart = '13:00';\n $periodEnd = '16:00';\n\n $this->assertEquals(840, $calculator->getPayableMinutes($parking, $periodStart, $periodEnd));\n }", "private function check_doctor_availability() {\n\t\t\tif($this->get_request_method() != \"GET\") {\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\tif(!isset($_GET['doc_id'])) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Doctor id is missing\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t} else{\n\t\t\t\t\t$todays_date = date('Y-m-d');\n\t\t\t\t\t$sql = \"SELECT `doctor_user`.`du_id`, `doctor_user`.`du_name`,`doctor_user`.`du_email`,`doctor_user`.`du_phone_no`,`doctor_user`.`du_pic`, `doctor_user`.`specializaton`,`doctor_user`.`qualification`, `doctor_availability`.`start_date`, `doctor_availability`.`end_date`, `doctor_availability`.`from_time`, `doctor_availability`.`to_time`, `doctor_availability_place`.`doct_visit_address`, `doctor_availability_place`.`doct_visit_state`, `doctor_availability_place`.`doct_visit_city`,`doctor_availability_place`.`doct_visit_district`,`doctor_availability_place`.`doct_visit_pincode` FROM doctor_user\n\t\t\t\t\tJOIN `doctor_availability_place` ON `doctor_availability_place`.`doc_id` = `doctor_user`.`du_id`\n\t\t\t\t\tJOIN `doctor_availability` ON `doctor_availability`.`doc_ava_pla_id` = `doctor_availability_place`.`id`\n\t\t\t\t\tWHERE `doctor_user`.`du_id` = \".$_GET['doc_id'].\" AND `user_type` = 0 LIMIT 1\";\n\t\t\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\t\t$searchResult = $stmt->execute();\n\t\t\t\t\t$results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t\t\t$startDate = $results[0]['start_date'];\n\t\t\t\t\t\t$endDate = $results[0]['end_date'];\n\t\t\t\t\t$check_date_in_range = $this->check_in_range($startDate, $endDate, $todays_date);\n\t\t\t\tif(!empty($check_date_in_range)) {\n\t\t\t\t\t\t$error = array('status' => 'Success', 'msg' => 'Data Found', 'data' => json_encode($results[0]));\n\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t} else{\n\t\t\t\t\t$sql = \"SELECT `doctor_user`.`du_id`, `doctor_user`.`du_name`,`doctor_user`.`du_email`,`doctor_user`.`du_phone_no`,`doctor_user`.`du_pic`, `doctor_user`.`specializaton`,`doctor_user`.`qualification`, `doctor_user`.`du_address`, `doctor_user`.`du_city`,`doctor_user`.`du_district`,`doctor_user`.`du_state`,`doctor_user`.`du_pincode` FROM doctor_user WHERE `doctor_user`.`du_id` = \".$_GET['doc_id'].\" AND `user_type` = 0 LIMIT 1\";\n\t\t\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\t\t$searchResult = $stmt->execute();\n\t\t\t\t\t$results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t\t$error = array('status' => 'Success', 'msg' => 'Doctor Available', 'data' => json_encode($results[0]));\n\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function testContract()\n {\n $api_conf = $this->getAPIConf();\n if($api_conf->services->url) {\n \\TwentyI\\API\\Services::$serviceURL = $api_conf->services->url;\n }\n $rest = new \\TwentyI\\API\\Services($api_conf->services->key);\n\n $list = $rest->getWithFields(\"/domain\");\n if(count($list) > 0) {\n $item = end($list);\n $info = $rest->getWithFields(\"/domain/{$item->name}/contract\");\n $this->assertTrue(\n !!preg_match(\n '/^\\d{4}-\\d{2}-\\d{2}$/',\n $info->renewalDate\n ),\n \"Renewal date returned\"\n );\n } else {\n $this->markTestSkipped(\"Please add some domains to test fetch\");\n }\n }", "public function testnumber_of_days() {\r\n $this->assertEquals(31, $this->date_util->number_of_days(\r\n new DateTime(\"2018-07-01 00:00:00\"), new DateTime(\"2018-08-01 00:00:00\"), \"days\"));\r\n // A whole calendar month minus one second\r\n $this->assertEquals(30, $this->date_util->number_of_days(\r\n new DateTime(\"2018-07-01 00:00:00\"), new DateTime(\"2018-07-31 23:59:59\"), \"days\"));\r\n // A whole inverted calendar month\r\n $this->assertEquals(31, $this->date_util->number_of_days(\r\n new DateTime(\"2018-08-01 00:00:00\"), new DateTime(\"2018-07-01 00:00:00\"), \"days\"));\r\n // A whole calendar year\r\n $this->assertEquals(365, $this->date_util->number_of_days(\r\n new DateTime(\"2018-01-01 00:00:00\"), new DateTime(\"2019-01-01 00:00:00\"), \"days\"));\r\n // A whole calendar leap year\r\n $this->assertEquals(366, $this->date_util->number_of_days(\r\n new DateTime(\"2012-01-01 00:00:00\"), new DateTime(\"2013-01-01 00:00:00\"), \"days\"));\r\n }", "public function testGetWDay()\n\t{\n\n\t\t// 火曜日\n\t\t$timestamp = strtotime(\"2017/4/4 23:59:00\");\n\t\t$datetime = new HDateTime($timestamp);\n\t\t$weekday = date('N', $timestamp);\n\t\t$this->assertEquals(2, $datetime->getWDay());\n\n\t\t// 水曜日\n\t\t$timestamp = strtotime(\"2017/4/5 23:59:00\");\n\t\t$datetime = new HDateTime($timestamp);\n\t\t$weekday = date('N', $timestamp);\n\t\t$this->assertEquals(3, $datetime->getWDay());\n\n\t\t// 木曜日\n\t\t$timestamp = strtotime(\"2017/4/6 23:59:00\");\n\t\t$datetime = new HDateTime($timestamp);\n\t\t$weekday = date('N', $timestamp);\n\t\t$this->assertEquals(4, $datetime->getWDay());\n\n\n\t\t// 金曜日\n\t\t$timestamp = strtotime(\"2017/4/7 23:59:00\");\n\t\t$datetime = new HDateTime($timestamp);\n\t\t$weekday = date('N', $timestamp);\n\t\t$this->assertEquals(5, $datetime->getWDay());\n\n\t\t// 土曜日\n\t\t$timestamp = strtotime(\"2017/4/8 23:59:00\");\n\t\t$datetime = new HDateTime($timestamp);\n\t\t$weekday = date('N', $timestamp);\n\t\t$this->assertEquals(6, $datetime->getWDay());\n\n\t\t// 日曜日\n\t\t$timestamp = strtotime(\"2017/4/9 23:59:00\");\n\t\t$datetime = new HDateTime($timestamp);\n\t\t$weekday = date('N', $timestamp);\n\t\t$this->assertEquals(0, $datetime->getWDay());\n\n\t\t//月曜日\n\t\t$timestamp = strtotime(\"2017/4/10 23:59:00\");\n\t\t$datetime = new HDateTime($timestamp);\n\t\t$weekday = date('N', $timestamp);\n\t\t$this->assertEquals(1, $datetime->getWDay());\n\n\t}", "public function date_check( $start, $end, $round_trip , $daysDeparture , $daysReturn ){\n \t $this->CI->lang->load('form_validation'); \n \t $currentDate = strtotime(date('d-m-Y H:i:s'));\n $startDate = strtotime( $start ) ; \n $endDate = strtotime( $end ); \n $startDate = ( $currentDate > $startDate ) ? $currentDate : $startDate;\n $dateDeparture = array();\n $dateReturn = array();\n while($startDate <= $endDate )\n { \n $day = date_format(date_create( date('d-m-Y', $startDate) ), ' l ') ;\n $day = enToTr( trim($day), \"tr\" ); \n $departure_days = explode(\"?\", $daysDeparture);\n foreach ($departure_days as $value) {\n if( strcmp( trim( $value ) , $day) == 0 ){\n $dateDeparture[] = array('date' => date('Y-m-d', $startDate) , 'is_return' => 0 );\n } \n }\n if( $round_trip == \"true\" ){\n $return_days = explode(\"?\", $daysReturn);\n foreach ($return_days as $value) {\n if( strcmp( trim( $value ) , $day) == 0 ){\n $dateReturn[] = array('date' => date('Y-m-d', $startDate) , 'is_return' => 1 );\n } \n }\n }\n\n $startDate += ( 24 * 3600); // add 1 day\n }\n $result = array_merge($dateDeparture, $dateReturn); \n \n if( count( $dateDeparture ) == 0 ){\n \t $this->result = FALSE;\n $this->method = \"date_departure\";\n $this->name = lang(\"gf.departure\");\n $this->param = lang(\"gf.departure\");\n $result = array();\n }\n if( $round_trip && $round_trip == \"true\" && count($dateReturn) == 0 ){\n $this->result = FALSE;\n $this->method = \"date_return\";\n $this->name = lang(\"gf.return\");\n $this->param = lang(\"gf.return\");\n $result = array();\n } \n return $result;\n }", "public function testComDayCommonsHttpclient() {\n\n }", "public function testGetDayOfWeek()\n {\n $this->assertSame(3, DateTime::createFromFormat('Y-m-d', '2020-01-01')->getDayOfWeek());\n $this->assertSame(4, DateTime::createFromFormat('Y-m-d', '2020-01-02')->getDayOfWeek());\n $this->assertSame(5, DateTime::createFromFormat('Y-m-d', '2020-01-03')->getDayOfWeek());\n $this->assertSame(6, DateTime::createFromFormat('Y-m-d', '2020-01-04')->getDayOfWeek());\n $this->assertSame(7, DateTime::createFromFormat('Y-m-d', '2020-01-05')->getDayOfWeek());\n $this->assertSame(1, DateTime::createFromFormat('Y-m-d', '2020-01-06')->getDayOfWeek());\n $this->assertSame(2, DateTime::createFromFormat('Y-m-d', '2020-01-07')->getDayOfWeek());\n }", "public static function check_support()\n\t{\n\t\t$status = 0;\n\t\t$code = 'inactive';\n\t\t$days = 0;\n\t\t$timestamp = '';\n\t\t$data = ADNI_Multi::get_option( 'adning_activation', array());\n\t\t//$data = get_option( 'adning_activation', array());\n\t\t\n\t\tif( !empty($data) )\n\t\t{\n\t\t\tif( is_object($data['verify']) )\n\t\t\t{\n\t\t\t\t$date = new DateTime($data['verify']->supported_until);\n\t\t\t\t$timestamp = strtotime($date->format('Y-m-d H:i:s'));\n\t\t\t\t\n\t\t\t\tif($timestamp > time())\n\t\t\t\t{\n\t\t\t\t\t$status = 1;\n\t\t\t\t\t$code = 'active';\n\t\t\t\t\t$datediff = $timestamp - time();\n\t\t\t\t\t$days = floor($datediff/(60*60*24));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$status = 0;\n\t\t\t\t\t$code = 'expired';\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn array('status' => $status, 'code' => $code, 'time' => $timestamp, 'days' => $days);\n\t}", "function isInTime(string $match): bool\n{\n $diffInHour = Calendar::diffTime($match);\n //print_r($diffInHour);\n return ($diffInHour >= MIN_HOUR_TO_BET);\n}", "public function testAll() {\n\t\t$response = $this->getFixture( 'time-entries' );\n\t\t$expectedArray = $response['time_entries'];\n\n\t\t$api = $this->getApiMock();\n\t\t$api->expects( $this->once() )\n\t\t\t->method( 'get' )\n\t\t\t->with( '/time_entries' )\n\t\t\t->will( $this->returnValue( $response ) );\n\n\t\t$this->assertEquals( $expectedArray, $api->all() );\n\t}", "public function test_get_posts_by_date()\n\t{\n\t\t$this->mark_test_incomplete();\n\t}", "public function getDayEvents(Request $request){\n $api_token = $request->input('api_token');\n if($api_token!=''){\n $emp = Employee::select('id')->where([\"api_token\"=>$api_token ])->get();\n if($emp->isNotEmpty()){\n $id=$emp[0]->id;\n $start = $request->input('ofDate');\n $end = $start.' 23:59:59';\n $eves = Calendar::where(['task_date'=>$start])->get();\n $bdays = Employee::select('f_name','l_name','dob' )->get();\n $leaves = Leave::where('user_id',$id)->where('leave_on', $start )->get();\n $bds=[];\n $leas=[];\n foreach($bdays as $bd){\n if(\n date('m',strtotime($bd['dob']))==\n date('m',strtotime($start))\n and\n date('d',strtotime($bd['dob']))==\n date('d',strtotime($start))\n ){\n array_push($bds,$bd['f_name'].' '.$bd['l_name'] );\n }\n }\n \n foreach($leaves as $leave){\n $leas = [$leave['reason'],$leave['leave_on'],$leave['leave_till']];\n break;\n }\n return response()->json([\n 'success'=>'true',\n 'beeps'=>$this->beeps($start,$end,$id),\n 'events'=>$eves,\n 'bdays'=>$bds,\n 'leaves'=>$leas,\n ]);\n }else{\n return response()->json([\n 'success'=>'false',\n 'error'=>'wrong token',\n ]);\n }\n }else{\n return response()->json([\n 'success'=>'false',\n 'error'=>'empty token',\n ]);\n }\n }", "public function isAvailableDate()\n { // 1) il faut connaitre les dates impossibles pour la réservation de notre article\n $notAvailableDays = $this->article->getNotAvailableDays();//function de l'entité Articles\n\n // 2) il faut comparer les dates choisies avec les dates impossibles\n $reservationDays = $this->getDays();\n\n // 3 on transforme les secondes du \"getDays\" en jours qu'on insère dans un array\n $formatDay = function ($day){\n return $day->format('Y-m-d');\n };\n\n $days = array_map($formatDay, $reservationDays);\n\n // 4 pareil pour le getNotAvailableDays\n $notAvailable = array_map($formatDay, $notAvailableDays);\n\n // 5 on compare les deux tableaux\n foreach ($days as $day) {\n if (array_search($day, $notAvailable) !== false) return false;\n }\n return true;\n }", "public function test_correct_lunar_delivery_time()\n {\n $this->withoutExceptionHandling();\n $this->json('get', 'api/lunar-delivery-time?dispatchTime=2021-08-29 10:09:09')\n ->assertStatus(Response::HTTP_OK)\n ->assertJson([\n \"status\" => Response::HTTP_OK,\n \"message\" => \"success\",\n \"body\" => \"54-9-19 21:31:40\"\n ]);\n }", "function checkverdict() {\n\t// ARRAY OF DATES TO BE AVOIDED IF PRESENT/AWAY\n\t$course = array(\n\t\t\t\t\tarray(\n\t\t\t\t\t 'startdate' => \"2013-06-03\",\n\t\t\t\t\t 'beginhour' => 16,\n\t\t\t\t\t 'endhour' => 23),\n\t\t\t\t\tarray(\n\t\t\t\t\t 'startdate' => \"2013-06-08\",\n\t\t\t\t\t 'beginhour' => 0,\n\t\t\t\t\t 'endhour' => 23),\n\t\t\t\t\tarray(\n\t\t\t\t\t 'startdate' => \"2013-06-15\",\n\t\t\t\t\t 'beginhour' => 17,\n\t\t\t\t\t 'endhour' => 19));\n\n\tif($_GET['presense'] == \"home\") {\n\t\t$course[] = array(\n\t\t\t\t\t\t'startdate' => date(\"Y-m-d\"),\n\t\t\t\t\t\t'beginhour' => (int)$currenthour,\n\t\t\t\t\t\t'endhour' => (int)$currenthour+1);\n\t} elseif($_GET['presense'] == \"away\") {\n\t\t$course[] = array(\n\t\t\t\t\t\t'startdate' => date(\"Y-m-d\"),\n\t\t\t\t\t\t'beginhour' => (int)$currenthour,\n\t\t\t\t\t\t'endhour' => 23);\n\t}\n\t// DEFAULT ANSWER\n\t$verdict = 'confirm';\n\n\t// CHECK IF WORK TIME FALLS INTO RESTRICTED CATEGORY\n\tif(isset($course)) {\n\t\tglobal $begindate, $begintime, $endtime, $duration;\n\t\t$jobendtime = ((int)$endtime < 7 && (int)$begintime > 7) ? 24 + (int)$endtime : (int)$endtime;\n\t\tforeach ($course as $value) {\n\t\t\tif ($value['startdate'] === $begindate) {\n\t\t\t\tif ($jobendtime >= $value['beginhour'] && $jobendtime <= $value['endhour']) {\n\t\t\t\t\t$verdict = 'deny';\n\t\t\t\t} elseif ((int)$begintime >= $value['beginhour'] && (int)$begintime <= $value['endhour']) {\n\t\t\t\t\t$verdict = 'deny';\n\t\t\t\t} elseif ($value['beginhour'] >= (int)$begintime && $value['endhour'] >= (int)$begintime && $value['beginhour'] <= $jobendtime && $value['endhour'] <= $jobendtime) {\n\t\t\t\t\t$verdict = 'deny';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn $verdict;\n}", "function check_dates( $test_dates = NULL ){\r\n\r\n\t$output = '';\r\n \r\n\tif( $test_dates ) foreach( $test_dates as $test_date ){\r\n\r\n\t\tforeach( $test_date as $key => $value ){\r\n\r\n\t\t\t$result\t= validate_date( $value, $key ) ? 'TRUE' : 'FALSE' ;\r\n\r\n\t\t\t$output\t.= \"Date tried: <b>{$value}</b>; Format: <b>{$key}</b>; Result: <b>{$result}</b><br />\";\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\treturn $output;\r\n\r\n}", "public function testEventsCalendarGetByEventId()\n {\n }", "public function testInvalidDate()\n {\n $invalidDate = '01/01/2018';\n\n $retInvalidDate = $this->customCalendar->getDayOfWeek($invalidDate);\n $this->assertNull($retInvalidDate);\n\n $invalidDate2 = '01/01';\n\n $retInvalidDate2 = $this->customCalendar->getDayOfWeek($invalidDate2);\n $this->assertNull($retInvalidDate2);\n\n $invalidDate3 = '01.01.xxxx';\n\n $retInvalidDate3 = $this->customCalendar->getDayOfWeek($invalidDate3);\n $this->assertNull($retInvalidDate3);\n }", "public function test_should_calculate_sector_based_on_weekly_selector()\n {\n $request = $this->prepareSectorRequestData('weekly');\n\n $response = $this->post('calculateSectors', $request)->getOriginalContent();\n\n foreach ($response as $sector) {\n //This assertion check the every sector last date day must be the delivery day\n //If its match then assert true else false\n if (carbon::parse($sector['end_date'])->format('l') === $request['delivery_day']) {\n $this->assertTrue(true);\n } else {\n $this->assertFalse(false);\n }\n }\n //This assertion check the last sector end date must be the delivery end date\n $this->assertEquals(last($response)['end_date'], $request['overall_end_date']);\n }", "public function testGetAdCampaignReportPerDay()\n {\n }", "public function test_interval_hit() {\n\t\t$mock = get_week_mock(5);\n\t\t$mock->set_start('1980-03-01');\n\t\t$schedule = new RecurringDowntime($mock);\n\n\t\t// Create future dates that coincides with the repeat interval\n\t\t$input1 = mock_date('1980-04-07');\n\t\t$input2 = mock_date('1980-05-14');\n\t\t$input3 = mock_date('1980-06-19');\n\n\t\t$this->assertTrue($schedule->match_week_interval($input1));\n\t\t$this->assertTrue($schedule->match_week_interval($input2));\n\t\t$this->assertTrue($schedule->match_week_interval($input3));\n\t}", "public function testAllToWithDateTime() {\n\t\t$response = $this->getFixture( 'time-entries' );\n\t\t$expectedArray = $response['time_entries'];\n\n\t\t$updatedSince = new DateTime( '2017-06-26 00:00:00', new DateTimeZone( 'Europe/Zurich' ) );\n\n\t\t$api = $this->getApiMock();\n\t\t$api->expects( $this->once() )\n\t\t\t->method( 'get' )\n\t\t\t->with( '/time_entries', [ 'to' => $updatedSince->format( 'Y-m-d' ) ] )\n\t\t\t->will( $this->returnValue( $response ) );\n\n\t\t$this->assertEquals( $expectedArray, $api->all( [ 'to' => $updatedSince ] ) );\n\t}", "protected function test() {\n $output = true;\n $results = $this->env->post_to_api(\"get-news-feed\");\n if (!$results) {\n $output = false;\n } else if (property_exists($results, \"error\")) {\n echo \"{$results->error}\\n\";\n echo \"Failed to get news feed.\\n\";\n $output = false;\n } else if (count($results->posts) !== $this->state[\"num_posts\"]) {\n echo \"Failed to get the right number of news feed posts.\\n\";\n $output = false;\n }\n return $output;\n }", "function checkExpiryDay($user_id){\n \n \t$res = $this->db->query(\"select timezone,display_day from itms_users where user_id = '$user_id'\");\n\t\n\t\tforeach ($res->result() as $row){\n\t\t $display_day = $row->display_day;\n\t $timezone= $row->timezone;\n\t\t\t\t\n\t\t}\n \n $day = strtolower(date('l'));\n\t\t$days = array();\n\t $days = explode(\",\",$display_day);\n\n\t \t\n\t\tif((in_array($day, $days) || in_array(\"all\", $days))){\n\t\t\treturn true; \n\t\t} else {\n\t\t\treturn false;\n\t\t}\n }", "public function testResolvedWithFuglyUrlsAndTrailingSlash(){\n $client = $this->httpClient->get(self::ROUTE_FUGLY . '/');\n $response = $client->json();\n $this->assertAlways($client, $response, __FUNCTION__);\n $this->assertContains('America/Denver', $response);\n }", "protected function _check_datetime_availability()\r\n {\r\n $this->load->model('services_model');\r\n $this->load->model('appointments_model');\r\n\r\n $appointment = $_POST['post_data']['appointment'];\r\n\r\n $service_duration = $this->services_model->get_value('duration', $appointment['id_services']);\r\n\r\n $exclude_appointments = (isset($appointment['id'])) ? [$appointment['id']] : [];\r\n\r\n $attendants_number = $this->services_model->get_value('attendants_number', $appointment['id_services']);\r\n\r\n if ($attendants_number > 1)\r\n {\r\n // Exclude all the appointments that will are currently registered.\r\n $exclude = $this->appointments_model->get_batch([\r\n 'id_services' => $appointment['id_services'],\r\n 'start_datetime' => $appointment['start_datetime']\r\n ]);\r\n\r\n if ( ! empty($exclude) && count($exclude) < $attendants_number)\r\n {\r\n foreach ($exclude as $entry)\r\n {\r\n $exclude_appointments[] = $entry['id'];\r\n }\r\n }\r\n }\r\n\r\n if ($appointment['id_users_provider'] === ANY_PROVIDER)\r\n {\r\n $appointment['id_users_provider'] = $this->_search_any_provider($appointment['id_services'],\r\n date('Y-m-d', strtotime($appointment['start_datetime'])));\r\n $_POST['post_data']['appointment']['id_users_provider'] = $appointment['id_users_provider'];\r\n return TRUE; // The selected provider is always available.\r\n }\r\n\r\n $available_periods = $this->_get_provider_available_time_periods(\r\n $appointment['id_users_provider'], $appointment['id_services'],\r\n date('Y-m-d', strtotime($appointment['start_datetime'])),\r\n $exclude_appointments);\r\n\r\n $is_still_available = FALSE;\r\n\r\n foreach ($available_periods as $period)\r\n {\r\n $appt_start = new DateTime($appointment['start_datetime']);\r\n $appt_start = $appt_start->format('H:i');\r\n\r\n $appt_end = new DateTime($appointment['start_datetime']);\r\n $appt_end->add(new DateInterval('PT' . $service_duration . 'M'));\r\n $appt_end = $appt_end->format('H:i');\r\n\r\n $period_start = date('H:i', strtotime($period['start']));\r\n $period_end = date('H:i', strtotime($period['end']));\r\n\r\n if ($period_start <= $appt_start && $period_end >= $appt_end)\r\n {\r\n $is_still_available = TRUE;\r\n break;\r\n }\r\n }\r\n\r\n return $is_still_available;\r\n }", "private function lookupWeather(): bool\n {\n throw new RuntimeException('API call to weather service which can\\'t be called from unit test');\n }", "public function testGetNotExistingTask()\n {\n $this->datestNotExists('GET');\n }", "public function testCrceTariffChangeGetAvailable()\n {\n\n }", "public function testWeatherTaskFail6DaysMore()\n {\n\n $this->browse(function (Browser $browser) {\n $browser->visit(new Login)\n ->type('@username', 'winsel')\n ->type('@password', 'winsel')\n ->press('Submit')\n ->waitForLocation('/')\n ->on(new Home)\n ->press('@newtask')\n ->waitForLocation('/tasks/create')\n ->on(new Create)\n ->value('@start', Carbon::now()->addDays(6)->format('Y-m-d\\TH:i:s'))\n ->value('@duration', '01:01:01')\n ->select('@taskType', 'Work')\n ->type('@description', 'Hello')\n ->press('@create')\n ->waitForLocation('/')\n ->assertVisible('#task-11');\n });\n if (empty(Task::findOrFail(11)->weather_task_id)) {\n echo \"Worked!!\";\n } else {\n echo \"Error!!\";\n }\n }", "public function testTeamMembersIdPortalsAvailableGet()\n {\n\n }" ]
[ "0.6203612", "0.61938256", "0.6144069", "0.59086293", "0.5895294", "0.58708", "0.5790913", "0.5780507", "0.577458", "0.5752659", "0.5729209", "0.5723081", "0.5719948", "0.56870896", "0.56752807", "0.5668706", "0.56417197", "0.563634", "0.56346124", "0.563402", "0.56307906", "0.56240255", "0.5617435", "0.56029844", "0.558964", "0.55750567", "0.55639124", "0.55603373", "0.5559146", "0.55495805", "0.5540916", "0.55127037", "0.5512136", "0.55040795", "0.549353", "0.5473947", "0.54550344", "0.54408395", "0.5430349", "0.5427978", "0.5424069", "0.5417415", "0.5412191", "0.5387591", "0.53873277", "0.5386524", "0.537696", "0.53538257", "0.53484666", "0.53444725", "0.5337229", "0.53310513", "0.5323612", "0.5322267", "0.53150004", "0.53136426", "0.52988416", "0.52937794", "0.5290769", "0.5290235", "0.5287174", "0.5283956", "0.52821916", "0.52756757", "0.5275267", "0.5265225", "0.52612835", "0.5261237", "0.5260558", "0.524635", "0.5243512", "0.5236804", "0.52346575", "0.5230961", "0.5228702", "0.52271384", "0.52270937", "0.5225514", "0.52201104", "0.521878", "0.52174896", "0.5216961", "0.5215829", "0.5213935", "0.5210589", "0.5210449", "0.52089924", "0.5203756", "0.5197404", "0.51930255", "0.51914775", "0.5191457", "0.5190455", "0.5189259", "0.518669", "0.5185851", "0.5183725", "0.51819617", "0.5180359", "0.5176196" ]
0.7709998
0
Test Patch Match api
Тестирование API соответствия патча
public function testPatchMatch() { $match = Match::first(); $request = [ 'id' => $match->id, 'first_team_score' => 1, 'second_team_score' => 1 ]; $response = $this->patch('/api/match/', $request); if ($response->getStatusCode() == 200) { $response->assertJsonStructure([ 'id', 'first_team_score', 'second_team_score' ]); } else { $this->assertTrue(true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testProxyPATCHNode()\n {\n }", "public function testPatch()\n\t{\n\t\t$this->transport->expects($this->once())\n\t\t\t->method('request')\n\t\t\t->with('PATCH', new JUri('http://example.com'), array('key' => 'value'), array('testHeader'))\n\t\t\t->will($this->returnValue('ReturnString'));\n\n\t\t$this->assertThat(\n\t\t\t$this->object->patch('http://example.com', array('key' => 'value'), array('testHeader')),\n\t\t\t$this->equalTo('ReturnString')\n\t\t);\n\t}", "public function testProxyPATCHNodeWithPath()\n {\n }", "public function testPatchRecordingsScreensession()\n {\n }", "public function testPatchMember()\n {\n }", "public function patch();", "public function testPatchScimV2Group()\n {\n }", "public function testProjectProjectsIdTeamMembersTeamMemberIdPatch()\n {\n\n }", "public function testOnlyPost() {\n $response = $this->post('/match');\n $response->assertStatus(200);\n\n $response = $this->put('/match');\n $response->assertStatus(405);\n\n $response = $this->get('/match');\n $response->assertStatus(405);\n }", "public function testPatchScimV2User()\n {\n }", "public function testPatchScimGroup()\n {\n }", "public function testPatchNode()\n {\n }", "public function testPatchThirdPartyResource()\n {\n }", "public function testTeamMembersIdPatch()\n {\n\n }", "function patch_test_apply($patch, $fulldetail=false) {\n\treturn patch_commit($patch, \"apply\", true, $fulldetail);\n}", "public function testCompanyContactsIdPatch()\n {\n\n }", "public function testRawPatch()\n {\n $uri = '/users/1';\n $base_uri = 'http://some-api.com';\n $postParams = ['foo' => 'bar', 'biz' => 'bang'];\n $response_body = json_encode(['id' => 123, 'name' => 'foo']);\n $headers = ['Content-Type' => 'application/json'];\n\n //mock the response we expect\n $this->mockHttpResponse(\n //\n //config overrides & return client\n //\n $this->initGuzzleRequestTest([\n 'trucker::request.base_uri' => $base_uri,\n 'trucker::request.driver' => 'rest'\n ]),\n //\n //expected status\n //\n 200,\n //\n //HTTP response headers\n //\n [\n 'Location' => $base_uri.'/'.$uri,\n 'Content-Type' => 'application/json'\n ],\n //\n //response to return\n //\n $response_body\n );\n \n //execute what we're testing\n $request = RequestFactory::build();\n $rawResponse = $request->rawPatch($uri, $postParams, $headers);\n\n //get objects to assert on\n $history = $this->getHttpClientHistory();\n $request = $history->getLastRequest();\n $response = $history->getLastResponse();\n\n\n $this->makeGuzzleAssertions(\n 'PUT',\n $base_uri,\n $uri,\n [],\n $postParams\n );\n\n //assert that the HTTP RESPONSE is what is expected\n $this->assertTrue($response->isSuccessful());\n $this->assertEquals($response_body, $response->getBody(true));\n $this->assertTrue(\n $rawResponse instanceof \\Trucker\\Responses\\RawResponse\n );\n }", "public function isPatch(){ }", "public function testGoodsReceivedNotePATCHRequestGRNIDUpdate()\n {\n }", "public function test_send() {\n\n $http_response = $this->request\n ->data(array(\"firstName\" => \"irakli\", \"lastName\" => \"Nadareishvili\"))\n ->data(\"hobby\", \"programming\")\n ->header(\"X-API-Key\", \"aabbccdd\")\n ->header(array(\"foo\" => \"bar\", \"User-Agent\" => \"CERN-LineMode/2.15 libwww/2.17b3\"))\n ->param(\"active\", 1)\n ->param(array(\"param1\" => \"foo\", \"param2\" => \"bar\"))\n ->method(\"PATCH\")\n ->timeout(1500)\n ->send(\"/somepath\");\n\n $response = array();\n eval('$response = ' . $http_response['data'] . \";\");\n\n $this->assertEquals(\"PATCH\", $response['server']['REQUEST_METHOD'],\n \"Test of correct method transmitted for HTTP PATCH when using send()\");\n\n $data = $response['PARSED_HTTP_DATA'];\n $data_vars_correct = ($data['firstName'] == 'irakli' &&\n $data['lastName'] == 'Nadareishvili' &&\n $data['hobby'] == 'programming');\n\n $this->assertEquals(true, $data_vars_correct,\n \"Test of data() functioning properly for HTTP PATCH issued via send()\");\n\n $get = $response['get'];\n $get_vars_correct = ($get['active'] == 1 &&\n $get['param1'] == 'foo' &&\n $get['param2'] == 'bar');\n\n $this->assertEquals(true, $get_vars_correct,\n \"Test of param() functioning properly for HTTP PATCH\");\n\n $this->assertEquals(\"/somepath?active=1&param1=foo&param2=bar\", $response['server']['REQUEST_URI'],\n \"Test of request_uri functioning properly for HTTP PATCH\");\n\n $this->assertEquals(\"application/x-www-form-urlencoded\", $response['server']['HTTP_CONTENT_TYPE'],\n \"Test1 (content-type) of header() functioning properly for HTTP PATCH\");\n\n $this->assertEquals(\"CERN-LineMode/2.15 libwww/2.17b3\", $response['server']['HTTP_USER_AGENT'],\n \"Test2 (custom headers, passed as array) of header() functioning properly for HTTP PATCH\");\n\n try {\n $this->request->header('Content-Type', 'application/json') // This is invalid\n ->data(array(\"firstName\" => \"irakli\", \"lastName\" => \"Nadareishvili\"))\n ->send(\"/somepath\");\n } catch (RestAgentException $ex) {\n $this->assertTrue(true);\n return;\n }\n\n $this->fail('You should not be able to call send() without sending method with method() first.');\n\n\n }", "function curl_patch($path,$request_body){\n $ch = curl_init('http://127.0.0.1:8080'.$path);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($request_body));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PATCH\");\n $response = curl_exec($ch);\n $resp = $response;\n curl_close($ch);\n return $resp;\n}", "public function patch(string $uri, $body, array $headers = [], string $version = '1.1'): TestResponse;", "public function testPatchScimUser()\n {\n }", "public function testPatchFeatureFlag()\n {\n }", "public function testLandedCostBookInPATCHRequestBookInIDUpdate()\n {\n }", "public function patch($data)\n {\n }", "public function testModify()\n {\n //Tests with full data array\n $this->clientAuthenticated->request(\n 'PUT',\n '/food/modify/' . self::$objectId,\n array(),\n array(),\n array('CONTENT_TYPE' => 'application/json'),\n '{\"name\": \"Name modifié\", \"description\": \"Description\", \"kind\": \"Kind\", \"status\": \"active\", \"photo\": \"/url/photo\"}'\n );\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Tests with partial data array\n $this->clientAuthenticated->request(\n 'PUT',\n '/food/modify/' . self::$objectId,\n array(),\n array(),\n array('CONTENT_TYPE' => 'application/json'),\n '{\"name\": \"Name modifié 2\"}'\n );\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n }", "public function testInventoryPATCHRequestInventoryIDUpdate()\n {\n }", "function test_TipoProductos_Update_Validate_Id()\n {\n \n $this->json('PATCH', 'api/v1/tipoproductos/1000', [], ['Content-Type' =>'application/json', 'Accept' => 'application/json'])\n ->assertStatus(404)\n ->assertJson([\n 'message' => 'Actualizacion de TipoProducto',\n 'status' => 'Not found',\n ]);\n }", "public function testTeamMembersIdReplacePost()\n {\n\n }", "public function patch(string $pattern, $action);", "function test_TipoProductos_Update_Successfull()\n {\n $tipoProducto = [\n 'descripcion' => 'TipoProducto uno'\n ];\n \n $this->json('PATCH', 'api/v1/tipoproductos/1', $tipoProducto, ['Content-Type' =>'application/json', 'Accept' => 'application/json'])\n ->assertStatus(200)\n ->assertJson([\n 'message' => 'Actualizacion de TipoProducto',\n 'status'=>'ok',\n ]);\n }", "public function patch($args = [])\r\n {\r\n }", "public function patch($args = [])\r\n {\r\n }", "public function testLandedCostShipmentPATCHRequestShipmentIDUpdate()\n {\n }", "function test_TipoProductos_Update_Validate()\n {\n $tipoProducto = [\n 'descripcion' => ''\n ];\n \n $this->json('PATCH', 'api/v1/tipoproductos/1', $tipoProducto, ['Content-Type' =>'application/json', 'Accept' => 'application/json'])\n ->assertStatus(422)\n ->assertJson([\n \"message\" => \"The given data was invalid.\",\n \"errors\" => [\n \"descripcion\" => [\n \"The descripcion field is required.\"\n ]\n ]\n ]);\n }", "public function test_PATCH_by_admin_user_succeeds()\n {\n $this->loginAsUser('admin', 'admin');\n $iri = $this->findTeamIriByUsername('player1');\n $this->client->request('PATCH', $iri, ['json' => [\n 'name' => 'a new team name'\n ], 'headers' => [\n 'content-type'=> 'application/merge-patch+json'\n ]]);\n $this->assertResponseIsSuccessful();\n $this->assertJsonContains([\n 'name' => 'a new team name',\n ]);\n }", "function patch($uri, array $headers = array(), $content = \"\");", "function isPatch()\n {\n\n }", "public function testInventoryDocumentPATCHRequestInventoryIDDocumentsDocumentIDUpdate()\n {\n }", "public function testMatch()\n\t{\n\t\t$routes = array(\n\t\t\t'flower/(id)/(alias)' => 'Flower\\\\Controller\\\\',\n\t\t\t'foo/bar(/id,sakura)' => 'Sakura\\\\Controller\\\\'\n\t\t);\n\n\t\t$this->instance->addMaps($routes);\n\n\t\t$result = $this->instance->match('flower/5/foo');\n\t\t$vars = $this->instance->getVariables();\n\n\t\t$this->assertEquals('Flower\\\\Controller\\\\Get', $result);\n\t\t$this->assertEquals('foo', $vars['alias']);\n\n\t\t$result = $this->instance->match('foo/bar/5/baz', 'POST');\n\t\t$vars = $this->instance->getVariables();\n\n\t\t$this->assertEquals('Sakura\\\\Controller\\\\Create', $result);\n\t\t$this->assertEquals('baz', $vars['sakura']);\n\n\t\t$this->instance\n\t\t\t->allowCustomMethod(true)\n\t\t\t->setCustomMethod('PUT');\n\n\t\t$result = $this->instance->match('foo/bar/5/baz', 'POST');\n\t\t$vars = $this->instance->getVariables();\n\n\t\t$this->assertEquals('Sakura\\\\Controller\\\\Update', $result);\n\t\t$this->assertEquals('baz', $vars['sakura']);\n\t}", "public function test_update() {\n\n }", "public function test_update() {\n\n }", "public function testProxyPATCHNamespacedPodWithPath()\n {\n }", "public function testFieldPostUpdate() {\r\n\t\t$_POST['payload'] = '{\"subscriber_id\": \"2\", \"fields\": [{\"title\":\"email_address\" , \"value\":\"giulianosigma@hotmail.com\"}, \r\n\t\t\t\t\t\t\t\t\t\t{\"title\":\"state\" , \"value\":\"junk\"}, \r\n\t\t\t\t\t\t\t\t\t\t{\"title\":\"name\" , \"value\":\"Giuliano Only!\"}]}';\r\n\r\n\t\t$env = Environment::mock([\r\n 'REQUEST_METHOD' => 'POST',\r\n\t\t\t'SERVER_NAME' => '127.0.0.1',\r\n\t\t\t'SERVER_PORT' => 8080,\r\n 'REQUEST_URI' => '/subscriber',\r\n\t\t\t'CONTENT_TYPE' => 'application/x-www-form-urlencoded'\r\n\t\t]);\r\n\r\n $req = Request::createFromEnvironment($env);\r\n $this->app->getContainer()['request'] = $req;\r\n $response = $this->app->run(true);\r\n $this->assertSame($response->getStatusCode(), 200);\r\n\t\t$data = json_decode($response->getBody());\r\n\t\t$this->assertSame($data->message, \"Success\");\r\n }", "public function test_patchCurrency($Id) { \n $requestUrl = self::$Client . \"/currencies/\" . $Id;\n $data = \"{'Status':'1'}\";\n $headers = array('Accept: application/json');\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $requestUrl);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PATCH');\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); \n $response = curl_exec($curl); \n $httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE); \n curl_close($curl);\n \n $this->assertEquals(200, $httpCode); \n }", "public function testRecipeUpdate()\n {\n $response = $this->client->request('PATCH', '/api/recipes/1',\n [\n 'json' => [\n \"recipe_name\" => $this->randw(8),\n \"preparation_time\" => 3,\n \"difficulty_level\" => \"3\",\n \"veg\" => false,\n \"status\" => true\n ]\n ]\n );\n $this->assertEquals(200, $response->getStatusCode());\n $body = json_decode($response->getBody(), true);\n $this->assertEquals('Recipe updated successfully', $body['message']);\n }", "public function testPatchPersistentVolume()\n {\n }", "public function testInventoryNotePATCHRequestInventoryIDNotesNoteIDUpdate()\n {\n }", "public function testProxyPATCHNamespacedService()\n {\n }", "public function test_can_update_a_product()\n { \n //$this->withoutExceptionHandling(); \n $data = $this->productDataHelper(); \n $product = $this->postJson('v1/products', $data);\n $product = Product::first();\n \n $response = $this->json('PATCH', 'v1/products/'.$product->id, $data); \n $response->assertStatus(200)\n ->assertJson([\n 'success' => true,\n ]); \n }", "public function testProxyPATCHNamespacedServiceWithPath()\n {\n }", "public function testGoodsReceivedNoteLinePATCHRequestGRNIDLinesLineIDUpdate()\n {\n }", "public function patch(string $url, array $body = []): ResponseInterface;", "function patch($uri = null, $headers = null, $body = null);", "public function patch($pattern, $callback, array $params = []);", "public function patch()\n\t{\n\t\t$this->authStub->refreshToken();\n\t\t$completeURL = $this->authStub->baseUrl . $this->path;\n\t\t$additionalQS = array();\n\t\t\n\t\t// All URL Props are required when doing Patch\t\n\t\tforeach($this->urlProps as $value){\n\t\t\tif (is_null($this->props) || !array_key_exists($value,$this->props)){\n\t\t\t\tthrow new Exception(\"Unable to process request due to missing required prop: {$value}\");\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tif (!is_null($this->props)) {\n\t\t\tforeach ($this->props as $key => $value){\n\t\t\t\tif (in_array($key,$this->urlProps)){\n\t\t\t\t\t$completeURL = str_replace(\"{{$key}}\",$value,$completeURL);\t\t\t\t\t\n\t\t\t\t} \n\t\t\t}\t\t\t\t\n\t\t}\n//\t\techo $additionalQS[\"access_token\"] . \"\\n\";\n\t\t// $queryString = http_build_query($additionalQS);\t\t\n\t\t// $completeURL = \"{$completeURL}?{$queryString}\";\n\t\t// $response = new ET_PatchRest($this->authStub, $completeURL, $this->props);\t\n\t\t$response = new ET_PatchRest($this->authStub, $completeURL, $this->props, $this->authStub->getAuthToken());\n\t\t\n\t\treturn $response;\n\t}", "public function test_can_update_photo()\n {\n $fake_photo = FbPhoto::factory()->create();\n\n $updatedData = [\n 'title' => 'Second Title',\n 'picture' => 'Second Picture Url',\n 'user_id' => 2,\n ];\n\n $this->json('PUT', route('fb_photos.update',$fake_photo->id),$updatedData)\n ->assertStatus(202);\n\n }", "public function testProxyPATCHNamespacedPod()\n {\n }", "public function testPut()\n {\n /*$this->routeMatch->setParam('id', '1');\n $this->request->setMethod('put');\n \n $result = $this->controller->dispatch($this->request);\n $response = $this->controller->getResponse();\n \n $this->assertEquals(200, $response->getStatusCode());*/\n }", "public function testPatchNoTokenCURL()\n {\n $token = \"\";\n $body_contents = array(\"brandName\"=>\"Unit Test Brand Patch\");\n $body = json_encode($body_contents);\n $endpoint = \"/brands/1\";\n\n try {\n $output = Testing::callAPIOverHTTP($endpoint, Methods::PATCH, $body, $token, Testing::JSON);\n } catch (\\Exception $err) {\n $this->assertEmpty($err->getMessage(), \"Error message: \". $err->getMessage());\n }\n\n $this->assertEquals('No token provided', $output);\n $this->assertEquals(StatusCodes::UNAUTHORIZED, Testing::getLastHTTPResponseCode());\n }", "public function test_updateCustomFields() {\n\n }", "public function test_updateCustomFields() {\n\n }", "public function test_can_update_template()\n { \n $template = factory('App\\Template')->create();\n $response = $this->call('PATCH', '/checklists/templates/'.$template->id, [\n 'data' => [ \n 'attributes' => [\n 'name' => $this->faker->name,\n 'checklist' => [\n 'description' => $this->faker->sentence,\n 'due_interval' => $this->faker->randomDigit,\n 'due_unit' => 'hour'\n ],\n 'items' => [\n [\n 'description' => $this->faker->sentence,\n 'urgency' => $this->faker->randomDigit,\n 'due_interval' => $this->faker->randomDigit,\n 'due_unit' => 'minute'\n ],\n [\n 'description' => $this->faker->sentence,\n 'urgency' => $this->faker->randomDigit,\n 'due_interval' => $this->faker->randomDigit,\n 'due_unit' => 'minute'\n ]\n ]\n ], \n ],\n ]); \n\n $this->assertEquals(200, $response->status());\n $this->seeJsonStructure([ \n 'data' => [ \n 'id',\n 'attributes' => [\n 'name',\n 'checklist' => [\n 'description',\n 'due_interval',\n 'due_unit',\n ],\n 'items' => [ '*' => \n [\n 'description',\n 'urgency',\n 'due_interval',\n 'due_unit',\n ], \n ] \n ], \n ],\n \n ]);\n\n }", "public function testInventoryNoteTypePATCHRequestNoteTypesNoteTypeIDUpdate()\n {\n }", "public function testRestart() {\n\t\t$timeEntryId = 636718192;\n\n\t\t$api = $this->getApiMock();\n\t\t$api->expects( $this->once() )\n\t\t\t->method( 'patch' )\n\t\t\t->with( '/time_entries/' . $timeEntryId . '/restart' );\n\n\t\t$api->restart( $timeEntryId );\n\t}", "public function testAppVerificationUpdate()\n {\n }", "public function testPartUpdateWrongRequest()\n {\n $part = array('type' => 'cp1u', 'model' => 'Wrong', 'specs' => 'Wrong specs', 'image_url' => 'Wrong');\n\n $response = $this->withHeader(\n 'Authorization', 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3Q6OTBcL3NhaXR5bmFzcGNcL3B1YmxpY1wvYXBpXC9hdXRoXC9sb2dpbiIsImlhdCI6MTU3MTY1MTgwNCwiZXhwIjoxNTcxNjU1NDA0LCJuYmYiOjE1NzE2NTE4MDQsImp0aSI6InpsSHFNaWJjdm5DVlRnZjUiLCJzdWIiOjEsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.1Ctkan1MrHkt0eb62iMgcVjDykGSv-b3RRnrzhZukog'\n )->json('PUT', \"api/part/68\", $part);\n $response->assertStatus(404);\n }", "function is_patch(): bool\n{\n return app()->request->isPatch();\n}", "function test_UnidadMedidas_Update_Validate()\n {\n $unidadMedida = [\n 'descripcion' => ''\n ];\n \n $this->json('PATCH', 'api/v1/unidadmedida/1', $unidadMedida, ['Content-Type' =>'application/json', 'Accept' => 'application/json'])\n ->assertStatus(422)\n ->assertJson([\n \"message\" => \"The given data was invalid.\",\n \"errors\" => [\n \"descripcion\" => [\n \"The descripcion field is required.\"\n ]\n ]\n ]);\n }", "public function testModify() {\n $file = file_get_contents('tests/mock-api/modify-fp.json');\n $data = json_decode($file, true);\n\n // Create stub\n $this->stub->method('modify')\n ->willReturn($data);\n\n // Perform call\n $args = [\n 'name' => 'Firewall policy rename test'\n ];\n\n $res = $this->stub->modify($args, '83522FC7DA9172F229E5352C587075BA');\n\n // Assert\n $this->assertEquals($res['name'], 'Firewall policy rename test');\n\n }", "public function testInventoryDocumentTypePATCHRequestDocumentTypesDocumentTypeIDUpdate()\n {\n }", "public function testTeamMembersIdTeamProductMaterialsPost()\n {\n\n }", "public function testModifyById()\n {\n\n // Success\n $this->json('PUT',\n '/eligibilities/2',\n [\n 'start_date' => '2019-01-01',\n 'end_date' => '2019-12-01',\n 'notes' => 'First eligibility notes modified', // --> modified\n 'is_eligible' => true,\n ]\n )\n ->seeJsonEquals([\n 'status_code' => 200,\n 'status' => 'OK',\n 'message' => 'Resource successfully retrieved/created/modified',\n 'data' => [\n 'id' => 2,\n 'start_date' => '2019-01-01',\n 'end_date' => '2019-12-01',\n 'notes' => 'First eligibility notes modified', // --> modified\n 'is_eligible' => true,\n 'student' => (new StudentBuilder('john'))->build(),\n ]\n ])\n ->seeStatusCode(200)\n ->seeInDatabase('eligibilities', ['id' => 2, 'notes' => 'First eligibility notes modified'])\n ->notSeeInDatabase('eligibilities', ['id' => 2, 'notes' => 'First eligibility notes']);\n\n // Success, remove notes and change start date\n $this->json('PUT',\n '/eligibilities/2',\n [\n 'start_date' => '2019-02-01', // --> modified\n 'end_date' => '2019-12-01',\n 'is_eligible' => true,\n ]\n )\n ->seeJsonEquals([\n 'status_code' => 200,\n 'status' => 'OK',\n 'message' => 'Resource successfully retrieved/created/modified',\n 'data' => [\n 'id' => 2,\n 'start_date' => '2019-02-01', // --> modified\n 'end_date' => '2019-12-01',\n 'is_eligible' => true,\n 'student' => (new StudentBuilder('john'))->build(),\n ]\n ])\n ->seeStatusCode(200)\n ->seeInDatabase('eligibilities', ['id' => 2, 'start_date' => '2019-02-01', 'notes' => null])\n ->notSeeInDatabase('eligibilities', ['id' => 2, 'notes' => 'First eligibility notes modified'])\n ->notSeeInDatabase('eligibilities', ['id' => 2, 'start_date' => '2019-01-01']);\n\n }", "public function testPatchPersistentVolumeStatus()\n {\n }", "public function test_PATCH_by_logged_in_user_for_own_team_succeeds()\n {\n $this->loginAsUser('player1', 'player1');\n $iri = $this->findTeamIriByUsername('player1');\n $this->client->request('PATCH', $iri, ['json' => [\n 'name' => 'a new team name'\n ], 'headers' => [\n 'content-type'=> 'application/merge-patch+json'\n ]]);\n $this->assertResponseIsSuccessful();\n $this->assertJsonContains([\n 'name' => 'a new team name',\n ]);\n }", "public function test_updateReplenishmentPlanCustomFields() {\n\n }", "public function testIncorrectArgsEdit(){\n $this->dispatch('/api/edit/id/sdasd');\n $this->assertRedirectTo('/api/manage');\n }", "public function patch(array $path_args, array $data): Response;", "public function test_updateDocumentFields() {\n\n }", "public function test_updateDocumentFields() {\n\n }", "public function testPatchNamespacedEndpoints()\n {\n }", "public function testLandedCostBookInLinePATCHRequestBookInIDLinesLineIDUpdate()\n {\n }", "public function testPostReviewFeatureFlagChangeRequest()\n {\n }", "public function testgetMatches()\n {\n // Invoque api\n $response = $this->json('GET', '/api/match');\n\n // Assert Json Structure\n $response->assertJsonStructure([$this->structure]);\n // Assert Status Code\n $response->assertStatus(200);\n }", "public function patch(\n array $params\n ): Response;", "function patch_apply($patch) {\n\treturn patch_commit($patch, \"apply\", false);\n}", "public function test_updateReplenishmentPlan() {\n\n }", "public function testPatchCollectionAddRetrieve()\n {\n $collection = new PatchCollection();\n\n // First, make sure that we don't get anything out of an empty collection.\n $this->assertEmpty($collection->getPatchesForPackage('some/package'));\n\n // Next, add a couple of patches for different packages.\n $patch1 = new Patch();\n $patch1->package = 'some/package';\n $patch1->description = 'patch1';\n $patch1->url = '1';\n $collection->addPatch($patch1);\n\n $patch2 = new Patch();\n $patch2->package = 'some/package';\n $patch2->description = 'patch2';\n $patch2->url = '2';\n $collection->addPatch($patch2);\n\n $patch3 = new Patch();\n $patch3->package = 'other/package';\n $patch3->description = 'patch3';\n $patch3->url = '3';\n $collection->addPatch($patch3);\n\n $patch4 = new Patch();\n $patch4->package = 'other/package';\n $patch4->description = 'patch4';\n $patch4->url = '4';\n $collection->addPatch($patch4);\n\n foreach (['some/package', 'other/package'] as $package_name) {\n // We should get 2 patches each for some/package and other/package.\n $this->assertCount(2, $collection->getPatchesForPackage($package_name));\n\n // The patches returned should match the requested package name.\n foreach ($collection->getPatchesForPackage($package_name) as $patch) {\n /** @var Patch $patch */\n $this->assertEquals($package_name, $patch->package);\n }\n }\n\n $packages = $collection->getPatchedPackages();\n $this->assertCount(2, $packages);\n $this->assertContains('other/package', $packages);\n $this->assertContains('some/package', $packages);\n\n $collection->clearPatchesForPackage('other/package');\n $this->assertCount(0, $collection->getPatchesForPackage('other/package'));\n\n $packages = $collection->getPatchedPackages();\n $this->assertCount(1, $packages);\n $this->assertNotContains('other/package', $packages);\n $this->assertContains('some/package', $packages);\n }", "private function updateTest()\n {\n $response = $this->actingAs( $this->user )->call(\n \"PUT\",\n $this->URL,\n [\n 'trip_id' => $this->last_trip_id + 1,\n \"trip_name\" => \"Name+\",\n \"trip_desc\" => \"Has Name+\",\n ]\n );\n $response->assertStatus(400);\n\n $response = $this->actingAs( $this->user )->call(\n \"PUT\",\n $this->URL,\n [\n 'trip_id' => $this->last_trip_id,\n \"trip_name\" => \"Name+\",\n \"trip_desc\" => \"Has Name+\",\n ]\n );\n $response->assertStatus(302);\n }", "public static function isPatch()\n {\n return self::getMethod() === 'PATCH';\n }", "public function testPatchNamespacedReplicationController()\n {\n }", "public function test_update()\n {\n // add a record\n $blog = Blog::factory()->create();\n\n // create new record template \n $newBlog = Blog::factory()->make()->getAttributes();\n\n // request\n $response = $this->putJson('api/blogs/' . $blog->id, $newBlog);\n\n // assert response\n $response->assertStatus(200);\n $response->assertJson([\n 'id' => $blog->id,\n 'title' => $newBlog['title'],\n 'body' => $newBlog['body'],\n ]);\n\n // assert database with will create data.\n $this->assertDatabaseHas('blogs', $newBlog);\n }", "public function testPatchExternalAdmissionHookConfiguration()\n {\n }", "public function patch($id, $data)\n {\n echo \"This is patch method\"; die;\n return new ApiProblem(405, 'The PATCH method has not been defined for individual resources');\n }", "public function testModifyByIdFailure()\n {\n\n // Invalid ID\n $this->json('PUT',\n '/eligibilities/abc',\n [\n 'start_date' => '2019-01-01',\n 'end_date' => '2019-12-01',\n 'notes' => 'Modified eligibility notes',\n 'is_eligible' => true,\n ]\n )\n ->seeJsonEquals([\n 'status_code' => 400,\n 'status' => 'Bad Request',\n 'message' => 'Request is not valid',\n 'data' => [\n 'id' => [\n 'code error_type',\n 'value abc',\n 'expected integer',\n 'used string',\n 'in path',\n ],\n ]\n ])\n ->seeStatusCode(400)\n ->notSeeInDatabase('eligibilities', ['id' => 'abc'])\n ->notSeeInDatabase('eligibilities', ['id' => 4]);\n\n // Non existing ID\n $this->json('PUT',\n '/eligibilities/999',\n [\n 'start_date' => '2019-01-01',\n 'end_date' => '2019-12-01',\n 'notes' => 'Modified eligibility notes',\n 'is_eligible' => true,\n ]\n )\n ->seeJsonEquals([\n 'status_code' => 404,\n 'status' => 'Not Found',\n 'message' => 'Resource(s) not found',\n ])\n ->seeStatusCode(404)\n ->notSeeInDatabase('eligibilities', ['id' => 999])\n ->notSeeInDatabase('eligibilities', ['id' => 4]);\n\n // Deleted eligibility.\n $this->json('PUT',\n '/eligibilities/1',\n [\n 'start_date' => '2019-01-01',\n 'end_date' => '2019-12-01',\n 'notes' => 'Modified eligibility notes',\n 'is_eligible' => true,\n ]\n )\n ->seeJsonEquals([\n 'status_code' => 404,\n 'status' => 'Not Found',\n 'message' => 'Resource(s) not found',\n ])\n ->seeStatusCode(404)\n ->notSeeInDatabase('eligibilities', ['id' => 999])\n ->notSeeInDatabase('eligibilities', ['id' => 4]);\n\n // Unallowed additional property.\n $this->json('PUT',\n '/eligibilities/2',\n [\n 'start_date' => '2019-01-01',\n 'end_date' => '2019-12-01',\n 'notes' => 'Modified eligibility notes', // --> modified\n 'is_eligible' => true,\n 'an_additional_property' => 'an additional value',\n ]\n )\n ->seeJsonEquals([\n 'status_code' => 400,\n 'status' => 'Bad Request',\n 'message' => 'Request is not valid',\n 'data' => [\n 'an_additional_property' => [\n 'code error_additional',\n 'value an additional value',\n 'in body',\n ]\n ]\n ])\n ->seeInDatabase('eligibilities', ['id' => 2])\n ->notSeeInDatabase('eligibilities', ['id' => 2, 'notes' => 'Modified eligibility notes']);\n\n // Missing required start_date.\n $this->json('PUT',\n '/eligibilities/2',\n [\n 'end_date' => '2019-12-01',\n 'notes' => 'Modified eligibility notes', // --> modified\n 'is_eligible' => true,\n ]\n )\n ->seeJsonEquals([\n 'status_code' => 400,\n 'status' => 'Bad Request',\n 'message' => 'Request is not valid',\n 'data' => [\n 'start_date' => [\n 'code error_required',\n 'in body',\n ]\n ]\n ])\n ->seeInDatabase('eligibilities', ['id' => 2])\n ->notSeeInDatabase('eligibilities', ['id' => 2, 'notes' => 'Modified eligibility notes']);\n\n // Missing required end_date.\n $this->json('PUT',\n '/eligibilities/2',\n [\n 'start_date' => '2019-01-01',\n 'notes' => 'Modified eligibility notes', // --> modified\n 'is_eligible' => true,\n ]\n )\n ->seeJsonEquals([\n 'status_code' => 400,\n 'status' => 'Bad Request',\n 'message' => 'Request is not valid',\n 'data' => [\n 'end_date' => [\n 'code error_required',\n 'in body',\n ]\n ]\n ])\n ->seeInDatabase('eligibilities', ['id' => 2])\n ->notSeeInDatabase('eligibilities', ['id' => 2, 'notes' => 'Modified eligibility notes']);\n\n // Missing required is_eligible.\n $this->json('PUT',\n '/eligibilities/2',\n [\n 'start_date' => '2019-01-01',\n 'end_date' => '2019-12-01',\n 'notes' => 'Modified eligibility notes', // --> modified\n ]\n )\n ->seeJsonEquals([\n 'status_code' => 400,\n 'status' => 'Bad Request',\n 'message' => 'Request is not valid',\n 'data' => [\n 'is_eligible' => [\n 'code error_required',\n 'in body',\n ]\n ]\n ])\n ->seeInDatabase('eligibilities', ['id' => 2])\n ->notSeeInDatabase('eligibilities', ['id' => 2, 'notes' => 'Modified eligibility notes']);\n\n // Identical dates.\n $this->json('PUT',\n '/eligibilities/2',\n [\n 'start_date' => '2019-01-01',\n 'end_date' => '2019-01-01',\n 'notes' => 'Modified eligibility notes', // --> modified\n 'is_eligible' => true,\n ]\n )\n ->seeJsonEquals([\n 'status_code' => 400,\n 'status' => 'Bad Request',\n 'message' => 'Request is not valid',\n 'data' => [\n 'start_date' => [\n 'The start date must be a date before end date',\n ],\n 'end_date' => [\n 'The end date must be a date after start date',\n ],\n ]\n ])\n ->seeInDatabase('eligibilities', ['id' => 2])\n ->notSeeInDatabase('eligibilities', ['id' => 2, 'notes' => 'Modified eligibility notes']);\n\n // Switched dates.\n $this->json('PUT',\n '/eligibilities/2',\n [\n 'start_date' => '2019-12-01',\n 'end_date' => '2019-01-01',\n 'notes' => 'Modified eligibility notes', // --> modified\n 'is_eligible' => true,\n ]\n )\n ->seeJsonEquals([\n 'status_code' => 400,\n 'status' => 'Bad Request',\n 'message' => 'Request is not valid',\n 'data' => [\n 'start_date' => [\n 'The start date must be a date before end date',\n ],\n 'end_date' => [\n 'The end date must be a date after start date',\n ],\n ]\n ])\n ->seeInDatabase('eligibilities', ['id' => 2])\n ->notSeeInDatabase('eligibilities', ['id' => 2, 'notes' => 'Modified eligibility notes']);\n\n // @todo add test related to overlapping time ranges\n // @todo add further tests related to invalid attribute format\n // @todo if eligibilities are enforced (config parameter), check with the ones that make internships allowed\n\n }", "final function patch($p) {return $this->p($p);}", "public function testEdit()\n\t{\n\t\t$this->response->code = 200;\n\t\t$this->response->body = $this->sampleString;\n\n\t\t$hook = new stdClass;\n\t\t$hook->name = 'acunote';\n\t\t$hook->config = array('token' => '123456789');\n\t\t$hook->events = array('push', 'public');\n\t\t$hook->add_events = array('watch');\n\t\t$hook->remove_events = array('watch');\n\t\t$hook->active = true;\n\n\t\t$this->client->expects($this->once())\n\t\t\t->method('patch')\n\t\t\t->with('/repos/joomla/joomla-platform/hooks/42', json_encode($hook))\n\t\t\t->will($this->returnValue($this->response));\n\n\t\t$this->assertThat(\n\t\t\t$this->object->edit('joomla', 'joomla-platform', 42, 'acunote', array('token' => '123456789'),\n\t\t\t\tarray('push', 'public'), array('watch'), array('watch')\n\t\t\t),\n\t\t\t$this->equalTo(json_decode($this->sampleString))\n\t\t);\n\t}", "public function update(Request $request, Match $match)\n {\n //\n }", "public function update(Request $request, Match $match)\n {\n //\n }" ]
[ "0.70509106", "0.70185584", "0.69841534", "0.69534564", "0.69250715", "0.676018", "0.67438513", "0.6738576", "0.6666749", "0.6642802", "0.66345006", "0.6613905", "0.6551014", "0.65433764", "0.6530721", "0.6519295", "0.65092146", "0.65026456", "0.64747435", "0.6470148", "0.6421927", "0.6386263", "0.6348492", "0.6331672", "0.62660164", "0.6257252", "0.62454027", "0.62410355", "0.6228228", "0.6212059", "0.61901295", "0.61790615", "0.61395705", "0.61395705", "0.6129714", "0.6125875", "0.6125031", "0.61167186", "0.61008656", "0.60972154", "0.6062862", "0.6055141", "0.6055141", "0.60438645", "0.59991086", "0.5998035", "0.5988694", "0.598817", "0.59745795", "0.595465", "0.5937514", "0.5929638", "0.59291804", "0.5928945", "0.5928326", "0.59198993", "0.5918789", "0.5912656", "0.5898718", "0.5891067", "0.58699614", "0.586476", "0.586476", "0.5863424", "0.58608824", "0.585085", "0.5847089", "0.58183396", "0.58177805", "0.58170843", "0.5816776", "0.58042884", "0.58026737", "0.580143", "0.58008057", "0.579527", "0.5788135", "0.57853216", "0.57834065", "0.5781052", "0.5781052", "0.57787913", "0.5777493", "0.5770429", "0.5768635", "0.5767268", "0.57655597", "0.57607245", "0.5759605", "0.57586294", "0.5741429", "0.5733983", "0.5732537", "0.5724704", "0.5720867", "0.57142526", "0.57099473", "0.5708767", "0.5702167", "0.5702167" ]
0.75508004
0
Test match post api
Test match post api
public function testPostMatch() { $sport = Sport::firstOrFail(); $championship = $sport->championship()->first(); $season = Season::whereChampionshipId($championship->id)->first(); $matchday = Matchday::whereSeasonId($season->id)->first(); $teams = Team::whereChampionshipId($championship->id)->get(); $request = [ 'sport_id' => $sport->id, 'championship_id' => $championship->id, 'season_id' => $season->id, 'matchday_id' => $matchday->id, 'first_team_id' => $teams[0]->id, 'second_team_id' => $teams[1]->id ]; $response = $this->post('/api/match/', $request); if ($response->getStatusCode() == 200) { $response->assertJsonStructure([ 'id', 'first_team_score', 'second_team_score' ]); } else { $this->assertTrue(true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testOnlyPost() {\n $response = $this->post('/match');\n $response->assertStatus(200);\n\n $response = $this->put('/match');\n $response->assertStatus(405);\n\n $response = $this->get('/match');\n $response->assertStatus(405);\n }", "function POST($matches = array()) {\n self::GET($matches);\n }", "public function testPost(){\n \t\t$result = $this->post('http://localhost/slimapp/app/index.php/cars','name=test,model=test,year=2010,prevOwner=test','application/json');\n \t\t$this->assertTrue($result);\n }", "public function testPost()\n {\n $response = $this->handlePostData(\n [\n 'name' => 'some/website',\n 'description' => 'some description',\n 'license' => 'MIT'\n ]\n );\n\n $result = json_decode($response->getContent(), true);\n\n $this->assertEmpty($result['warnings']);\n $this->assertEmpty($result['errors']);\n $this->assertEquals('OK', $result['status']);\n }", "public function testPost()\n {\n $this->post('/unit_test/test_action/123');\n $this->assertTrue($this->response instanceof Mad_Controller_Response_Http);\n\n // html template\n $this->assertResponseContains(\"Rendered test action template\");\n }", "public function testTeamMembersPost()\n {\n\n }", "public function test13(){\n\t\t$postData='{\"post\":\"data here\"}';\n\t\t$this->post('/raw_post.php','www.talkingpixels.org',$postData,'json')\n\t\t\t->assertContains('valfoo','showme_header1/sub2');\t\n\t}", "public function testIndexActionPost()\n {\n $this->di->get(\"request\")->setGlobals(\n [\n 'post' => [\n 'ipnummer' => \"132.248.10.7\"\n ]\n ]\n );\n $res = $this->controller->indexActionPost();\n $this->assertInternalType(\"array\", $res);\n\n $json = $res[0];\n $exp = \"ipv4\";\n $this->assertContains($exp, $json[\"type\"]);\n }", "public function testTeamMembersIdTeamMembersPost()\n {\n\n }", "public function testTeamMembersIdTeamDataRecordPost()\n {\n\n }", "public function testFieldPost() {\r\n\t\t$_POST['payload'] = '{\"title\":\"address\" , \"type\":\"string\"}';\r\n\r\n\t\t$env = Environment::mock([\r\n 'REQUEST_METHOD' => 'POST',\r\n\t\t\t'SERVER_NAME' => '127.0.0.1',\r\n\t\t\t'SERVER_PORT' => 8080,\r\n 'REQUEST_URI' => '/field',\r\n\t\t\t'CONTENT_TYPE' => 'application/x-www-form-urlencoded'\r\n\t\t]);\r\n\r\n $req = Request::createFromEnvironment($env);\r\n $this->app->getContainer()['request'] = $req;\r\n $response = $this->app->run(true);\r\n $this->assertSame($response->getStatusCode(), 200);\r\n\t\t$data = json_decode($response->getBody());\r\n\t\t$this->assertSame($data->message, \"Success\");\r\n }", "public function testTeamMembersIdTeamBrandPost()\n {\n\n }", "public function testgetMatches()\n {\n // Invoque api\n $response = $this->json('GET', '/api/match');\n\n // Assert Json Structure\n $response->assertJsonStructure([$this->structure]);\n // Assert Status Code\n $response->assertStatus(200);\n }", "public function testTeamMembersIdTeamTeamMembersPost()\n {\n\n }", "public function testPostTeams()\n {\n }", "public function testJsonActionPostValid()\n {\n // Setup di\n $di = new DIFactoryConfig();\n $di->loadServices(ANAX_INSTALL_PATH . \"/config/di\");\n\n // Use a different cache dir for unit test\n $di->get(\"cache\")->setPath(ANAX_INSTALL_PATH . \"/test/cache\");\n\n // Setup the controller\n $controller = new RestApiController2();\n $controller->setDI($di);\n $controller->initialize();\n\n // Do the test and assert it\n $controller->jsonActionGet();\n $_POST[\"check\"] = \"172.217.11.14\";\n $res = $controller->jsonActionPost();\n $this->assertIsArray($res);\n }", "public function requestApiTestPost()\n {\n //Desired Results\n $responseBody = array('test' => true);\n $responseInfo = array('http_code' => 200, 'content_type' => 'test');\n\n $this->_setMockProperties('_curlExec', $responseBody);\n $this->_setMockProperties('_curlInfo', $responseInfo);\n\n //using POST to test the else case\n $result = $this->_curlObject->requestApi(\"\", array(), 'POST');\n $this->assertEquals(\n array(\n 'header' => array(\n 'status' => $responseInfo['http_code'],\n 'reason' => null,\n ),\n 'body' => $responseBody)\n ,$result);\n }", "public function test2()\n\t{\n\t\t$this->post('/mypost.php','test.localhost',array('test'=>'foo this'))\n\t\t\t->assertContains('oo th');\n\t}", "public function testTeamMembersIdTeamPortalsPost()\n {\n\n }", "public function testChatbotPost()\n {\n }", "public function testTeamMembersIdTeamImagesPost()\n {\n\n }", "public function testTeamMembersIdTeamTemplatesPost()\n {\n\n }", "public function testServicesPost()\n {\n }", "public function testGetToPostResponse() {\n $_SERVER['REQUEST_URI'] = \"/test-g\";\n $_SERVER['REQUEST_METHOD'] = \"GET\";\n\n echo \"{{POST}} REQUEST_URI set to \".$_SERVER['REQUEST_URI'].PHP_EOL;\n echo \"{{POST}} REQUEST_METHOD set to \".$_SERVER['REQUEST_METHOD'].PHP_EOL.\".\".PHP_EOL;\n echo \"Expecting:\".PHP_EOL.\n \" ~ GET == true\".PHP_EOL.\n \" ~ POST == false\".PHP_EOL;\n\n $var = new FunkyBunch\\SimpleHTTPRouter\\Router;\n $this->assertTrue($var->get(\"/test-g\", function(){echo \"Result: GET\".PHP_EOL;}));\n $this->assertFalse($var->post(\"/test-g\", function(){echo \"Result: POST\".PHP_EOL;}));\n echo PHP_EOL.PHP_EOL;\n unset($var);\n }", "public function testFieldPostInsert() {\r\n\t\t$_POST['payload'] = '{\"fields\": [{\"title\":\"email_address\" , \"value\":\"giulianosigma@hotmail.com\"}, \r\n\t\t\t\t\t\t\t\t\t\t{\"title\":\"state\" , \"value\":\"bounced\"}, \r\n\t\t\t\t\t\t\t\t\t\t{\"title\":\"name\" , \"value\":\"Giuliano Pietoso\"}]}';\r\n\r\n\t\t$env = Environment::mock([\r\n 'REQUEST_METHOD' => 'POST',\r\n\t\t\t'SERVER_NAME' => '127.0.0.1',\r\n\t\t\t'SERVER_PORT' => 8080,\r\n 'REQUEST_URI' => '/subscriber',\r\n\t\t\t'CONTENT_TYPE' => 'application/x-www-form-urlencoded'\r\n\t\t]);\r\n\r\n $req = Request::createFromEnvironment($env);\r\n $this->app->getContainer()['request'] = $req;\r\n $response = $this->app->run(true);\r\n $this->assertSame($response->getStatusCode(), 200);\r\n\t\t$data = json_decode($response->getBody());\r\n\t\t$this->assertSame($data->message, \"Success\");\r\n }", "public function testMovieShouldBeSuccessIfAllDataAresentViaPostRoute()\n {\n $formData = [\n 'title'=>'NEw Thriller Movie',\n 'quote'=>'The best quote from thriller movie'\n ];\n $this->post(route('movies.store'),$formData)->assertStatus(201);\n }", "public function testTeamMembersIdTeamPermissionPost()\n {\n\n }", "public function test_sharing_post_private_is_successful ()\n {\n $post=factory('App\\Post')->raw();\n \n $this->call('POST','api/post/', $post)->assertOk();\n }", "public function testTeamMembersIdTeamBillingCardPost()\n {\n\n }", "public function testPostSpecificKey()\n {\n $request = $this->Request;\n\n $this->assertContains('value', $request::post('test'));\n }", "public function testTeamMembersIdPortalsPost()\n {\n\n }", "public function testInfoActionPost()\n {\n // Setup the controller\n $controller = new WeatherAPIController();\n $controller->setDI($this->di);\n\n // Test the controller action\n $request = $this->di->get(\"request\");\n $request->setPost(\"userip\", \"94.21.49.200\");\n $request->setServer(\"REQUEST_METHOD\", \"POST\");\n $res = $controller->infoActionPost();\n $request->setPost(\"type\", \"historical\");\n $res1 = $controller->infoActionPost();\n $request->setPost(\"type\", \"forecast\");\n $res2 = $controller->infoActionPost();\n $request->setServer(\"REQUEST_METHOD\", \"\");\n $res3 = $controller->infoActionPost();\n $this->assertIsArray($res);\n $this->assertIsArray($res1);\n $this->assertIsArray($res2);\n $this->assertIsArray($res3);\n }", "public function testTeamMembersIdTeamProductMaterialsPost()\n {\n\n }", "public function testTeamMembersIdInviteInviteePost()\n {\n\n }", "public function testVehiclesPost()\n {\n $response = $this->json('POST', '/vehicles', ['modelYear' => 2015,'manufacturer'=> 'Audi','model'=>'A3']);\n\n $response\n ->assertStatus(200)\n ->assertJson([]);\n\n }", "public function testIndexActionPost2()\n {\n $this->di->get(\"request\")->setGlobals(\n [\n 'post' => [\n 'ipnummer' => \"uåt.132.248.10.7\"\n ]\n ]\n );\n $res = $this->controller->indexActionPost();\n $this->assertInternalType(\"array\", $res);\n\n $json = $res[0];\n $exp = \"none\";\n $this->assertContains($exp, $json[\"domainname\"]);\n }", "public function testTeamMembersIdRequestedDesignsPost()\n {\n\n }", "public function testJsonActionPostInvalid()\n {\n // Setup di\n $di = new DIFactoryConfig();\n $di->loadServices(ANAX_INSTALL_PATH . \"/config/di\");\n\n // Use a different cache dir for unit test\n $di->get(\"cache\")->setPath(ANAX_INSTALL_PATH . \"/test/cache\");\n\n // Setup the controller\n $controller = new RestApiController2();\n $controller->setDI($di);\n $controller->initialize();\n\n // Do the test and assert it\n $controller->jsonActionGet();\n $_POST[\"check\"] = \"172.217.11.\";\n $res = $controller->jsonActionPost();\n $this->assertIsArray($res);\n }", "public function testResponseSetsPost()\n {\n }", "public function test3()\n\t{\n\t\t$this->post('/exact.php','test.localhost',array('test'=>'foo this'))\n\t\t\t->assertEquals('foo this');\n\t}", "public function testUnavailabilitiesPost()\n {\n }", "public function testFieldPostUpdate() {\r\n\t\t$_POST['payload'] = '{\"subscriber_id\": \"2\", \"fields\": [{\"title\":\"email_address\" , \"value\":\"giulianosigma@hotmail.com\"}, \r\n\t\t\t\t\t\t\t\t\t\t{\"title\":\"state\" , \"value\":\"junk\"}, \r\n\t\t\t\t\t\t\t\t\t\t{\"title\":\"name\" , \"value\":\"Giuliano Only!\"}]}';\r\n\r\n\t\t$env = Environment::mock([\r\n 'REQUEST_METHOD' => 'POST',\r\n\t\t\t'SERVER_NAME' => '127.0.0.1',\r\n\t\t\t'SERVER_PORT' => 8080,\r\n 'REQUEST_URI' => '/subscriber',\r\n\t\t\t'CONTENT_TYPE' => 'application/x-www-form-urlencoded'\r\n\t\t]);\r\n\r\n $req = Request::createFromEnvironment($env);\r\n $this->app->getContainer()['request'] = $req;\r\n $response = $this->app->run(true);\r\n $this->assertSame($response->getStatusCode(), 200);\r\n\t\t$data = json_decode($response->getBody());\r\n\t\t$this->assertSame($data->message, \"Success\");\r\n }", "public function testPostFromForm()\n {\n $bodyRaw = ['message' => 'mock me do you mocker?'];\n\n $this->mockEnvironment([\n 'PATH_INFO' => '/',\n 'REQUEST_METHOD' => 'POST',\n 'CONTENT_TYPE' => 'application/x-www-form-urlencoded',\n 'slim.input' => 'target=mocker'\n ]);\n\n $response = $this->tacit->invoke();\n\n $this->assertEquals(\n array_intersect_assoc(\n $bodyRaw,\n json_decode($response->getBody(), true)\n ),\n $bodyRaw\n );\n }", "public function testTeamMembersIdTeamBillingBankAccountVerifyPost()\n {\n\n }", "public function testPostTeamsIdMemberships()\n {\n }", "public function testPostAction()\n {\n $uri = $this->router->generate('umberfirm__customer__post_customer');\n\n $this->client->request(\n 'POST',\n $uri,\n [],\n [],\n [\n 'HTTP_ACCEPT' => 'application/json',\n 'CONTENT_TYPE' => 'application/json',\n ],\n json_encode($this->payload)\n );\n\n $this->assertJsonResponse($this->client->getResponse(), Response::HTTP_CREATED);\n }", "public function testProjectProjectsIdTeamMembersPost()\n {\n\n }", "public function testTeamMembersIdTeamBillingBankAccountPost()\n {\n\n }", "public function testGetPost() {\r\n $post = $this->_request->getPost();\r\n\r\n $this->assertInstanceOf('PM\\Main\\Web\\Component\\Http\\Post', $post);\r\n $this->assertEmpty($post->toArray());\r\n }", "public function testPost()\n\t{\n\t\t$this->transport->expects($this->once())\n\t\t\t->method('request')\n\t\t\t->with('POST', new JUri('http://example.com'), array('key' => 'value'), array('testHeader'))\n\t\t\t->will($this->returnValue('ReturnString'));\n\n\t\t$this->assertThat(\n\t\t\t$this->object->post('http://example.com', array('key' => 'value'), array('testHeader')),\n\t\t\t$this->equalTo('ReturnString')\n\t\t);\n\t}", "public function testTeamMembersIdTeamDataSourceSoapsPost()\n {\n\n }", "public function testPostAction()\n {\n $client = static::createClient();\n $client->followRedirects();\n $fecha = '2018-04-03';\n $hora = '12:00:00';\n $params = [\n 'puntoatencion' => 1,\n 'tramite' => 26,\n 'fecha' => $fecha,\n 'hora' => $hora\n ];\n $client->request('POST', '/api/v1.0/turnos', $params);\n $turnoDatos = json_decode($client->getResponse()->getContent());\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n return $turnoDatos->additional->id;\n }", "public function testPostQuiz()\n{\n $data = [\n 'quiztitle' => 'web',\n 'skilltype' =>'backend',\n 'passsocre' => 1,\n 'duration' => 1,\n ];\n $this->json('post','api/quizzes/addnewquiz', $data)->assertStatus(201); \n }", "public function testCreateConsultationUsingPost()\n {\n }", "public function testMatch()\n\t{\n\t\t$routes = array(\n\t\t\t'flower/(id)/(alias)' => 'Flower\\\\Controller\\\\',\n\t\t\t'foo/bar(/id,sakura)' => 'Sakura\\\\Controller\\\\'\n\t\t);\n\n\t\t$this->instance->addMaps($routes);\n\n\t\t$result = $this->instance->match('flower/5/foo');\n\t\t$vars = $this->instance->getVariables();\n\n\t\t$this->assertEquals('Flower\\\\Controller\\\\Get', $result);\n\t\t$this->assertEquals('foo', $vars['alias']);\n\n\t\t$result = $this->instance->match('foo/bar/5/baz', 'POST');\n\t\t$vars = $this->instance->getVariables();\n\n\t\t$this->assertEquals('Sakura\\\\Controller\\\\Create', $result);\n\t\t$this->assertEquals('baz', $vars['sakura']);\n\n\t\t$this->instance\n\t\t\t->allowCustomMethod(true)\n\t\t\t->setCustomMethod('PUT');\n\n\t\t$result = $this->instance->match('foo/bar/5/baz', 'POST');\n\t\t$vars = $this->instance->getVariables();\n\n\t\t$this->assertEquals('Sakura\\\\Controller\\\\Update', $result);\n\t\t$this->assertEquals('baz', $vars['sakura']);\n\t}", "public function testRouter()\n {\n $response = $this->post('thrivecart');\n\n $response->assertStatus(200);\n }", "public function testMethodPost()\n {\n $raw = array('REQUEST_METHOD' => 'POST');\n $request = new Pillar_Rest_Request($raw);\n\n $this->assertEquals(Pillar_Rest_Request::METHOD_POST, $request->getMethod());\n }", "public function testPost()\n {\n $_POST = ['test' => 'value', 'test-2' => 1];\n $request = $this->Request;\n\n $this->assertInternalType('array', $request::post());\n }", "public function testTeamMembersIdTemplatesPost()\n {\n\n }", "public function testPostNode()\n {\n $client = static::createClient();\n\n $path = '/{path}/{name}';\n $pattern = '{path}';\n $data = $this->genTestData('[a-z0-9]+');\n $path = str_replace($pattern, $data, $path);\n $pattern = '{name}';\n $data = $this->genTestData('[a-z0-9]+');\n $path = str_replace($pattern, $data, $path);\n\n $crawler = $client->request('POST', $path);\n }", "public function testTeamMembersIdTeamDynamicDatasPost()\n {\n\n }", "public function testSuccessfulPostPayment()\n {\n $data = [\n \"payment_name\" => \"payment name 1\",\n\n ];\n\n $this->json('POST', 'api/v1/payment', $data, ['Accept' => 'application/json'])\n ->assertStatus(201)\n ->assertJson([\n \"msg\" => \"Data Berhasil Disimpan\"\n\n ]);\n }", "public function testSubaccountsPost()\n {\n }", "public function testPostQuestion(): void {\n $user = factory(User::class)->create();\n Auth::login($user);\n factory(Question::class)->create();\n $question = factory(Question::class)->make(['author_id' => $user->id]);\n $this->post(url('/api/questions/'),\n ['api_token' => $user->api_token, 'title' => $question->title, 'body' => $question->body])\n // ->assertStatus(302);\n //$this->get(url('/api/questions'))\n ->assertStatus(200)\n ->assertJsonFragment(['title' => $question->title]);\n }", "public function testInventoryPOSTRequestPost()\n {\n }", "public function testWebhookPost()\n {\n $this->webhook->post();\n $this->assertObjectHasAttribute('request', $this->webhook);\n\n // The webhook request object.\n $request = $this->webhook->getRequest();\n $this->assertNotNull($request);\n $this->assertInstanceOf(\"\\Guzzle\\Http\\Message\\EntityEnclosingRequest\", $request);\n $this->assertEquals($request->getMethod(), \"POST\");\n }", "public function testforecastActionPost()\n {\n $request = $this->di->get(\"request\");\n $request->setGlobals(\n [\n \"post\" => [\n \"userInput\" => \"69.89.31.226\",\n ]\n ]\n );\n $resIP = $this->controller->forecastActionPost();\n\n $request = $this->di->get(\"request\");\n $request->setGlobals(\n [\n \"post\" => [\n \"userInput\" => \"Karlskrona\",\n ]\n ]\n );\n $resCity = $this->controller->forecastActionPost();\n\n $request = $this->di->get(\"request\");\n $request->setGlobals(\n [\n \"post\" => [\n \"userInput\" => \"aoiwdnnndn23fail\",\n ]\n ]\n );\n $resFail = $this->controller->forecastActionPost();\n\n $bodyIP = $resIP->getBody();\n $bodyCity = $resCity->getBody();\n $bodyFail = $resFail->getBody();\n\n $expIP = \"Provo\";\n $expCity = \"Karlskrona\";\n $expFail = \"Invalid Location\";\n $this->assertContains($expIP, $bodyIP);\n $this->assertContains($expCity, $bodyCity);\n $this->assertContains($expFail, $bodyFail);\n }", "public function testGoodsReceivedNotePOSTRequestPost()\n {\n }", "public function testPost() {\n $data = [\"id\"=> 0,\n \"location\" => [\n \"latitude\" => 12.9231501,\n \"longitude\" => 74.7818517\n ],\n \"title\" => \"incident title\",\n \"category_id\" => 1,\n \"people\" => [[\n \"name\" => \"Name of person\",\n \"type\"=> \"staff\",\n \"name\" => \"Name of person\",\n \"type\" => \"witness\"\n ],\n [\n \"name\" => \"Name of person\",\n \"type\" => \"staff\"\n ]\n ],\n \"comments\" => \"This is a string of comments\",\n \"incidentDate\"=> \"2020-09-01T13:26:00+00:00\",\n \"createDate\" => \"2020-09-01T13:32:59+01:00\",\n \"modifyDate\" => \"2020-09-01T13:32:59+01:00\"];\n $this->json('POST', 'api/saveData', $data)\n ->assertStatus(200)\n ->assertJson([\n \n ]);\n }", "public function testGetUserScore()\n {\n $data = [\n 'id'=>0, \n ];\n $this->json('post','api/answer/getusersocre', $data)\n ->assertStatus(200);\n}", "public function testConditionInPostTeam()\n {\n /* ************ Test to create team F/F *************/\n $data_1 = array(\n 'teamName' => 'tryTeam',\n 'targetDestination' => 'tryDestination',\n 'comment' => 'A Try Comment',\n 'editionId' => 1,\n 'userEmail1' => 'tryteam2@tryteam.com',\n 'userEmail2' => 'tryteam3@tryteam.com',\n 'startCity' => 2990969\n );\n \n $this->client->request('POST','/api/v1/teams',array(), array(), array('CONTENT_TYPE' => 'application/json'), json_encode($data_1));\n\n $response = $this->client->getResponse();\n $this->assertEquals(400, $response->getStatusCode());\n\n\n //Create a real team\n $data_2 = array(\n 'teamName' => 'tryTeam',\n 'targetDestination' => 'tryDestination',\n 'comment' => 'A Try Comment',\n 'editionId' => 1,\n 'userEmail1' => 'tryteam1@tryteam.com',\n 'userEmail2' => 'tryteam2@tryteam.com',\n 'startCity' => 2990969\n );\n \n $this->client->request('POST','/api/v1/teams',array(), array(), array('CONTENT_TYPE' => 'application/json'), json_encode($data_2));\n\n\n /* ****** Test create a team with 1 already in a team ******/\n $data_3 = array(\n 'teamName' => 'tryTeam',\n 'targetDestination' => 'tryDestination',\n 'comment' => 'A Try Comment',\n 'editionId' => 1,\n 'userEmail1' => 'tryteam1@tryteam.com',\n 'userEmail2' => 'tryteam3@tryteam.com',\n 'startCity' => 2990969\n );\n \n $this->client->request('POST','/api/v1/teams',array(), array(), array('CONTENT_TYPE' => 'application/json'), json_encode($data_3));\n\n $response = $this->client->getResponse();\n $this->assertEquals(400, $response->getStatusCode());\n\n\n /* *************** Remove team *************/\n $this->deleteTeam('1');\n }", "public function post(string $pattern, $action);", "public function test_playoff_matches_can_be_generated()\n { \n $response = $this->post('/generate/playoff-matches');\n\n $response->assertRedirect('/');\n }", "public function testStore()\n {\n $this->createHttpPost()->assertStatus(201);\n\n // Checking output field mapping\n $post = $this->json('GET', '/api/posts/1', [], $this->headers);\n $this->assertArraySubset($this->postFields, array_keys((array)json_decode($post->getContent())));\n\n /**\n * |-------------------------------------------\n * | Failed\n * |-------------------------------------------\n */\n $this->json('POST', '/api/posts', [], $this->headers)\n ->assertStatus(500);\n\n }", "public function testPost()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit(route('admin@getLogin'))\n ->type('email', 'admin@fresher03.local.com')\n ->type('password', 'cowell@123')\n ->press('Login')\n ->visit(route('admin@post@post'))\n ->assertSee(\"CONTENT\");\n });\n }", "public function testTeamMembersIdUploadedTemplatesPost()\n {\n\n }", "public function testTeamMembersIdTeamWorkflowsPost()\n {\n\n }", "public function testTeamMembersIdInvitationTicketsPost()\n {\n\n }", "public function testTeamMembersIdNotificationsPost()\n {\n\n }", "public function testSuccess()\n {\n $this->get('/api/posts/')\n ->seeJson([\n 'meta' => array(\n 'code' => trans('api.CODE_INPUT_SUCCESS'),\n 'description' => trans('api.DESCRIPTION_GET_SUCCESS'),\n \"messages\" => array(\n array(\"message\" => trans('api.MSG_GET_SUCCESS',['attribute' => 'Posts']) ),\n )\n )\n ]);\n }", "public function testVendorsPost()\n {\n }", "public function testCreateApplicationUsingPost()\n {\n }", "public function testTeamMembersIdReviewedDesignsPost()\n {\n\n }", "public function testPostFromJson()\n {\n $bodyRaw = ['message' => 'mock me do you mocker?'];\n\n $this->mockEnvironment([\n 'PATH_INFO' => '/',\n 'REQUEST_METHOD' => 'POST',\n 'CONTENT_TYPE' => 'application/json',\n 'slim.input' => '{\"target\":\"mocker\"}'\n ]);\n\n $response = $this->tacit->invoke();\n\n $this->assertEquals(\n array_intersect_assoc(\n $bodyRaw,\n json_decode($response->getBody(), true)\n ),\n $bodyRaw\n );\n }", "public function testPfsWebhookPost()\n {\n }", "public function testCheckActionPostIP4Happy()\n {\n global $di;\n\n // Setup di\n $di = new DIFactoryConfig();\n $di->loadServices(ANAX_INSTALL_PATH . \"/config/di\");\n\n // Use a different cache dir for unit test\n $di->get(\"cache\")->setPath(ANAX_INSTALL_PATH . \"/test/cache\");\n\n // View helpers uses the global $di so it needs its value\n // $di = $this->di;\n\n // Setup the controller\n $controller = new \\Hab\\MeModule\\ValidateIPController();\n $controller->setDI($this->di);\n $controller->initialize();\n $session = $di->get(\"session\");\n\n // Setup post request\n // Can't properly set POST variable for som reason. Is this intentional?\n // Also don't know why I have to reference $di with $this keyword.\n // $this->di->get(\"request\")->setPost(\"ip\", \"1.2.3.4\");\n $this->di->get(\"request\")->setGlobals([\"post\" => [\"ip\" => \"1.2.3.4\"]]);\n\n // Get response\n $controller->checkActionPost();\n $res = $session->get(\"res\");\n // var_dump($res);\n $exp = \"1.2.3.4 is a valid ipv4 adress\";\n\n $this->assertContains($exp, $res[\"data\"][\"text\"]);\n }", "public function testTeamMembersIdDesignSharesPost()\n {\n\n }", "public function testTeamMembersIdRequestedDesignExportsPost()\n {\n\n }", "public function testValidPostStockAnalyseForm()\r\n {\r\n $appRunner = new \\Support\\AppRunner;\r\n $response = $appRunner->runMockApp('POST', '/analyseform',['ticker=XETR:MAN']);\r\n $this->assertEquals(200, $response->getStatusCode());\r\n }", "public function testPaymentConditionsPost()\n {\n }", "public function testSspsPost()\n {\n }", "public function test_uploade_post_public_successful()\n {\n $this->withoutExceptionHandling();\n //create user\n $user = factory(User::class)->create();\n //login user\n $this->actingAs($user,'api');\n //create post\n $post = factory('App\\Post')->create();\n //send post route\n $this->post('api/post/upload', $post->toArray());\n //check database\n $this->assertDatabaseHas('posts', $post->toArray()); \n }", "public function testCheckActionPostSad()\n {\n global $di;\n\n // Setup di\n $di = new DIFactoryConfig();\n $di->loadServices(ANAX_INSTALL_PATH . \"/config/di\");\n\n // Use a different cache dir for unit test\n $di->get(\"cache\")->setPath(ANAX_INSTALL_PATH . \"/test/cache\");\n\n // View helpers uses the global $di so it needs its value\n // $di = $this->di;\n\n // Setup the controller\n $controller = new \\Hab\\MeModule\\ValidateIPController();\n $controller->setDI($this->di);\n $controller->initialize();\n $session = $di->get(\"session\");\n\n // Setup post request\n $this->di->get(\"request\")->setPost(\"ip\", \"1.2.3.4.5\");\n // $_POST[\"ip\"] = \"1.2.3.4.5\";\n\n // Get response\n $controller->checkActionPost();\n $res = $session->get(\"res\");\n $exp = \"1.2.3.4.5 is not a valid format\";\n\n $this->assertContains($exp, $res[\"data\"][\"text\"]);\n }", "public function testTeamMembersIdTeamBillingSourcePost()\n {\n\n }", "public function testExample()\n {\n $response = $this->json('POST', '/teams/store', ['nama' => $this->faker->words(3, true)]);\n $response->assertStatus(200);\n \n // $response = $this->get('/');\n\n // $teams = $factory('App\\Models\\Teams')->create();\n\n // $response = $this->post(route('teams.store'), [\n // //isi parameter sesuai kebutuhan request\n // 'nama' => $this->faker->words(3, true)\n // ]);\n\n // $response->assertStatus(200);\n\n // $response\n // ->assertStatus(200)\n // ->assertJson([\n // 'created' => true,\n // ]);\n }", "public function testPostPageRequestWhenAuthorized()\n {\n $this->withoutExceptionHandling();\n $request = $this->actingAs($this->user)\n ->postJson('api/post', ['title' => 'test content', 'content' => 'test content', 'tag' => 'test tag', 'tags_array' => $this->tags->pluck('id')->toArray()]);\n $request->assertOk()\n ->assertJson([\n 'result' => true\n ]);\n\n $this->assertSame(2, Post::all()->count());\n }", "public function testSimpleSubmit()\n {\n \t$personExample = [\n \t\t\t\t\t'destination'=>\"D\",\n\t\t\t\t\t\t'img'=>\"people15\",\n\t\t\t\t\t\t'name'=>\"mike12802\",\n\t\t\t\t\t\t'origin'=>\"E\",\n\t\t\t\t\t\t'time'=>12,\n\t\t\t\t\t\t'time0'=>61,\n\t\t\t\t\t\t'x'=>20,\n\t\t\t\t\t\t'y'=>20\n \t\t\t\t];\n \t$this->json('POST', '/submitdata', [\n \t\t\t'turnNumber' =>0, \n \t\t\t'clientID' => 1467960390, \n \t\t\t'currentTime' => 1467960391, \n \t\t\t'peoples' => [$personExample,$personExample,$personExample,$personExample]\n \t\t])->seeJson([\n\t\t\t\t'turnNumber' => 0,\n\t\t\t\t'clientID '=>1467960390,\n\t\t\t]);\n }", "public function testPostMembers()\n {\n }", "public function testGet()\n {\n /*$this->request->setMethod('GET');\n $this->request->getPost()->set('chave', 'valor');\n\n $result = $this->controller->dispatch($this->request);\n $response = $this->controller->getResponse();\n \n $this->assertEquals(200, $response->getStatusCode());*/\n }", "public function testTeamMembersIdTeamImageFoldersPost()\n {\n\n }" ]
[ "0.7755007", "0.7207059", "0.71818906", "0.70302486", "0.6932332", "0.6904523", "0.6878852", "0.6830189", "0.6815214", "0.6809224", "0.6804134", "0.6800151", "0.679724", "0.67965347", "0.6746222", "0.67371", "0.6692771", "0.66847086", "0.6672428", "0.6650537", "0.6646877", "0.65880895", "0.6583902", "0.6563005", "0.65573305", "0.65437907", "0.6531055", "0.65185976", "0.6509694", "0.6495497", "0.6463915", "0.6458486", "0.64492935", "0.6429377", "0.64210594", "0.6414945", "0.6407116", "0.6397104", "0.6387159", "0.6379809", "0.63691646", "0.63587254", "0.63586646", "0.6358481", "0.6356194", "0.6350416", "0.63503385", "0.63478184", "0.6344204", "0.63418037", "0.63330775", "0.6323495", "0.6322102", "0.6316071", "0.6315686", "0.6315389", "0.63043857", "0.6303888", "0.62994945", "0.6299157", "0.629374", "0.6290968", "0.6273688", "0.6268879", "0.62678885", "0.62635875", "0.6262358", "0.62600565", "0.6249369", "0.6237949", "0.62350756", "0.6231705", "0.6227411", "0.6226177", "0.6221856", "0.6220758", "0.6215499", "0.6210641", "0.62098956", "0.6207349", "0.62044865", "0.6203065", "0.61952215", "0.61936206", "0.61816907", "0.6177229", "0.6174224", "0.6173913", "0.6169724", "0.6162643", "0.615725", "0.6152564", "0.61488044", "0.6138273", "0.6138137", "0.61378485", "0.61348325", "0.6130719", "0.6130596", "0.6124041" ]
0.73602897
1
/ TBD perform PK compression, based on values of data each column in PK becomes a key of resulting array $records: array of arrays, of count > $pk_count
/ TBD выполнить сжатие PK, основываясь на значениях данных, каждая колонка в PK становится ключом результирующего массива $records: массив массивов, количество которых больше $pk_count
function aggregate_pk_table($records, $pk_count) { $recursive = function($c) { }; $aa = array(); $pk = array_pad(array(), $pk_count, null); foreach($records as $record) { //$vs = array_values($r); $i = 0; $rr = $aa; foreach($record as $value) { if ($i < $pk_count) { if (!isset($rr[$value])) $rr[$value]; if ($value != $pk[$i]) { $pk[$i] = $value; } } $i++; } } return $aa; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getPrimaryKeyData(array $data)\n {\n $pk = array();\n foreach($this->primaryKeys as $primaryKey){\n if(array_key_exists($primaryKey, $data)){\n $pk[$primaryKey] = $data[$primaryKey];\n }\n }\n return $pk;\n }", "function dbQuery_rs2struct_preset($rs, $fields,$pkeys) {\r\n $pidx = array();\r\n $field2idx = array_flip($fields);\r\n foreach ($pkeys as $pkey) $pidx[] = $field2idx[$pkey];\r\n\r\n $data = array();\r\n if (count($pidx) > 0) {\r\n $pidx0 = array_shift($pidx);\r\n while ($row=$rs->fetch_row()) {\r\n $id = $row[$pidx0];\r\n foreach ($pidx as $i) $id .= '|'.$row[$i];\r\n $data[$id] = $row;\r\n }\r\n } else {\r\n // if there is NO primary key, then use numeric key\r\n while ($row=$rs->fetch_row()) {\r\n $data[] = $row;\r\n }\r\n }\r\n return array('keys'=>$pkey,'fields'=>$fields,'data'=>$data); \r\n}", "protected function _generateRecords(TableSchemaInterface $table, int $recordCount = 1): array\n {\n $records = [];\n for ($i = 0; $i < $recordCount; $i++) {\n $record = [];\n foreach ($table->columns() as $field) {\n $fieldInfo = $table->getColumn($field);\n $insert = '';\n switch ($fieldInfo['type']) {\n case 'decimal':\n $insert = $i + 1.5;\n break;\n case 'biginteger':\n case 'integer':\n case 'float':\n case 'smallinteger':\n case 'tinyinteger':\n $insert = $i + 1;\n break;\n case 'string':\n case 'binary':\n $isPrimary = in_array($field, $table->getPrimaryKey());\n if ($isPrimary) {\n $insert = Text::uuid();\n } else {\n $insert = 'Lorem ipsum dolor sit amet';\n if (!empty($fieldInfo['length'])) {\n $insert = substr(\n $insert,\n 0,\n (int)$fieldInfo['length'] > 2\n ? (int)$fieldInfo['length'] - 2\n : (int)$fieldInfo['length']\n );\n }\n }\n break;\n case 'timestamp':\n case 'timestamptimezone':\n case 'timestampfractional':\n $insert = time();\n break;\n case 'datetime':\n $insert = date('Y-m-d H:i:s');\n break;\n case 'date':\n $insert = date('Y-m-d');\n break;\n case 'time':\n $insert = date('H:i:s');\n break;\n case 'boolean':\n $insert = 1;\n break;\n case 'text':\n $insert = 'Lorem ipsum dolor sit amet, aliquet feugiat.';\n $insert .= ' Convallis morbi fringilla gravida,';\n $insert .= ' phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin';\n $insert .= ' venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla';\n $insert .= ' vestibulum massa neque ut et, id hendrerit sit,';\n $insert .= ' feugiat in taciti enim proin nibh, tempor dignissim, rhoncus';\n $insert .= ' duis vestibulum nunc mattis convallis.';\n break;\n case 'uuid':\n $insert = Text::uuid();\n break;\n }\n $record[$field] = $insert;\n }\n $records[] = $record;\n }\n\n return $records;\n }", "public function extract() {\n $pkValues = array();\n // Lose the parentheses, they mean nothing to us (more importantly, \"((key = value))\" fails)\n // @fixme A string primary key containing a \"(\" will not be returned.\n $where = str_replace(array('(', ')'), '', $this->_where);\n foreach ($this->_pkColumns as $pk) {\n $regexp = '/(?:`?' . preg_quote($this->_tableName) . '`?\\.|\\s|^){1}`?(?:' .\n preg_quote($pk) .\n ')`?\\s?=\\s?(?:(?P<q>[\\'\"])(?P<value>(?:(?!\\k<q>).)*)\\k<q>|(?P<rest>\\w*))/';\n if (!preg_match($regexp, $where, $matches)) {\n continue;\n }\n // Note: backreference \"rest\" is there to catch unquoted\n // values. (id = 100 instead of id = \"100\")\n $value = $matches['value'];\n if (!empty($matches['rest'])) {\n $value = $matches['rest'];\n }\n $pkValues[$pk] = $value;\n }\n return $pkValues;\n }", "protected function prepareData(): array\n {\n $data = $this->toArray(true);\n $id_field_name = $this->getIdFieldName();\n if (!is_null($id_field_name)) {\n foreach ($data AS $key => $value) {\n if ($key == $id_field_name) {\n unset($data[$key]);\n break;\n }\n }\n }\n return $this->dbc->generateParameterizedComponents($data);\n }", "function dataToArray($data) {\n $arr = [];\n foreach ($data as $o) {\n $arr[$o['id']] = $o;\n }\n return $arr;\n}", "protected function fetchKeys()\r\n {\r\n $keys = array();\r\n foreach($this->getData() as $i => $data)\r\n $keys[$i] = $data['_id'];\r\n return $keys;\r\n }", "private function _compressMultiData($resultSet)\n\t{\n\t\t$finalResSet = array();\n\t\tforeach($resultSet as $memcacheKey => $memcacheValue)\n\t\t{\n\t\t\t$memcacheKey = $this->getKey($memcacheKey);\n\t\t\tif($this->serverConf['enable_user_level_compression']===1)\n\t\t\t{\n\t\t\t\t$finalResSet[$memcacheKey] = gzcompress(json_encode($memcacheValue),9);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$finalResSet[$memcacheKey] = $memcacheValue;\n\t\t\t}\n\t\t}\n\t\treturn $finalResSet;\n\t}", "static function cache_array_main_id($row) {\n return static::serialize_pk_array(static::row_pk($row));\n }", "public function batchInsert(array $data)\n {\n $ids = [];\n foreach ($data as $item) {\n if (isset($item['id'])) {\n if (array_key_exists($item['id'], $this->table->data['data'])) {\n continue;\n }\n } else {\n $item = ['id' => $this->generateId()] + $item;\n }\n\n $ids[] = $this->insert($item);\n }\n\n return $ids;\n }", "protected function _indexRecords($records)\n {\n $index = array();\n\n foreach ($records as $record) {\n $index[$record->id] = $record;\n }\n\n return $index;\n }", "function dbQuery_rs2struct($rs, $omitPrimaryKeys=FALSE,$indexByPrimaryKey=TRUE) {\r\n // with fields 'fields' and 'data', whereby data is indexed by $pkey;\r\n // $pkey is removed from the data itself if $omitPrimaryKeys is TRUE.\r\n $fields = array();\r\n $fieldInfo = mysqli_fetch_fields($rs);\r\n $pidx = array();\r\n $pkey = array();\r\n $usedFields = array();\r\n foreach ($fieldInfo as $i=>$f) { \r\n $table = $f->table;\r\n $col = $f->name;\r\n $flags = $f->flags;\r\n if (isset($usedFields[$col])) $col = $table.'.'.$col;\r\n $usedFields[$col] = TRUE;\r\n if ($flags & MYSQLI_PRI_KEY_FLAG) { $pidx[] = $i; $pkey[] = $col; }\r\n $fields[] = $col;\r\n }\r\n $data = array();\r\n if ($indexByPrimaryKey && count($pidx) > 0) {\r\n $pidx0 = array_shift($pidx);\r\n if ($omitPrimaryKeys) {\r\n unset($fields[$pidx0]);\r\n foreach ($pidx as $i) unset($fields[$i]);\r\n $fields = array_values($fields);\r\n }\r\n while ($row=$rs->fetch_row()) {\r\n $id = $row[$pidx0];\r\n foreach ($pidx as $i) $id .= '|'.$row[$i];\r\n if ($omitPrimaryKeys) {\r\n unset($row[$pidx0]);\r\n foreach ($pidx as $i) unset($row[$i]);\r\n $row = array_values($row);\r\n }\r\n $data[$id] = $row;\r\n }\r\n } else {\r\n // if there is NO primary key, then use numeric key\r\n while ($row=$rs->fetch_row()) {\r\n $data[] = $row;\r\n }\r\n // formatAs_error('Query result must contain at least one primary key field.');\r\n }\r\n return array('keys'=>$pkey,'fields'=>$fields,'data'=>$data); \r\n}", "private function getDataForDB(): array {\n $data = $this->getDataAssoc();\n $dbData = array();\n \n if (is_array($data)) {\n foreach ($data as $key => $val) {\n $newKey = preg_replace_callback(\n '/[A-Z]/',\n function($matches) {\n return '_' . strtolower($matches[0]);\n },\n $key\n );\n $dbData[$newKey] = $val;\n }\n }\n \n return $dbData;\n }", "function getPrimaryKeyAndExtra()\r\n {\r\n $origColNames = $this->getDBFields();\r\n if (is_array( $origColNames )) {\r\n foreach ($origColNames as $origColName) {\r\n $colName \t= $origColName->Field;\r\n $key \t\t\t= $origColName->Key;\r\n $extra \t\t= $origColName->Extra;\r\n $type \t\t= $origColName->Type;\r\n if ($key == \"PRI\") {\r\n return array( \"key\"=>$key, \"extra\"=>$extra, \"type\"=>$type, \"colname\"=>$colName );\r\n }\r\n }\r\n }\r\n return false;\r\n }", "public function toInflatedArray()\n {\n $data = array();\n $schema = static::getSchema();\n $data = $this->getData();\n foreach ($data as $k => $v) {\n $col = $schema->getColumn($k);\n if ($col && $col->isa) {\n $data[ $k ] = $col->inflate($v, $this);\n } else {\n $data[ $k ] = $v;\n }\n }\n\n return $data;\n }", "function cb791($a, $groupby_key, $key_id)\r\n{\r\n $ret=array();\r\n\r\n if(!empty($a))\r\n foreach($a as $k=>$v)\r\n {\r\n if(!isset($ret[$v[$groupby_key]])) $ret[$v[$groupby_key]] = array();\r\n $ret[$v[$groupby_key]][$v[$key_id]] = $v;\r\n continue;\r\n }\r\n return $ret;\r\n}", "protected function prepareInsertData(array $data): array\n {\n $results = [];\n if ($this->extraColumns) {\n foreach ($data as $key => $value) {\n $results[] = array_merge(\n $this->extraColumns,\n [$this->keyColumn => $key, $this->valueColumn => $value]\n );\n }\n } else {\n foreach ($data as $key => $value) {\n $results[] = [$this->keyColumn => $key, $this->valueColumn => $value];\n }\n }\n\n return $results;\n }", "public function getPrimaryKeys();", "protected function _prepareData()\n\t{\n\t\t//get the table field data\n\t\tif(!$this->_fields){\n\t\t\t$fieldData = DB::query('DESCRIBE '.$this->_tableName);\n\t\t\tforeach($fieldData as $field){\n\t\t\t\t$this->_fields[$field->Field] = $field;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//build write array of only the appropriate fields\n\t\t$fields = array_keys($this->_fields);\n\t\t$writeData = array();\n\t\tforeach($this->getData() as $key=>$value){\n\t\t\tif(in_array($key, $fields)){\n\t\t\t\tif($value instanceof BaseObject){\n\t\t\t\t\t$writeData[$key] = $value->_toSql();\n\t\t\t\t} else {\n\t\t\t\t\t$writeData[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//run the auto-population on row creation\n\t\tif(!$this->getId()){\n\t\t\tforeach($this->_autoInsertFields as $field=>$function){\n\t\t\t\tif(in_array($field, $fields)){\n\t\t\t\t\t$writeData[$field] = call_user_func(array($this, $function));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//run the autopopulation on row update - so everytime the row is saved in other words\n\t\tforeach($this->_autoUpdateFields as $field=>$function){\n\t\t\tif(in_array($field, $fields)){\n\t\t\t\t$writeData[$field] = call_user_func(array($this, $function));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $writeData;\n\t}", "abstract public function getPKColumns($database, $table);", "private function getPrimaryKeySet($table_name)\n\t{\n\t\t//$sql = 'SHOW KEYS FROM `' . $table_name; // . '` WHERE `key_name` = \"PRIMARY\"';\n\t\t$sql = 'SHOW COLUMNS FROM `' . $table_name . '` WHERE `key` = \"PRI\"';\n\t\t$rs = $this->selectDataSet($sql);\n\t\tif($rs)\n\t\t{\n\t\t\t$arr = array();\n\t\t\tforeach($rs as $row)\n\t\t\t{\n\t\t\t\t//$arr[] = $row['key_name']; \n\t\t\t\t$arr[] = $row['Field'];\n\t\t\t}\n\t\t\treturn $arr;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->err(\"Error in MySQLTable.getPrimaryKeys(\" . $table_name . \") PDO recordset: \" . print_r($rs, true));\n\t\t\treturn false;\n\t\t}\n\t}", "public static function row_pk($row) {\n $pk_array = array();\n foreach (static::table_pk() as $table_pk) {\n $pk_array[$table_pk] = $row[$table_pk];\n }\n return $pk_array;\n }", "function associate_values($data, $data_format){\n $result = array();\n if(is_array($data) and is_array($data_format)){\n foreach($data as $line){\n $x = 1;\n $row = array();\n foreach($line as $field){\n $row[$data_format[$x]['fn']] = trim(substr($field,0,$data_format[$x]['fl']));\n $x++;\n }\n $result[] = $row;\n }\n }else{\n $result = $data;\n }\n return $result;\n}", "function DBMapArray(&$result, $key = false, $autoClose = true)\n{\n $tr = array();\n $singleCol = null;\n\n while ($row = $result->fetch_assoc())\n {\n if (is_null($singleCol))\n {\n $singleCol = false;\n if (count(array_keys($row)) == 1)\n {\n $singleCol = array_keys($row);\n $singleCol = array_shift($singleCol);\n }\n }\n if ($key === false)\n {\n $key = array_keys($row);\n $key = array_shift($key);\n }\n if (is_array($key))\n switch (count($key))\n {\n case 1:\n $tr[$row[$key[0]]] = $singleCol ? $row[$singleCol] : $row;\n break;\n case 2:\n if($key[1])\n $tr[$row[$key[0]]][$row[$key[1]]] = $singleCol ? $row[$singleCol] : $row;\n else\n $tr[$row[$key[0]]][] = $singleCol ? $row[$singleCol] : $row;\n break;\n }\n elseif (is_null($key))\n $tr[] = $singleCol ? $row[$singleCol] : $row;\n else\n $tr[$row[$key]] = $singleCol ? $row[$singleCol] : $row;\n }\n\n if ($autoClose)\n $result->close();\n\n return $tr;\n}", "protected function hydrateAllData()\n {\n $result = array();\n\n $data = $this->_stmt->fetchAll(PDO::FETCH_ASSOC);\n foreach($data as $row)\n {\n $keys = array_keys($row);\n\n $result[ $row[ $keys[0] ] ] = $row[ $keys[1] ];\n }\n\n return $result;\n }", "public function getSqlZipArray()\r\n {\r\n $zipArray = [];\r\n foreach($this->tableInfo as $tableName => $rows)\r\n {\r\n $zipArray[$tableName.'.sql'] = \r\n Helpers::arrayToInsertQuery($tableName, $rows);\r\n }\r\n \r\n return $zipArray;\r\n }", "function cake_arr_to_assoc_tbl ($arr_cake) {\r\n if (! $arr_cake) {\r\n return array();\r\n }\r\n\r\n $arr_tbl2 = array();\r\n foreach ($arr_cake as $r_row) {\r\n $rtmp = array();\r\n foreach ($r_row as $rf) {\r\n $rtmp = array_merge($rtmp, $rf);\r\n }\r\n $arr_tbl2[] = $rtmp;\r\n }\r\n\r\n $akeys = array_keys($rtmp);\r\n\r\n $arr = array();\r\n foreach ($arr_tbl2 as $row) {\r\n $new_row = array();\r\n foreach ($akeys as $akey) {\r\n $new_row[$akey] = $row[$akey];\r\n }\r\n $arr[] = $new_row;\r\n }\r\n\r\n return $arr;\r\n}", "function getSelectedRecords($record)\n {\n $keys = array();\n \n if (isset($record[$this->fieldName()]))\n {\n for ($i = 0; $i < count($record[$this->fieldName()]); $i++)\n {\n if (is_array($record[$this->fieldName()][$i][$this->getRemoteKey()]))\n {\n $key = $this->m_destInstance->primaryKey($record[$this->fieldName()][$i][$this->getRemoteKey()]);\n }\n else\n {\n $key = $this->m_destInstance->primaryKey(array($this->m_destInstance->primaryKeyField()=>$record[$this->fieldName()][$i][$this->getRemoteKey()]));\n }\n \n $keys[] = $key;\n }\n }\n \n return $keys;\n }", "protected function _extractSelectedRecordsByKey($record)\n {\n $selectedRecordsByKey = array();\n foreach ($record[$this->fieldName()] as $selectedRecord)\n {\n $selectedKey = \n is_array($selectedRecord[$this->getRemoteKey()]) ?\n $selectedRecord[$this->getRemoteKey()][$this->getDestination()->primaryKeyField()] :\n $selectedRecord[$this->getRemoteKey()];\n \n $selectedRecordsByKey[$selectedKey] = $selectedRecord;\n }\n \n return $selectedRecordsByKey; \n }", "protected function fetchKeys()\n {\n $keys=array();\n foreach($this->getData() as $i=>$data)\n {\n $key=$this->keyAttribute===null ? $data->getPrimaryKey() : $data->{$this->keyAttribute};\n $keys[$i]=is_array($key) ? implode(',',$key) : $key;\n }\n return $keys;\n }", "function pklist ($aa) {\n $pklist = array ();\n foreach ($aa as $fk_authors => $o) {\n if (count ($o['titles'])) {\n $pklist[] = $fk_authors;\n }\n }\n return $pklist;\n}", "public function prepare()\n {\n if (is_array($this->dataPrepared)) {\n return false;\n }\n\n $data = $this->data;\n\n foreach ($data as $key => &$row) {\n $row = (array) $row;\n\n $ids = [];\n\n foreach ($this->getColumns() as $col) {\n /* @var $col \\ZfcDatagrid\\Column\\AbstractColumn */\n\n if (isset($row[$col->getUniqueId()]) && $col->isIdentity() === true) {\n $ids[] = $row[$col->getUniqueId()];\n }\n\n /*\n * Maybe the data come not from another DataSource?\n */\n if ($col instanceof Column\\ExternalData) {\n /* @var $col \\ZfcDatagrid\\Column\\ExternalData */\n // @todo improve the interface...\n $dataPopulation = $col->getDataPopulation();\n\n foreach ($dataPopulation->getObjectParametersColumn() as $parameter) {\n $dataPopulation->setObjectParameter($parameter['objectParameterName'], $row[$parameter['column']->getUniqueId()]);\n }\n $row[$col->getUniqueId()] = $dataPopulation->toString();\n }\n\n if (!isset($row[$col->getUniqueId()])) {\n $row[$col->getUniqueId()] = '';\n }\n\n /*\n * Replace\n */\n if ($col->hasReplaceValues() === true) {\n $replaceValues = $col->getReplaceValues();\n\n if (is_array($row[$col->getUniqueId()])) {\n foreach ($row[$col->getUniqueId()] as &$value) {\n if (isset($replaceValues[$value])) {\n $value = $replaceValues[$value];\n } elseif ($col->notReplacedGetEmpty() === true) {\n $value = '';\n }\n }\n } else {\n if (isset($replaceValues[$row[$col->getUniqueId()]])) {\n $row[$col->getUniqueId()] = $replaceValues[$row[$col->getUniqueId()]];\n } elseif ($col->notReplacedGetEmpty() === true) {\n $row[$col->getUniqueId()] = '';\n }\n }\n }\n\n /*\n * Type converting\n */\n if ($this->getRendererName() != 'PHPExcel') {\n $row[$col->getUniqueId()] = $col->getType()->getUserValue($row[$col->getUniqueId()]);\n }\n\n /*\n * Translate (nach typ convertierung -> PhpArray...)\n */\n if ($col->isTranslationEnabled() === true) {\n if (is_array($row[$col->getUniqueId()])) {\n foreach ($row[$col->getUniqueId()] as &$value) {\n if (is_array($value)) {\n continue;\n }\n $value = $this->getTranslator()->translate($value);\n }\n } else {\n $row[$col->getUniqueId()] = $this->getTranslator()->translate($row[$col->getUniqueId()]);\n }\n }\n\n /*\n * Trim the values\n */\n if (is_array($row[$col->getUniqueId()])) {\n array_walk_recursive($row[$col->getUniqueId()], function (&$value) {\n if (!is_object($value)) {\n $value = trim($value);\n }\n });\n } elseif (!is_object($row[$col->getUniqueId()])) {\n $row[$col->getUniqueId()] = trim($row[$col->getUniqueId()]);\n }\n\n /*\n * Custom formatter\n */\n if ($col->hasFormatters() === true) {\n foreach ($col->getFormatters() as $formatter) {\n $formatter->setRowData($row);\n $formatter->setRendererName($this->getRendererName());\n\n $row[$col->getUniqueId()] = $formatter->format($col);\n }\n }\n }\n\n // Concat all identity columns\n if ($ids) {\n $data[$key]['idConcated'] = implode('~', $ids);\n }\n }\n\n $this->dataPrepared = $data;\n\n return true;\n }", "protected function findPrimaryKeys($table)\n {\n $result = [];\n switch($this->AsaVersion) {\n case 9:\n $sql = <<<SQL\nSELECT\n trim(C.column_name) AS field_name\nFROM SYS.SYSTABLE T\nLEFT OUTER JOIN SYS.SYSCOLUMN C ON\n T.table_id=C.table_id\nJOIN SYS.SYSUSERPERMS U ON\n U.user_id = T.creator\nWHERE\n upper(table_name) = upper(:tableName) AND\n upper(U.user_name) = upper(:schemaName) AND\n C.pkey='Y'\nSQL;\n break;\n case 11:\n case 12:\n case 16:\n case 17:\n $sql = <<<SQL\nSELECT\n trim(c.column_name) field_name\nFROM SYS.SYSTABLE t\nLEFT OUTER JOIN SYS.SYSUSER U ON\n U.user_id = T.creator\nLEFT OUTER JOIN SYS.SYSCOLUMN c ON\n t.table_id=c.table_id\nLEFT OUTER JOIN SYS.SYSIDXCOL i ON\n t.table_id=i.table_id AND\n i.index_id = 0 AND\n c.column_id=i.column_id\nWHERE\n upper(t.table_name) = upper(:tableName) AND\n upper(U.user_name) = upper(:schemaName) AND\n c.pkey='Y'\nSQL;\n break;\n default:\n throw new NotSupportedException('This version ASA( Ver.'.$this->AsaVersion.') is not supported.');\n }\n\n $primary = $this->db\n ->createCommand($sql, [\n ':tableName' => $table->name,\n ':schemaName' => $table->schemaName,\n ])\n ->queryAll();\n\n $result = [];\n foreach ($primary as $row) {\n $result[] = $row['field_name'];\n }\n $table->primaryKey = $result;\n\t}", "public function getKeyValueMap() {\n $columns = [];\n foreach($this->_data as $row)\n {\n $columns[$row['id']] = $row['csv_field'];\n }\n return $columns;\n }", "function formatData($data) {\n $newData = array();\n foreach($data as $key => $value) {\n foreach($value as $indice => $valor) {\n if ($indice == 'data_serial') {\n $newData[$key][$indice] = unserialize($valor);\n } else {\n $newData[$key][$indice] = $valor; \n }\n }\n }\n return $newData;\n}", "function createAssociativeArray($result, $data)\n{\n global $log;\n //get the column table names\n $fieldNames = $result->fetch_fields();\n\n // create an array of field (column names)\n $fieldNames_array = [];\n foreach ($fieldNames as $value) {\n $fieldNames_array[] = $value->name;\n }\n\n // use $i to loop through our row and get the correct field name to insert as a key\n $i = 0;\n $row_num = 0;\n $log = [];\n\n /*\n * here we do a generic keys / values add to our $data array for dreamers, some volunteer data, etc.\n * row_num is appended to field name if the while loop runs more than once (which would indicate a multi-row return)\n */\n while ($row = mysqli_fetch_assoc($result)) {\n foreach ($fieldNames_array as $value) {\n if ($row[$fieldNames_array[$i]] == null) {\n //if 'value' at given 'key' is null, then display empty string instead of null\n $data[$fieldNames_array[$i] . $row_num] = \"\";\n } //if 'key' is \"dreamer's date of birth\" or \"user's date joined\" then format them for readability\n //formatSQLDate (functions.php)\n else if ($fieldNames_array[$i] == \"dreamer_date_of_birth\" || $fieldNames_array[$i] == \"user_date_joined\") {\n $data[$fieldNames_array[$i] . $row_num] = formatSQLDate($row[$fieldNames_array[$i]]);\n } //if 'key' is \"user's phone\" then format them for readability\n //formatSQLPhone (functions.php)\n else if ($fieldNames_array[$i] == \"user_phone\") {\n $data[$fieldNames_array[$i] . $row_num] = formatSQLPhone($row[$fieldNames_array[$i]]);\n } else {\n //display 'value' at given 'key'\n $data[$fieldNames_array[$i] . $row_num] = $row[$fieldNames_array[$i]];\n }\n $i++;\n }\n $i = 0;\n $row_num++;\n }\n //return object\n return $data;\n}", "public function GetPrimaryKeysValues() {\n $db = & $this->DB();\n $pk = $this->GetPrimaryKeys($db, $this->_table);\n\n $result = \"\";\n foreach ($pk as $field) {\n $result .= sprintf(\"[%8s]\", $this->$field);\n }\n return $result;\n }", "public function fetchRows($primaryKeyValues)\n {\n $rows = array();\n \n if (count($primaryKeyValues) > 0) {\n $primary_key_chunks = array_chunk($primaryKeyValues, CHUNK_SIZE);\n \n foreach ($primary_key_chunks as $primary_key_value_set) {\n $keyValueSets = array();\n \n foreach ($primary_key_value_set as $index => $set) {\n $quoted_set = \\iRAP\\CoreLibs\\ArrayLib::wrapElements($set, \"'\");\n $keyValueSets[] = \"(\" . implode(',', $quoted_set) . \")\";\n }\n \n \n $sql = \"SELECT * FROM `\" . $this->m_table . \"` \" .\n \"WHERE (\" . $this->getPrimaryKeyString() . \") IN (\" . implode(',', $keyValueSets) . \")\";\n \n $result = $this->m_mysqliConn->query($sql);\n \n if ($result === false) {\n throw new Exception(\"problem with query: \" . $sql);\n }\n \n while (($row = $result->fetch_assoc()) != null) {\n $rows[] = $row;\n }\n }\n }\n \n return $rows;\n }", "public function transformForPersistence(array $data): array;", "public static function toStoreData($data, $keyProperty, $valueProperty, $idProperty='id'){\n $result = [];\n $i = 1;\n foreach ($data as $key => $value){\n $result[] = [$idProperty => $i, $keyProperty => $key, $valueProperty => $value];\n $i++;\n }\n return $result;\n }", "public function remapListedDBRecords() {}", "private function processPrimaryKeys($ids)\n {\n $where = array();\n if(is_array($ids)){\n if(array_search(\"\", $ids) !== false){\n throw new \\Exception(__CLASS__.\" function: \".__FUNCTION__.\"() primary keys can not contain empty value :\".print_r($this->ids, true));\n }\n // verfiy total pass in primary keys \n if(count($ids) != count($this->primaryKeys)){\n throw new \\Exception(\"The number of primary keys doesn't match, it should contain:\".print_r($this->primaryKeys, true));\n }\n // convert to key & value data format\n foreach($this->primaryKeys as $key => $primaryKey){\n $where[$primaryKey] = current($ids);\n next($ids);\n }\n }else{\n // when ids pass in as string (not array) primary key has to be only 1\n if(count($this->primaryKeys) != 1){\n throw new \\Exception(\"The number of primary keys doesn't match, it should contain:\".print_r($this->primaryKeys, true));\n }\n $where[$this->primaryKeys[0]] = $ids;\n }\n return $where;\n }", "public function PKArray() {\n $returnvalue = array();\n $returnvalue['ShipmentID'] = $this->getShipmentID();\n return $returnvalue;\n }", "public function providerGetPK() {\n return array(\n array('Person','id'),\n array('Phone','id'),\n array('PersonPhone',array('person' => 'person','phone' => 'phone')),\n );\n }", "private function build_taxonIDs_with_objects_array($records)\n {\n $taxon_ids = array();\n foreach($records as $rec) {\n $taxon_id = (string) $rec[\"http://rs.tdwg.org/dwc/terms/taxonID\"];\n $taxon_ids[$taxon_id] = '';\n }\n return array_keys($taxon_ids);\n }", "public function getPrimaryKeyValues() {\n\t\treturn array(\n\t\t\tself::FIELD_CODI_RECINTE=>$this->getCodiRecinte(),\n\t\t\tself::FIELD_ZONA=>$this->getZona(),\n\t\t\tself::FIELD_FILA=>$this->getFila(),\n\t\t\tself::FIELD_NUMERO=>$this->getNumero());\n\t}", "public function getPrimaryKeyColumns(Table $table): array;", "function combine_same_barcode($result_set_of_trans_view) {\n\n $array_result_set_after_sort = array();\n while ($row_before_sort = mysql_fetch_assoc($result_set_of_trans_view)){\n $row_temp = null;\n $row_temp = array();\n\n if (count($array_result_set_after_sort) == 0) {\n $row_temp['barcode'] = $row_before_sort['barcode'];\n $row_temp['name'] = $row_before_sort['name'];\n $row_temp['quantity'] = $row_before_sort['quantity'];\n array_push($array_result_set_after_sort,$row_temp);\n }\n else {\n foreach ($array_result_set_after_sort as $row_number => $row_exist) {\n if($row_exist['barcode'] == $row_before_sort['barcode']){\n $array_result_set_after_sort[$row_number]['quantity'] = (int)$row_exist['quantity'] + (int)$row_before_sort['quantity'];\n break;\n }\n elseif($row_number == (count($array_result_set_after_sort) - 1)){\n $row_temp['barcode'] = $row_before_sort['barcode'];\n $row_temp['name'] = $row_before_sort['name'];\n $row_temp['quantity'] = $row_before_sort['quantity'];\n array_push($array_result_set_after_sort,$row_temp);\n }\n }\n }\n };\n return $array_result_set_after_sort;\n}", "protected function transformDataObjects()\n\t{\n\t\t$dataObjects = $this->data;\n\n\t\tforeach($dataObjects as $key => $row)\n\t\t{\n\t\t\t$this->data[$key] = (array) $row;\n\t\t}\n\t}", "public function import(&$data) {\r\n $importedPks = [];\r\n foreach ($data as $row) {\r\n $skipImport = isset($this->skipImport) ? call_user_func($this->skipImport, $row) : false;\r\n if (!$skipImport) {\r\n /* @var $model \\yii\\db\\ActiveRecord */\r\n $model = new $this->className;\r\n $uniqueAttributes = [];\r\n foreach ($this->configs as $config) {\r\n if (isset($config['attribute']) && $model->hasAttribute($config['attribute'])) {\r\n $value = call_user_func($config['value'], $row);\r\n //Create array of unique attributes\r\n if (isset($config['unique']) && $config['unique']) {\r\n $uniqueAttributes[$config['attribute']] = $value;\r\n }\r\n //Set value to the model\r\n $model->setAttribute($config['attribute'], $value);\r\n }\r\n }\r\n //Check if model is unique and saved with success\r\n if ($this->isActiveRecordUnique($uniqueAttributes) && $model->save()) {\r\n $importedPks[] = $model->primaryKey;\r\n }\r\n }\r\n }\r\n return $importedPks;\r\n }", "public function normalizeSchema()\n {\n $result = [];\n foreach ($this->records as $record) {\n if ($record->isAbstract()) {\n continue;\n }\n\n $schema = [\n ORM::M_ROLE_NAME => $record->getRole(),\n ORM::M_SOURCE => $record->getSource(),\n ORM::M_TABLE => $record->getTable(),\n ORM::M_DB => $record->getDatabase(),\n ORM::M_PRIMARY_KEY => $record->getPrimaryKey(),\n ORM::M_HIDDEN => $record->getHidden(),\n ORM::M_SECURED => $record->getSecured(),\n ORM::M_FILLABLE => $record->getFillable(),\n ORM::M_COLUMNS => $record->getDefaults(),\n ORM::M_NULLABLE => $record->getNullable(),\n ORM::M_MUTATORS => $record->getMutators(),\n ORM::M_VALIDATES => $record->getValidates(),\n ORM::M_RELATIONS => $this->packRelations($record)\n ];\n\n ksort($schema);\n $result[$record->getName()] = $schema;\n }\n\n return $result;\n }", "function groupArraysObjects ($query, $key, $arrays, $arraysOfObject = array(), $objects, $columns = array()) {\n\t$results = array();\n\twhile ($r = $query->fetch(PDO::FETCH_ASSOC)) {\n\t\t$row_key = $r[$key];\n\t\tif (!isset($results[$row_key])) {\n\t\t\t$results[$row_key] = $r;\n\n\t\t\t# arrays\n\t\t\tforeach ($arrays as $field => $as) {\n\t\t\t\tif (isset($r[$field])) {\n\t\t\t\t\t$results[$row_key][$as] = array($r[$field]);\n\t\t\t\t}\n\t\t\t\tunset($results[$row_key][$field]);\n\t\t\t}\n\n\t\t\t# arrays of objects\n\t\t\tforeach ($arraysOfObject as $objectKey => $col) {\n\t\t\t\t$object = array();\n\t\t\t\tforeach ($col as $column) {\n\t\t\t\t\tif (isset($r[$column])) {\n\t\t\t\t\t\t$object[$column] = $r[$column];\n\t\t\t\t\t}\n\t\t\t\t\tunset($results[$row_key][$column]);\n\t\t\t\t}\n\t\t\t\tif (count($object) > 0) {\n\t\t\t\t\tif (!isset($results[$row_key][$objectKey]))\n\t\t\t\t\t\t$results[$row_key][$objectKey] = array();\n\t\t\t\t\t$results[$row_key][$objectKey][] = $object;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t# objects\n\t\t\tforeach ($objects as $as => $object) {\n\t\t\t\tif (isset($r[$object['key']]) && isset($r[$object['value']])) {\n\t\t\t\t\t$new_object = new stdClass();\n\t\t\t\t\t$new_object->$r[$object['key']] = $r[$object['value']];\n\t\t\t\t\t$results[$row_key][$as] = $new_object;\n\t\t\t\t}\n\t\t\t\tunset($results[$row_key][$object['key']]);\n\t\t\t\tunset($results[$row_key][$object['value']]);\n\t\t\t}\n\t\t\tforeach ($columns as $columnName => $fields) {\n\t\t\t\t$results[$row_key][$columnName] = array();\n\t\t\t\tforeach ($fields as $field) {\n\t\t\t\t\t$value = $results[$row_key][$field];\n\t\t\t\t\t$results[$row_key][$columnName][$field] = $value;\n\t\t\t\t\tunset($results[$row_key][$field]);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tforeach ($arrays as $field => $as) {\n\t\t\t\tif (isset($r[$field])) {\n\t\t\t\t\tif (!isset($results[$row_key][$as]))\n\t\t\t\t\t\t$results[$row_key][$as] = array();\n\t\t\t\t\tif (!in_array($r[$field], $results[$row_key][$as]))\n\t\t\t\t\t\t$results[$row_key][$as][] = $r[$field];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach ($arraysOfObject as $objectKey => $col) {\n\t\t\t\t$object = array();\n\t\t\t\tforeach ($col as $column) {\n\t\t\t\t\tif (isset($r[$column])) {\n\t\t\t\t\t\t$object[$column] = $r[$column];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (count($object) > 0) {\n\t\t\t\t\tif (!isset($results[$row_key][$objectKey]))\n\t\t\t\t\t\t$results[$row_key][$objectKey] = array();\n\t\t\t\t\tif (!in_array($object, $results[$row_key][$objectKey]))\n\t\t\t\t\t\t$results[$row_key][$objectKey][] = $object;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach ($objects as $as => $object) {\n\t\t\t\tif (isset($r[$object['key']]) && isset($r[$object['value']])) {\n\t\t\t\t\tif (!isset($results[$row_key][$as]))\n\t\t\t\t\t\t$results[$row_key][$as] = new stdClass();\n\t\t\t\t\t$results[$row_key][$as]->$r[$object['key']] = $r[$object['value']];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn array_values($results);\n}", "abstract public function getPrimaryKey(): array;", "function groupAsArray ($input, $key, $fields) {\n $results = array();\n foreach ($input as $r) {\n\t\t$r = (array) $r;\n $row_key = $r[$key];\n if (!isset($results[$row_key])) {\n $results[$row_key] = $r;\n\t\t\tforeach ($fields as $field => $as) {\n\t if (isset($r[$field])) {\n\t $results[$row_key][$as] = array($r[$field]);\n\t } else {\n\t $results[$row_key][$as] = array();\n\t }\n\t\t\t}\n unset($results[$row_key][$field]);\n } else {\n\t\t\tforeach ($fields as $field => $as) {\n\t\t\t\tif (isset($r[$field])) {\n\t $results[$row_key][$as][] = $r[$field];\n\t }\n\t\t\t}\n }\n }\n return array_values($results);\n}", "public function getPrimaryKey()\n {\n $pks = array();\n $pks[0] = $this->getOehshnbr();\n $pks[1] = $this->getOehshseq();\n\n return $pks;\n }", "protected function primaryKeysAsArray() {\r\n\t\t$arr = array();\r\n\t\tforeach (static::getPrimaryKeys() as $field) {\r\n\t\t\t$arr[$field] = $this->$field;\r\n\t\t}\r\n\t\treturn $arr;\r\n\t}", "function columnize($data) {\r\n $data = (array)$data;\r\n $columns = array_keys($data);\r\n foreach ($data[$columns[0]] as $k => $v) {\r\n foreach ($columns as $kc => $vc) {\r\n $arr[$k][$vc] = $data[$vc][$k];\r\n }\r\n }\r\n return $arr;\r\n }", "function prepare_metadata_for( $ids_array ) {\n\t\tglobal $wpdb;\n\n\t\t$object_ids = array_map( 'intval', $ids_array );\n\t\t$id_list = join( ',', $object_ids );\n\t\t$table = _get_meta_table( 'post' );\n\t\t$meta_list = $wpdb->get_results( \"SELECT post_id, meta_key, meta_value FROM $table WHERE post_id IN ( $id_list )\" );\n\t\t$metadata = array();\n\t\tforeach ( $meta_list as $row )\n\t\t\t$metadata[$row->post_id][$row->meta_key][] = $row->meta_value;\n\n\t\tunset( $meta_list, $id_list, $object_ids, $ids_array );\n\t\treturn $metadata;\n\t}", "protected function tidy_data($data)\n {\n $insert_data = [];\n $columns = $this->get_table_columns();\n foreach ($data as $key => $val) {\n if (in_array($key, $columns)) {\n $insert_data[$key] = is_null($val)? '' : $val;\n }\n }\n\n return $insert_data;\n }", "function get_records_sql($sql) {\n/// The \"key\" is the first column returned, eg usually \"id\"\n/// The sql statement is provided as a string.\n\n global $db;\n\n $rs = $db->Execute(\"$sql\");\n if (!$rs) return false;\n\n if ( $rs->RecordCount() > 0 ) {\n if ($records = $rs->GetAssoc(true)) {\n foreach ($records as $key => $record) {\n $objects[$key] = (object) $record;\n }\n return $objects;\n } else {\n return false;\n }\n } else {\n return false;\n }\n}", "protected function _getExistingRecordsByKey(atkDb $db, $record, $mode)\n {\n $existingRecords = $this->load($db, $record, $mode);\n $existingRecordsByKey = array();\n foreach ($existingRecords as $existingRecord)\n {\n $existingRecordKey = \n is_array($existingRecord[$this->getRemoteKey()]) ? \n $existingRecord[$this->getRemoteKey()][$this->getDestination()->primaryKeyField()] :\n $existingRecord[$this->getRemoteKey()];\n \n $existingRecordsByKey[$existingRecordKey] = $existingRecord;\n }\n \n return $existingRecordsByKey; \n }", "protected function getPkWhere() {\n\t\t$pks = $this->pk();\n\t\t$ids = $this->id();\n\t\t\n\t\t//single PK\n\t\tif(!is_array($pks)) {\n\t\t\t$ids = array($pks=>$ids);\n\t\t\t$pks = array($pks);\n\t\t}\n\t\t\t\t\n\t\t$pk_where = array();\n\t\t$rawVals = array();\n\t\t\n\t\tforeach($pks as $pk) {\n\t\t\t$pkval = $ids[$pk];\n\n\t\t\t$pk_where[] = sprintf(\" %s=?\",$pk);\n\t\t\t$rawVals[] = $pkval;\n\t\t}\n\t\t\t\t\t\t\n\t\treturn array('where'=>join(' and ',$pk_where),'vals'=>$rawVals);\n\t}", "private function _buildDataPackage($model_name, $mirror_name, $primary_data = array()) {\n\t\tif(empty($primary_data)) { return false; }\n\t\t$data = array($mirror_name => array());\n\t\t$field_map = $this->_smartMirrors[$model_name][$mirror_name]['fieldMap'];\n\t\tforeach($field_map as $primary_key => $mirror_key) {\n\t\t\t$result_primary = Set::classicExtract($primary_data, $primary_key);\n\t\t\t$parts = explode('.', $mirror_key);\n\t\t\t$field_name = array_pop($parts);\n\t\t\tif(!(is_null($result_primary) or empty($field_name))) {\n\t\t\t\t$data[$mirror_name][$field_name] = $result_primary;\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "public function schemaPK() {\n return $this->primaryKeyArray;\n }", "public function schemaPK() {\n return $this->primaryKeyArray;\n }", "private function commonRefactorNameId($data)\n {\n $arr = [];\n foreach($data as $row) {\n $row = (Object)$row;\n $hash = $this->getStorageHash($row->name_en);\n $arr[$hash] = $row->id;\n }\n\n return $arr;\n }", "function my_iterator_to_array($entries, $PrimaryKey, $Key){\n $data = array();\n foreach ($entries as $profiletype) {\n if ($PrimaryKey) {\n $data[$profiletype->$PrimaryKey] = $profiletype->$Key;\n } else {\n $data[] = $profiletype->$Key;\n }\n }\n return $data;\n }", "public function getPrimaryKeyValues() {\n\t\treturn array(\n\t\t\tself::FIELD_ID=>$this->getId());\n\t}", "public function fetchKeyedRows($sql)\n {\n $result = $this->_execute(func_get_args());\n if(!$result) return array();\n\n $data = array();\n foreach ($this->_fetchAll($result) as $row) {\n // use first column's value for key\n $data[ reset($row) ] = $row;\n }\n\n return $data;\n }", "public function insertMany($data)\n {\n $arr = null;\n foreach ($data as $key => $value) {\n foreach ($value as $key_strto => $value_strto) {\n $arr_input[strtolower($key_strto)] = $value_strto;\n }\n $arr[] = $this->db->insert($this->table,$arr_input);\n }\n return $arr;\n }", "public function getUniqueKeyColumns(): Collection;", "public function getIdSkuPairs(): array\n {\n $select = clone $this->getSelect();\n $select->reset(\\Magento\\Framework\\DB\\Select::ORDER);\n $select->reset(\\Magento\\Framework\\DB\\Select::LIMIT_COUNT);\n $select->reset(\\Magento\\Framework\\DB\\Select::LIMIT_OFFSET);\n $select->reset(\\Magento\\Framework\\DB\\Select::COLUMNS);\n\n $select->columns($this->getResource()->getIdFieldName(), 'main_table');\n $select->columns('sku', 'main_table');\n return $this->getConnection()->fetchPairs($select, $this->_bindParams);\n }", "protected function getOidData()\n {\n return [\n [1, 1, '123', null, 1],\n [2, 2, '123', 1, 1],\n [3, 2, 'i:3:123', 1, 1],\n [4, 3, '1', 2, 1],\n [5, 3, '2', 2, 1],\n ];\n }", "public function getPrimaryKey()\n {\n $pks = array();\n $pks[0] = $this->getCivilization();\n $pks[1] = $this->getDimension();\n\n return $pks;\n }", "protected function _getRecords(): array\n {\n $fields = $values = $types = [];\n $columns = $this->_schema->columns();\n foreach ($this->records as $record) {\n $fields = array_merge($fields, array_intersect(array_keys($record), $columns));\n }\n /** @var array<string> $fields */\n $fields = array_values(array_unique($fields));\n foreach ($fields as $field) {\n $column = $this->_schema->getColumn($field);\n assert($column !== null);\n $types[$field] = $column['type'];\n }\n $default = array_fill_keys($fields, null);\n foreach ($this->records as $record) {\n $values[] = array_merge($default, $record);\n }\n\n return [$fields, $values, $types];\n }", "public function transformToDatabaseAppropriateArray() {\n $arr[\"registration\"] = $this->registration;\n $arr[\"make\"] = $this->make;\n $arr[\"color\"] = $this->color;\n $arr[\"year\"] = $this->year;\n $arr[\"price\"] = $this->price;\n\n return $arr;\n }", "public function getPrimaryKeys()\n {\n return array_keys($this->getArrayCopy());\n }", "public function getPrimaryKeys()\n {\n return array_keys($this->getArrayCopy());\n }", "public function getPrimaryKeys()\n {\n return array_keys($this->getArrayCopy());\n }", "public function get_array(): array\n {\n return array_merge(array($this->primary_key => $this->id), $this->data);\n }", "function hotpot_get_records_groupby($function, $fieldnames, $table, $select, $groupby) {\n\n $fields = sql_concat_join(\"'_'\", $fieldnames);\n $fields = \"$groupby, $function($fields) AS joinedvalues\";\n\n if ($fields) {\n $records = get_records_sql(\"SELECT $fields FROM $table WHERE $select GROUP BY $groupby\");\n }\n\n if (empty($fields) || empty($records)) {\n $records = array();\n }\n\n $fieldcount = count($fieldnames);\n\n foreach ($records as $id=>$record) {\n if (empty($record->joinedvalues)) {\n unset($records[$id]);\n } else {\n $values = explode('_', $record->joinedvalues);\n\n for ($i=0; $i<$fieldcount; $i++) {\n $fieldname = $fieldnames[$i];\n $records[$id]->$fieldname = $values[$i];\n }\n }\n unset($record->joinedvalues);\n }\n\n return $records;\n}", "function toIds( $data, $field = 'id' )\n\t{\n\t\t$ids = [];\n\t\tforeach($data as $i => $item)\n\t\t{\n\t\t\t$ids[] = $item->{$field};\n\t\t}\n\t\treturn $ids;\n\t}", "public static function getPrimaryKeys()\n {\n return array('scanId');\n }", "protected function _sortRawData()\n {\n foreach ($this->data as &$row) {\n ksort($row);\n }\n ksort($this->data);\n }", "protected function _mapDbDataToObjectData(array $db_data) {\n $object_data = array();\n\n foreach ($db_data as $col => $val) {\n if (array_key_exists($col, $this->_map_columns_to_properties)) {\n if (null == $this->_map_columns_to_properties[$col]) {\n continue;\n }\n $key = $this->_map_columns_to_properties[$col];\n\n } else {\n $key = $col;\n }\n\n $object_data[$key] = $val;\n }\n\n return $object_data;\n }", "function combineValues($data, $fields) {\n\t$result = array();\n\tforeach ($data as $id=>$row) {\n\t\t$values = array();\n\t\tforeach ($fields as $field) {\n\t\t\t$values[$field] = '--'.implode('--', explode(',', $row[$field])).'--';\n\t\t}\n\t\t$result[$id] = implode('--', array_unique($values));\n\t}\n\treturn $result;\n}", "protected function dataSet() {\n $data = parent::dataSet();\n for ($i = 0; $i < 50; $i++) {\n $data[] = array(\n 'name' => 'name_' . $i,\n 'age' => $i,\n 'job' => 'job_' . $i,\n 'created' => rand(0, time()),\n );\n }\n return $data;\n }", "public function all()\n\t{\n\t\t$results = array();\n\t\tforeach ($this->data as $record)\n\t\t\t$results[$record['id']] = (object) $record;\n\t\treturn $results;\n\t}", "protected final function expandPrimaryKey($id): array\n {\n if (!$this->primaryKey) {\n throw new QueryError(\"repository has no primary key defined\");\n }\n\n if (!\\is_array($id)) {\n $id = [$id];\n }\n if (\\count($id) !== \\count($this->primaryKey)) {\n throw new QueryError(\\sprintf(\"column count mismatch between primary key and user input, awaiting columns (in that order): '%s'\", \\implode(\"', '\", $this->primaryKey)));\n }\n\n $ret = [];\n\n $relationAlias = $this->getRelation()->getAlias();\n foreach (\\array_combine($this->primaryKey, $id) as $column => $value) {\n // Repository can choose to actually already have prefixed the column\n // primary key using the alias, let's cover this use case too: this\n // might happen if either the original select query do need\n // deambiguation from the start, or if the API user was extra\n // precautionous.\n if (false === \\strpos($column, '.')) {\n $ret[$relationAlias.'.'.$column] = $value;\n } else {\n $ret[$column] = $value;\n }\n }\n\n return $ret;\n }", "protected function fillObjects( $datas )\n {\n\n $pool = array();\n\n foreach( $datas as $data )\n {\n $id = $data[$this->tablePk];\n\n $entity = new $this->entityName();\n $entity->addData($data);\n $entity->setId($id);\n\n $this->addToPool($id,$entity);\n $pool[$id] = $entity;\n }\n\n return $pool;\n\n }", "private function _unCompressMultiData($resultSet,$hashKeyToActualKeyMap)\n\t{\n\t\tforeach($resultSet as $memcacheKey => $memcacheValue)\n\t\t{\n\t\t\t$actualKey = $hashKeyToActualKeyMap[$memcacheKey];\n\t\t\tif($this->serverConf['enable_user_level_compression']===1)\n\t\t\t{\n\t\t\t\t$finalResSet[$actualKey] = json_decode(gzuncompress($memcacheValue),true); \n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$finalResSet[$actualKey] = $memcacheValue;\n\t\t\t}\n\t\t}\n\t\treturn $finalResSet;\t\t\n\t}", "function encodeData($sql){\n //citation:http://stackoverflow.com/questions/750648/select-from-in-mysqli\n\n $meta = $sql->result_metadata();\n while ($field = $meta->fetch_field()) {\n $parameters[] = &$row[$field->name];\n }\n call_user_func_array(array($sql, 'bind_result'), $parameters);\n $data = array();\n while ($sql->fetch()) {\n foreach($row as $key => $val) {\n $x[$key] = $val;\n }\n $data[] = $x;\n }\n return $data;\n}", "function encodeData($sql){\n //citation:http://stackoverflow.com/questions/750648/select-from-in-mysqli\n\n $meta = $sql->result_metadata();\n while ($field = $meta->fetch_field()) {\n $parameters[] = &$row[$field->name];\n }\n call_user_func_array(array($sql, 'bind_result'), $parameters);\n $data = array();\n while ($sql->fetch()) {\n foreach($row as $key => $val) {\n $x[$key] = $val;\n }\n $data[] = $x;\n }\n return $data;\n}", "function encodeData($sql){\n //citation:http://stackoverflow.com/questions/750648/select-from-in-mysqli\n\n $meta = $sql->result_metadata();\n while ($field = $meta->fetch_field()) {\n $parameters[] = &$row[$field->name];\n }\n call_user_func_array(array($sql, 'bind_result'), $parameters);\n $data = array();\n while ($sql->fetch()) {\n foreach($row as $key => $val) {\n $x[$key] = $val;\n }\n $data[] = $x;\n }\n return $data;\n}", "function encodeData($sql){\n //citation:http://stackoverflow.com/questions/750648/select-from-in-mysqli\n\n $meta = $sql->result_metadata();\n while ($field = $meta->fetch_field()) {\n $parameters[] = &$row[$field->name];\n }\n call_user_func_array(array($sql, 'bind_result'), $parameters);\n $data = array();\n while ($sql->fetch()) {\n foreach($row as $key => $val) {\n $x[$key] = $val;\n }\n $data[] = $x;\n }\n return $data;\n}", "public function addUidAndPid()\n {\n ///////////////////////////////////\n //\n // Init RETURN array\n\n $arr_return = array();\n $arr_return['data']['arrFetchedTables'] = $this->pObj->arr_realTables_arrFields;\n if (isset($this->pObj->arrConsolidate['addedTableFields']))\n {\n $arr_return['data']['consolidate']['addedTableFields'] = $this->pObj->arrConsolidate['addedTableFields'];\n }\n if (!isset($this->pObj->arrConsolidate['addedTableFields']))\n {\n $arr_return['data']['consolidate']['addedTableFields'] = false;\n }\n // Init RETURN array\n ///////////////////////////////////\n //\n // Init consolidation array\n\n $this->init_arrConsolidation();\n if (!$this->bool_conf_unique_rows)\n {\n return $arr_return;\n }\n // Init consolidation array\n ///////////////////////////////////\n //\n // Add table.uids to the global arr_realTables_arrFields\n // 121211, dwildt, 1-\n //$arr_TCAcolumns = false;\n foreach ($this->pObj->arr_realTables_arrFields as $table => $arrFields)\n {\n// $this->pObj->objZz->loadTCA($table);\n // dwildt, 100428: ADDED in context with table_mm.sorting\n // Don't store uid or pid, if table isn't in the TCA\n if (in_array($table, array_keys($GLOBALS['TCA'])))\n {\n $bool_storeId = true;\n }\n if (!in_array($table, array_keys($GLOBALS['TCA'])))\n {\n $bool_storeId = false;\n }\n // Don't store uid or pid, if table isn't in the TCA\n if ((!in_array('uid', $arrFields) ) && $bool_storeId)\n {\n $arr_return['data']['arrFetchedTables'][$table][] = 'uid';\n $arr_return['data']['consolidate']['addedTableFields'][] = $table . '.uid';\n }\n if ((!in_array('pid', $arrFields) ) && $bool_storeId)\n {\n $arr_return['data']['arrFetchedTables'][$table][] = 'pid';\n $arr_return['data']['consolidate']['addedTableFields'][] = $table . '.pid';\n }\n }\n // Add table.uids to the global arr_realTables_arrFields\n\n\n return $arr_return;\n }", "public function datosPK() {\n\t\t// Recupera el valor de la base de datos\n\t\t$this->nombreClavePrimaria(); // me aseguro que obtengo el nombre de la clave primaria\n $link=Conectarse(); // y me conecto. //dependiendo del tipo recupero uno u otro.\n\t $Sql='SELECT '.$this->nombrePK.' FROM '.$this->nombreTabla;\n // echo $Sql;\n\t $result=mysqli_query($link,$Sql); // ejecuta la cadena sql y almacena el resultado el $result\n $ii=0;\n while ($row=mysqli_fetch_array($result)) {\n\t\t\t $datoid[$ii]=$row[$this->nombrePK];\n\t\t\t $ii++;\n\t\t }\n\t\tif (!is_null($datoid)) { // si no lo recupera, el valor por defecto)\n\t\t return $datoid; //envia el valor dado\n\t\t} else {\n\t\t return NULL;\n\t }\n\t mysqli_free_result($result);\n\t mysqli_close($link); \t\t\n\t}", "protected function restrictIdentityAutoincrementReadOnlyFields($data)\n {\n $dataArray = [];\n $fields = $this->fields();\n foreach ($fields as $name => $params) {\n if (property_exists($data, $name)) {\n if ($this->isFieldIdentity($name)) {\n $this->dataArrayIdentity[$name] = $data->{$name};\n }\n else {\n $dataArray[$name] = $data->{$name};\n }\n }\n }\n\n return $dataArray;\n }", "public static function getPrimaryKeys()\n {\n return array('personId');\n }", "private function getPrimaryKeys()\n {\n $primaryKeys = $this->getPrimaryKey();\n if (!is_array($primaryKeys)) {\n if ($primaryKeys === null) {\n $primaryKeys = array();\n } else {\n $primaryKeys = array($primaryKeys);\n }\n }\n return $primaryKeys;\n }" ]
[ "0.5656955", "0.5563204", "0.5316831", "0.52667606", "0.51853335", "0.5167197", "0.51592004", "0.5159141", "0.5155975", "0.5085571", "0.5081765", "0.5074231", "0.50702107", "0.50573516", "0.50571", "0.5052878", "0.50163823", "0.5001481", "0.50004786", "0.5000367", "0.4999454", "0.49779832", "0.49695465", "0.49500558", "0.49400285", "0.493499", "0.49133992", "0.4892807", "0.48801395", "0.48799855", "0.48525527", "0.48315856", "0.48278406", "0.48263022", "0.48250476", "0.48218542", "0.48198974", "0.48188868", "0.48172987", "0.48051366", "0.48017013", "0.4800799", "0.47997355", "0.47905716", "0.47804067", "0.47712088", "0.47598955", "0.4759754", "0.47584486", "0.475547", "0.47526518", "0.47433928", "0.47372973", "0.47279197", "0.47091192", "0.47029537", "0.47020397", "0.47005507", "0.46926233", "0.46900305", "0.46886915", "0.46771368", "0.4657084", "0.46529204", "0.46529204", "0.4652224", "0.46490496", "0.4642743", "0.46413845", "0.46174893", "0.461399", "0.45995137", "0.45992133", "0.45923272", "0.45899445", "0.4585219", "0.45852175", "0.45852175", "0.45852175", "0.45846677", "0.45835024", "0.45823923", "0.4579967", "0.45743278", "0.4573118", "0.457269", "0.45698106", "0.4564577", "0.45587134", "0.4556422", "0.455115", "0.45474628", "0.45474628", "0.45474628", "0.45474628", "0.45434436", "0.45428652", "0.45391488", "0.4535691", "0.45335317" ]
0.71740204
0
Enable link manager on wpadmin page.
Включите менеджер ссылок на странице wpadmin.
protected function link_manager() { add_filter( 'pre_option_link_manager_enabled', '__return_true' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function autolinkAddPages() {\r\n\tadd_options_page('AutoLink Options', 'AutoLinks', 8, __FILE__, 'autolinkAddAdminPage');\r\n}", "function addAdminPage()\r\n\t{\r\n\t\t$adminPage = add_options_page('Auto Content Links Options', 'Auto Content Links', 'administrator', 'auto-content-links', array($this, 'admin'));\r\n\t\tadd_action('load-'.$adminPage, array($this, 'adminScripts'));\r\n\t}", "static function enable() {\r\n // add shortcode hook for processing our links\r\n add_shortcode('intlink', array(__CLASS__, 'shortcode'));\r\n // add link to settings menu for plugin\r\n add_action('admin_menu', array(__CLASS__, 'addOptionsPages'));\r\n // start gettext\r\n $plugin_dir = basename(dirname(__FILE__));\r\n load_plugin_textdomain('rb-internal-links', false, dirname(plugin_basename(__FILE__)) . '/languages/');\r\n }", "function maybe_disable_link_manager()\n{\n}", "function wp_link_manager_disabled_message()\n{\n}", "function LB_admin_add() {\n\t add_menu_page( 'Link Bar Settings', 'Link Bar', 1, 'link-bar-settings', 'LB_admin_create', 'dashicons-share-alt2');\n}", "function wp_linkmove_menu() {\r\n /** Add a page to the options section of the website **/\r\n if (current_user_can('manage_options')) \t\t\t\t\r\n \t\tadd_options_page(\"链接平移设置\",\"链接平移设置\", 8, __FILE__, 'wp_linkmove_optionpage');\r\n}", "function pp_Tambah_Link_Admin()\n{\n add_menu_page(\n 'Inline Related by Trentech', // Judul dari halaman\n 'Inline Related by Trentech.id', // Tulisan yang ditampilkan pada menu\n 'manage_options', // Persyaratan untuk dapat melihat link\n 'art-settings', // slug dari file untuk menampilkan halaman ketika menu link diklik.\n 'tampil' \n );\n}", "public function insert_admin_menu_link() {\n require_once(PCUSU_PLUGIN_DIR . 'classes/PingFmCustomUrlHtml.php');\n\n // Add the link, and then add the admin CSS for the settings page\n $plugin_page = add_submenu_page(\n 'plugins.php',\n 'Ping.fm Settings',\n 'Ping.fm Settings',\n 'manage_options',\n 'wp-pingfm-settings',\n array('PingFmCustomUrlHtml', 'print_main_settings')\n );\n\n add_action(\"admin_head-$plugin_page\", array('PingFmCustomUrlHtml', 'print_admin_css'));\n add_contextual_help($plugin_page, PingFmCustomUrlHtml::get_contextual_help());\n\n // Add a link to the same page from the main plugins listing\n $plugin_action_links = 'plugin_action_links_' . plugin_basename(PCUSU_PLUGIN_FILE);\n add_filter($plugin_action_links, array($this, 'insert_admin_action_link'));\n }", "function network_tools_admin_menu() {\n\t\tadd_management_page(\n\t\t\t$this->plugin_manager_base->get_plugin_title(),\n\t\t\t$this->plugin_manager_base->get_plugin_title(),\n\t\t\t'manage_network_options',\n\t\t\t$this->properties->core_slug,\n\t\t\tarray(\n\t\t\t\t$this->template,\n\t\t\t\t'subsite_tools_options_page',\n\t\t\t)\n\t\t);\n\t}", "function reme_plugin_settings_link( $links ) { \r\n\t$title = __( 'Settings', 'reach-me' );\r\n\t$settings_link = '<a href=\"admin.php?page=reach-me/reach-me.php\">' . $title . '</a>'; \r\n\tarray_unshift( $links, $settings_link ); \r\n\r\n\treturn $links; \r\n}", "function nksc_add_menu_links() {\n\n\tadd_options_page( __( 'NK-Connect', NKSC_TD ), __( 'NK-Connect', NKSC_TD ), 'administrator', 'nksc', 'nksc_menu_settings' );\n}", "static function registerAdmin()\n {\n add_options_page('Github/BitBucket', 'GitHub/BitBucket', 'edit_pages', 'wordpress-github.php', array(__CLASS__, 'adminMenuCallback'));\n }", "function eael_add_settings_link( $links ) {\n $settings_link = sprintf( '<a href=\"admin.php?page=eael-settings\">' . __( 'Settings' ) . '</a>' );\n array_push( $links, $settings_link );\n return $links;\n}", "public function mobile_link_generator_create_admin_page() {\n $this->mobile_link_generator_options = get_option('mobile_link_generator_option_name');\n ?>\n\n <div class=\"wrap\">\n <h2>Mobile Link Generator</h2>\n <p>Plugin to install the links needed to bookmark your site on mobile</p>\n <?php settings_errors(); ?>\n\n <form method=\"post\" action=\"options.php\">\n <?php\n settings_fields('mobile_link_generator_option_group');\n do_settings_sections('mobile-link-generator-admin');\n submit_button();\n ?>\n </form>\n </div>\n <?php\n }", "function plugin_enablestatechange_links ($enable)\n{\n global $_TABLES;\n\n $is_enabled = $enable ? 1 : 0;\n\n // toggle links feeds\n DB_query (\"UPDATE {$_TABLES['syndication']} SET is_enabled = $is_enabled WHERE type = 'links'\");\n}", "function gluu_add_url_options(){\n\t\tadd_management_page( \"go-live-setting\", \"Go Live\", \"manage_options\", basename( __FILE__ ), array(\n\t\t\t\t$this,\n\t\t\t\t\"adminToolsPage\"\n\t\t\t) );\n\t}", "public static function addAdminMenu()\n {\n add_submenu_page(\n 'options-general.php',\n 'No Follow All External Links',\n 'No Follow All External Links',\n 'manage_options',\n 'no_follow_all_external_links',\n ['noFollowAllExternalLinks', 'optionsPage']\n );\n }", "function miniplan_settings_link($links) {\n $settings_link = '<a href=\"' . get_bloginfo('wpurl') . '/wp-admin/admin.php?page=miniplan-admin-settings\">Einstellungen</a>';\n array_unshift($links, $settings_link);\n return $links;\n}", "function wpo_plugin_settings_link($links) { \n $settings_link = '<a href=\"admin.php?page=WP-Optimize\">Settings</a>'; \n array_unshift($links, $settings_link); \n return $links; \n}", "public function registerLinks(): void\n {\n }", "function lw_settings_link( $links ) {\n\t// $url = esc_url( add_query_arg(\n\t// \t'page',\n\t// \t'setting',\n\t// \tget_admin_url() . 'admin.php'\n\t// ) );\n\t$url = admin_url('admin.php?page=setting');\n\t// Create the link.\n\t$settings_link = \"<a href='$url'>\" . __( 'Settings' ) . '</a>';\n\t// Adds the link to the end of the array.\n\tarray_push(\n\t\t$links,\n\t\t$settings_link\n\t);\n\treturn $links;\n}", "function admin_links() {\n\n\t\t$this->Module->recursive = 0;\n\n\t\t/**\n\t\t * Put all options in \"options\".\n\t\t * $options will be available in the view.\n\t\t */\n\t\t$this->set('options', $this->paginate());\n\t}", "public function register_wp_menu_links() {\n\t\tadd_meta_box('pafl_metabox_modal_link', __('Fullscreen Login Link', 'pressapps-fullscreen-login' ), array( $this, 'pafl_callback_metabox_modal_link' ), 'nav-menus', 'side', 'high');\n\t}", "function pagebar_addConfigureLink( $links ) { // add Settings link to plugin page\n $settings_link = '<a href=\"options-general.php?page=pagebar_options.php\">'. __('Settings').'</a>';\n array_unshift( $links, $settings_link );\n return $links;\n}", "function addAdminMenu() {\r\n\t\t\r\n\t\tadd_options_page(\r\n\t\t\t'JRelated',\r\n\t\t\t'JRelated',\r\n\t\t\t'manage_options',\r\n\t\t\tbasename(__FILE__),\r\n\t\t\tarray (&$this, 'executeAdmin')\r\n\t\t);\r\n\t\t\r\n\t}", "function Weather_Admin_Link()\t{\n\t add_menu_page(\n\t 'MHR Weather Plugin Settins', // Title of the page\n\t 'MHR-Weather', // Text to show on the menu link\n\t 'manage_options', // Capability requirement to see the link\n\t __FILE__, // The 'slug' - file to display when clicking the link\n\t 'mhr_weather_settings_page' //calls the function to populate page html\n\t );\n\t //call the register settings function\n\t add_action('admin_init', 'register_mhr_weather_settings');\n\t}", "function EWD_FEUP_plugin_settings_link($links) { \r\n\t$settings_link = '<a href=\"admin.php?page=EWD-FEUP-options\">Settings</a>'; \r\n\tarray_unshift($links, $settings_link); \r\n\treturn $links; \r\n}", "function t2t_admin_link() {\n\tglobal $wp_admin_bar, $wpdb, $themename;\n\tif ( !is_super_admin() || !is_admin_bar_showing() )\n\t\treturn;\n\t$wp_admin_bar->add_menu( array( 'id' => 't2t_admin', 'title' => __( \"Advocate\", 'textdomain' ), 'href' => admin_url(\"admin.php?page=functions.php\") ) );\n}", "function network_admin_setup_page() {\n\t$this->common_admin_setup_page( true );\n}", "function mkgd_settings_link($links) {\n $settings_link = '<a href=\"admin.php?page=mkgdAdminPage\">Settings</a>';\n array_unshift($links, $settings_link);\n return $links;\n}", "function add_settings_plugin_page($links)\n{\n $settings_link = '<a href=\"admin.php?page=crb_carbon_fields_container_framework_settings.php\">Settings</a>';\n array_push($links, $settings_link);\n return $links;\n}", "function mendeley_research_plugin_actlinks( $links ) { \n // Add a link to this plugin's settings page\n $plugin = plugin_basename(__FILE__);\n $settings_link = sprintf( '<a href=\"options-general.php?page=%s\">%s</a>', $plugin, __('Settings') ); \n array_unshift( $links, $settings_link ); \n return $links; \n}", "function jig_add_settings_link($links){\r\n\t\t\tarray_unshift($links, '<a href=\"https://justifiedgrid.com/support/#utm_campaign=dashboard&utm_source=jig-plugin&utm_medium=support-link-on-plugins-list\" target=\"_blank\">'.__('Support', 'jig_td').'</a>');\r\n\t\t\tarray_unshift($links, '<a href=\"options-general.php?page=justified-image-grid\">'.__('Settings', 'jig_td').'</a>');\r\n\t\t\treturn $links;\r\n\t\t}", "function viglink_admin_init() {\n wp_register_script( \"viglink_admin_script\", WP_PLUGIN_URL . \"/viglink/viglink.js\" );\n wp_register_style( \"viglink_admin_style\", WP_PLUGIN_URL . \"/viglink/viglink.css\" );\n\n // register settings for the options page\n register_setting( \"viglink\", \"key\", \"viglink_sanitize_option\" );\n register_setting( \"viglink\", \"enable-rss-rewrites\");\n}", "function fyp_spampro_add_plugin_page_settings($links) {\n $url = 'options-general.php?page=' . YFP_Spam_Settings_Page::SLUG_MENU_ADMIN;\n\t$settings_link = '<a href=\"' . admin_url($url) . '\">' . __('Settings') . '</a>';\n // Put the settings link before the others.\n array_unshift( $links, $settings_link );\n\treturn $links;\n}", "function wp_dashboard_incoming_links_control()\n{\n}", "function plugin_settings_link($links)\n\t\t{\n\t\t\t$settings_link = '<a href=\"options-general.php?page=arzamath_17th\">Настройки</a>';\n\t\t\tarray_unshift($links, $settings_link);\n\t\t\treturn $links;\n\t\t}", "function mcptp_Add_My_Admin_Link()\n{\n // add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '', $position = null );\n add_menu_page(\n 'My First Page', // Title of the page\n 'Mytheme CPT Plugin', // Text to show on the menu link\n 'manage_options', // Capability requirement to see the link\n 'includes/mcptp-first-acp-page.php' // The 'slug' - file to display when clicking the link\n );\n // add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function = '' ); // demo\n}", "function add_settings_link( $links ) {\n return array_merge( $links, array( '<a href=\"' . admin_url( 'options-general.php?page=404pagesettings' ) . '\">' . __( 'Settings' ) . '</a>') );\n }", "public function setup_admin_navigation() {\n parent::setup_admin_navigation();\n }", "function autoContentLinksControlPanel($file)\r\n\t{\r\n\t\t// Add Settings link to plugin page\r\n\t\tadd_filter(\"plugin_action_links_\".$file, array($this, 'actlinks'));\r\n\t\t// Any settings to initialize\r\n\t\tadd_action('admin_init', array($this, 'adminInit'));\r\n\t\t// Load menu page\r\n\t\tadd_action('admin_menu', array($this, 'addAdminPage'));\r\n\t\t// Load admin CSS style sheet\r\n\t\tadd_action('admin_head', array($this, 'registerHead'));\r\n\t}", "function bbstarter_plugin_add_settings_link( $links ) {\n $settings_link = '<a href=\"options-general.php?page=bb-starter-plugin\">' . __( 'Settings' ) . '</a>';\n array_push( $links, $settings_link );\n \treturn $links;\n}", "function wpreso_vfb_settings_link($links) {\r\n $settings_link = '<a href=\"' . admin_url( 'options-general.php?page=wpreso_vfb_options' ) . '\">' . __('Settings', 'wpreso-video-featurebox') . '</a>';\r\n array_unshift($links, $settings_link);\r\n return $links;\r\n}", "public function registerSettings(){\n add_filter('plugin_action_links', array($this, 'pluginSettingsLink'), 10, 2);\n }", "public static function add_admin_menu() {\n\t\t\t\tadd_menu_page(\n\t\t\t\t\tesc_html__( 'Alep', 'text-domain' ),\n\t\t\t\t\tesc_html__( 'Alep', 'text-domain' ),\n\t\t\t\t\t'manage_options',\n\t\t\t\t\t'theme-settings',\n\t\t\t\t\tarray( 'alep_Theme_Options', 'create_admin_page' )\n\t\t\t\t);\n\t\t\t}", "function logincust_admin_link() {\n\n\t// Get global submenu\n\tglobal $submenu;\n\tglobal $url_customizer;\n\t// Generate the redirect url.\n\t$options = get_option( 'login_customizer_settings', array() );\n\n\t$url = add_query_arg(\n\t\tarray(\n\t\t\t'autofocus[panel]' => 'logincust_panel',\n\t\t\t'url' => rawurlencode( get_permalink( $options['page'] ) ),\n\t\t),\n\t\tadmin_url( 'customize.php' )\n\t);\n\n\t// Add Login Customizer as a menu item\n\t//$submenu['themes.php'][] = array( 'Login Customizer', 'manage_options', $url, 'login-customizer' );\n\t$url_customizer = $url;\n}", "public function plugins_page_link( $links ) {\n\t\t$url = '<a href=\"' . admin_url( 'edit.php?post_type=download&page=edd-settings&tab=extensions#eddeet' ) . '\">' . __( 'Settings', 'edd-enhanced-ecommerce-tracking' ) . '</a>';\n\t\tarray_unshift( $links, $url );\n\n\t\treturn $links;\n\t}", "function cabbagecms_settings_link($links) {\n \n global $cabbagecms_options_page;\n $settings_link = '<a href=\"' . $cabbagecms_options_page . '\">Settings</a>'; \n array_unshift($links, $settings_link); \n return $links; \n}", "function lt_add_admin_panels() {\r\n\t// WP-Admin >> Tools >> Latency Tracker\r\n\t$page = add_management_page('Latency Tracker', 'Latency Tracker', 8, basename(__FILE__), 'lt_manage_panel');\r\n\t\r\n\t// WP-Admin >> Settings >> LT Settings\r\n\tadd_options_page('Latency Tracker', 'Latency Tracker', 8, basename(__FILE__), 'lt_settings_panel');\t\r\n\r\n\t// Load styles and scripts for our page, and our page only\r\n\tadd_action('admin_print_styles-' . $page, 'lt_admin_styles');\r\n\tadd_action('admin_print_scripts-' . $page, 'lt_admin_scripts');\t\r\n}", "public function add_admin_pages() {\n\t\t$show_settings_page = true;\n\t\t$show_settings_page = apply_filters( 'simple_history_show_settings_page', $show_settings_page );\n\t\t$show_settings_page = apply_filters( 'simple_history/show_settings_page', $show_settings_page );\n\n\t\tif ( $show_settings_page ) {\n\t\t\tadd_options_page(\n\t\t\t\t__( 'Simple History Settings', 'simple-history' ),\n\t\t\t\t_x( 'Simple History', 'Options page menu title', 'simple-history' ),\n\t\t\t\t$this->simple_history->get_view_settings_capability(),\n\t\t\t\t$this->simple_history::SETTINGS_MENU_SLUG,\n\t\t\t\tarray( $this, 'settings_page_output' )\n\t\t\t);\n\t\t}\n\t}", "function mfp_Add_My_Admin_Link2()\n{\n add_menu_page(\n 'My First Page2', // Title of the page\n 'My First Plugin2', // Text to show on the menu link\n 'manage_options', // Capability requirement to see the link\n 'mfp-first-acp-page2.php', // The 'slug' - file to display when clicking the link\n 'inici2' //Script\n );\n}", "function wb_settings_link($links) { \r $settings_link = '<a href=\"admin.php?page=wb_settings\">Settings</a>'; \r array_unshift($links, $settings_link); \r return $links; \r}", "function admin_menu() {\n\t\tadd_options_page( esc_html__( 'LivePress Settings', 'livepress' ), esc_html__( 'LivePress', 'livepress' ), 'manage_options', 'livepress-settings', array( $this, 'render_settings_page' ) );\n\t}", "function plugin_action_links( $links ) {\n $settings_link = admin_url( 'options-general.php?page=eboywp' );\n $settings_link = '<a href=\" ' . $settings_link . '\">' . __( 'Settings', 'EWP' ) . '</a>';\n array_unshift( $links, $settings_link );\n return $links;\n }", "function xrds_admin_menu() {\n\tadd_options_page('XRDS-Simple', 'XRDS-Simple', 'manage_options', 'xrds-simple', 'xrds_options_page');\n\tadd_filter('plugin_action_links', 'xrds_plugin_actions', 10, 2);\n}", "function admin_menu() {\n add_options_page( 'eboywp', 'eboywp', 'manage_options', 'eboywp', array( $this, 'settings_page' ) );\n }", "function admin_menu() {\n if ( function_exists( 'is_multisite' ) && is_multisite() )\n $this->pagehook = add_submenu_page( 'settings.php', __( 'AntiSpam Options' ), __( 'AntiSpam Options'), 'manage_network_options', 'rt-anti-spam', array( &$this, 'show_page' ) );\n else\n $this->pagehook = add_options_page(__( 'AntiSpam Options' ), __( 'AntiSpam Options'), 'manage_options', 'rt-anti-spam', array( &$this, 'show_page' ) );\n add_action( 'load-'.$this->pagehook, array( &$this, 'load_page' ) );\n add_action( 'admin_print_styles-' . $this->pagehook, array( &$this, 'admin_styles' ) );\n add_action( 'admin_print_scripts-' . $this->pagehook, array( &$this, 'admin_scripts' ) );\n\t}", "function smfgm_settings_link($links){\r\n $settings_link = '<a href=\"admin.php?page=smfgroupmembers/smfgroupmembers.php\">Settings</a>';\r\n array_unshift($links, $settings_link);\r\n return $links;\r\n}", "function adminMenu()\r\n{\r\n add_menu_page('MMA Config', 'MMA Config', 'administrator', 'make-me-accessible', 'makeMeAccessibleWidgetAdminOptions',get_bloginfo('url' ).'/wp-content/plugins/makeMeAccessible/assets/img/accessibility.png');\r\n}", "public function admin_menu()\n\t{\n\t\tif ( $this->settings['admin_pages'] )\n\t\t{\n\t\t\tforeach( $this->settings['admin_pages'] as $page )\n\t\t\t{\n\t\t\t\t$page_title = $page['page_title'];\n\t\t\t\t$menu_title = $page['menu_title'];\n\t\t\t\t$capability = $page['capability'];\n\t\t\t\t$menu_slug = $page['menu_slug'];\n\t\t\t\t$function = array($this, $page['function']);\n\t\t\t\tadd_management_page( $page_title, $menu_title, $capability, $menu_slug, $function );\n\t\t\t}\n\t\t}\n\t}", "function wp_limit_login_settings_link($links) { \n $settings_link = '<a href=\"options-general.php?page=wp-limit-login-attempts\">Settings</a>'; \n array_unshift($links, $settings_link); \n return $links; \n}", "public function register_admin_menu() {\n\t\tadd_management_page( 'New Post Format Unmigrator', 'New Post Formats', 'manage_options', 'new-post-format-unmigrator', array( $this, 'admin_page' ) );\n\t}", "public function p11_social_admin_menu() {\n add_options_page(\n 'P11 Social',\n 'P11 Social',\n 'manage_options',\n 'p11-social-settings',\n array( $this, 'p11_social_settings_page' )\n );\n}", "function digressit_add_admin_menu() {\n global $wp_rewrite;\n add_submenu_page( 'themes.php', 'Digress.it', 'Digress.it', 'administrator', 'digressit.php', 'digressit_theme_options_page');\n\n if(!$wp_rewrite->permalink_structure){\n add_action( 'admin_notices', 'digressit_permalink_required_notice' );\n }\n}", "function mcfp_pf_Add_My_Admin_Link()\n{\n // add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '', $position = null );\n add_menu_page(\n 'My First Page', // Title of the page\n 'Mytheme Contact Form Plugin - Petit Four', // Text to show on the menu link\n 'manage_options', // Capability requirement to see the link\n 'includes/mcfp-pf-first-acp-page.php' // The 'slug' - file to display when clicking the link\n );\n // add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function = '' ); // demo\n}", "function mal_sync_admin_init() {\n add_management_page(\n __( 'MAL Sync', 'mal-sync' ),\n __( 'MAL Sync', 'mal-sync' ),\n 'manage_options',\n 'mal-sync',\n 'mal_sync_page'\n );\n}", "public function addAdminMenu()\n {\n add_options_page(\n 'BuddyPress Activity Refresh',\n 'myFOSSIL BuddyPress Activity Refresh',\n 'manage_options',\n basename( __FILE__ ),\n array( $this, 'printAdminPage' )\n );\n }", "public function _action_setup_admin_page() {\n\t\tif ( ! $this->page ){\n\t\t\treturn;\n\t\t}\n\n\t\tAdmin::add_menu( $this->page->view, $this->page->title, $this->page->menu, 'manage_options', 10 );\n\t}", "function plugin_settings_link($links)\n\t\t{\n\t\t\t$settings_link = '<a href=\"options-general.php?page=wp_plugin_template\">Settings</a>';\n\t\t\tarray_unshift($links, $settings_link);\n\t\t\treturn $links;\n\t\t}", "function plugin_settings_link($links)\n\t\t{\n\t\t\t$settings_link = '<a href=\"options-general.php?page=wp_plugin_template\">Settings</a>';\n\t\t\tarray_unshift($links, $settings_link);\n\t\t\treturn $links;\n\t\t}", "function byrev_picshield_settings_link($links) { \n $settings_link = '<a href=\"options-general.php?page=byrev_picshield_admin\">Settings</a>'; \n array_unshift($links, $settings_link); \n return $links; \n}", "function referrer_wp_add_pages() {\r\n add_options_page('Referrer WP', 'Referrer WP', 'administrator', 'referrer_wp', 'referrer_wp_options_page');\r\n}", "public function admin_menu() {\n\t\tadd_management_page(\n\t\t\t__( 'Parse This', 'indieweb-post-kinds' ), // page title\n\t\t\t__( 'Parse This', 'indieweb-post-kinds' ), // menu title\n\t\t\t'manage_options', // access capability\n\t\t\t'parse_this',\n\t\t\tarray( $this, 'debug' )\n\t\t);\n\t}", "public static function externalLinkSettings()\n {\n $settings = get_option('nel_settings');\n ?>\n <fieldset>\n <legend class=\"screen-reader-text\">\n <span>External link settings</span>\n </legend>\n <label for=\"nel_settings[new_window]\">\n <input type='checkbox' id='nel_settings[new_window]' name='nel_settings[new_window]' <?php checked( isset($settings['new_window']), 1 ); ?> value='1'>\n Open all external links in a new window\n </label>\n <br>\n <p class=\"description\">Add 'samewindow' class to prevent external link opening in a new window.</p>\n <br>\n <label for=\"nel_settings[unsafe_target]\">\n <input type='checkbox' id='nel_settings[unsafe_target]' name='nel_settings[unsafe_target]' <?php checked( isset($settings['unsafe_target']), 1 ); ?> value='1'>\n Allow unsafe link target\n </label>\n <br>\n <p class=\"description\">Prevent Wordpress from adding rel=\"noreferrer\" and rel=\"noopener\" to new external links.</p>\n </fieldset>\n <?php\n }", "protected function getMenuLinkManager() {\n return \\Drupal::service('plugin.manager.menu.link');\n }", "function RegisterAdminPage() {\n\t\tif (function_exists('add_options_page')) {\n\t\t\tadd_options_page(__('Sitemap Generator','sitemap'), __('Sitemap','sitemap'), 8, basename(__FILE__), array(&$this,'HtmlShowOptionsPage'));\n\t\t}\n\t}", "public function wordpress_hook_admin_menu()\n\t\t{\n\t\t\tadd_menu_page(\n\t\t\t\t__('Opn Payments Settings', 'omise'),\n\t\t\t\t'Opn Payments',\n\t\t\t\t'manage_options',\n\t\t\t\t'omise',\n\t\t\t\t[$this, 'page_settings']\n\t\t\t);\n\t\t}", "public function action_admin_menu() {\n\t\tadd_options_page( __( 'Pantheon Page Cache', 'pantheon-cache' ), __( 'Pantheon Page Cache', 'pantheon-cache' ), $this->options_capability, self::SLUG, array( self::$instance, 'view_settings_page' ) );\n\t}", "function ac_pathless_category_links_menu() {\r\n\tadd_options_page(\"Pathless Category Links\", \"Pathless Category Links\", \"manage_options\", __FILE__, \"ac_pathless_category_links_admin\");\r\n}", "public function setupAdminPage()\n {\n if (function_exists('acf_add_options_page')) {\n $option_page = acf_add_options_page(array(\n 'page_title' => self::$pageName,\n 'menu_title' => self::$pageName,\n 'menu_slug' => sanitize_title(self::$pageName),\n 'parent_slug' => self::$parentSlug,\n 'capability' => 'edit_posts',\n 'redirect' => false\n ));\n }\n }", "function wp_edit_admin_bar_init() {\t\tif (!is_admin() || !is_admin_bar_showing() ) {\n\t\t\treturn;\n\t\t}\n\t\t// Good to go, lets do this!\n\t\tadd_action('admin_bar_menu', 'wp_edit_admin_bar_links', 500);\n\t}", "public function addAdminPage(){\n add_action(\n 'admin_menu',\n function(){\n add_menu_page(\n 'Buy Articles Mothership',\n 'Buy Articles Mothership',\n 'manage_options',\n 'buy-articles-mothership',\n function (){\n $Screen = new MothershipAdminScreen;\n $Screen->echoAdminScreen();\n }\n );\n }\n );\n }", "function skwp_menu_links_js() {\n\t\techo '<script>\n jQuery(\"#menu-pages > a\").attr(\"href\", \"/wp-admin/edit.php?post_type=page&page=cms-tpv-page-page\");\n\t\t</script>';\n\t}", "function Xxxxxxxx_api_settings_link($links) {\n\t$settings_link = '<a href=\"admin.php?page=Xxxxxxxx_API_config\">Settings</a>';\n\tarray_unshift($links, $settings_link);\n\treturn $links;\n}", "function settings_link( $links ) {\n\t\t\t$settings_link = '<a href=\"options-general.php?page='.CB_Analytics_Settings::PLUGIN_NAME.'\">Settings</a>';\n\t\t\tarray_push( $links, $settings_link );\n\t\t\treturn $links;\n\t\t}", "function AddAdminMenu()\n\t\t{\n\t\t\tadd_options_page(__('bbPress WP Tweaks', 'bbpress-wp-tweaks'), __('bbPress WP Tweaks', 'bbpress-wp-tweaks'), 'manage_options', 'bbpress-wp-tweaks', array(&$this, 'OptionsPage'));\n\t\t}", "function tracm_add_action_links($links) {\r\n $mylinks = array('<a href=\"' . admin_url('options-general.php?page=tracmsettings') . '\">Settings</a>');\r\n return array_merge($links, $mylinks);\r\n}", "public function admin_menu() {\n\t\tadd_settings_field( $this->field_key, esc_attr__( 'Replace site name in post url:', 'socialflow' ), array( $this, 'setting_replace_site_url' ), $this->slug, 'general_settings_section' );\n\t}", "function cp_ssl_fix_register_admin_page() {\n\tadd_management_page(\n\t\t__( 'CP SSL Fix', 'cp-ssl-fix' ),\n\t\t__( 'CP SSL Fix', 'cp-ssl-fix' ),\n\t\t'read',\n\t\t'cp-ssl-fix',\n\t\t'cp_ssl_fix_show_admin_page'\n\t);\n}", "public function add_admin_menu() {\n\t\t$this->menu_id = add_theme_page(\n\t\t\t'Simplelightbox Options',\n\t\t\t'Simplelightbox',\n\t\t\t'manage_options',\n\t\t\t'simplelightbox',\n\t\t\tarray($this, 'admin_panel')\n\t\t);\n\t}", "function wc_offline_gateway_plugin_links( $links ) {\n\n\t$plugin_links = array(\n\t\t'configure' => '<a href=\"' . admin_url( 'admin.php?page=wc-settings&tab=checkout&section=offline_gateway' ) . '\">' . __( 'Configure', 'wc-gateway-wordpay' ) . '</a>'\n\t);\n\treturn array_merge( $plugin_links, $links );\n}", "function add_administartion_options() {\r\n add_options_page('IVONA WebReader', 'IVONA WebReader', 8, 'IVONAWebReader' /* slug */, array(IVONA_WR_PLUGIN_NAME,'get_webreader_options_page') );\r\n }", "public function add_plugin_admin_menu() {\n add_options_page( 'MFN Feed', 'MFN Feed', 'manage_options', $this->plugin_name, array($this, 'display_plugin_setup_page')\n );\n }", "function RelativePageLinksOnBeforePageDisplay(OutputPage &$out, Skin &$skin) {\n\n // Add as ResourceLoader Module\n $out->addModules('ext.RelativePageLinks');\n\n return true;\n}", "public function plugin_settings_link($links)\r\n\t\t{\r\n\t\t\t$url = get_admin_url() . 'options-general.php?page=lgng';\r\n\t\t\t$settings_link = '<a href=\"' . $url . '\">' . __('Settings', 'lgng') . '</a>';\r\n\t\t\tarray_unshift($links, $settings_link);\r\n\t\t\treturn $links;\r\n\t\t}", "public function plugin_settings_link( $links ) {\n\t\tif ( ! is_admin() || ! current_user_can( 'install_plugins' ) )\n\t\t\treturn $links;\n\n\t\t$links[] = sprintf( '<a href=\"%s\">%s</a>', admin_url( 'edit.php' ) . '?post_type=event&page=events-settings', __( 'Settings', 'events-maker' ) );\n\n\t\treturn $links;\n\t}", "public function enableAdminMode()\n\t{\n\t\t$this->admin_god_mode = true;\n\t}", "static function addOptionsPages() {\r\n add_options_page(self::$pluginName, self::$pluginName, 'manage_options', 'rb-internal-links', array(__CLASS__, 'adminSettings'));\r\n }", "public static function addAdminMenuPage()\n\t\t{\n\t\t\tif ( is_admin() )\n\t\t\t{\n\t\t\t\tif ( is_multisite() ) AdminMenuModule::addPageToNetwork( new LogAdminMenuPage( AdminMenuPage::PARENT_SLUG_NETWORK_SETTINGS ) );\n\t\t\t\tAdminMenuModule::addPage( new LogAdminMenuPage( AdminMenuPage::PARENT_SLUG_SETTINGS ) );\n\t\t\t}\n\t\t}" ]
[ "0.75666744", "0.7272842", "0.7141191", "0.7060666", "0.698221", "0.6910204", "0.6873137", "0.6776463", "0.67110544", "0.6705361", "0.66422296", "0.66249555", "0.6614838", "0.66089666", "0.6565333", "0.6525619", "0.65174526", "0.6514701", "0.6511804", "0.65021354", "0.6497603", "0.64857566", "0.6478141", "0.6468371", "0.64625233", "0.6458409", "0.6449157", "0.6416382", "0.64075905", "0.6379921", "0.6375271", "0.63741934", "0.63646066", "0.63401335", "0.63397026", "0.6329122", "0.63238615", "0.6244735", "0.62333417", "0.62322044", "0.62248236", "0.6223646", "0.6216713", "0.62008786", "0.61944985", "0.6189716", "0.61864585", "0.61830926", "0.6173661", "0.61733127", "0.61705786", "0.6165702", "0.6162094", "0.6154533", "0.614786", "0.6143488", "0.6137042", "0.6126199", "0.6121369", "0.61180216", "0.61162025", "0.61140084", "0.6106672", "0.61017954", "0.6093343", "0.6090589", "0.6089354", "0.60865736", "0.6081635", "0.6081628", "0.6081628", "0.6079864", "0.60783947", "0.60759676", "0.607561", "0.60688466", "0.6068041", "0.6066928", "0.60621643", "0.60614175", "0.60588235", "0.6057517", "0.6048458", "0.60458434", "0.60415095", "0.6040855", "0.6039823", "0.6036617", "0.60317254", "0.6027485", "0.60259336", "0.6020355", "0.5998527", "0.5991415", "0.59885585", "0.5986019", "0.5980898", "0.5976564", "0.5975001", "0.59718263" ]
0.8331434
0
Sets the session ID
Устанавливает идентификатор сеанса
public function setSessionId($id) { $this->sessionID = $id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setSessionId($id);", "public function setSessionID($id)\n {\n Session::set($this->getSessionKey(), $id);\n }", "function setSessionID($session)\n\t{\n\t\t$this->user_session = $session;\n\t}", "public function set_id( $id ) {\n\t\t$this->id = $this->is_valid_id( $id ) ? $id : $this->generate_session_id();\n\t}", "final function setSession_id($value) {\n\t\treturn $this->setSessionId($value);\n\t}", "final function setSession_id($value) {\n\t\treturn $this->setSessionId($value);\n\t}", "public static function setId($id)\n\t{\n\t\tsession_id($id);\n\t}", "public function setSessionid($sessionID) {\n\t\t$this->sessionID = $sessionID;\n\t}", "public function setSessionid($sessionID) {\n\t\t$this->sessionID = $sessionID;\n\t}", "function setSessionId($value) {\n\t\treturn $this->setColumnValue('session_id', $value, Model::COLUMN_TYPE_INTEGER);\n\t}", "function setSessionId($value) {\n\t\treturn $this->setColumnValue('session_id', $value, Model::COLUMN_TYPE_INTEGER);\n\t}", "function setSessionID($session){\t\t\t\t\n\t\t$element = array('sessionID' => $session);\t\t\n\t\t$this->setHeader('SessionHeaderValue', $element);\n\t}", "private function setNewSession(){\r\n\r\n $M = new MySql();\r\n \r\n $M->Insert(array('userId' => $this->id), 'session');\r\n $this->sessionId = mysql_insert_id($M->sDBLink);\r\n }", "public function set_session_id($session_id)\n {\n $this->set_default_property(self::PROPERTY_SESSION_ID, $session_id);\n }", "public function setSessionId($id=null)\n {\n session_id(self::ID);\n return $this;\n }", "public function setSession($id)\n {\n if ($this->outputVisitor instanceof Sessionable) {\n $this->outputVisitor->setSession($id);\n }\n }", "public function setId(string $sessionId): void\n {\n @session_id($sessionId);\n }", "public function setId($id)\n\t{\n\t\tif ($this->started) {\n\t\t\tthrow new LogicException('Cannot set session ID after the session has started.');\n\t\t}\n\n\t\t// Set the PHP Session ID here too, it just works\n\t\tsession_id($id);\n\n\t\t$this->id = $id;\n\t}", "public function setSessionId($sessionId) {\n $this->sessionId = $sessionId;\n }", "static function setSessionUser(int $id) {\n $_SESSION['userId'] = $id;\n $_SESSION['errorMsg'] = ''; \n \n }", "function set_session_id($id,$guest_session=false) // NB: Guests sessions can persist because they are more benign\n{\n\t// Save cookie\n\t$timeout=$guest_session?(time()+60*60*max(1,intval(get_option('session_expiry_time')))):NULL;\n\t/*if (($GLOBALS['DEBUG_MODE']) && (get_param_integer('keep_debug_has_cookies',0)==0))\n\t{\n\t\t$test=false;\n\t} else*/\n\t{\n\t\t$test=@setcookie('ocp_session',strval($id),$timeout,get_cookie_path()); // Set a session cookie with our session ID. We only use sessions for secure browser-session login... the database and url's do the rest\n\t}\n\t$_COOKIE['ocp_session']=strval($id); // So we remember for this page view\n\n\t// If we really have to, store in URL\n\tif (((!has_cookies()) || (!$test)) && (is_null(get_bot_type())))\n\t{\n\t\t$_GET['keep_session']=strval($id);\n\t}\n\n\tif ($id!=get_session_id()) decache('side_users_online');\n}", "public function setId($id)\n {\n $this->_sess_id = $id;\n return $this;\n }", "public static function set_http_session_id() {\n self::$current_http_session_id = self::new_http_session_id();\n }", "public function setSessionId($newSessionId)\n {\n $this->sessionId = $newSessionId;\n }", "function _setNewSessID($_sess_id = NULL)\n {\n\n global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS;\n\n $_continue = TRUE;\n\n /**\n * If supplied with a session ID, validate it and use it when it's good.\n */\n if (strlen($_sess_id) == $this->_sess_ID_len) {\n if (!$this->pregMatches('/^[a-zA-Z0-9]+/', $_sess_id)) {\n // Warning: Custom session ID passed is invalid.\n $this->_setWrnMsg('SESS_INVALID', NULL, $_sess_id);\n\n $this->_handleErrors();\n\n // Ignoring value and assigning a new session ID.\n $this->_setWrnMsg('NEW_SESS_ID');\n\n } else {\n\n session_id($_sess_id);\n\n $_continue = FALSE;\n\n }\n\n }\n\n\n /**\n * Use session_regenerate_id() when the session ID length desired is the\n * same as the maximum allowed, because it generates the maximum length.\n * It is only available in PHP version 4.3.2 or higher. As of PHP 4.3.3,\n * if session cookies are enabled, use of session_regenerate_id() is\n * supposed to submit a new session cookie with the new session id.\n */\n if (($_continue) &&\n ($this->_sess_ID_len == $this->_MAX_SESS_ID_LEN) &&\n (version_compare(PHP_VERSION, '4.3.2', '>='))) {\n if (session_regenerate_id()) {\n\n $_sess_id = session_id();\n\n $_continue = FALSE;\n\n }\n\n }\n\n\n if ($_continue) {\n\n $_sess_id = $this->_genString($this->_sess_ID_len);\n\n session_id($_sess_id);\n }\n\n // To be safe set...\n if (isSet($_REQUEST[$this->_sess_name]))\n $_REQUEST[$this->_sess_name] = $_sess_id;\n\n if (isSet($_GET[$this->_sess_name]))\n $_GET[$this->_sess_name] = $_sess_id;\n\n if (isSet($HTTP_GET_VARS[$this->_sess_name]))\n $HTTP_GET_VARS[$this->_sess_name] = $_sess_id;\n\n if (isSet($_POST[$this->_sess_name]))\n $_POST[$this->_sess_name] = $_sess_id;\n\n if (isSet($HTTP_POST_VARS[$this->_sess_name]))\n $HTTP_POST_VARS[$this->_sess_name] = $_sess_id;\n\n if (isSet($_COOKIE[$this->_sess_name]))\n $_COOKIE[$this->_sess_name] = $_sess_id;\n\n // May not actually change until next refresh\n if (isSet($HTTP_COOKIE_VARS[$this->_sess_name]))\n $HTTP_COOKIE_VARS[$this->_sess_name] = $_sess_id;\n\n if (isSet($GLOBALS[$this->_sess_name]))\n $GLOBALS[$this->_sess_name] = $_sess_id;\n\n return $_sess_id;\n }", "public function setId(string $id): void\n {\n if ($this->sessionExists()) {\n throw new SessionException(\n 'Session has already been started, to change the session ID call regenerateId()'\n );\n }\n session_id($id);\n }", "private function setSessid ()\n\t{\n\t\tif (is_bool($this->identified) and $this->identified == false and empty($this->sessionid))\n\t\t{\n\t\t\t$unid = md5(uniqid(\"Wallalalalalalalalla teh wlalalalalalalala\") . time()) . md5(uniqid(microtime()));\n\t\t\twhile (!$this->checkSessions($unid))\n\t\t\t{\n\t\t\t\t$unid = md5(uniqid(\"Wallalalalalalalalla teh wlalalalalalalala\") . time()) . md5(uniqid(microtime()));\n\t\t\t}\n\t\t\t$this->sessionid = $unid;\n\t\t}\n\t}", "public function setSessionId( $sessionId )\n\t{\n\t\t$this->sessionId = $sessionId;\n\t\t\n\t\treturn session_id( $sessionId );\n\t}", "function set_session() {\n\t\t\tglobal $config, $app, $session;\n\t\t\t\n\t\t\t$time = ($config->cookie->lifespan == 0)? 0 : time()+$config->cookie->lifespan;\n\t\t\t\n\t\t\tsetcookie(\n\t\t\t\t$config->cookie->session, \n\t\t\t\t$_SESSION['user_id'] . '|' . $session->rs, \n\t\t\t\t$time, \n\t\t\t\t\"/\", \n\t\t\t\t$this->domain()\n\t\t\t);\n\t\t}", "public function setSessionId($data)\n {\n $this->_SessionId=$data;\n return $this;\n }", "public function setCurrentId($idUser)\n\n {\n\n $_SESSION['idUser'] = $idUser;\n\n }", "function setSession($role_id) {\n $rds = $this->_di->getShared('redis');\n $saved_session_key = \"role:$role_id:session\";\n $saved_session_id = $rds->get($saved_session_key);\n if ($saved_session_id) {\n $session_key = \"PHPREDIS_SESSION:$saved_session_id\";\n $rds->del($session_key);\n }\n if ($saved_session_id != $this->session->getId()) {\n $rds->set($saved_session_key, $this->session->getId());\n syslog(LOG_DEBUG, \"replace old session $saved_session_id to \".$this->session->getId());\n }\n }", "public function setUserId($user_id)\n {\n $_SESSION['user_id'] = $user_id;\n }", "protected static function updateSession($id) {\n Factory::session()->set(static::getName(), $id);\n }", "public function set_session()\n {\n }", "public function setSession($id, $fName, $lName, $userName)\n {\n $_SESSION['id'] = $id;\n $_SESSION['first_name'] = $fName;\n $_SESSION['last_name'] = $lName;\n $_SESSION['user_name'] = $userName;\n $_SESSION['loggedin'] = true;\n }", "public function setId($id = '')\n {\n try {\n if (\n ! is_string(\n $id\n ) ||\n ! preg_match(\n '~^[a-zA-Z0-9,-]+$~',\n $id\n )\n ) {\n throw new \\InvalidArgumentException(\n 'Invalid session id.'\n );\n }\n\n if (\n ! $this->isStarted()\n ) {\n $this->id = $id;\n\n // Set the session id\n session_id(\n $this->id\n );\n }\n }\n catch (\n InvalidArgumentException $exception\n ) {\n echo $exception->getMessage();\n exit;\n }\n\n return $this;\n }", "private function setParam()\n {\n if ( strpos(App::request()->getRequestUri(), self::SESSION_NAME.'=') !== false )\n\t\t{\n\t\t\t$pattern = \"/(?:\".self::SESSION_NAME.\"=)(.*)$/i\";\n\t\t\tpreg_match($pattern, App::request()->getRequestUri(), $sessid) and session_id($sessid[1]);\n//\t\t\t$this->_request_uri = preg_replace($pattern, '', $this->_request_uri);\n\t\t}\n elseif(isset($_POST[self::SESSION_NAME]) && !empty($_POST[self::SESSION_NAME]))\n {\n $this->setId($_POST[self::SESSION_NAME]);\n }\n \n // set the PHP session id (PHPSESSID) cookie to a custom value\n// session_set_cookie_params(Defines::$session_alive_time, Defines::$cookie_path);\n // here some problem then top line was active: session over no metter how \n // many request you do. browser just stop send cookie and server start new session.\n // {@link http://ua.php.net/manual/ru/function.session-set-cookie-params.php#100672}\n session_set_cookie_params(0);\n // set the garbage collector - who will clean the session files -\n // to our custom timeout\n // timeout value for the garbage collector\n // we add 300 seconds, just in case the user's computer clock\n // was synchronized meanwhile; 600 secs (10 minutes) should be\n // enough - just to ensure there is session data until the\n // cookie expires\n ini_set('session.gc_maxlifetime', (Defines::$session_alive_time+600));\n // we need a distinct directory for the session files,\n // otherwise another garbage collector with a lower gc_maxlifetime\n // will clean our files aswell - but in an own directory, we only\n // clean sessions with our \"own\" garbage collector (which has a\n // custom timeout/maxlifetime set each time one of our scripts is\n // executed)\n $sessdir = session_save_path().DS.str_replace(' ','',Config::SITE_NAME).'_sessions';\n// $sessdir = ini_get('session.save_path').DS.str_replace(' ','',Config::SITE_NAME).'_sessions';\n if (!is_dir($sessdir)) { mkdir($sessdir, 0777); }\n session_save_path($sessdir);\n// ini_set('session.save_path', $sessdir);\n }", "private static function setUserID($userid)\n {\n $_SESSION[\"userid\"] = $userid;\n }", "protected function setSessions($id, $email)\n {\n $_SESSION['userAgent'] = $_SERVER['HTTP_USER_AGENT']; // tipo navegador\n $_SESSION['LastActivity'] = $_SERVER['REQUEST_TIME']; // fecha Unix de inicio de la petición\n $_SESSION['SESSID'] = $id; // id user\n $_SESSION['SESSEMAIL'] = $email; // email user\n }", "public function setSession($key, $value);", "function SetId($value) { $this->id=$value; }", "function SetId($value) { $this->id=$value; }", "function setAuth($id)\n {\n $_SESSION['auth_id'] = $id;\n }", "public function setSid($sid) {\n $this->sid = $sid;\n $_SESSION['sid'] = $sid;\n }", "private function setSessionKey($key)\n\t{\n\t\t$this->sessionKey = (string) $key;\n\t}", "public function __construct() {\n\t\t$this->sessionID = session_id();\n\t}", "public function __construct() {\n\t\t$this->sessionID = session_id();\n\t}", "public function setId($sessionId)\n {\n if ($this->hasStarted()) {\n throw new LogicException('Session already started, can not change ID.');\n }\n session_id($sessionId);\n }", "public function setSessionid($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->sessionid !== $v) {\n $this->sessionid = $v;\n $this->modifiedColumns[CarthedTableMap::COL_SESSIONID] = true;\n }\n\n return $this;\n }", "function set_session_id($id, $guest_session = false) // NB: Guests sessions can persist because they are more benign\n{\n global $DID_CHANGE_SESSION_ID;\n $DID_CHANGE_SESSION_ID = true;\n\n // If checking safe mode, can really get in a spin. Don't let it set a session cookie till we've completed startup properly.\n global $CHECKING_SAFEMODE;\n if (($CHECKING_SAFEMODE) && ($id == '')) {\n return;\n }\n\n // Save cookie\n $timeout = $guest_session ? (time() + intval(60.0 * 60.0 * max(0.017, floatval(get_option('session_expiry_time'))))) : null;\n /*if (($GLOBALS['DEV_MODE']) && (get_param_integer('keep_debug_has_cookies', 0) == 0)) { Useful for testing non-cookie support, but annoying if left on\n $test = false;\n } else {*/\n $test = @setcookie(get_session_cookie(), $id, $timeout, get_cookie_path(), get_cookie_domain()); // Set a session cookie with our session ID. We only use sessions for secure browser-session login... the database and url's do the rest\n if (is_null($test)) {\n $test = false;\n }\n //}\n $_COOKIE[get_session_cookie()] = $id; // So we remember for this page view\n\n // If we really have to, store in URL\n if (((!has_cookies()) || (!$test)) && (!$guest_session/*restorable with no special auth*/) && (is_null(get_bot_type()))) {\n $_GET['keep_session'] = $id;\n }\n\n if ($id != get_session_id()) {\n decache('side_users_online');\n }\n}", "function _set_id($id) {\n $this->id = $id;\n }", "function setSession($key, $value, $sid = 0)\n {\n if (!$this->session_name) return;\n if (isset($value)) PwSession::setWithKey($this->session_name, $key, $value, $sid);\n }", "private function updateUserIdInSession($user_id) {\n $this->app['session']->set(self::SESSION_USER_ID,\n $user_id);\n }", "function sumo_session_regenerate_id()\n{\n\tGLOBAL $SUMO;\n\t\n\tif(SUMO_SESSIONS_DATABASE)\n\t adodb_session_regenerate_id();\n\telse \n\t session_regenerate_id();\n\n\t$query = \"UPDATE \".SUMO_TABLE_SESSIONS.\"\n\t\t SET session_id='\".session_id().\"'\n\t\t WHERE session_id='\".$SUMO['client']['session_id'].\"'\";\n\n\t$SUMO['DB']->Execute($query);\n\t\t\n\tsumo_create_session_id(false);\n}", "protected function setSessionCookie() {}", "private function setUserId($userId) {\n\t\t$_SESSION[self::SESSION_FIELD_USER_ID] = intval($userId);\n\t}", "public function set_session($partner_id)\n\t{\n\t\tSession::instance()->set('loggedin_partner_id',$partner_id);\n\t}", "public function setID($value){\r\n $this->id = $value;\r\n }", "public function setRequestedSessionId($requestedSessionId)\n {\n $this->requestedSessionId = $requestedSessionId;\n }", "private function regenerateSessionId()\n {\n session_regenerate_id();\n }", "private function _regenerate_session_id() {\n // I *think* if the parameter is null or false, the session info (such as session filename)\n // can be stored in the database and then restored on successful login.\n session_regenerate_id(true); // Requires PHP => 5.1\n }", "public function set_id($instance_id) {\n\t\t$this->id = $instance_id;\n\t}", "function testSetSessionIdNormal()\n {\n oxTestModules::addFunction(\"oxUtilsServer\", \"getOxCookie\", \"{return true;}\");\n $this->getConfig()->setConfigParam('blForceSessionStart', 0);\n\n $oSession = $this->getMock(\\OxidEsales\\EshopCommunity\\Tests\\Unit\\Core\\testSession::class, array(\"_getNewSessionId\"));\n $oSession->expects($this->any())->method('_getNewSessionId')->will($this->returnValue(\"newSessionId\"));\n\n $this->assertFalse($oSession->isNewSession());\n\n $oSession->start();\n $this->assertEquals($oSession->getName(), 'sid');\n $oSession->UNITsetSessionId('testSid');\n\n $this->assertEquals($oSession->getId(), 'testSid');\n $this->assertTrue($oSession->isNewSession());\n\n //reset session\n $oSession->initNewSession();\n $this->assertNotEquals('testSid', $oSession->getId());\n }", "protected function updateSession(string $id): void\n {\n $this->session->put($this->getName(), $id);\n \n $this->session->migrate(true);\n }", "private function setSession ()\n {\n $_SESSION[\"username\"] = $this->getUsername();\n $_SESSION[\"userid\"] = $this->getUserId();\n $_SESSION['isAdmin'] = \"1\";\n }", "public function setUserId($userId){\n\t\t$_SESSION['userId'] = $userId;\n\t}", "protected function setID($id){\r\n $this->id = $id;\r\n }", "public function initializeId(SessionInterface $session): SessionInterface;", "public static function SetCartId()\n\t{\n\t\t// If the cart ID hasn't already been set ...\n\t\tif (self::$_mCartId == '')\n\t\t{\n\t\t\tif(isset ($_SESSION['cart_id']) )\n\t\t\t\tself::$_mCartId = $_SESSION['cart_id'];\n\t\t\t\n\t\t\t// If not, check whether the cart ID was saved as a cookie\n\t\t\telseif(isset ($_COOKIE['cart_id']) && ( self::IsValidId($_COOKIE['cart_id']) ) )\n\t\t\t{\n\t\t\t\t// Save the cart ID from the cookie\n\t\t\t\tself::$_mCartId = $_COOKIE['cart_id'];\n\t\t\t\t$_SESSION['cart_id'] = self::$_mCartId;\n\t\t\t\tsetcookie('cart_id', self::$_mCartId, time() + CART_EXPIRE_TIME);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tself::$_mCartId = md5(uniqid(rand(), true));\n\t\t\t\t$_SESSION['cart_id'] = self::$_mCartId;\n\t\t\t\tsetcookie('cart_id', self::$_mCartId, time() + CART_EXPIRE_TIME);\n\t\t\t}\n\t\t}\n\t}", "public function setID($value) {\r\n $this->id = $value;\r\n }", "public function setID($value) {\r\n $this->id = $value;\r\n }", "public function set_id($str){\r\n $this->local_login=$str;\r\n }", "public static function set_session($sid)\n {\n self::$session=$sid;\n }", "private function setSession(){\r\n\t\t\tif (isset($_SESSION['time'])){//判断缓存时间\r\n\t\t session_id();\r\n\t\t $_SESSION['time'];\r\n\t\t } else {\r\n\t\t $_SESSION['time'] = date(\"Y-m-d H:i:s\");\r\n\t\t }\r\n\t\t}", "function _set_id( $id ){\n \t\t$this->id = $id;\n }", "private function setupCookie()\n {\n $cookie = getSetCookieHeader(\"key_phpsessid\");\n $cookieParts = explode(\"; \", $cookie);\n $value = str_replace('Set-Cookie: key_phpsessid=', '', $cookieParts[0]);\n $_COOKIE['key_phpsessid'] = $value;\n }", "public function setSessionid($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->sessionid !== $v) {\n $this->sessionid = $v;\n $this->modifiedColumns[EditPoDetailTableMap::COL_SESSIONID] = true;\n }\n\n return $this;\n }", "public function set_id($value) {\r\n\t\t$this->id = $value;\r\n\t}", "public static function initSession(){\n if( session_status() == PHP_SESSION_NONE ) {\n session_start();\n }\n self::$sessionId = session_id();\n }", "function set_id($id) {\n $this->id = $id;\n }", "function getSessionID() \n {\n return $this->sid;\n \n }", "function setID($id) {\n\t\t$this->id = $id;\n\t}", "function set_id( $id ) {\n // sets the value of id\n $this->id = $id;\n }", "private function Set() {\n $_SESSION[''.$this->name] = serialize($this->session);\n }", "public function set_id($value)\r\n\t\t\t{\r\n\t\t\t}", "public function set_id($value)\n {\n }", "public function set_id($value)\n {\n }", "function set_user_ident($session_id, $user_ident) {\n// to temporarily store user identification data until it gets polled by the ajax \n// functions on the login page\n\treturn apc_store(sprintf(K_USER_IDENT, $session_id), $user_ident, 30) ? $session_id : \"\";\n}", "public function createSessionId() {}", "public function setUserID () {\n\t\tif (isset($_SESSION['user_id'])) {\n\n\t\t\t\treturn $userID = $_SESSION['user_id'];\n\t\t\t} else {\n\n\t\t\t\treturn '';\n\t\t\t}\n\t}", "public static function setSessionKey($key) {\n self::$SESSION_KEY = $key;\n self::$prependedSessionKey = false;\n self::prependSessionKey();\n }", "function setID($id) {\n $this->id = $id;\n }", "public function setId($id)\r\n {\r\n if (is_int($id)) {\r\n self::$id = $id;\r\n\r\n if (self::$key !== null) {\r\n $this->setToken(self::$id . ':' . self::$key);\r\n }\r\n }\r\n }", "public static function setSessionCookie($sessionId) {\n\t\t$autoLogin = self::isGuest() ? false : (bool) self::$data['autologin'];\n\n\t\tzbx_setcookie('zbx_sessionid', $sessionId, $autoLogin ? strtotime('+1 month') : 0);\n\t}", "public function set($key, $value)\n {\n $this->sessioning->set($this->domain, $key, $value);\n }", "public function id($id = null) \n\t{\n\t\tif ($id !== null) {\n\t\t\t$this->id = $id;\n\t\t}\n\t\t\n\t\tif (!isset($this->id)) {\n\t\t\t$this->id = md5(uniqid(\"SESSION_ID\"));\n\t\t}\n\t\t\n\t\treturn $this->id;\n\t}", "public function enforceNewSessionId() {}", "public function id() {\n return $this->_session_id;\n }", "public function regenerate_id(){\n\n // saves the old session's id\n $old_session_id = session_id();\n\n // regenerates the id\n // this function will create a new session, with a new id and containing the data from the old session\n // but will not delete the old session\n session_regenerate_id();\n\n // because the session_regenerate_id() function does not delete the old session,\n // we have to delete it manually\n $this->destroy($old_session_id);\n }" ]
[ "0.81643647", "0.7999125", "0.79622465", "0.7850915", "0.7830858", "0.7830858", "0.7679876", "0.75380594", "0.75380594", "0.74766386", "0.74766386", "0.74027103", "0.7271629", "0.72398293", "0.7232351", "0.717739", "0.71740013", "0.7114016", "0.70938736", "0.70616627", "0.70139366", "0.6998486", "0.6984482", "0.69726413", "0.6958552", "0.69554305", "0.6938142", "0.6924951", "0.69193053", "0.6906655", "0.6843556", "0.6757843", "0.6754986", "0.67486894", "0.6740924", "0.66556615", "0.66329443", "0.66296595", "0.6585534", "0.6584104", "0.6581135", "0.6542902", "0.6542902", "0.6533269", "0.6526232", "0.6523715", "0.652042", "0.652042", "0.65023357", "0.64749604", "0.64725846", "0.6449892", "0.64094865", "0.64076126", "0.6403381", "0.63924944", "0.63896894", "0.6372167", "0.63653314", "0.6356706", "0.6353981", "0.63519484", "0.63481146", "0.6343378", "0.6342552", "0.6338072", "0.6325105", "0.6324769", "0.6317849", "0.63166565", "0.6316495", "0.6316495", "0.6307746", "0.63045454", "0.63033843", "0.6295625", "0.62893873", "0.628317", "0.6281268", "0.6279937", "0.6276822", "0.6268087", "0.6262961", "0.625654", "0.624014", "0.6234433", "0.62318015", "0.623152", "0.6230912", "0.622617", "0.62165517", "0.62154615", "0.62150085", "0.62115526", "0.61953783", "0.619369", "0.61920625", "0.61914486", "0.618666", "0.6177912" ]
0.8191909
0
Sets the client IP address
Устанавливает IP-адрес клиента
public function setClientIp($ip) { $this->clientIP = $ip; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setClientIP() {\r\n $this->clientIP = $_SERVER['REMOTE_ADDR'];\r\n }", "protected function setClientIp($clientIp)\n {\n $this->clientIp = $clientIp;\n }", "private function setUsersIpAddress()\n {\n $CIP = ( ! isset($_SERVER['HTTP_CLIENT_IP'])) ? FALSE : $_SERVER['HTTP_CLIENT_IP'];\n $FOR = ( ! isset($_SERVER['HTTP_X_FORWARDED_FOR'])) ? FALSE : $_SERVER['HTTP_X_FORWARDED_FOR'];\n $RMT = ( ! isset($_SERVER['REMOTE_ADDR'])) ? FALSE : $_SERVER['REMOTE_ADDR'];\n\n if ($CIP)\n {\n $cip = explode('.', $CIP);\n\n $this->data['ip'] = ($cip['0'] != current(explode('.', $RMT))) ? implode('.', array_reverse($cip)) : $CIP;\n }\n elseif ($FOR)\n {\n $this->data['ip'] = (strstr($FOR, ',')) ? end(explode(',', $FOR)) : $FOR;\n }\n else {\n $this->data['ip'] = $RMT;\n }\n }", "function set_ip( $ip ) {\n // sets the value of ip\n $this->ip = $ip;\n }", "public function set_user_ip_address($value)\n {\n }", "public function setIp($ip)\n {\n $this->ip = $ip;\n }", "public function setIp($ip = '');", "public function setIp($ip)\n {\n $this->ip = $ip;\n }", "public function set_customer_ip_address($value)\n {\n }", "public function setClientIp($value)\n {\n return $this->setParameter('clientIp', $value);\n }", "public function setIpAddress(?string $value): void {\n $this->getBackingStore()->set('ipAddress', $value);\n }", "public function setIpAddress(?string $value): void {\n $this->getBackingStore()->set('ipAddress', $value);\n }", "private function setClientIPs()\n {\n if ($this->isUsingTrustedProxy()) {\n $this->clientIps = [$this->server->get('REMOTE_ADDR')];\n }\n $clientIps = [];\n\n if ($this->header->has(self::$trustedHeaderNames[RequestHeaderConstants::FORWARDED])) {\n $header = $this->header->get(self::$trustedHeaderNames[RequestHeaderConstants::FORWARDED]);\n preg_match_all(\"/for=(?:\\\"?\\[?)([a-z0-9:\\.\\-\\/_]*)/\", $header, $matches);\n $clientIps = $matches[1];\n } elseif ($this->header->has(self::$trustedHeaderNames[RequestHeaderConstants::CLIENT_IP])) {\n $clientIps = explode(',', $this->header->get(self::$trustedHeaderNames[RequestHeaderConstants::CLIENT_IP]));\n $clientIps = array_map('trim', $clientIps);\n }\n\n $clientIps[] = $this->server->get('REMOTE_ADDR');\n $fallbackClientIps = [$clientIps[0]];\n\n foreach ($clientIps as $index => $clientIp) {\n // Check for valid IPs\n if (!filter_var($clientIp, FILTER_VALIDATE_IP)) {\n unset($clientIps[$index]);\n\n continue;\n }\n\n // Don't allow trusted proxies\n if (in_array($clientIp, self::$trustedProxies)) {\n unset($clientIps[$index]);\n }\n }\n\n $this->clientIps = (count($clientIps) == 0) ? $fallbackClientIps : array_reverse($clientIps);\n }", "private function setIpAddress()\n {\n if (\\App::environment() === 'local') {\n $ip_address = (rand(0, 255)) . '.' . (rand(0, 255)) . '.' . (rand(0, 255)) . '.' . (rand(0, 255));\n // $ip_address = '127.0.0.1';\n } else {\n $ip_address = isset($_SERVER[\"HTTP_CF_CONNECTING_IP\"]) ? $_SERVER[\"HTTP_CF_CONNECTING_IP\"] : $_SERVER[\"REMOTE_ADDR\"];\n }\n\n return $ip_address;\n }", "function setIp(){\n\t\t$data = array('ip' => $_SERVER['REMOTE_ADDR'],\n\t\t\t\t\t'user_agent' => $_SERVER['HTTP_USER_AGENT']);\n\n\t\t$this->db->insert('ipcliente', $data); \n\t}", "public function clientRequestsFromIp(string $ip)\n {\n $this->clientIp = $ip;\n }", "private function serverIP()\r\n {\r\n \\DB::table('settings')->whereId(config('mc.app_id'))->update([\r\n 'server_ip' => $_SERVER['SERVER_ADDR']\r\n ]);\r\n }", "public function setIpAddress($val)\n {\n $this->_propDict[\"ipAddress\"] = $val;\n return $this;\n }", "public function testIPMethodReturnsClientIPAddress()\r\n\t{\r\n\t\t$this->setServerVar('REMOTE_ADDR', 'something');\r\n\t\t$this->assertEquals('something', Request::ip());\r\n\r\n\t\t$this->setServerVar('HTTP_CLIENT_IP', 'something');\r\n\t\t$this->assertEquals('something', Request::ip());\r\n\r\n\t\t$this->setServerVar('HTTP_CLIENT_IP', 'something');\r\n\t\t$this->assertEquals('something', Request::ip());\r\n\r\n\t\t$_SERVER = array();\r\n\t\t$this->restartRequest();\r\n\t\t$this->assertEquals('0.0.0.0', Request::ip());\r\n\t}", "public function setIP($IP = \"RAND\") {\n if($IP) {\n if($IP == \"RAND\") {\n $this->randIP = true;\n } else {\n $this->randIP = false;\n $this->IP = $IP;\n }\n } else {\n $this->IP = \"\";\n }\n }", "private function set_client_ip($data = null) {\n\t\t$ip = (isset($data)) ? $data : '0.0.0.0';\n\t\tif(strpos($ip, ',')) {\n\t\t\t$ip2 = explode(',', $ip);\n\t\t\t$ip = $ip2[0];\n\t\t\tif(strpos($ip, '192.168.') !== false && isset($ip2[1])) {\n\t\t\t\t$ip = $ip2[1];\n\t\t\t} elseif(strpos($ip, '10.') !== false && isset($ip2[1])) {\n\t\t\t\t$ip = $ip2[1];\n\t\t\t} elseif(strpos($ip, '172.16.') !== false && isset($ip2[1])) {\n\t\t\t\t$ip = $ip2[1];\n\t\t\t}\n\t\t}\n\t\t$ip = filter_var($ip, FILTER_VALIDATE_IP);\n\t\t$ip = ($ip === false) ? '0.0.0.0' : $ip;\n\t\treturn $ip;\n\t}", "public function setIPAddress($value)\n {\n return $this->set('IPAddress', $value);\n }", "public function setIP($ip) {\n $this->checkIP($ip);\n $this->ip = $ip;\n return $this; \n }", "public function setAddress($address) {\n if (filter_var($address, FILTER_VALIDATE_IP)) {\n $this->address = $address;\n } else {\n trigger_error('Service IP address is not valid.');\n }\n }", "public function getClientIp();", "public function setSenderIP(?string $value): void {\n $this->getBackingStore()->set('senderIP', $value);\n }", "public function getClientIp()\n {\n return '127.0.0.1';\n }", "private function _getIp()\r\n\t\t{\r\n\t\t\t\treturn getClientIp();\r\n\t\t}", "public function getClientIp()\n {\n return $this->clientIP;\n }", "public function setIp($ipObj)\n {\n $this->ipObj = $ipObj;\n }", "public function getClientIP() {\r\n return $this->clientIP;\r\n }", "public function getClientIp(){\n\t\t\treturn $this->getParameter('clientIP');\n\t\t}", "public function setSourceIPAddress(?string $value): void {\n $this->getBackingStore()->set('sourceIPAddress', $value);\n }", "public function set_user_source_ip($value)\n {\n $this->_user_source_IP = $value;\n }", "public static function get_unsafe_client_ip()\n {\n }", "public function withClientIpAddress()\n {\n $this->request_tag .= $this->determineClientIpAddress($this->request) . ':';\n\n return $this;\n }", "function RGClientIP()\n{\n // Request::setTrustedProxies(['100.97.0.0/16']);\n // Fixed: 配置过可信任代理,这里就不需要阿里云 ip\n\n return request()->ip();\n}", "public static function getClientIP() {\n return self::$ClientIP;\n }", "public function setIpAddress(string $ipAddress): self\n {\n $this->options['ipAddress'] = $ipAddress;\n return $this;\n }", "public function setIpAddress($value)\n {\n return $this->setParameter('ipAddress', $value);\n }", "function setOriginatingIPAddress($originatingIPAddress) {\n\t\t$this->m_originatingIPAddress = $originatingIPAddress;\n\t}", "public function getClientIp()\n {\n return $_SERVER[$this->options['clientIpKey']];\n }", "public function setIpAddress(string $ipAddress)\n {\n if (false == filter_var($ipAddress, FILTER_VALIDATE_IP)) {\n throw new InvalidArgumentException(\"You must provide valid IP address\");\n }\n\n $this->ipAddress = $ipAddress;\n }", "function setVisitorIpAddress($notification)\n\t{\n\t\t$ip =& $notification->getNotificationObject();\n\t\t$ip = self::applyIPMask($ip, Piwik_Tracker_Config::getInstance()->Tracker['ip_address_pre_mask_length']);\n\t}", "public function setClient($client){\n $this->client = $client;\n }", "public function setting_scanner_ip(){\n $ip_address = '127.0.0.1';\n $doxie = new DoxieConsumer();\n $doxie->set_logger($this->_logger);\n\n $this->assertFalse($doxie->is_scanner_ip_set());\n $doxie->set_scanner_ip($ip_address);\n $this->assertTrue($doxie->is_scanner_ip_set());\n $this->assertEquals($ip_address, $doxie->get_scanner_ip());\n $doxie->unset_scanner_ip();\n $this->assertFalse($doxie->is_scanner_ip_set());\n }", "public function getClientIp()\n {\n if (is_null($this->clientIp)) {\n $this->setClientIp($this->detectClientIp());\n }\n\n return $this->clientIp;\n }", "public function setRequestorIp($ip)\n {\n if (!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {\n throw new \\InvalidArgumentException('Not a valid IPv4');\n }\n $this->requestorIP = ip2long($ip);\n }", "public function get_client_ip() {\n\n $this->ipaddress = '';\n if (getenv('HTTP_CLIENT_IP'))\n $this->ipaddress = getenv('HTTP_CLIENT_IP');\n else if(getenv('HTTP_X_FORWARDED_FOR'))\n $this->ipaddress = getenv('HTTP_X_FORWARDED_FOR');\n else if(getenv('HTTP_X_FORWARDED'))\n $this->ipaddress = getenv('HTTP_X_FORWARDED');\n else if(getenv('HTTP_FORWARDED_FOR'))\n $this->ipaddress = getenv('HTTP_FORWARDED_FOR');\n else if(getenv('HTTP_FORWARDED'))\n $this->ipaddress = getenv('HTTP_FORWARDED');\n else if(getenv('REMOTE_ADDR'))\n $this->ipaddress = getenv('REMOTE_ADDR');\n else\n $this->ipaddress = 'UNKNOWN';\n return $this->ipaddress;\n\n }", "public function getClientIp(): IPAddressInterface;", "public function setClient($client)\r\n {\r\n $this->client = $client;\r\n }", "public function setLDAPServer($ip){\n\t\t$this->LDAPServer = $ip;\n\t}", "public function __construct(){\r\n\t\t//Determine clients IP with get method\r\n\t\t$this->ip = $this->get();\r\n\t}", "public function setIpFrom($ip) {\n\t\tif (is_string($ip)) {\n\t\t\t$this->_ip_from = $ip;\n\t\t} else {\n\t\t\tthrow new InvalidArgumentException('ip from should be an IP address');\n\t\t}\n\t}", "public function setIp($var)\n {\n GPBUtil::checkString($var, True);\n $this->ip = $var;\n }", "public function setClient($client)\n {\n $this->client = $client;\n }", "public function getClientIp()\n {\n return $this->getParameter('clientIp');\n }", "public function setIp($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->ip !== $v) {\n\t\t\t$this->ip = $v;\n\t\t\t$this->modifiedColumns[] = UserPeer::IP;\n\t\t}\n\n\t\treturn $this;\n\t}", "protected function setClient(Client $client): void\n {\n $this->client = $client;\n }", "public function setSenderIP($val)\n {\n $this->_propDict[\"senderIP\"] = $val;\n return $this;\n }", "public function getClientIPAddress() : string;", "public function ip()\n {\n return '0.0.0.0';\n }", "public function setClient($client)\r\n\t\t{\r\n\t\t\t$this->client = unserialize($client);\r\n\t\t}", "public function setIp($ip)\n {\n $this->ip = $ip;\n\n return $this;\n }", "public function setIp($ip)\n {\n $this->ip = $ip;\n\n return $this;\n }", "public function set_client( Client $client)\n {\n $this->client = $client;\n }", "public static function getClientIp(): mixed\n {\n return IP::real();\n }", "public static function getClientIp(): mixed\n {\n return IP::real();\n }", "private function Obtener_IP_Cliente()\n {\n \tif (!empty($_SERVER['HTTP_CLIENT_IP']))\n return $_SERVER['HTTP_CLIENT_IP'];\n \n \tif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n \n \treturn $_SERVER['REMOTE_ADDR'];\n\t}", "public function setClient($client);", "public function add_ipaddress()\n\t{\n\t\t$ip_user = $this->getRealIP();\n\t\t$conection = $this->ConnectDB();\n\t\t$statement = $conection->prepare(\"INSERT INTO visitas (ip_address) values (:ip_address)\");\n\t\t$statement->execute(array(':ip_address' => $ip_user));\n\t}", "public function __construct(PersonalizeClientIp $personalize_client_ip) {\n $this->personalize_client_ip = $personalize_client_ip;\n }", "public function setClient(Client $client)\n {\n $this->client = $client;\n }", "public function setClient(Client $client)\n {\n $this->client = $client;\n }", "protected function setClient($value)\n {\n $this->set('client', (string)$value);\n }", "function set_client_ip($visiter_ip)\n{\n\tglobal $db;\n\t\n\t$stmt = $db->prepare(\"INSERT INTO sessions (s_ip, s_date, s_agent) VALUES (:ip, :time, :agent)\");\n $stmt->bindParam(':ip', $visiter_ip);\n $stmt->bindParam(':time', time());\n $stmt->bindParam(':agent', $_SERVER['HTTP_USER_AGENT']);\n $stmt->execute();\n\n // var_dump($_SERVER['HTTP_USER_AGENT']);\n}", "public static function setClient(Client $client) {\n self::$client = $client;\n }", "public function setNasIPAddress($hostOrIp = '')\n {\n if (0 < strlen($hostOrIp)) {\n $this->nasIpAddress = gethostbyname($hostOrIp);\n } else {\n $hostOrIp = @php_uname('n');\n if (empty($hostOrIp)) {\n $hostOrIp = (isset($_SERVER['HTTP_HOST'])) ? $_SERVER['HTTP_HOST'] : '';\n }\n if (empty($hostOrIp)) {\n $hostOrIp = (isset($_SERVER['SERVER_ADDR'])) ? $_SERVER['SERVER_ADDR'] : '0.0.0.0';\n }\n\n $this->nasIpAddress = gethostbyname($hostOrIp);\n }\n\n $this->setAttribute(4, $this->nasIpAddress);\n\n return $this;\n }", "private function registerIpAddress()\n {\n $this->app->singleton('firewall.ip.address', function() {\n return new IpAddress();\n });\n }", "public function getIpAddress()\n {\n return $this->ip_address;\n }", "function ambilIPClient() {\n if (!empty($_SERVER['HTTP_CLIENT_IP'])) {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n //to check ip is pass from proxy \n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } else {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n return $ip;\n }", "public function setRemoteIPAddress($value)\n {\n $this->socketConfig->setRemoteAddress($value);\n return $this;\n }", "public function getIpAddress()\n {\n return $this->ipAddress;\n }", "public function getIpAddress()\n {\n return $this->ipAddress;\n }", "public function getIpAddress()\n {\n return $this->ipAddress;\n }", "public function getIpAddress()\n {\n return $this->ipAddress;\n }", "public static function get_ip_address()\n {\n }", "public function setIpAddress($v)\n {\n if ($v !== null)\n {\n $v = (string) $v;\n }\n\n if ($this->ip_address !== $v)\n {\n $this->ip_address = $v;\n $this->modifiedColumns[] = CommentArchivePeer::IP_ADDRESS;\n }\n\n return $this;\n }", "function getIp(){\n if (isset($_SERVER[\"HTTP_CF_CONNECTING_IP\"])) {\n $_SERVER['REMOTE_ADDR'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n $_SERVER['HTTP_CLIENT_IP'] = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n }\n $client = @$_SERVER['HTTP_CLIENT_IP'];\n $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\n $remote = $_SERVER['REMOTE_ADDR'];\n\n if(filter_var($client, FILTER_VALIDATE_IP))\n {\n $this->ip = $client;\n }\n elseif(filter_var($forward, FILTER_VALIDATE_IP))\n {\n $this->ip = $forward;\n }\n else\n {\n $this->ip = $remote;\n }\n\n return $this->ip;\n }", "function GetClientIP(){ \n\n\t\t\t\tif ($_SERVER['HTTP_X_FORWARDED_FOR']) { \n\t\t\t\t\t$clientip = $_SERVER['HTTP_X_FORWARDED_FOR']; \n\t\t\t\t} \n\t\t\t\telse { \n\t\t\t\t $clientip = $_SERVER['REMOTE_ADDR']; \n\t\t\t\t} \n\n\t\t\t\treturn $clientip; \n\t\t\t\t}", "protected function getClientIp()\n {\n return $this->request->getClientIp();\n }", "public function ip()\n {\n return $this->getClientIp();\n }", "public function setClient(AClient $client)\n {\n $this->client = $client;\n }", "public function ipAddress($ipAddress = null);", "function setAddress($address) { $this->address = $address; }", "public function getClientIpAddress()\n {\n return $this->getAttribute(self::ATTRIBUTE_CLIENT_IP);\n }", "public function setIpAddress($ipAddress)\n {\n $this->ipAddress = $ipAddress;\n return $this;\n }", "public function setIpAddress($ipAddress)\n {\n $this->ipAddress = $ipAddress;\n return $this;\n }", "function clientIP() {\r\n \r\n\t\t\t\t$ipaddress = '';\r\n\t\t\t\t\r\n\t\t\t\tif (getenv('HTTP_CLIENT_IP')) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t$ipaddress = getenv('HTTP_CLIENT_IP');\r\n\t\t\t\t\t\r\n\t\t\t\t}elseif(getenv('HTTP_X_FORWARDED_FOR')){\r\n\t\t\t\t\t\r\n\t\t\t\t\t$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\r\n\t\t\t\t\t\r\n\t\t\t\t}elseif(getenv('HTTP_X_FORWARDED')){\r\n\t\t\t\t\t\r\n\t\t\t\t\t$ipaddress = getenv('HTTP_X_FORWARDED');\r\n\t\t\t\t\t\r\n\t\t\t\t}elseif(getenv('HTTP_FORWARDED_FOR')){\r\n\t\t\t\t\t\r\n\t\t\t\t\t$ipaddress = getenv('HTTP_FORWARDED_FOR');\r\n\t\t\t\t\t\r\n\t\t\t\t}elseif(getenv('HTTP_FORWARDED')){\r\n\t\t\t\t\t\r\n\t\t\t\t\t$ipaddress = getenv('HTTP_FORWARDED');\r\n\t\t\t\t\t\r\n\t\t\t\t}elseif(getenv('REMOTE_ADDR')){\r\n\t\t\t\t\t\r\n\t\t\t\t\t$ipaddress = getenv('REMOTE_ADDR');\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\t\r\n\t\t\t\t\t$ipaddress = 'UNKNOWN';\r\n\t\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t \r\n\t\t\t\treturn $ipaddress;\r\n\t\r\n\t\t}", "public function __construct()\n {\n $this->IP = isset($_SERVER[\"HTTP_CF_CONNECTING_IP\"])?$_SERVER[\"HTTP_CF_CONNECTING_IP\"]:$_SERVER[\"REMOTE_ADDR\"];\n }" ]
[ "0.8776662", "0.74363893", "0.73351556", "0.73313886", "0.72851944", "0.7169082", "0.7134694", "0.71125805", "0.70614475", "0.7020477", "0.69795203", "0.69795203", "0.6978725", "0.6836867", "0.68145025", "0.678169", "0.6767426", "0.6720543", "0.6656844", "0.66220576", "0.6560311", "0.6549246", "0.6544459", "0.6527064", "0.6512928", "0.6464527", "0.6370817", "0.635983", "0.62984294", "0.6294984", "0.6286158", "0.6277188", "0.62701356", "0.6267235", "0.6209264", "0.62068933", "0.6202741", "0.61920744", "0.6187429", "0.6186938", "0.614238", "0.61409444", "0.6139676", "0.6127544", "0.61151993", "0.61096084", "0.6094748", "0.6083299", "0.60681313", "0.60679775", "0.6048448", "0.6046632", "0.6034652", "0.60199124", "0.5978621", "0.5977768", "0.59699315", "0.5964384", "0.5963367", "0.59513533", "0.5947291", "0.5943905", "0.5926611", "0.5908125", "0.5908125", "0.5900362", "0.58996534", "0.58996534", "0.58990824", "0.58976847", "0.58901525", "0.588643", "0.5877986", "0.5877986", "0.5877254", "0.5875402", "0.58651644", "0.58606064", "0.5859562", "0.5858156", "0.5847659", "0.5824137", "0.5819755", "0.5819755", "0.5819755", "0.5819755", "0.58175844", "0.5817079", "0.581525", "0.58017915", "0.5791821", "0.57905805", "0.57816124", "0.57807124", "0.577595", "0.5775859", "0.5773962", "0.5773962", "0.57729256", "0.57716846" ]
0.8196065
1
CircleBurst Main Helper Function Creates a set of Circles relative in size to Wallpaper & Total amount of circles to build
Основная вспомогательная функция CircleBurst создает набор окружностей, размер которых относится к размеру обоев, и общее количество окружностей для построения
public function borderBurstCircles($bbP = array(), $tcs) { // Compute Circle Size // First Circle size is relative to Wallpaper size / half of total colors // Additional Circles are relative [%]PERCENT of primary circle size if ($bbP["counter"] === 1) { $cSize = intval(round(rand(intval(self::WALLWIDTH * 0.25), intval(self::WALLWIDTH * 0.75)))); $this->mainSize = $cSize; } else { $cSize = intval(round($this->mainSize * (($tcs - $bbP["counter"]) * .1))); } // Error checking min size & set min size $testSize = intval(round(self::WALLWIDTH * 0.13)); if ($cSize < $testSize) $cSize = $testSize; //if ($bbP["counter"] === 1) $this->mainSize = $cSize; //outputLog("MainSize:" . $this->mainSize . " Count: " . $bbP["counter"]); // Background Outline Size 5% larger than circle size $borderSize = intval(round(self::BORDERSIZE + $cSize)); $bInSize = intval(round($this->mainSize * (($tcs - $bbP["counter"]) * .1))); $cInSize = intval(round($bInSize * (($tcs - $bbP["counter"]) * .1))); if ($bInSize < self::BORDERMID) $bInSize = self::BORDERMID; if ($cInSize < self::BORDERIN) $cInSize = self::BORDERIN; // Compute Circle Location $spots = $this->circleLocation($cSize); $cX = $spots["spotX"]; $cY = $spots["spotY"]; // Add Border Circle to Wallpaper $this->drawColoredCircle($bbP["wImg"], $bbP["cPal"], $cX, $cY, $borderSize, $bbP["bgColor"]); // Add Theme Color Circle to Wallpaper $this->drawColoredCircle($bbP["wImg"], $bbP["cPal"], $cX, $cY, $cSize, $bbP["currentColor"]); $rChance = rand(1, 5); if ($rChance !== 1) { $this->drawColoredCircle($bbP["wImg"], $bbP["cPal"], $cX, $cY, $bInSize, $bbP["bgColor"]); $this->drawColoredCircle($bbP["wImg"], $bbP["cPal"], $cX, $cY, $cInSize, $bbP["currentColor"]); } $fA = array("x" => $cX, "y" => $cY); return $fA; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DrawCircle(int $centerX, int $centerY, float $radius, \\raylib\\Color $color): void { }", "function createCircle($mac, $parentID){\n\t\n\tGLOBAL $CircleGroups;\n\tGLOBAL $Profil_Plugwise_Leistung;\n \tGLOBAL $Profil_Plugwise_Verbrauch;\n \tGLOBAL $Profil_Plugwise_Switch;\n\n // Archive ID ermitteln\n foreach ( IPS_GetInstanceListByModuleType(0) as $modul )\n {\n\t\t$instance = IPS_GetInstance($modul);\n\t\tif ( $instance['ModuleInfo']['ModuleName'] == \"Archive Control\" ) { $archive_id = $modul; break; }\n\t }\n if ( !isset($archive_id) ) { echo \"\\nArchive Control nicht gefunden!\"; die(); }\n\n\n\tprint \"\\nPW Create Circle: \".$mac;\n\t$item = CreateInstance($mac, $parentID, \"{485D0419-BE97-4548-AA9C-C083EB82E61E}\", $Position=0);\n\t$id_info = IPS_GetObject($item);\n\tIPS_SetIdent ($item, $mac);\n\n\n \t$gruppe = \"\";\n\t$name = \"\";\n $einaus = \"\";\n \n\tforeach( $CircleGroups as $circle )\n\t {\n\t\tif ( $circle[0] == $mac )\n\t\t {\n\t\t $name = $circle[1];\n\t\t $gruppe = $circle[2];\n\t\t $einaus = $circle[3];\n\t\t break;\n\t\t }\n\t }\n\n if ( $name != \"\" )\n IPS_SetName($item,$name);\n \n\t$CategoryIdApp = get_ObjectIDByPath('Program.IPSLibrary.app.hardware.Plugwise');\n\t$ScriptId = IPS_GetScriptIDByName('Plugwise_Controller', $CategoryIdApp );\n\n\t//$id1 = @IPS_GetVariableIDByName(\"Status\",$item) ;\n\t//if ( $id1 == false )\n\t$id1 = CreateVariable(\"Status\", 0, $item, 0, $Profil_Plugwise_Switch[0], false, true);\n $einaus = intval($einaus);\n \n if ( $einaus > 0 )\n {\n echo \"\\nBei $id1 Actionscript setzen\"; \n IPS_SetVariableCustomAction($id1,$ScriptId);\n\n\t if ( $einaus > 1 )\n if ( IPS_VariableExists($einaus) )\n\t \t{\n\t \techo \"\\nCreate Trigger:\" ;\n\t \tCreateEvent($einaus,$einaus,$ScriptId,0);\n\t\t}\n \n }\n\n\t//$id2 = @IPS_GetVariableIDByName(\"Leistung\",$item) ;\n\t//if ( $id2 == false )\n\t\t$id2 = CreateVariable(\"Leistung\", 2, $item, 0, $Profil_Plugwise_Leistung[0], 0, 0);\n\n\t//$id3 = @IPS_GetVariableIDByName(\"Gesamtverbrauch\",$item) ;\n\t//if ( $id3 == false )\n\t\t$id3 = CreateVariable(\"Gesamtverbrauch\", 2, $item, 0, $Profil_Plugwise_Verbrauch[0], 0, 0);\n\n\t$Profil_Plugwise_Kosten = 'Plugwise_Kosten';\n\t$id4 = CreateVariable(\"Kosten\", 2, $item, 0, $Profil_Plugwise_Kosten, 0, 0);\n\t\n\n $aggtype = 1; // Zaehler\n if ( defined('AGGTYPE') )\n $aggtype = AGGTYPE;\n\n $archivlogging = true;\n if ( defined('ARCHIVLOGGING') )\n $archivlogging = ARCHIVLOGGING;\n\n if ($archivlogging == true)\n {\n if ( defined('AGGTYPELEISTUNG') )\n \t$aggtype = AGGTYPELEISTUNG;\n\n \t\tAC_SetLoggingStatus($archive_id , $id2, True); \t// Logging einschalten\n \t\tAC_SetAggregationType($archive_id, $id2,$aggtype); // Logging auf Type setzen\n IPS_ApplyChanges($archive_id);\n\n \t\tif ( defined('AGGTYPEVERBRAUCH') )\n \t$aggtype = AGGTYPEVERBRAUCH;\n\n \t\tAC_SetLoggingStatus($archive_id , $id3, True); \t// Logging einschalten\n \t\tAC_SetAggregationType($archive_id, $id3, $aggtype);// Logging auf Type setzen\n IPS_ApplyChanges($archive_id);\n\n \t\tAC_SetLoggingStatus($archive_id , $id4, True); \t// Logging einschalten\n \t\t//AC_SetAggregationType($archive_id, $id4, $aggtype);// Logging auf Type setzen\n IPS_ApplyChanges($archive_id);\n\n \n\t\t}\n\n\t//$myVar = CreateVariable(\"gaina\",2,$item,0,\"\",0,0);\n\t//IPS_SetHidden($myVar, True);\n\t//$myVar = CreateVariable(\"gainb\",2,$item,0,\"\", 0,0);\n\t//IPS_SetHidden($myVar, True);\n\t//$myVar = CreateVariable(\"offTotal\",2,$item,0,\"\",0,0);\n\t//IPS_SetHidden($myVar, True);\n\t//$myVar = CreateVariable(\"offNoise\",2,$item,0,\"\",0,0);\n\t//IPS_SetHidden($myVar, True);\n $myVar = CreateVariable(\"LogAddress\", 1,$item,0,\"\",0,0);\n\tIPS_SetHidden($myVar, True);\n $myVar = CreateVariable(\"Error\", 1,$item,0,\"\",0,0);\n\tIPS_SetHidden($myVar, True);\n $myVar = CreateVariable(\"LastMessage\", 3,$item,0,\"\",0,0);\n\tIPS_SetHidden($myVar, True);\n $myVar = CreateVariable(\"Kalibrierdaten\", 3,$item,0,\"\",0,0);\n\tIPS_SetHidden($myVar, True);\n\n\t// Kalibrierungsdaten vom Circle abrufen\n\tPW_SendCommand(\"0026\".$mac,$mac);\n\n\t// Zeit stellen\n \tPW_SendCommand(\"0016\".$mac.unixtime2pwtime(),$mac);\n\n\t// Status abfragen\n\tPW_SendCommand(\"0012\".$mac,$mac);\n\tPW_SendCommand(\"0023\".$mac,$mac);\n\n}", "public function spreadImage ($radius) {}", "function x_y_creater_circle($center_x,$center_y,$radius,$n){\n $alpha = M_PI * 2 / $n;\n $points = array();\n \n $i = -1;\n while( ++$i < $n ){\n $theta= $alpha * ($i+0.3);\n $pointOnCircle= array(round((cos( $theta )* $radius +$center_x),2), round((sin( $theta ) * $radius +$center_y),2));\n $points[ $i ] = $pointOnCircle;\n }\n return $points;\n }", "function DrawCircleLines(int $centerX, int $centerY, float $radius, \\raylib\\Color $color): void { }", "public function createCircle() {\n\t\treturn $this->objectManager->get('Tx_Sfsvgapi_Domain_Model_Circle');\n\t}", "public function randomCircleData($cSize)\n {\n $cData = array();\n $cData[\"spotX\"] = rand(0, self::WALLWIDTH);\n $cData[\"spotY\"] = rand(0, self::WALLHEIGHT);\n\n return $cData;\n }", "function PdfCircle(&$pdf, $radius = 1, $width = -1, $height = -1)\n\t{\n\t\t$this->radius = $radius;\n\t\t$this->PdfObject($pdf, $radius, $width, $height);\t\t\n\t}", "function ImageDrawCircle(\\raylib\\Image &$dst, int $centerX, int $centerY, int $radius, \\raylib\\Color $color): void { }", "function ImageDrawCircleLines(\\raylib\\Image &$dst, int $centerX, int $centerY, int $radius, \\raylib\\Color $color): void { }", "public function circle ($ox, $oy, $px, $py) {}", "function f_displayAllCircles($day_id)\n {\n echo \"\n <div class='row'>\n <div class='small-8 columns small-centered'>\";\n if(empty($day_id)) //if no day_id is specified -- i.e. initial page load\n {\n //Get the day_id here, instead of in the sub-function would make sure day_id is always synced up between start circle, and end circle.\n $day_id = f_getLatestDayId();\n }\n f_displayBigStartCircle($day_id); //$day_id simply means, that value will be marked as selected in the start circle\n f_displayBigEndCircle($day_id);\n\n echo \"</div></div>\";\n\n //Time for small circles\n echo \"\n <div class='row'>\n <div class='small-8 columns small-centered'>\n <ul class='list-menu'>\";\n\n // Displaying the following\n //<li><a href='#' class='button large circle'>6PM</a></li>\n // <li><a href='#' class='button large info circle long-text'>10PM</a></li>\n // <li><a href='#' class='button large info circle'>2AM</a></li>\n // <li><a href='#' class='button large info circle'>3AM</a></li>\n // <li><a href='#' class='button large info circle'>4AM</a></li>\n f_displaySmallCircles($day_id);\n echo \"</ul></div></div>\";\n\n }", "public function oilPaintImage ($radius) {}", "function drawCircle($Xc,$Yc,$Height,$Width,$Format=\"\")\n {\n $R\t = isset($Format[\"R\"]) ? $Format[\"R\"] : 0;\n $G\t = isset($Format[\"G\"]) ? $Format[\"G\"] : 0;\n $B\t = isset($Format[\"B\"]) ? $Format[\"B\"] : 0;\n $Alpha = isset($Format[\"Alpha\"]) ? $Format[\"Alpha\"] : 100;\n $Ticks = isset($Format[\"Ticks\"]) ? $Format[\"Ticks\"] : NULL;\n\n $Height\t= abs($Height);\n $Width\t= abs($Width);\n\n if ( $Height == 0 ) { $Height = 1; }\n if ( $Width == 0 ) { $Width = 1; }\n $Xc = floor($Xc); $Yc = floor($Yc);\n\n $RestoreShadow = $this->Shadow;\n if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 )\n {\n $this->Shadow = FALSE;\n $this->drawCircle($Xc+$this->ShadowX,$Yc+$this->ShadowY,$Height,$Width,array(\"R\"=>$this->ShadowR,\"G\"=>$this->ShadowG,\"B\"=>$this->ShadowB,\"Alpha\"=>$this->Shadowa,\"Ticks\"=>$Ticks));\n }\n\n if ( $Width == 0 ) { $Width = $Height; }\n if ( $R < 0 ) { $R = 0; } if ( $R > 255 ) { $R = 255; }\n if ( $G < 0 ) { $G = 0; } if ( $G > 255 ) { $G = 255; }\n if ( $B < 0 ) { $B = 0; } if ( $B > 255 ) { $B = 255; }\n\n $Step = 360 / (2 * PI * max($Width,$Height));\n $Mode = 1; $Cpt = 1;\n for($i=0;$i<=360;$i=$i+$Step)\n {\n $X = cos($i*PI/180) * $Height + $Xc;\n $Y = sin($i*PI/180) * $Width + $Yc;\n\n if ( $Ticks != NULL )\n {\n if ( $Cpt % $Ticks == 0 )\n { $Cpt = 0; if ( $Mode == 1 ) { $Mode = 0; } else { $Mode = 1; } }\n\n if ( $Mode == 1 )\n $this->drawAntialiasPixel($X,$Y,array(\"R\"=>$R,\"G\"=>$G,\"B\"=>$B,\"Alpha\"=>$Alpha));\n\n $Cpt++;\n }\n else\n $this->drawAntialiasPixel($X,$Y,array(\"R\"=>$R,\"G\"=>$G,\"B\"=>$B,\"Alpha\"=>$Alpha));\n\n }\n $this->Shadow = $RestoreShadow;\n }", "public function sketchImage ($radius, $sigma, $angle) {}", "public function run()\n {\n $g = 0;\n for ($i = 1; $i <= 60; $i++) {\n $f = ($i - 1) - $g; // First index\n for ($j = 0; $j < 5; $j++) {\n Image::create([\n 'artwork_id' => $i,\n 'image_source' => 'images/artwork_pic_00' . $j . '.png',\n 'priority' => $f + $j\n ]);\n if ($f + $j == 4) $f = -($j + 1);\n }\n if($i % 5 == 0) $g += 5;\n }\n }", "function DrawCircleGradient(int $centerX, int $centerY, float $radius, \\raylib\\Color $color1, \\raylib\\Color $color2): void { }", "function update_uebersicht_circles()\n\t{\n\tGLOBAL $CircleGroups;\n\tGLOBAL $IdGraph;\n\n\t$VisuPath = \"Visualization.WebFront.Hardware.Plugwise.MENU\";\n $IdMenu = @get_ObjectIDByPath($VisuPath,true);\n\t$VisuPath = \"Visualization.WebFront.Hardware.Plugwise.GRAPH\";\n $IdGraph = @get_ObjectIDByPath($VisuPath,true);\n\t$AllgPath = \"Visualization.WebFront.Hardware.Plugwise.MENU.Allgemeines\";\n $IdAllg = get_ObjectIDByPath($AllgPath);\n\n\t$SystemstPath = \"Visualization.WebFront.Hardware.Plugwise.MENU.Systemsteuerung\";\n $IdSystemst = get_ObjectIDByPath($SystemstPath);\n\n\t$id = IPS_GetObjectIDByName('Systemsteuerung',$IdAllg); // Systemsteuerung\n \tif ( !$id ) return;\n\tif ( @GetValue($id) != 1 ) return;\n\n\t$CircleDataPath = \"Program.IPSLibrary.data.hardware.Plugwise.Circles\";\n $idCatCircles = get_ObjectIDByPath($CircleDataPath);\n\n\t$id = IPS_GetObjectIDByName('Auswahl',$IdGraph);\n\t$menupunkt = GetValue($id);\n\t\n\t$object = IPS_GetObject($id);\n \t$ident = intval($object['ObjectIdent']);\n\n\t$csspath = \"/user/Plugwise/\";\n $hintergrundfarbe = \"#9B9B9B\";\n\n $imggroesse = \"width='90' height='50'\";\n\n\n\t$menuarray = array\n\t (\n\t array(true ,\"menu_uebersicht.png\"\t\t,\"menu_uebersicht_grau.png\"\t\t,0),\n\t array(true ,\"menu_letztedaten.png\"\t\t,\"menu_letztedaten_grau.png\"\t\t,1),\n\t array(true ,\"menu_softwareversion.png\"\t,\"menu_softwareversion_grau.png\"\t,2),\n\t array(true ,\"menu_hardwareversion.png\"\t,\"menu_hardwareversion_grau.png\"\t,3),\n\t array(true ,\"menu_leistung.png\"\t\t\t,\"menu_leistung_grau.png\"\t\t\t,4),\n\t array(true ,\"menu_verbrauch.png\"\t\t\t,\"menu_verbrauch_grau.png\"\t\t\t,5),\n\t array(true ,\"menu_ping.png\"\t\t\t\t,\"menu_ping_grau.png\"\t\t\t\t,6),\n\t );\n\n\n\t$menu = \"\";\n\t$menu = $menu . \"<table border='0' cellspacing='1' cellpadding='0' bgcolor=$hintergrundfarbe width='100%' height='20'>\";\n\t$menu = $menu . \"<tr>\";\n\n\t$imgpath = \"/user/Plugwise/images/\";\n\n\t\n\tforeach ( $menuarray as $menuitem )\n\t {\n\t\t$menu = $menu . \"<td bgcolor=#000000 width='16%' cellspacing='0' cellpadding='0'>\";\n\n\t\tif ( $menuitem[0] == false )\n\t\t {\n\t\t $altfile = IPS_GetKernelDir().\"webfront/user/Plugwise/images/alt_\".$menuitem[2];\n\t\t if ( file_exists($altfile) )\n\t\t $file = $imgpath . \"alt_\" . $menuitem[2];\n\t\t\telse\n\t\t\t $file = $imgpath . $menuitem[2];\n\n\t\t\t$menu = $menu . \"<img src='$file' \". $imggroesse .\" >\";\n\t\t\t}\n\n\t\tif ( $menuitem[0] == true and $menuitem[3] != $menupunkt)\n\t\t {\n\t\t $altfile = IPS_GetKernelDir().\"webfront/user/Plugwise/images/alt_\".$menuitem[2];\n\t\t if ( file_exists($altfile) )\n\t\t $file = $imgpath . \"alt_\" . $menuitem[2];\n\t\t\telse\n\t\t\t $file = $imgpath . $menuitem[2];\n\n\t\t \n\t\t\t$menu = $menu . \"<img src='$file' \". $imggroesse .\" onmouseover=\\\"this.style.cursor = 'pointer'\\\" \";\n\t\t\t$menu = $menu . \"onclick=\\\"new Image().src = '/user/Plugwise/PlugwiseWebMenuController.php?Button=$menuitem[3] '; return false;\\\" \";\n\t\t\t$menu = $menu . \"ontouchstart=\\\"new Image().src = '/user/Plugwise/PlugwiseWebMenuController.php?Button=$menuitem[3] '; return false;\\\">\";\n\t\t\t}\n\n\t\tif ( $menuitem[3] == $menupunkt )\n\t\t {\n\t\t $altfile = IPS_GetKernelDir().\"webfront/user/Plugwise/images/alt_\".$menuitem[2];\n\t\t if ( file_exists($altfile) )\n\t\t $file = $imgpath . \"alt_\" . $menuitem[1];\n\t\t\telse\n\t\t\t $file = $imgpath . $menuitem[1];\n\n\n\t\t\t$menu = $menu .\"<img src='$file' \". $imggroesse .\" onmouseover=\\\"this.style.cursor = 'pointer'\\\" \";\n\t\t\t$menu = $menu . \"onclick=\\\"new Image().src = '/user/Plugwise/PlugwiseWebMenuController.php?Button=$menuitem[3] '; return false;\\\" \";\n\t\t\t$menu = $menu . \"ontouchstart=\\\"new Image().src = '/user/Plugwise/PlugwiseWebMenuController.php?Button=$menuitem[3] '; return false;\\\">\";\n\t\t\t}\n\t\t \n\n\t\t$menu = $menu . \"</td>\";\n\t }\n\n\n\t$menu = $menu . \"</tr>\";\n\t$menu = $menu . \"</table>\";\n\t//***************************************************************************\n\n\t$menu = $menu . \"Seite \". ($ident + 1);\n\t\n\t$menu = createMenueSystemsteuerung();\n\n\t// Erstelle Datenarray\n\t$data_array = array();\n\tfor($x=0;$x<181;$x++)\n\t\t{\n\t\t$data_array[$x]['EXIST'] = false ;\n\t\t$data_array[$x]['CIRCLEID'] = \"\" ;\n\t\t$data_array[$x]['CIRCLENAME'] = \"\" ;\n\t\t$data_array[$x]['CIRCLESTATUS'] = getRandomBoolean() ;\n\t\t$data_array[$x]['CIRCLENEW'] = getRandomBoolean() ;\n\t\t$data_array[$x]['CIRCLEERROR'] = getRandomBoolean() ;\n\t\t$data_array[$x]['CIRCLESWVERSION'] = \"SW?\" ;\n\t\t$data_array[$x]['CIRCLEHWVERSION'] = \"HW?\" ;\n\t\t$data_array[$x]['CIRCLELASTSEEN'] = 0 ;\n\t\t$data_array[$x]['CIRCLELASTMILLISEC'] = 0 ;\n\t\t$data_array[$x]['CIRCLEWATT'] = 0 ;\n\t\t$data_array[$x]['CIRCLELIVECOUNTER'] = 0 ;\n\t\t$data_array[$x]['CIRCLEKWH'] = 0 ;\n\t\t$data_array[$x]['CIRCLEPINGMS'] = 0;\n\t\t$data_array[$x]['CIRCLEPINGRSSI1'] = 0;\n\t\t$data_array[$x]['CIRCLEPINGRSSI2'] = 0;\n\n\t\t}\n\n\t$circles = IPS_GetChildrenIDs($idCatCircles);\n\t$counter = 0;\n\n\tforeach ( $circles as $circle )\n\t {\n\t\t$data_array[$counter]['EXIST'] = true ;\n\n\t\t$object = IPS_GetObject($circle);\n\t $data_array[$counter]['CIRCLEID'] = $object['ObjectIdent'];\n\t\t$data_array[$counter]['CIRCLENEW'] = false;\n\t\t$data_array[$counter]['CIRCLEERROR'] = @GetValue(IPS_GetVariableIDByName('Error',$circle));\n\t\t$data_array[$counter]['CIRCLESTATUS'] = @GetValue(IPS_GetVariableIDByName('Status',$circle));\n\n\n\t\t$objlastmessage = IPS_GetObject(IPS_GetObjectIDByIdent(\"LastMessage\",$circle));\n\t\t$string = $objlastmessage['ObjectInfo'];\n\t\t$string_array = explode(\";\", $string);\n\n\t\t$start_timestamp = @$string_array[0];\n\t\t$ende_timestamp = @$string_array[1];\n $last_seen = intval($ende_timestamp);\n\n\t\t$last_ms = @GetValue(IPS_GetVariableIDByName('LastMessage',$circle));\n\t\t$last_ms = intval($last_ms);\n\t\t$data_array[$counter]['CIRCLELASTSEEN'] = date('d.m.y H:i:s',$last_seen);\n\t\t$data_array[$counter]['CIRCLELASTMILLISEC'] = $last_ms;\n\t\t//\n\n\n\n\t\t$watt = @number_format(GetValue(IPS_GetVariableIDByName('Leistung',$circle)),1,\",\",\"\");\n\t\t$y = strlen($watt);\n\t\tfor($x=$y;$x<6;$x++)\n\t\t $watt = \"&ensp;\".$watt;\n\t\t$data_array[$counter]['CIRCLEWATT'] = $watt;\n\n\t\t$kwh = @number_format(GetValue(IPS_GetVariableIDByName('Gesamtverbrauch',$circle)),1,\",\",\"\");\n\t\t$y = strlen($kwh);\n\t\tfor($x=$y;$x<6;$x++)\n\t\t $kwh = \"&ensp;\".$kwh;\n\t\t$data_array[$counter]['CIRCLEKWH'] = $kwh;\n\n\n\t\t$array = explode(\",\",$object['ObjectInfo']);\n\t\tif ( isset($array[0]) )\n\t\t\t$data_array[$counter]['CIRCLEHWVERSION'] = $array[0];\n\t\tif ( isset($array[1]) )\n\t\t\t$data_array[$counter]['CIRCLESWVERSION'] = $array[1];\n\n\n\n\t\t//suche richtigen Namen in der Config\n\t\t$data_array[$counter]['CIRCLENAME'] = $object['ObjectIdent'];\n\t\t$gefunden = false;\n\t\tforeach ( $CircleGroups as $configCircle )\n\t\t\t{\n\t\t\tif ( $object['ObjectIdent'] == $configCircle[0] )\n\t\t\t\t{\n\t\t\t\t$data_array[$counter]['CIRCLENAME'] = $configCircle[1] ;\n\t\t\t\t$gefunden = true;\n\t\t\t\tbreak ;\n\t\t\t\t}\n\t\t\t}\n\t\tif ( $gefunden == false )\n\t\t {\n\t\t\t$data_array[$counter]['CIRCLENEW'] = true;\n\t\t }\n\t\t \n\t $info = $object['ObjectInfo'];\n\n\t\t$counter = $counter + 1;\n\n\t }\n\n\t// unbekannte neue Circles in Array einfuegen\n $file = 'plugwise_unknowncircles.log';\n\t$logdatei = IPS_GetLogDir() . \"Plugwise/\" . $file;\n\tif ( file_exists($logdatei) )\n\t\t{\n\t\tini_set(\"auto_detect_line_endings\", true);\n\t\t$newarray = file($logdatei,FILE_SKIP_EMPTY_LINES);\n\t\t$newarr = array_unique($newarray);\n\t\t //print_r($arr);\n\t\t$newanzahl = count($newarr);\n\t\tforeach( $newarr as $unknowncircle )\n\t\t {\n\t\t $unknowncircle = strtok($unknowncircle,\",\");\n\t\t\t$data_array[$counter]['EXIST'] = true ;\n\t\t\t$data_array[$counter]['CIRCLEID'] = $unknowncircle;\n\t\t\t$data_array[$counter]['CIRCLENAME'] = $unknowncircle;\n\t\t\t$data_array[$counter]['CIRCLENEW'] = true;\n\t\t\t$counter = $counter + 1;\n\t\t }\n\t\t\n\t\t}\n\t// alle eingefuegt\n\n\n\t// Anzahl der daten in der letzten Stunde\n\tif ( $menupunkt == 1 )\n\t {\n\t $instancesarchiv = IPS_GetInstanceListByModuleID('{43192F0B-135B-4CE7-A0A7-1475603F3060}');\n\t\t$archiveID = $instancesarchiv[0];\n\t\t$starttimearchiv = time() - 3600;\n\t\t$endetimearchiv = time() ;\n\n $counter = 0;\n\n\t\tforeach ( $circles as $circle )\n\t \t{\n\t\t\t$id = IPS_GetVariableIDByName('LastMessage',$circle);\n\t\t\t$datainarchiv = @AC_GetLoggedValues($archiveID,$id,$starttimearchiv,$endetimearchiv,-1);\n\n $data_array[$counter]['CIRCLELIVECOUNTER'] = count($datainarchiv) ;\n\t\t\t$counter = $counter + 1;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t// Pingdaten einfuegen wenn Menupunkt angewaehlt\n\tif ( $menupunkt == 6 )\n\t {\n \t$file = 'plugwiseping.log';\n\t\t$pingdatei = IPS_GetLogDir() . \"Plugwise/logs/\" . $file;\n\t\t$pingarr = array();\n\t\tif ( file_exists($pingdatei) )\n\t\t\t{\n\t\t\tini_set(\"auto_detect_line_endings\", true);\n\t\t\t$pingarray = file($pingdatei,FILE_SKIP_EMPTY_LINES);\n\t\t\t$pingarr = array_unique($pingarray);\n\t\t\n\t\t\t}\n\n\t\tforeach($pingarr as $pingcircle )\n\t \t{\n\t \t$teile = explode(\",\",$pingcircle);\n\t \t$teil_id = @$teile[1];\n\t \t$teil_rssi1 = @$teile[2];\n\t \t$teil_rssi2 = @$teile[3];\n\t \t$teil_ms = @$teile[4];\n\n\t\t\t// suche in bereits erstellten array\n\t\t\t$counter = 0;\n\t\t\tforeach($data_array as $d_a )\n\t\t\t {\n\t\t\t\t$testtext = $d_a['CIRCLEID'].\"-\".$teil_id;\n\t\t\t\t\n\t\t\t\t//IPS_Logmessage(\"plugwise\",$testtext);\n\n\t\t\t\tif($d_a['CIRCLEID'] == $teil_id) // gefunden\n\t\t\t\t {\n\t \t\t\t//IPS_Logmessage(\"plugwise\",$d_a['CIRCLEID']);\n\t\t\t\t\t$data_array[$counter]['CIRCLEPINGMS'] = $teil_ms;\n\t\t\t\t\t$data_array[$counter]['CIRCLEPINGRSSI1'] = $teil_rssi1;\n\t\t\t\t\t$data_array[$counter]['CIRCLEPINGRSSI2'] = $teil_rssi2;\n\t\t\t\t\t\n\t }\n\t\t\t\t$counter = $counter + 1;\n\t }\n\t\t\t}\n\t }\n\t// Ende Pingdaten\n\n\n\t\n\t$anzahlzeilen = 6 ;\n\t$anzahlspalten = 3;\n\tif (defined('UEBERSICHTSPALTEN'))\n\t $anzahlspalten = UEBERSICHTSPALTEN;\n\tif (defined('UEBERSICHTZEILEN'))\n\t $anzahlzeilen = UEBERSICHTZEILEN;\n\n\t \n\t$start_data = 27 * $ident;\n\t\n\t$start_data = $anzahlspalten * $anzahlzeilen * $ident;\n\n\t$hintergrundfarbe = '#FFFFFF';\n\t$text = \"\";\n\t$text = \"<head><link rel='stylesheet' type='text/css' href='\".$csspath.\"Plugwise.css'></head><body>\";\n//\t$menu = $menu . \"<table border='0' class='table'>\";\n\n\t$text = $text . \"<table class='table' border='0' cellspacing='5' bgcolor=$hintergrundfarbe width='100%' height='200' cellspacing='0' >\";\n\t$hintergrundfarbe = '#000000';\n\n\tfor($x=0;$x<$anzahlzeilen;$x++)\n\t {\n\t\t$text = $text . \"<tr>\";\n\t\tfor($y=0;$y<$anzahlspalten;$y++)\n\t\t {\n\t\t \n\t\t $c_id \t = $data_array[$start_data]['CIRCLEID'];\n\t\t $c_name \t = $data_array[$start_data]['CIRCLENAME'];\n\t\t $c_error \t = $data_array[$start_data]['CIRCLEERROR'];\n\t\t $c_status \t = $data_array[$start_data]['CIRCLESTATUS'];\n\t\t $c_new \t = $data_array[$start_data]['CIRCLENEW'];\n\t\t $c_swv \t = $data_array[$start_data]['CIRCLESWVERSION'];\n\t\t $c_hwv \t = $data_array[$start_data]['CIRCLEHWVERSION'];\n\t\t $c_ls \t = $data_array[$start_data]['CIRCLELASTSEEN'];\n\t\t $c_lsms = $data_array[$start_data]['CIRCLELASTMILLISEC'];\n\t\t $c_watt \t = $data_array[$start_data]['CIRCLEWATT'];\n\t\t $c_kwh \t = $data_array[$start_data]['CIRCLEKWH'];\n\t\t $c_pingms = $data_array[$start_data]['CIRCLEPINGMS'];\n\t\t $c_pingrssi1 = $data_array[$start_data]['CIRCLEPINGRSSI1'];\n\t\t $c_pingrssi2 = $data_array[$start_data]['CIRCLEPINGRSSI2'];\n\t\t\t$c_livecount = $data_array[$start_data]['CIRCLELIVECOUNTER'];\n\n\t\t\t$text = $text . \"<td width='25%' bgcolor=$hintergrundfarbe >\";\n\t\t\t$circletext = \"\";\n\n\t\t\tif ( $data_array[$start_data]['EXIST'] == false )\n\t\t\t\t{\n\t\t\t\t$circletext = \"<img src='/user/Plugwise/images/status_o.png' align='absmiddle' ><br>&nbsp;\";\n\t\t\t\t}\n\t\t\telse\n\t\t\t {\n\t\t\t\tif ( $menupunkt == 0 )\n\t\t\t\t\t{\n\t\t\t \tif ( $c_new == false )\n\t\t\t \t{\n\t\t\t\t\t\tif ( $c_error == true )\n\t\t\t\t\t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_offline.png' align='absmiddle' >\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_online.png' align='absmiddle'>\";\n\n\t\t\t \t\tif ( $c_status == true )\n\t\t\t \t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_an.png' align='absmiddle'>\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_aus.png' align='absmiddle'>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t \tif ( $c_new == true )\n\t\t\t \t{\n\t\t\t\t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_o.png' align='absmiddle' >\";\n\t\t\t \t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_neu.png' align='absmiddle'>\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t$circletext = $circletext . \"<FONT SIZE='4'>&nbsp;&nbsp;&nbsp;\" . substr($c_id,-7) . \"</FONT>\";\n\n\t\t\t\t\t$circletext = $circletext . \"<br><center>\" .$c_name .\"</center>\";\n\n\t\t\t\t\t}\n\n\t\t\t\tif ( $menupunkt == 1 ) // last seen\n\t\t\t\t\t{\n\t\t\t\t\t$c_livecount = substr(\"0\" . $c_livecount ,-2);\n\t\t\t \tif ( $c_new == false )\n\t\t\t \t{\n\t\t\t\t\t\tif ( $c_error == true )\n\t\t\t\t\t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_offline.png' align='absmiddle' >\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_online.png' align='absmiddle'>\";\n\n\t\t\t\t\t\t$circletext = $circletext . \"<FONT SIZE='2'>&nbsp;\".$c_ls.\"</FONT>\";\n\t\t\t\t\t\t$circletext = $circletext . \"<FONT SIZE='2'>&nbsp;\";\n\n\n\t\t\t\t\t\tif ( $c_livecount == 60 or $c_livecount == 61 or $c_livecount == 59 )\n\t\t\t\t\t\t\t$circletext = $circletext . \"<span style='color:#FFFFFF'>[&nbsp;\".$c_livecount.\"&nbsp;]</span>\";\n\t\t\t\t\t\tif ( $c_livecount < 59 )\n\t\t\t\t\t\t\t$circletext = $circletext . \"<span style='color:#FF0000'>[&nbsp;\".$c_livecount.\"&nbsp;]</span>\";\n\t\t\t\t\t\tif ( $c_livecount > 61 )\n\t\t\t\t\t\t\t$circletext = $circletext . \"<span style='color:#FFFF00'>[&nbsp;\".$c_livecount.\"&nbsp;]</span>\";\n\n\n\t\t\t\t\t\tif ( $c_lsms > 200 )\n\t\t\t\t\t\t\t$circletext = $circletext . \"<span style='color:#FFFF00'>[&nbsp;\".$c_lsms.\"&nbsp;]</span></FONT>\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$circletext = $circletext . \"<span style='color:#FFFFFF'>[&nbsp;\".$c_lsms.\"&nbsp;]</span></FONT>\";\n\n\n\n\t\t\t\t\t\t$circletext = $circletext . \"<center>\" .$c_name .\"</center>\";\n\t\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$circletext = \"<img src='/user/Plugwise/images/status_o.png' align='absmiddle' ><br>&nbsp;\";\n\n\t\t\t\t\t}\n\n\t\t\t\n\t\t\t\tif ( $menupunkt == 2 ) // Softwareversion\n\t\t\t\t\t{\n\t\t\t \tif ( $c_new == false )\n\t\t\t \t{\n\t\t\t\t\t\tif ( $c_error == true )\n\t\t\t\t\t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_offline.png' align='absmiddle' >\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_online.png' align='absmiddle'>\";\n\n\t\t\t\t\t\t$circletext = $circletext . \"<FONT SIZE='3'>&nbsp;&nbsp;\".$c_swv.\"</FONT>\";\n\n\t\t\t\t\t\t$circletext = $circletext . \"<br><center>\" .$c_name .\"</center>\";\n\t\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$circletext = \"<img src='/user/Plugwise/images/status_o.png' align='absmiddle' ><br>&nbsp;\";\n\n\t\t\t\t\t}\n\n\t\t\t\tif ( $menupunkt == 3 ) // Hardwareversion\n\t\t\t\t\t{\n\t\t\t \tif ( $c_new == false )\n\t\t\t \t{\n\t\t\t\t\t\tif ( $c_error == true )\n\t\t\t\t\t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_offline.png' align='absmiddle' >\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_online.png' align='absmiddle'>\";\n\n\t\t\t\t\t\t$circletext = $circletext . \"<FONT SIZE='3'>&nbsp;&nbsp;\".$c_hwv.\"</FONT>\";\n\n\t\t\t\t\t\t$circletext = $circletext . \"<br><center>\" .$c_name .\"</center>\";\n\t\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$circletext = \"<img src='/user/Plugwise/images/status_o.png' align='absmiddle' ><br>&nbsp;\";\n\n\t\t\t\t\t}\n\n\t\t\t\tif ( $menupunkt == 4 ) // Watt\n\t\t\t\t\t{\n\t\t\t \tif ( $c_new == false )\n\t\t\t \t{\n\t\t\t\t\t\tif ( $c_error == true )\n\t\t\t\t\t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_offline.png' align='absmiddle' >\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_online.png' align='absmiddle'>\";\n\n\t\t\t \t\tif ( $c_status == true )\n\t\t\t \t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_an.png' align='absmiddle'>\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_aus.png' align='absmiddle'>\";\n\t\t\t\t\t\t}\n\n\t\t\t \tif ( $c_new == true )\n\t\t\t \t{\n\t\t\t\t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_o.png' align='absmiddle' >\";\n\t\t\t \t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_neu.png' align='absmiddle'>\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t$circletext = $circletext . \"<FONT SIZE='4'>&nbsp;&nbsp;&nbsp;\" . $c_watt . \" Watt</FONT>\";\n\n\t\t\t\t\t$circletext = $circletext . \"<br><center>\" .$c_name .\"</center>\";\n\n\t\t\t\t\t}\n\n\t\t\t\tif ( $menupunkt == 5 ) // Verbrauch kWh\n\t\t\t\t\t{\n\t\t\t \tif ( $c_new == false )\n\t\t\t \t{\n\t\t\t\t\t\tif ( $c_error == true )\n\t\t\t\t\t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_offline.png' align='absmiddle' >\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_online.png' align='absmiddle'>\";\n\n\t\t\t \t\tif ( $c_status == true )\n\t\t\t \t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_an.png' align='absmiddle'>\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_aus.png' align='absmiddle'>\";\n\t\t\t\t\t\t}\n\n\t\t\t \tif ( $c_new == true )\n\t\t\t \t{\n\t\t\t\t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_o.png' align='absmiddle' >\";\n\t\t\t \t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_neu.png' align='absmiddle'>\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t$circletext = $circletext . \"<FONT SIZE='4'>&nbsp;&nbsp;&nbsp;\" . $c_kwh . \" kWh</FONT>\";\n\n\t\t\t\t\t$circletext = $circletext . \"<br><center>\" .$c_name .\"</center>\";\n\n\t\t\t\t\t}\n\n\t\t\t\tif ( $menupunkt == 6 ) // Pinganzeige\n\t\t\t\t\t{\n\t\t\t\t\t\n\t\t\t \tif ( $c_new == false )\n\t\t\t \t{\n\t\t\t \t$circletext = \"<table border='0' cellspacing='0' bgcolor=$hintergrundfarbe width='100%' height='15' >\";\n\t\t\t \t$circletext = $circletext . \"<td width='25%'>\";\n\t\t\t\t\t\tif ( $c_error == true )\n\t\t\t\t\t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_offline.png' align='absmiddle' >\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_online.png' align='absmiddle'>\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$circletext = $circletext . \"</td>\";\n\t\t\t\t\t\t$circletext = $circletext . \"<td title='incomingLastHopRssiTarget' align='absmiddle' width='25%'><FONT SIZE='3'>\".$c_pingrssi1;\n\t\t\t\t\t\t$circletext = $circletext . \"</td>\";\n\t\t\t\t\t\t$circletext = $circletext . \"<td title='lastHopRssiSource' align='absmiddle' width='25%'><FONT SIZE='3'>\".$c_pingrssi2;\n\t\t\t\t\t\t$circletext = $circletext . \"</td>\";\n\n\t\t\t\t\t\t$circletext = $circletext . \"<td align='absmiddle' width='25%'><FONT SIZE='3'> \".$c_pingms.\"<FONT SIZE='2'> ms\";\n\t\t\t\t\t\t$circletext = $circletext . \"</td>\";\n $circletext = $circletext . \"</table>\";\n\n\t\t\t\t\t\t//$circletext = $circletext . \"<FONT SIZE='4'>&nbsp;&nbsp;\".$c_pingms.\" ms</FONT>\";\n\t\t\t\t\t\t$circletext = $circletext . \"<center>\" .$c_name .\"</center>\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$circletext = \"<img src='/user/Plugwise/images/status_o.png' align='absmiddle' ><br>&nbsp;\";\n\n\t\t\t\t\t}\n\n\n\n\n\t\t\t\t}\n \n\t\t\t$start_data = $start_data + 1;\n $text = $text . \"<span style='font-family:arial;color:white;font-size:14px;'>$circletext</span>\";\n\t\t\t$text = $text . \"</td>\";\n\t\t }\n\t\t$text = $text . \"</tr>\";\n\t }\n\n\t\t\t\n\n\t$text = $text . \"</table>\";\n\t$text = $text . \"</body>\";\n\t$text = $text . \"</html>\";\n\n/*\n\t$text = \"\";\n\t$text = $text . \"<table border='0' cellspacing='1' bgcolor=$hintergrundfarbe width='100%' height='200' cellspacing='0' >\";\n\n\t$anzahl = 0;\n\n \n\t$anzahl = count(IPS_GetChildrenIDs($idCatCircles));\n $circles = IPS_GetChildrenIDs($idCatCircles);\n\n\t$counter = 0;\n\t\n\tfor ( $y = 0;$y<9;$y++)\n\t\t{\n\t\t$gefunden = false;\n\t\t$text = $text . \"<tr>\";\n\n\t\tfor ( $x = 0;$x<3;$x++)\n\t \t{\n\t \t$circle = 0;\n\t \t$name = \"FFFFFFFFFFFFFFFF\";\n\t \t$name = \"\";\n\t\t\t$hintergrundfarbe = '#000000';\n\t\t\t$statustext = \"\";\n\t\t\t$circletext = \".\";\n\t\t\t\n\t\t\t$circletext = \"<img src='/user/Plugwise/images/status_o.png'>\";\n\n\t \tif ( $counter < $anzahl )\n\t \t {\n\t \t $id = $circles[$counter];\n\t \t\t$circle = IPS_GetObject($id);\n\t \t\t$info = $circle['ObjectInfo'];\n\t \t\t$ident = $circle['ObjectIdent'];\n $error = GetValue(IPS_GetVariableIDByName('Error',$id));\n $status = GetValue(IPS_GetVariableIDByName('Status',$id));\n $lastm = GetValue(IPS_GetVariableIDByName('LastMessage',$id));\n\t\t\t\t$mac = \"?\";\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//suche richtigen Namen in der Config\n\t\t\t\t$gefunden = false;\n\t\t\t\tforeach ( $CircleGroups as $configCircle )\n\t\t\t\t {\n\n\t\t\t\t if ( $ident == $configCircle[0] )\n\t\t\t\t {\n\t\t\t\t\t\t$name = $configCircle[1] ;\n\t\t\t\t\t\t$mac = substr($configCircle[0],-4);\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$gefunden = true;\n\t\t\t\t\t\tbreak ;\n\t\t\t\t\t\t}\n\n\t\t\t\t }\n\n\t\t\t\t}\n\n\t\t\tif ( $gefunden )\n\t\t\t {\n\t\t\t $circletext = \"\";\n\n\t\t\t if ( $error == true )\n\t\t\t \t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_offline.png' align='absmiddle' >\";\n\t\t\t\telse\n\t\t\t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_online.png' align='absmiddle'>\";\n\t\t\t\t\n\t\t\t if ( $status == true )\n\t\t\t \t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_an.png' align='absmiddle'>\";\n\t\t\t\telse\n\t\t\t\t\t$circletext = $circletext . \"<img src='/user/Plugwise/images/status_aus.png' align='absmiddle'>\";\n\t\t\t\t\n\t\t\t\t$circletext = $circletext . \"<FONT SIZE='4'>&nbsp;&nbsp;&nbsp;\" . substr($ident,-7) . \"</FONT><br><center>\" .$name .\"</center>\";\n\t\t\t\t\n\t\t\t\t}\n\t\t\telse\n\t\t\t {\n $circletext = $circletext . \"<img src='/user/Plugwise/images/status_neu.png'>\";\n\n\t\t\t\t$circletext = $circletext . substr($ident,-7) . \"<br>\" . IPS_GetName($id) ;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t$text = $text . \"<td width='25%' bgcolor=$hintergrundfarbe style='text-align:left;'>\";\n\t\t\t$text = $text . \"<span style='font-family:arial;color:white;font-size:14px;'>$circletext</span>\";\n\t\t\t$text = $text . \"</td>\";\n\t\t\t$counter++;\n\n\t \t}\n\t\t$text = $text . \"</tr>\";\n\n\t }\n\n\t$text = $text . \"</table>\";\n\n\t*/\n\n\t$id = IPS_GetObjectIDByIdent('Uebersicht',$IdGraph); // Uebersicht Circles\n\n\t//$html = $menu . \"<br>\" . $text;\n\t$html = $text;\n\n\tSetValueString($id,$html);\n\t\n\t}", "function DrawCircleSector(\\raylib\\Vector2 $center, float $radius, float $startAngle, float $endAngle, int $segments, \\raylib\\Color $color): void { }", "public function CircleArea(){\n return round((self::Pi * $this->radius),2) ;\n }", "public function implodeImage ($radius) {}", "public function circle(int $x, int $y, int $r): PlotBuilder;", "public function __construct($point, $radius) {\n for ($ii = 0; $ii < count($point); $ii++) {\n $this->circles[] = new Circle($point[$ii], $radius[$ii]);\n }\n }", "function drawFilledCircle($X,$Y,$Radius,$Format=\"\")\n {\n $R\t\t\t= isset($Format[\"R\"]) ? $Format[\"R\"] : 0;\n $G\t\t\t= isset($Format[\"G\"]) ? $Format[\"G\"] : 0;\n $B\t\t\t= isset($Format[\"B\"]) ? $Format[\"B\"] : 0;\n $Alpha\t\t= isset($Format[\"Alpha\"]) ? $Format[\"Alpha\"] : 100;\n $BorderR\t\t= isset($Format[\"BorderR\"]) ? $Format[\"BorderR\"] : -1;\n $BorderG\t\t= isset($Format[\"BorderG\"]) ? $Format[\"BorderG\"] : -1;\n $BorderB\t\t= isset($Format[\"BorderB\"]) ? $Format[\"BorderB\"] : -1;\n $BorderAlpha\t= isset($Format[\"BorderAlpha\"]) ? $Format[\"BorderAlpha\"] : $Alpha;\n $Ticks \t= isset($Format[\"Ticks\"]) ? $Format[\"Ticks\"] : NULL;\n $Surrounding \t= isset($Format[\"Surrounding\"]) ? $Format[\"Surrounding\"] : NULL;\n\n if ( $Radius == 0 ) { $Radius = 1; }\n if ( $Surrounding != NULL ) { $BorderR = $R+$Surrounding; $BorderG = $G+$Surrounding; $BorderB = $B+$Surrounding; }\n $X = floor($X); $Y = floor($Y);\n\n $Radius = abs($Radius);\n\n $RestoreShadow = $this->Shadow;\n if ( $this->Shadow && $this->ShadowX != 0 && $this->ShadowY != 0 )\n {\n $this->Shadow = FALSE;\n $this->drawFilledCircle($X+$this->ShadowX,$Y+$this->ShadowY,$Radius,array(\"R\"=>$this->ShadowR,\"G\"=>$this->ShadowG,\"B\"=>$this->ShadowB,\"Alpha\"=>$this->Shadowa,\"Ticks\"=>$Ticks));\n }\n\n $this->Mask = \"\";\n $Color = $this->allocateColor($this->Picture,$R,$G,$B,$Alpha);\n for ($i=0; $i<=$Radius*2; $i++)\n {\n $Slice = sqrt($Radius * $Radius - ($Radius - $i) * ($Radius - $i));\n $XPos = floor($Slice);\n $YPos = $Y + $i - $Radius;\n $AAlias = $Slice - floor($Slice);\n\n $this->Mask[$X-$XPos][$YPos] = TRUE;\n $this->Mask[$X+$XPos][$YPos] = TRUE;\n imageline($this->Picture,$X-$XPos,$YPos,$X+$XPos,$YPos,$Color);\n }\n if ( $this->Antialias )\n $this->drawCircle($X,$Y,$Radius,$Radius,array(\"R\"=>$R,\"G\"=>$G,\"B\"=>$B,\"Alpha\"=>$Alpha,\"Ticks\"=>$Ticks));\n\n $this->Mask = \"\";\n\n if ( $BorderR != -1 )\n $this->drawCircle($X,$Y,$Radius,$Radius,array(\"R\"=>$BorderR,\"G\"=>$BorderG,\"B\"=>$BorderB,\"Alpha\"=>$BorderAlpha,\"Ticks\"=>$Ticks));\n\n $this->Shadow\t= $RestoreShadow;\n }", "public function run()\n {\n Intensity::factory()->times(5)->create();\n Intermittent::factory()->times(5)->create();\n Steady::factory()->times(5)->create();\n Progressive::factory()->times(5)->create();\n }", "public function inlineCircle($wImg, $colorPalette, $mainColor, $circleSize, $counter)\n {\n if ($counter === 1)\n $this->circSpot_x = self::INLINESPACE;\n else\n $this->circSpot_x = intval(round(($circleSize + $this->circSpot_x)));\n\n $circSpot_y = intval(round((self::WALLHEIGHT * 0.5)));\n $modSize = intval(round($circleSize - self::SMALLGAP));\n\n $this->drawColoredCircle($wImg, $colorPalette, $this->circSpot_x, $circSpot_y, $modSize, $mainColor);\n\n $fA = array(\"x\" => $this->circSpot_x, \"y\" => $circSpot_y, \"c\" => $mainColor);\n return $fA;\n }", "public function buildGlassTop(Level $level, $radius, $height, $dataX, $dataY, $dataZ, $wallType) {\r\n\t\t$status = false;\r\n\t\ttry {\r\n\t\t\t$doorExist = 0;\r\n\t\t\t$x = $dataX;\r\n\t\t\t// $level = $player->getLevel ();\r\n\t\t\tfor($rx = 0; $rx < $radius; $rx ++) {\r\n\t\t\t\t$y = $dataY;\r\n\t\t\t\tfor($ry = 0; $ry < $height; $ry ++) {\r\n\t\t\t\t\t$z = $dataZ;\r\n\t\t\t\t\tfor($rz = 0; $rz < $radius; $rz ++) {\r\n\t\t\t\t\t\t$rb = $level->getBlock ( new Vector3 ( $x, $y, $z ) );\r\n\t\t\t\t\t\t// if ($rz > round($height/2)) {\r\n\t\t\t\t\t\t// $this->renderBlockByType ( $rb, $player, 0);\r\n\t\t\t\t\t\t// } else {\r\n\t\t\t\t\t\t$this->renderBlockByType ( $rb, $level, 0 );\r\n\t\t\t\t\t\t// }\r\n\t\t\t\t\t\t// $this->log ( TextFormat::BLUE . \"+ remove X blocks: \" . $x . \" \" . $y . \" \" . $z );\r\n\t\t\t\t\t\t// build the wall at edge - $ry control the roof and base\r\n\t\t\t\t\t\tif ($rx == ($radius - 1) || $rz == ($radius - 1) || $rx == 0 || $rz == 0 || $ry == ($radius - 1) || $ry == 0) {\r\n\t\t\t\t\t\t\t// $this->renderBlockByType ( $rb, $player, $wallType );\r\n\t\t\t\t\t\t\tif ($rx == 2 && $ry > 0 && $ry < ($radius - 1)) {\r\n\t\t\t\t\t\t\t\t$this->renderBlockByType ( $rb, $level, 50 );\r\n\t\t\t\t\t\t\t} else if ($ry == 0) {\r\n\t\t\t\t\t\t\t\t// $this->log ( TextFormat::BLUE . \"floor blocks: \" . $rb->x . \" \" . $rb->y . \" \" . $rb->z );\r\n\t\t\t\t\t\t\t\t$this->renderBlockByType ( $rb, $level, 20 );\r\n\t\t\t\t\t\t\t} else if ($ry == ($radius - 1)) {\r\n\t\t\t\t\t\t\t\t// $this->log ( TextFormat::BLUE . \"roof blocks: \" . $rb->x . \" \" . $rb->y . \" \" . $rb->z );\r\n\t\t\t\t\t\t\t\t$this->renderBlockByType ( $rb, $level, 0 );\r\n\t\t\t\t\t\t\t} else if ($rx == 0 || $rz == 0) {\r\n\t\t\t\t\t\t\t\t$this->renderBlockByType ( $rb, $level, 20 );\r\n\t\t\t\t\t\t\t} else if ($rx == ($radius - 1)) {\r\n\t\t\t\t\t\t\t\t$this->renderBlockByType ( $rb, $level, 20 );\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$this->renderBlockByType ( $rb, $level, 50 );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$z ++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$y ++;\r\n\t\t\t\t}\r\n\t\t\t\t$x ++;\r\n\t\t\t}\r\n\t\t\t// update status\r\n\t\t\t$status = true;\r\n\t\t} catch ( \\Exception $e ) {\r\n\t\t\t$this->log ( \"Error:\" . $e->getMessage () );\r\n\t\t}\r\n\t\treturn $status;\r\n\t}", "function __construct($radius = 0)\n {\n $this->radius = 0;\n }", "public function run()\n {\n // $projects = factory(Project::class, 8)->create();\n\n // $projects->each(function($c){\n // $count = rand(1, 3);\n // $users = factory(User::class, $count)->create(); // Se crean en BD users\n // $c->users()->saveMany($users);\n // });\n \n // $projects = factory(Project::class, 8)->create()->each(function(Project $project){\n // $project->circles()->attach([\n // 2,\n // 3,\n // ]);\n // $project->users()->attach([\n // 4,\n // 5,\n // ]);\n // }); \n\n\n\n // $circles = Circle::all();\n\n }", "function ImageDrawCircleV(\\raylib\\Image &$dst, \\raylib\\Vector2 $center, int $radius, \\raylib\\Color $color): void { }", "public abstract function buildWalls();", "function f_displaySmallCircles($day_id)\n {\n echo \"<li>\";\n f_display6pmCircle($day_id);\n echo \"</li>\";\n\n echo \"<li>\";\n f_display10pmCircle($day_id);\n echo \"</li>\";\n\n echo \"<li>\";\n f_display2amCircle($day_id);\n echo \"</li>\";\n\n echo \"<li>\";\n f_display3amCircle($day_id);\n echo \"</li>\";\n\n echo \"<li>\";\n f_display4amCircle($day_id);\n echo \"</li>\";\n\n }", "function DrawCapsuleWires(\\raylib\\Vector3 $startPos, \\raylib\\Vector3 $endPos, float $radius, int $slices, int $rings, \\raylib\\Color $color): void { }", "function DrawCircleSectorLines(\\raylib\\Vector2 $center, float $radius, float $startAngle, float $endAngle, int $segments, \\raylib\\Color $color): void { }", "function DrawCircleV(\\raylib\\Vector2 $center, float $radius, \\raylib\\Color $color): void { }", "function DrawCylinderWires(\\raylib\\Vector3 $position, float $radiusTop, float $radiusBottom, float $height, int $slices, \\raylib\\Color $color): void { }", "function DrawCircle3D(\\raylib\\Vector3 $center, float $radius, \\raylib\\Vector3 $rotationAxis, float $rotationAngle, \\raylib\\Color $color): void { }", "public function CircleCurcumference(){\n return round(($this->radius * 2 * self::Pi));\n }", "function imageCircleAA($img, $cx, $cy, $r, $w, $s, $t, $color) {\n\t\n\t// echo \"\\n<strong>\" . __FILE__ . \" Line: \" . __LINE__ . \"</strong>\\n\";\n\t// echo \"\\n<pre style=\\\"text-align:left; line-height:1.1em;\\\">\\n\";\n\t// print_r($color);\n\t// echo \"</pre>\\n\";\n\t\n\t\n\t$adj = $w + $s;\n\t$sCol = imagecolorallocate($img, $color['r'], $color['g'], $color['b']);\n\tfor($x = -$r - $adj; $x <= $r + $adj; $x++) {\n\t\tfor($y = -$r - $adj; $y <= $r + $adj; $y++) {\n\t\t\t$d = sqrt($x * $x + $y * $y); // distance from pixel to center\n\t\t\t$err = abs($d - $r); // absolute distance from pixel to circle edge\n\t\t\tif($err <= $w / 2 + $s) // within the stroke width + smoothing radius\n\t\t\t{\n\t\t\t\tif($err <= $w / 2) // inside the stroke width so make it solid color\n\t\t\t\t{\n\t\t\t\t\t$aaCol = $sCol;\n\t\t\t\t}\n\t\t\t\telse // in the antialisaing region so make it a blended color\n\t\t\t\t{\n\t\t\t\t\t$err -= $w / 2; // adjust to the aliased part\n\t\t\t\t\t$err = 1 - $err / $s; // adjust to between 0 and 1\n\t\t\t\t\t$err = ($err - 0.5) * $t * 2; // adjust to -$t to +$t for tightness\n\t\t\t\t\t$err = ($err / sqrt(1 + $err * $err) + 1) / 2; // sigmoid curve to smooth edges\n\t\t\t\t\t$rgb = imagecolorat($img, $x + $cx, $y + $cy); // Get current background color\n\t\t\t\t\t$rB = ($rgb >> 16) & 0xFF;\n\t\t\t\t\t$gB = ($rgb >> 8) & 0xFF;\n\t\t\t\t\t$bB = $rgb & 0xFF;\n\t\t\t\t\t$rDelta = ($rB - $color['r']); // change in Red from background\n\t\t\t\t\t$rComp = $rB - $rDelta * $err; // mix Red\n\t\t\t\t\t$gDelta = ($gB - $color['g']); // change in Red from background\n\t\t\t\t\t$gComp = $gB - $gDelta * $err; // mix Red\n\t\t\t\t\t$bDelta = ($bB - $color['b']); // change in Red from background\n\t\t\t\t\t$bComp = $bB - $bDelta * $err; // mix Red\n\t\t\t\t\t$aaCol = imagecolorallocate($img, $rComp, $gComp, $bComp);\n\t\t\t\t}\n\t\t\t\timagesetpixel($img, $x + $cx, $y + $cy, $aaCol);\n\t\t\t}\n\t\t}\n\t}\n}", "public function charcoalImage ($radius, $sigma) {}", "function ImageDrawCircleLinesV(\\raylib\\Image &$dst, \\raylib\\Vector2 $center, int $radius, \\raylib\\Color $color): void { }", "public function run()\n {\n for ($i=0; $i<10; $i++){\n Dock::create(\n [\n 'name' => 'Circuito '.($i+1),\n 'description' => '',\n 'location_id' => 1\n ]\n );\n }\n }", "function Circle($x, $y, $r, $style = '') {\r\n\t\t$this->Ellipse($x, $y, $r, $r, $style);\r\n\t}", "protected function Build()\n {\n // 1 pet: 100% total\n // 2 pets: 80% total\n // 3 pets: 64% total\n // 4 pets: 51.2%\n // 5 pets: 40.96%\n // 6 pets: 32.768%\n // ...\n\n $fraction = 1.25;\n $skill = 0;\n\n foreach($this->pets as $pet)\n {\n $skill += $pet->SkillAtCraft($this->questProgress['type']);\n $fraction *= 0.8;\n }\n\n $skill = ceil($skill * $fraction);\n\n // @TODO: log & journal\n // $logId = $this->AddLog('');\n // $this->AddJournal('', $logId);\n\n if($skill > $this->questProgress['workToDo'])\n $this->questProgress['workToDo'] = 0;\n else\n $this->questProgress['workToDo'] -= $skill;\n }", "function CheckCollisionCircles(\\raylib\\Vector2 $center1, float $radius1, \\raylib\\Vector2 $center2, float $radius2): bool { return false; }", "function __construct ($center, $radius)\r\n {\r\n $this->center = $center;\r\n $this->radius = $radius;\r\n }", "function generateShape($category, $size=-1) {\n\t\t\n\t\t$size_a = array(\n\t\t\t\"tiny\",\n\t\t\t\"small\",\n\t\t\t\"mid-sized\",\n\t\t\t\"large\",\n\t\t\t\"huge\"\n\t\t\t);\n\t\t\n\t\tif ($size == -1) {\n\t\t\tif ($category==0) $size_s = $size_a[rand(0,sizeof($size_a)-1)];\n\t\t\telse $size_s = $size_a[rand(0,sizeof($size_a)-2)];\n\t\t}\n\t\telse $size_s = $size_a[$size];//predetermined\n\t\t\n\t\t$shape0 = array(\n\t\t\t\"round\",\n\t\t\t\"pear-shaped\",\n\t\t\t\"egg-shaped\",\n\t\t\t\"oval\",\n\t\t\t\"odd-shaped\",\n\t\t\t\"elongated\"\n\t\t\t);\n\t\t$shape1 = array(\n\t\t\t\"round\",\n\t\t\t\"oval\",\n\t\t\t\"elongated\",\n\t\t\t\"drupelet-shaped\",\n\t\t\t\"strawberry-like\",\n\t\t\t\"blueberry-like\",\n\t\t\t\"mulberry-like\",\n\t\t\t\"currant-like\",\n\t\t\t\"gooseberry-like\"\n\t\t\t);\n\t\t$shape2 = array(\n\t\t\t\"many-forked\",\n\t\t\t\"two-forked\",\n\t\t\t\"carrot-shaped\",\n\t\t\t\"parsnip-shaped\",\n\t\t\t\"turnip-shaped\",\n\t\t\t\"celeriac-shaped\",\n\t\t\t\"round\",\n\t\t\t\"curved\",\n\t\t\t\"elongated\",\n\t\t\t\"pointy-ended\",\n\t\t\t\"odd-shaped\"\n\t\t\t);\n\t\t$shape3 = array(\n\t\t\t\"funnel-form\",\n\t\t\t\"trumpet-shaped\",\n\t\t\t\"tubular\",\n\t\t\t\"bowl-shaped\",\n\t\t\t\"saucer-shaped\",\n\t\t\t\"stellate\",\n\t\t\t\"cruciform\",\n\t\t\t\"urn-shaped\",\n\t\t\t\"bell-shaped\"\n\t\t\t);\n\t\t$shape4 = array(\n\t\t\t\"circular\",\n\t\t\t\"kidney-shaped\",\n\t\t\t\"ovate\",\n\t\t\t\"elliptic\",\n\t\t\t\"narrow kidney-shaped\",\n\t\t\t\"narrow ovate\",\n\t\t\t\"narrow elliptic\",\n\t\t\t\"broad kidney-shaped\",\n\t\t\t\"broad ovate\",\n\t\t\t\"broad elliptic\"\n\t\t\t);\n\t\t$shape5 = array(\n\t\t\t\"round\",\n\t\t\t\"pear-shaped\",\n\t\t\t\"egg-shaped\",\n\t\t\t\"oval\",\n\t\t\t\"lemon-shaped\",\n\t\t\t\"hand-shaped\"\n\t\t\t);\n\t\t\n\t\t$shape6 = array(\n\t\t\t\"round\",\n\t\t\t\"bumpy\",\n\t\t\t\"conic\",\n\t\t\t\"lopsided\",\n\t\t\t\"oblate\"\n\t\t\t);\n\t\t\n\t\t$shape7 = array(\n\t\t\t\"peach-shaped\",\n\t\t\t\"cherry-shaped\",\n\t\t\t\"plum-shaped\",\n\t\t\t\"olive-shaped\"\n\t\t\t);\n\t\t\n\t\t$texture = array(\n\t\t\t\"leathery\",\n\t\t\t\"waxy\",\n\t\t\t\"smooth\",\n\t\t\t\"fuzzy\",\n\t\t\t\"glowing\",\n\t\t\t\"spiny\",\n\t\t\t\"spiky\",\n\t\t\t\"pitted\",\n\t\t\t\"dented\",\n\t\t\t\"scaly\",\n\t\t\t\"rough\",\n\t\t\t\"hairy\",\n\t\t\t\"grooved\",\n\t\t\t\"smooth\",\n\t\t\t\"bumpy\"\n\t\t\t);\n\t\t\n\t\t$peel = array(\n\t\t\t\"very thin\",\n\t\t\t\"thin\",\n\t\t\t\"thick\",\n\t\t\t\"very thick\",\n\t\t\t\"unevenly thick\",\n\t\t\t\"hard\"\n\t\t\t);\n\t\t\n\t\tswitch ($category) {\n\t\tcase 0:\n\t\t\treturn array(\n\t\t\t\t\"size\" => $size_s,\n\t\t\t\t\"shape\" => $shape0[rand(0, sizeof($shape0)-1)],\n\t\t\t\t\"texture\" => $texture[rand(0, sizeof($texture)-1)],\n\t\t\t\t\"skin\" => $peel[rand(0, sizeof($peel)-1)]\n\t\t\t\t);\n\t\tcase 1:\n\t\t\treturn array(\n\t\t\t\t\"size\" => $size_s,\n\t\t\t\t\"shape\" => $shape1[rand(0, sizeof($shape1)-1)],\n\t\t\t\t\"texture\" => $texture[rand(0, 2)],\n\t\t\t\t\"skin\" => $peel[rand(0, 2)]\n\t\t\t\t);\n\t\tcase 2:\n\t\t\treturn array(\n\t\t\t\t\"size\" => $size_s,\n\t\t\t\t\"shape\" => $shape2[rand(0, sizeof($shape2)-1)],\n\t\t\t\t\"texture\" => $texture[rand(sizeof($texture)-5, sizeof($texture)-2)],\n\t\t\t\t\"skin\" => $peel[rand(1, 4)]\n\t\t\t\t);\n\t\tcase 3:\n\t\t\treturn array(\n\t\t\t\t\"size\" => $size_s,\n\t\t\t\t\"shape\" => $shape3[rand(0, sizeof($shape3)-1)],\n\t\t\t\t\"texture\" => $texture[rand(1, 3)],\n\t\t\t\t\"skin\" => false\n\t\t\t\t);\n\t\tcase 4:\n\t\t\treturn array(\n\t\t\t\t\"size\" => $size_s,\n\t\t\t\t\"shape\" => $shape4[rand(0, sizeof($shape4)-1)],\n\t\t\t\t\"texture\" => $texture[rand(sizeof($texture)-3, sizeof($texture)-1)],\n\t\t\t\t\"skin\" => $peel[rand(0, 2)]\n\t\t\t\t);\n\t\tcase 5:\n\t\t\treturn array(\n\t\t\t\t\"size\" => $size_s,\n\t\t\t\t\"shape\" => $shape5[rand(0, sizeof($shape5)-1)],\n\t\t\t\t\"texture\" => \"pitted\",\n\t\t\t\t\"skin\" => $peel[rand(0, 3)]\n\t\t\t\t);\n\t\tcase 6:\n\t\t\treturn array(\n\t\t\t\t\"size\" => $size_s,\n\t\t\t\t\"shape\" => $shape6[rand(0, sizeof($shape6)-1)],\n\t\t\t\t\"texture\" => \"waxy\",\n\t\t\t\t\"skin\" => $peel[rand(0, 2)]\n\t\t\t\t);\n\t\tcase 7:\n\t\t\treturn array(\n\t\t\t\t\"size\" => $size_s,\n\t\t\t\t\"shape\" => $shape7[rand(0, sizeof($shape7)-1)],\n\t\t\t\t\"texture\" => $texture[rand(0, 3)],\n\t\t\t\t\"skin\" => $peel[rand(0, 2)]\n\t\t\t\t);\n\t\t}\n\t}", "function DrawCapsule(\\raylib\\Vector3 $startPos, \\raylib\\Vector3 $endPos, float $radius, int $slices, int $rings, \\raylib\\Color $color): void { }", "public function circleImage($imagePath, $size, $loadOptions = null);", "public function makeCircleComplex($imagine, $themeName, $themeType)\n {\n\n $theme = loadThemeFile($themeType, false, $themeName);\n\n $palette = new RGB();\n\n $image = $imagine->create(\n new Box(self::WALLWIDTH, self::WALLHEIGHT),\n $palette->color($theme[\"background\"])\n );\n\n $cParams = array(\n \"wImg\" => $image,\n \"cPal\" => $palette,\n \"bgColor\" => $theme[\"background\"],\n \"colors\" => $theme[\"colors\"]\n );\n\n outputLog(\"complexCircleLoop starting....\");\n\n $this->complexCircleLoop($cParams);\n\n $cwt = \"circleComp_\";\n\n $result = $this->saveCircleWallpaper($image, $cwt);\n return $result;\n }", "public function edgeImage ($radius) {}", "public function drawCircle($x, $y, $radius, $color, $opacity) {\n $svg = '<circle cx=\"'.$x.'\" cy=\"'.$y.'\" r=\"'.$radius.'\" style=\"fill:'.$color.'\" opacity= \"'.$opacity.'\" />';\n\n array_push($this->elements, $svg);\n }", "public function run()\n {\n //\n $this->createMultiple(50);\n }", "function learn_press_circle_progress_html( $percent = 0, $width = 32, $border = 4, $color = '' ) {\n\t$radius = $width / 2;\n\t$r = ( $width - $border ) / 2;\n\t$circumference = $r * 2 * pi();\n\t$offset = $circumference - $percent / 100 * $circumference;\n\n\tprintf(\n\t\t'<svg class=\"circle-progress-bar\" width=\"%d\" height=\"%d\">\n <circle class=\"circle-progress-bar__circle\"\n stroke=\"%s\"\n stroke-width=\"%d\"\n style=\"stroke-dasharray:%s %s; stroke-dashoffset:%s;\"\n fill=\"transparent\"\n r=\"%d\" cx=\"%d\" cy=\"%d\"></circle>\n </svg>',\n\t\t$width,\n\t\t$width,\n\t\t$color,\n\t\t$border,\n\t\t$circumference,\n\t\t$circumference,\n\t\t$offset,\n\t\t$r,\n\t\t$radius,\n\t\t$radius\n\t);\n}", "public function run()\n {\n foreach(range(1,20) as $index){\n \tfactory(App\\Pupil::class)->create();\n }\n }", "public function run()\n {\n $parkingSpots = [];\n $yGutter = 9;\n $xGutter = 7;\n\n // top row\n $x = 1;\n for($i = 12; $i <= 82; $i += $xGutter) {\n \t$parkingSpots[] = [\n 'code' => 'A' . $x,\n 'price' => 3,\n \t\t'grid_x' => $i,\n \t\t'grid_y' => 1,\n \t\t'orientation' => 'vertical'\n \t];\n $x++;\n }\n\n // top middle row\n $x = 1;\n for($i = 26; $i <= 68; $i += $xGutter) {\n \t$parkingSpots[] = [\n 'code' => 'B' . $x,\n 'price' => 3,\n \t\t'grid_x' => $i,\n \t\t'grid_y' => 36,\n \t\t'orientation' => 'vertical'\n \t];\n $x++;\n }\n\n // bottom middle row\n for($i = 26; $i <= 68; $i += $xGutter) {\n \t$parkingSpots[] = [\n 'code' => 'B' . $x,\n 'price' => 3,\n \t\t'grid_x' => $i,\n \t\t'grid_y' => 52,\n \t\t'orientation' => 'vertical'\n \t];\n $x++;\n }\n\n // bottom row left half\n $x = 1;\n for($i = 12; $i <= 33; $i += $xGutter) {\n \t$parkingSpots[] = [\n 'code' => 'C' . $x,\n 'price' => 3,\n \t\t'grid_x' => $i,\n \t\t'grid_y' => 85,\n \t\t'orientation' => 'vertical'\n \t];\n $x++;\n }\n\n // bottom row right half\n for($i = 61; $i <= 82; $i += $xGutter) {\n \t$parkingSpots[] = [\n 'code' => 'C' . $x,\n 'price' => 3,\n \t\t'grid_x' => $i,\n \t\t'grid_y' => 85,\n \t\t'orientation' => 'vertical'\n \t];\n $x++;\n }\n\n // left column\n $x = 1;\n for($i = 28; $i <= 73; $i += $yGutter) {\n \t$parkingSpots[] = [\n 'code' => 'D' . $x,\n 'price' => 3,\n \t\t'grid_x' => 1,\n \t\t'grid_y' => $i,\n \t\t'orientation' => 'horizontal'\n \t];\n $x++;\n }\n\n // right column\n $x = 1;\n for($i = 19; $i <= 73; $i += $yGutter) {\n \t$parkingSpots[] = [\n 'code' => 'E' . $x,\n 'price' => 3,\n \t\t'grid_x' => 89,\n \t\t'grid_y' => $i,\n \t\t'orientation' => 'horizontal'\n \t];\n $x++;\n }\n\n foreach($parkingSpots as $parkingSpot) {\n \tParkingSpot::create($parkingSpot);\n }\n }", "function DrawSphereWires(\\raylib\\Vector3 $centerPos, float $radius, int $rings, int $slices, \\raylib\\Color $color): void { }", "public function run()\n {\n Contract::factory(1000)->times(50);\n }", "public function makeCircleInline($imagine, $theme, $themeType)\n {\n\n $tfc = loadThemeFile($themeType, false, $theme);\n\n $palette = new RGB();\n\n $image = $imagine->create(new Box(self::WALLWIDTH, self::WALLHEIGHT), $palette->color($tfc[\"background\"]));\n\n //$cBig = intval(round($WALLWIDTHMax / $maxCs));\n\n // Generate Inline Circle Pattern\n $maxCs = count($tfc[\"colors\"]);\n $curCs = 1;\n $WALLWIDTHMax = intval(round(self::WALLWIDTH - self::INLINESPACE));\n $circleSize = intval(round(($WALLWIDTHMax / $maxCs))); // Small Gap between each circle. \n\n //outputLog(count($tfc[\"colors\"]) . \" circles @ \" . $circleSize) . \"px each\";\n\n foreach ($tfc[\"colors\"] as $themeColor) {\n $tC = $this->inlineCircle($image, $palette, $themeColor, $circleSize, $curCs);\n //outputLog($tC[\"x\"] . \" \" . $tC[\"y\"] . \" \" . $curCs);\n $curCs++;\n }\n\n $cwt = \"horizontal_\";\n\n $result = $this->saveCircleWallpaper($image, $cwt);\n return $result;\n }", "function area_of_circle($radius)\n{\n $radius *= $radius;\n $area = pi() * $radius;\n return $area;\n}", "function render_building($x, $y, $width, $height) {\n\tif ($width == 30) {\n\t\t$x = $x + 10;\n\t}\n\tif ($height == 30) {\n\t\t$y = $y + 10;\n\t}\n\t\n\techo '<rect x=\"';\n\techo $x;\n\techo '\" y=\"';\n\techo $y;\n\techo '\" width=\"';\n\techo $width;\n\techo '\" height=\"';\n\techo $height;\n\techo '\" fill=\"gray\"';\n\techo ' fill-opacity=\"1.0\" />';\n\t\n\tfor ($i=$x+3; $i < $x+$width-3; $i++) {\n\t\tfor ($j=$y+3; $j < $y+$height-3; $j++) {\n\t\t\n\t\t\t# Find Humans\n\t\t\tif (mt_rand(1,2000) < HUMAN_DENSITY) {\n\t\t\t\trender_human($i, $j);\n\t\t\t}\n\t\t}\n\t}\n}", "public function buildWalls(Request $request) {\n // depending on wall quality\n \n $recipe = (object)[];\n $recipe->id = 1;\n $recipe->ingredients = [];\n\n return $this->doActivity($recipe);\n }", "public function run()\n {\n ExtraCharge::factory()->times(8)->create();\n }", "public function reduceNoiseImage ($radius) {}", "public function run()\n {\n for ($i = 26; $i < 45; $i++) {\n factory(App\\ShoeSize::class)->create([\"size\" => $i]);\n }\n }", "function GenMeshCone(float $radius, float $height, int $slices): \\raylib\\Mesh { return new \\raylib\\Mesh; }", "protected static function Core_ListModifierCircle()\n {\n// Hooks::call(\"Core_feedListModifierCircle\", $c);\n// return $c;\n }", "public function __construct($Radius)\n {\n $this->radius = $Radius;\n }", "function draw_circle($img, $passthru, $plot_area)\n{\n\tlist($plot,$x_world1,$shift,$diff,$pvalue,$y2) = $passthru;\n list($x1,$ytest)=$plot->GetDeviceXY($x_world1+$shift,$y2);\n// list($x2,$ytest)=$plot->GetDeviceXY($x_world2,$y2);\n if($pvalue>1)\n $pvalue=1;\n $diff=($diff-1);\n if($diff>1)\n $diff=1;\n if($diff<0)\n $diff=0;\n\t// Allocate colors for label text, box background and border:\n\t$boxcolor = imagecolorresolve($img, 255,intval(255*(1-$pvalue)),intval(255*(1-$pvalue))); // highlight yellow\n $line_color = imagecolorresolve($img, 0, 0, 0); // black line\n\t$y1 = 0+$y2;\n\timagefilledellipse($img, $x1,$y2+100,100*$diff,100*$diff,$boxcolor);\n imagesetthickness($img,5);\n// imageellipse($img, $x1,$y2+100,100*$diff,100*$diff,$line_color);\n imagearc($img,$x1,$y2+100,100*$diff,100*$diff,0,360,$line_color);\n}", "public function run()\n {\n GrowthBonus::factory()->times(5)->create();\n StartingBonus::factory()->times(5)->create();\n }", "function f_displayBigStartCircle($day_id)\n {\n global $db;\n $num_days = 5; //Start Circle should display this many dates\n\n echo \"\n <div id='cicle-left' class='circle'>\n <select id='start-date'>\";\n //$dates is an associative array -- \"day_id\"=>\"yyyy-mm-dd\"\n $dates = f_getStartCircleDates($num_days);\n foreach($dates as $id => $date)\n {\n if($id == $day_id){echo \"<option value='$id' selected>$date</option>\";}\n else {echo \"<option value='$id'>$date</option>\";}\n }\n\n echo \"</select></div>\";\n\n }", "public function makeCircleRows($imagine, $themeName, $themeType, $colorMode = \"random\")\n {\n //global $imagine;\n\n $tfc = loadThemeFile($themeType, false, $themeName);\n\n $palette = new RGB();\n $image = $imagine->create(\n new Box(self::WALLWIDTH, self::WALLHEIGHT),\n $palette->color($tfc[\"background\"])\n );\n\n // Generate Rows and Rows of Circles\n $this->rowLoop($image, $palette, $tfc, $colorMode);\n\n $cwt = \"rows_\";\n if ($colorMode === \"random\") $cwt = \"rand-os_\";\n\n $result = $this->saveCircleWallpaper($image, $cwt);\n return $result;\n }", "public function created(Circle $circle)\n {\n \\App\\Models\\UserExtra::query()->where('user_id', $circle->user_id)->increment('circles');\n }", "public function generate()\n {\n $box = Geo::calculateBox($this->size, $this->centerPoint);\n\n $this->resultImage = $this->imagine->create($box['base']);\n $jj = 0;\n\n $xStart = $box['tiles']['start']->getX();\n $xStop = $box['tiles']['stop']->getX();\n $yStart = $box['tiles']['start']->getY();\n $yStop = $box['tiles']['stop']->getY();\n\n for ($i = ($yStart - 1); $i < $yStop; $i++) {\n $ii = 0;\n for ($j = ($xStart - 1); $j < $xStop; $j++) {\n $this->addTile(\n $this->tiles->getTile($j, $i),\n new Point(($ii * Geo::TILE_SIZE), ($jj * Geo::TILE_SIZE))\n );\n $ii++;\n }\n $jj++;\n }\n\n $this->loader->run();\n\n $this->resultImage->crop($box['crop'], $this->size);\n\n foreach ($this->blips as $blip) {\n $this->drawBlip($blip);\n }\n\n $this->loader->run();\n\n return $this->resultImage;\n }", "public function run()\n {\n Size::insert([\n [\n 'size' => 'XS',\n ],\n [\n 'size' => 'S',\n ],\n [\n 'size' => 'M',\n ],\n [\n 'size' => 'L',\n ],\n [\n 'size' => 'XL',\n ],\n [\n 'size' => '36',\n ],\n [\n 'size' => '37',\n ],\n [\n 'size' => '38',\n ],\n [\n 'size' => '39',\n ],\n [\n 'size' => '40',\n ],\n [\n 'size' => '41',\n ],\n [\n 'size' => '42',\n ],\n [\n 'size' => '43',\n ],\n ]);\n }", "function DrawEllipseLines(int $centerX, int $centerY, float $radiusH, float $radiusV, \\raylib\\Color $color): void { }", "function AddSliceToCSIM($i,$xc,$yc,$radius,$sa,$ea) {\n while( $sa > 2*M_PI ) $sa = $sa - 2*M_PI;\n while( $ea > 2*M_PI ) $ea = $ea - 2*M_PI;\n\n $sa = 2*M_PI - $sa;\n $ea = 2*M_PI - $ea;\n\n // Special case when we have only one slice since then both start and end\n // angle will be == 0\n if( abs($sa - $ea) < 0.0001 ) {\n $sa=2*M_PI; $ea=0;\n }\n\n //add coordinates of the centre to the map\n $xc = floor($xc);$yc=floor($yc);\n $coords = \"$xc, $yc\";\n\n //add coordinates of the first point on the arc to the map\n $xp = floor(($radius*cos($ea))+$xc);\n $yp = floor($yc-$radius*sin($ea));\n $coords.= \", $xp, $yp\";\n\n //add coordinates every 0.2 radians\n $a=$ea+0.2;\n\n // If we cross the 360-limit with a slice we need to handle\n // the fact that end angle is smaller than start\n if( $sa < $ea ) {\n while ($a <= 2*M_PI) {\n $xp = floor($radius*cos($a)+$xc);\n $yp = floor($yc-$radius*sin($a));\n $coords.= \", $xp, $yp\";\n $a += 0.2;\n }\n $a -= 2*M_PI;\n }\n\n\n while ($a < $sa) {\n $xp = floor($radius*cos($a)+$xc);\n $yp = floor($yc-$radius*sin($a));\n $coords.= \", $xp, $yp\";\n $a += 0.2;\n }\n\n //Add the last point on the arc\n $xp = floor($radius*cos($sa)+$xc);\n $yp = floor($yc-$radius*sin($sa));\n $coords.= \", $xp, $yp\";\n if( !empty($this->csimtargets[$i]) ) {\n $this->csimareas .= \"<area shape=\\\"poly\\\" coords=\\\"$coords\\\" href=\\\"\".$this->csimtargets[$i].\"\\\"\";\n $tmp=\"\";\n if( !empty($this->csimwintargets[$i]) ) {\n $this->csimareas .= \" target=\\\"\".$this->csimwintargets[$i].\"\\\" \";\n }\n if( !empty($this->csimalts[$i]) ) {\n $tmp=sprintf($this->csimalts[$i],$this->data[$i]);\n $this->csimareas .= \" title=\\\"$tmp\\\" alt=\\\"$tmp\\\" \";\n }\n $this->csimareas .= \" />\\n\";\n }\n }", "public function __construct($radius) {\n $this->radius = $radius;\n }", "function drawCircle(Point $pt, $r, $fill='black') {\r\n// echo \"Drawing::drawCircle(pt=$pt, r=$r, fill=$fill)<br>\\n\";\r\n return $this->svg->circle($this->proj($pt), $r, $fill);\r\n }", "protected function addCircleNoTransform($x, $y, $size, $counterClockwise)\n {\n $radius = $size / 2;\n $this->ctx->moveTo($x + $size, $y + $radius);\n $this->ctx->arc(\n $x + $radius, $y + $radius, \n $radius, 0, M_PI * 2, \n $counterClockwise);\n $this->ctx->closePath();\n }", "public function getRadius() : float;", "public function myMoodBoardCircleAction(Request $request)\n\t{\n\t\t// Get the user's profile and their favourite feeds\n\t\t$profile = $this->em->getRepository('ThreadAndMirrorProductsBundle:Profile')->findOneByUser($this->getUser()->getId());\n\t\t$posts = $this->em->getRepository('ThreadAndMirrorMoodBoardBundle:Post')->findFromFeedList($profile->getMoodBoardFeeds());\n\n\t\t// Set the dynamic page values\n\t\t$this->page->setTitle($this->getUser()->getFullname().'\\'s MoodBoard Circle');\n\t\t$this->page->setWindowTitle($this->getUser()->getFullname().'\\'s MoodBoard Circle');\n\n\t\treturn $this->render('ThreadAndMirrorMoodBoardBundle:Front:myCircle.html.twig', array(\n\t\t\t'posts' \t\t=> $posts,\n\t\t\t'page'\t\t\t=> $this->page,\n\t\t));\n\t}", "function DrawCylinderWiresEx(\\raylib\\Vector3 $startPos, \\raylib\\Vector3 $endPos, float $startRadius, float $endRadius, int $sides, \\raylib\\Color $color): void { }", "public function run()\n {\n $sizes = ['XS', 'S', 'M', 'L', 'XL'];\n foreach ($sizes as $size) {\n factory(Size::class)->create([\n 'name' => $size\n ]);\n }\n }", "function AddSliceToCSIM($i,$xc,$yc,$radius,$sa,$ea) {\n while( $sa > 2*M_PI ) $sa = $sa - 2*M_PI;\n while( $ea > 2*M_PI ) $ea = $ea - 2*M_PI;\n\n $sa = 2*M_PI - $sa;\n $ea = 2*M_PI - $ea;\n\n // Special case when we have only one slice since then both start and end\n // angle will be == 0\n if( abs($sa - $ea) < 0.0001 ) {\n $sa=2*M_PI; $ea=0;\n }\n\n // Add inner circle first point\n $xp = floor(($this->imidsize*$radius*cos($ea))+$xc);\n $yp = floor($yc-($this->imidsize*$radius*sin($ea)));\n $coords = \"$xp, $yp\";\n\n //add coordinates every 0.25 radians\n $a=$ea+0.25;\n\n // If we cross the 360-limit with a slice we need to handle\n // the fact that end angle is smaller than start\n if( $sa < $ea ) {\n while ($a <= 2*M_PI) {\n $xp = floor($radius*cos($a)+$xc);\n $yp = floor($yc-$radius*sin($a));\n $coords.= \", $xp, $yp\";\n $a += 0.25;\n }\n $a -= 2*M_PI;\n }\n\n while ($a < $sa) {\n $xp = floor(($this->imidsize*$radius*cos($a)+$xc));\n $yp = floor($yc-($this->imidsize*$radius*sin($a)));\n $coords.= \", $xp, $yp\";\n $a += 0.25;\n }\n\n // Make sure we end at the last point\n $xp = floor(($this->imidsize*$radius*cos($sa)+$xc));\n $yp = floor($yc-($this->imidsize*$radius*sin($sa)));\n $coords.= \", $xp, $yp\";\n\n // Straight line to outer circle\n $xp = floor($radius*cos($sa)+$xc);\n $yp = floor($yc-$radius*sin($sa));\n $coords.= \", $xp, $yp\";\n\n //add coordinates every 0.25 radians\n $a=$sa - 0.25;\n while ($a > $ea) {\n $xp = floor($radius*cos($a)+$xc);\n $yp = floor($yc-$radius*sin($a));\n $coords.= \", $xp, $yp\";\n $a -= 0.25;\n }\n\n //Add the last point on the arc\n $xp = floor($radius*cos($ea)+$xc);\n $yp = floor($yc-$radius*sin($ea));\n $coords.= \", $xp, $yp\";\n\n // Close the arc\n $xp = floor(($this->imidsize*$radius*cos($ea))+$xc);\n $yp = floor($yc-($this->imidsize*$radius*sin($ea)));\n $coords .= \", $xp, $yp\";\n\n if( !empty($this->csimtargets[$i]) ) {\n $this->csimareas .= \"<area shape=\\\"poly\\\" coords=\\\"$coords\\\" href=\\\"\".\n $this->csimtargets[$i].\"\\\"\";\n if( !empty($this->csimwintargets[$i]) ) {\n $this->csimareas .= \" target=\\\"\".$this->csimwintargets[$i].\"\\\" \";\n }\n if( !empty($this->csimalts[$i]) ) {\n $tmp=sprintf($this->csimalts[$i],$this->data[$i]);\n $this->csimareas .= \" title=\\\"$tmp\\\" alt=\\\"$tmp\\\" \";\n }\n $this->csimareas .= \" />\\n\";\n }\n }", "function create_shape($num) {\n $shape_array = [];\n \n // YOUR CODE GOES HERE\n for ($i = $num; $i >= 1; $i--){\n $curr = str_repeat(\"*\", $i);\n $shape_array[] = $curr;\n array_unshift($shape_array, $curr);\n }\n return $shape_array;\n}", "public function setCircle($circle) {\n $this->properties['circle'] = $circle;\n\n return $this;\n }", "public function create()\n {\n return view(\"circles.create\")->with(\"supercircles\", Supercircle::all());\n }", "public function print() {\n foreach ($this->circles as $value) {\n $value->centerPoint->print();\n }\n }", "public function draw()\n {\n $length = $this->value * 2;\n $radius = $this->value - 5 ;\n\n return \"<svg width=\\\"$length\\\" height=\\\"$length\\\">\n <circle cx=\\\"$this->value\\\" cy=\\\"$this->value\\\" r=\\\"$radius\\\"\n style=\\\"fill:rgb(\".$this->getColor().\");stroke-width:10;stroke:rgb(0,0,0)\\\" />\n </svg>\";\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n $createRubrics = function (int $depth, array $ancestors) use (&$createRubrics, $faker) {\n if ($depth === 0) {\n return;\n }\n\n $childrenCount = empty($ancestors) ? 5 : random_int(0, 5);\n\n for ($i = 0; $i < $childrenCount; $i++) {\n $rubric = new \\App\\Models\\Rubric();\n $rubric->name = $faker->unique()->lexify('??????');\n $rubric->ancestors = '{' . implode(',', $ancestors) . '}';\n $rubric->save();\n\n $newAncestors = $ancestors;\n $newAncestors[] = $rubric->id;\n $createRubrics($depth - 1, $newAncestors);\n }\n };\n\n $createRubrics(5, []);\n }", "public function createCirle($radius)\n\t{\n\t\treturn new Circle($this, $radius);\n\t}", "public function showCircle($circle_id)\n\t{\n\t\ttry{\n\t\t\t$limit = Input::get('limit') ?: 15;\n\n\t\t\t$circle = Circle::with('friends.profile.profile_image')->find($circle_id);\n\n\t\t\tif(! $circle)\n\t\t\t{\n\t\t\t\treturn $this->responseNotFound('Circles Not Found!');\n\t\t\t}\n\n\t\t\t$fractal = new Manager();\n\n\t\t\t$circlesResource = new Item($circle, new CircleTransformer());\n\n\t\t\t$data = $fractal->createData($circlesResource);\n\n\t\t\treturn $data->toJson();\n\t\t} catch (Exception $e) {\n\n\t\t\treturn $this->setStatusCode(500)->respondWithError($e);\n\t\t}\n\t}", "function DrawRingLines(\\raylib\\Vector2 $center, float $innerRadius, float $outerRadius, float $startAngle, float $endAngle, int $segments, \\raylib\\Color $color): void { }", "public function __construct($radius)\n\t\t{\n\t\t\t$this -> radius = $radius;\n\t\t}", "public function setRadius($radius = 0 )\n {\n $this->radius = $radius;\n }", "function DrawCylinder(\\raylib\\Vector3 $position, float $radiusTop, float $radiusBottom, float $height, int $slices, \\raylib\\Color $color): void { }", "public function run()\n {\n $faker = Faker::create();\n $z = 1;\n // $u=1;\n for ($i = 0; $i < 450; $i++) {\n App\\PortfolioImage::create(array(\n // 'name' => $faker->imageUrl($width = 640, $height = 480),\n // 'name' => \"https://loremflickr.com/640/480\",\n // 'name' => \"https://loremflickr.com/640/480?lock=$u\",\n // 'name' => \"https://picsum.photos/id/$u/640/480\",\n 'name' => \"https://via.placeholder.com/640x480\",\n 'portfolio_id' => App\\Portfolio::find($z)->id,\n ));\n $z++;\n // $u++;\n if ($z == 151) {\n $z = 1;\n }\n }\n }", "public function run()\n {\n Size::insert([\n ['name' => 'XS'],\n ['name' => 'S'],\n ['name' => 'M'],\n ['name' => 'L'],\n ['name' => 'XL'],\n ['name' => 'XXL'],\n ]);\n\n Color::insert([\n ['name' => 'red'],\n ['name' => 'black'],\n ['name' => 'green'],\n ['name' => 'white'],\n ['name' => 'blue'],\n ['name' => 'orange'],\n ['name' => 'purple'],\n ['name' => 'gray'],\n ['name' => 'yellow'],\n ['name' => 'pink'],\n ]);\n\n Material::insert([\n ['name' => 'cotton'],\n ['name' => 'polyester'],\n ['name' => 'wool'],\n ['name' => 'silk'],\n ['name' => 'flax'],\n ['name' => 'nylon'],\n ]);\n }", "function show_gd_img($content=\"\")\r\n\t{\r\n\t\t\r\n\t\t\r\n\t\t$content = ' '. preg_replace( \"/(\\w)/\", \"\\\\1 \", $content ) .' ';\r\n\t\t$gd_version = 2;\r\n\t\t@header(\"Content-Type: image/jpeg\");\r\n\t\t\r\n\t\t$tmp_x = 140;\r\n\t\t$tmp_y = 20;\r\n\t\t\r\n\t\t$image_x = 210;\r\n\t\t$image_y = 65;\r\n\t\t\r\n\t\t$circles = 3;\r\n\t\t\r\n\t\tif ( $gd_version == 1 )\r\n\t\t{\r\n\t\t\t$tmp = imagecreate($tmp_x, $tmp_y);\r\n\t\t\t$im = imagecreate($image_x, $image_y);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$tmp = imagecreatetruecolor($tmp_x, $tmp_y);\r\n\t\t\t$im = imagecreatetruecolor($image_x, $image_y);\r\n\t\t}\r\n\t\t\r\n\t\t$white = ImageColorAllocate($tmp, 255, 255, 255);\r\n\t\t$black = ImageColorAllocate($tmp, 0, 0, 0);\r\n\t\t$grey = ImageColorAllocate($tmp, 210, 210, 210 );\r\n\t\t\r\n\t\timagefill($tmp, 0, 0, $white);\r\n\t\t\r\n\t\tfor ( $i = 1; $i <= $circles; $i++ )\r\n\t\t{\r\n\t\t\t$values = array(\r\n\t\t\t\t\t\t\t0 => rand(0, $tmp_x - 10),\r\n\t\t\t\t\t\t\t1 => rand(0, $tmp_y - 3),\r\n\t\t\t\t\t\t\t2 => rand(0, $tmp_x - 10),\r\n\t\t\t\t\t\t\t3 => rand(0, $tmp_y - 3),\r\n\t\t\t\t\t\t\t4 => rand(0, $tmp_x - 10),\r\n\t\t\t\t\t\t\t5 => rand(0, $tmp_y - 3),\r\n\t\t\t\t\t\t\t6 => rand(0, $tmp_x - 10),\r\n\t\t\t\t\t\t\t7 => rand(0, $tmp_y - 3),\r\n\t\t\t\t\t\t\t8 => rand(0, $tmp_x - 10),\r\n\t\t\t\t\t\t\t9 => rand(0, $tmp_y - 3),\r\n\t\t\t\t\t\t\t10 => rand(0, $tmp_x - 10),\r\n\t\t\t\t\t\t\t11 => rand(0, $tmp_y - 3),\r\n\t\t\t\t\t );\r\n\t \r\n\t\t\t$randomcolor = imagecolorallocate( $tmp, rand(100,255), rand(100,255),rand(100,255) );\r\n\t\t\timagefilledpolygon($tmp, $values, 6, $randomcolor );\r\n\t\t}\r\n\r\n\t\timagestring($tmp, 5, 0, 2, $content, $black);\r\n\t\t\r\n\t\t//-----------------------------------------\r\n\t\t// Distort by resizing\r\n\t\t//-----------------------------------------\r\n\t\t\r\n\t\timagecopyresized($im, $tmp, 0, 0, 0, 0, $image_x, $image_y, $tmp_x, $tmp_y);\r\n\t\t\r\n\t\timagedestroy($tmp);\r\n\t\t\r\n\t\t$white = ImageColorAllocate($im, 255, 255, 255);\r\n\t\t$black = ImageColorAllocate($im, 0, 0, 0);\r\n\t\t$grey = ImageColorAllocate($im, 100, 100, 100 );\r\n\t\t\r\n\t\t$random_pixels = $image_x * $image_y / 10;\r\n\t\t\t\r\n\t\tfor ($i = 0; $i < $random_pixels; $i++)\r\n\t\t{\r\n\t\t\tImageSetPixel($im, rand(0, $image_x), rand(0, $image_y), $black);\r\n\t\t}\r\n\t\t\r\n\t\t$no_x_lines = ($image_x - 1) / 5;\r\n\t\t\r\n\t\tfor ( $i = 0; $i <= $no_x_lines; $i++ )\r\n\t\t{\r\n\t\t\t// X lines\r\n\t\t\t\r\n\t\t\tImageLine( $im, $i * $no_x_lines, 0, $i * $no_x_lines, $image_y, $grey );\r\n\t\t\t\r\n\t\t\t// Diag lines\r\n\t\t\t\r\n\t\t\tImageLine( $im, $i * $no_x_lines, 0, ($i * $no_x_lines)+$no_x_lines, $image_y, $grey );\r\n\t\t}\r\n\t\t\r\n\t\t$no_y_lines = ($image_y - 1) / 5;\r\n\t\t\r\n\t\tfor ( $i = 0; $i <= $no_y_lines; $i++ )\r\n\t\t{\r\n\t\t\tImageLine( $im, 0, $i * $no_y_lines, $image_x, $i * $no_y_lines, $grey );\r\n\t\t}\r\n\t\t\r\n\t\tImageJPEG($im);\r\n\t\tImageDestroy($im);\r\n\t\t\r\n\t\texit();\r\n\t}" ]
[ "0.5951404", "0.5759042", "0.56529266", "0.56316066", "0.5629406", "0.5624095", "0.5573912", "0.5560994", "0.5546308", "0.54957306", "0.5492205", "0.5460458", "0.54564494", "0.5375243", "0.53589493", "0.52946603", "0.52870804", "0.52409756", "0.52240103", "0.5195231", "0.51947033", "0.5187938", "0.51853865", "0.5123501", "0.5107234", "0.51054806", "0.5098482", "0.5096421", "0.50790244", "0.50785846", "0.50533915", "0.504647", "0.5043943", "0.50254476", "0.49882287", "0.4965218", "0.4960117", "0.4956448", "0.49503276", "0.49499428", "0.49492794", "0.48579445", "0.4857654", "0.48386934", "0.48282188", "0.48120096", "0.47771412", "0.47727957", "0.47650132", "0.47624698", "0.4737708", "0.4725148", "0.47229794", "0.47190347", "0.47181964", "0.4711916", "0.46998772", "0.46935922", "0.46877104", "0.46844986", "0.46776164", "0.46710107", "0.4665133", "0.4650749", "0.4647201", "0.46455282", "0.46450877", "0.46297055", "0.46205294", "0.46152467", "0.459778", "0.45836455", "0.45753488", "0.45704135", "0.456366", "0.45596153", "0.45579603", "0.45530796", "0.45511535", "0.45484933", "0.4548481", "0.45430568", "0.45422688", "0.45318907", "0.4521469", "0.45062634", "0.4500081", "0.448476", "0.44812313", "0.44643524", "0.4463185", "0.44596508", "0.44554818", "0.4443954", "0.44408524", "0.44376072", "0.44368953", "0.44356433", "0.44355708", "0.44353592" ]
0.7728812
0
Are we allowed to use Buspakje by preferences from Magento
Можно ли использовать Buspakje на основе предпочтений из Magento
private function canUseBuspakje() { return Mage::helper('postnl')->canUseBuspakje(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_data/kpi');\n }", "protected function _isAllowed()\t{\r\n\t\treturn Mage::getSingleton('admin/session')->isAllowed('stagem_estimator/addon');\r\n\t}", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('weber_best/best');\n }", "protected function _isAllowed()\n {\n return true;\n return Mage::getSingleton('admin/session')->isAllowed('system/gene_bluefoot/content_apps');\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('system/gene_bluefoot/content_apps');\n }", "public function canUse()\n {\n return parent::canUse() && \\YunShop::plugin()->get('yop-pay');\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_data/cofa');\n }", "public function isAllowed()\n {\n $storeId = $this->getStoreId();\n\n return\n $this->configHelper->getApplicationID($storeId)\n && $this->configHelper->getAPIKey($storeId)\n && $this->configHelper->isEnabledFrontEnd($storeId)\n && $this->configHelper->makeSeoRequest($storeId);\n }", "public function testConfig() {\n\t\ttry {\n\t\t\twfWAF::getInstance()->getStorageEngine()->isDisabled();\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "protected function _canBeStoreCodeInUrl()\n {\n return Mage::isInstalled() && Mage::getStoreConfigFlag(Mage_Core_Model_Store::XML_PATH_STORE_IN_URL);\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('gaiterjones_gdpr');\n }", "public function isEnabled(){\n return Mage::helper('acierno_helloworld')->isEnabled();\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('webspeaks_notifycustomer/notification');\n }", "function instance_allow_config() {\r\n\r\n return false;\r\n }", "public function isEnabledCondition(){\r\n return Mage::getStoreConfig('vendors/pricecomparison2/enable_condition');\r\n }", "private function isPBFActiveForThisOrder()\n {\n return (Mage::getSingleton('paybyfinance/session')->getData('enabled'));\n }", "function secure_is_failtoban_active(){\n\t$failtoban_active = custom_get_option(\"tool-secure-failtoban-active\");\n\tif (!empty($failtoban_active) && $failtoban_active == \"on\")\n\t\treturn true;\n\treturn false;\n}", "function threema_is_installed()\n{\n global $mybb;\n\n if( array_key_exists('threema_id', $mybb->settings) &&\n array_key_exists('threema_secret', $mybb->settings) &&\n array_key_exists('threema_blacklist', $mybb->settings) &&\n array_key_exists('threema_fid', $mybb->settings) )\n {\n return true;\n }\n else\n {\n return false;\n }\n}", "private function isEnabledForCurrentContext() {\n $this->token = Mage::getStoreConfig('loyaltylion/configuration/loyaltylion_token');\n $this->secret = Mage::getStoreConfig('loyaltylion/configuration/loyaltylion_secret');\n\n if (empty($this->token) || empty($this->secret)) return false;\n return true;\n }", "public function canShow()\n {\n if (!Mage::getStoreConfig(self::XML_CONFIG_RUOAUTH)) {\n $this->_available = TRUE;\n }\n\n return $this->_available;\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('share_refund/app');\n }", "public function shouldVerifyTwoFactorForMarketplace()\n {\n $setting = $this->twoFactorSetting;\n return $setting->enabled && $setting->marketplace;\n }", "function isEnabled()\n\t{\n\t\t$currentUid= $GLOBALS['TSFE']->id;\n\t\t$enabledIds = array();\n\t\t\n\t\tif ($this->conf['productPage'])\n\t\t{\n\t\t\t$enabledIds = explode(',',$this->conf['productPage']);\n\t\t}\n\t\telseif($GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_commerce_pi1.']['overridePid'])\t\n\t\t{\n\t\t\t$enabledIds = array($GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_commerce_pi1.']['overridePid']);\n\t\t}\t\n\t\t\n\t\t// if showUid exists in url, this extension should not be perform\n\t\t$gpVars = t3lib_div::GPvar('tx_commerce_pi1');\t\t\n\t\t\n\t\tif ($gpVars && is_array($gpVars))\n\t\t{\n\t\t\tif (array_key_exists('showUid', $gpVars))\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// check if current id exists in array\n\t\treturn in_array($currentUid, $enabledIds);\n\t}", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('system/config');\n }", "function canConfigure(){\n $r = $this->api->recall('cmsediting',false);\n return $r;\n }", "function Aastra_is_parking_notify_allowed_Asterisk($user)\n{\nGlobal $AA_PARKING_EXCLUDE;\n\n# Yes by default\n$return=True;\n\n# Check configuration\nif($AA_PARKING_EXCLUDE!='')\n\t{\n\tif(in_array($user,$AA_PARKING_EXCLUDE)) $return=False;\n\t}\n\n# Return result\nreturn($return);\n}", "public function isAllow()\n {\n if ($this->_moduleManager->isOutputEnabled($this->_getModuleName()) && $this->scopeConfig->getValue(\n 'sendquote/general/active',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n )\n ) {\n return true;\n }\n return false;\n }", "public function isEnabled()\n {\n return Mage::getStoreConfig(self::SETTINGS_ENABLED);\n }", "public function _isEnableModule()\n {\n $storeId = Mage::app()->getRequest()->getParam('store');\n return Mage::getStoreConfig(self::ENABLE,$storeId);\n }", "protected function _isAllowed() {\n return Mage::getSingleton('admin/session')->isAllowed('catalog/vidtest');\n }", "function instance_allow_config() {\n return false;\n }", "public function checkBackendAccessSettingsFromInitPhp() {}", "function instance_allow_config() {\n return false;\n }", "public function isAllowed()\n {\n return $this->_scopeConfig->isSetFlag(\n 'rss/catalog/special',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }", "public function isConfigured()\n {\n if (HSetting::Get('secret') != \"\") {\n return true;\n }\n return false;\n }", "function __pluginAllowedByConfig()\n {\n\n if (isset($this->isAllowed2FA) && !is_null($this->isAllowed2FA)) {\n return $this->isAllowed2FA;\n }\n\n $rcmail = rcmail::get_instance();\n $this->load_config();\n\n // users allowed to use plugin (not showed for others!).\n //\t-- From config.inc.php file.\n // -- You can use regexp: admin.*@domain.com\n $users = $rcmail->config->get('users_allowed_2FA');\n if (is_array($users)) { // exists \"users\" from config.inc.php\n foreach ($users as $u) {\n preg_match(\"/$u/\", $rcmail->user->data['username'], $matches);\n\n if (isset($matches[0])) {\n return true;\n }\n }\n\n // not allowed for all, except explicit\n return false;\n }\n\n // by default, all users have plugin activated\n return true;\n }", "public function setAllowByPass($b) {$this->allowByPass = $b;}", "protected function _isAllowed() {\n return Mage::getSingleton('admin/session')->isAllowed('netgo_pricereminder/netgopricereminder');\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('catalog/bs_coursecost/coursecost');\n }", "function permit() {\n return true;\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('copernica');\n }", "public function getEnabled(){\n\t\treturn (Mage::helper('nektria')->getConfig('active') && ! is_null(Mage::helper('nektria')->getConfig('apikey')) );\n\t}", "public function isUserNotAllowSaveCookie()\n {\n return Virtual::getStoreConfig(self::XML_PATH_COOKIE_RESTRICTION);\n }", "public function canShow()\n {\n $helper = Mage::helper('deployment');\n\n return $helper->canGit() || $helper->canVarnish() || $helper->canMemcached() || $helper->canApc();\n }", "public function isAllowSpecific()\n {\n $configPath = sprintf($this->configPathPattern, 'allowspecific');\n\n return Mage::getStoreConfig($configPath);\n }", "function is_available()\n\t{\n\n\t\t// proper configuration\n\t\tif ( ! $this->get_profile_id() || ! $this->get_access_key() || ! $this->get_secret_key() || ! $this->get_merchant_id() ) return false;\n\n\t\treturn parent::is_available();\n\t}", "public function isEnabled2()\n {\n return Mage::getStoreConfig(self::SETTINGS_ENABLED_2);\n }", "function _hasAccess()\n {\n // User can always access My Preferences page\n return true;\n }", "private function _isEnabled() {\n return Mage::getStoreConfigFlag(\"contactlab_transactional/global/enabled\");\n }", "public function blacklistMode() {\n\t\t$blacklistEnabled = false;\n\t\ttry {\n\t\t\t$wafEnabled = !(!WFWAF_ENABLED || wfWAF::getInstance()->getStorageEngine()->isDisabled());\n\t\t\t$blacklistEnabled = $wafEnabled && !wfWAF::getInstance()->getStorageEngine()->getConfig('disableWAFBlacklistBlocking');\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\t//Do nothing\n\t\t}\n\t\t\n\t\tif (wfConfig::get('isPaid') && $blacklistEnabled) {\n\t\t\treturn self::BLACKLIST_MODE_ENABLED;\n\t\t}\n\t\treturn self::BLACKLIST_MODE_DISABLED;\n\t}", "public function isAllowing() {\n\t\t\n\t}", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('emailvision/abandonment/list');\n }", "public function isEnabled()\n {\n return Mage::getStoreConfigFlag('catalin_seo/catalog/enabled');\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Webkul_Marketplace::seller');\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Webkul_Marketplace::seller');\n }", "private function is_accessing_settings()\n {\n }", "public function isAwShopbybrandInstalled()\n {\n return Mage::getConfig()->getModuleConfig('AW_Shopbybrand')->is('active', 'true');\n }", "public function moduleEnabled(){\n\t\treturn Mage::getStoreConfig('vendors/config/active');\n\t}", "function is_active() {\n if (isset($this->info['prime value'])) {\n return (bool)$this->config[$this->info['prime value']];\n }\n else {\n return TRUE;\n }\n }", "public function isEnabled()\n\t{\n\t\treturn Mage::getStoreConfig('ipmenumanager/settings/enabled');\n\t}", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_exam/bs_docwise/exam');\n }", "function onAdminPanelCheck($name, &$isOK)\n {\n if ($name == 'bitly') {\n $isOK = true;\n return false;\n }\n\n return true;\n }", "function jig_init_check_permissions(){\r\n\t\t\tif($this->settings['jig_activated'] == \"hot\"){\r\n\t\t\t\t$this->jig_install_check_permissions();\r\n\t\t\t\t$this->settings['jig_activated'] = \"cold\";\r\n\t\t\t\tupdate_option(self::SETTINGS_NAME,$this->settings);\r\n\t\t\t\tflush_rewrite_rules();\r\n\t\t\t}\r\n\t\t}", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('sales/niveus_requestproduct_requestnewproduct');\n }", "protected function _isAllowed()\n\t{\n\t\treturn Mage::getSingleton('admin/session')->isAllowed('system/borderfreecrontab');\n\t}", "private function isEnabled()\n {\n if ($this->scopeConfig->getValue('vesta_protection/general/enable', ConfigurationScope::SCOPE_STORE)) {\n return true;\n } else {\n return false;\n }\n }", "public function isEnabled() {\n return Mage::getStoreConfig('extension/extension_settings/extension_active');\n }", "protected function _isAllowed()\n { \n\t $aclResource = 'admin/sales/qquoteadv';\n\t\treturn Mage::getSingleton('admin/session')->isAllowed($aclResource); \n }", "public function testConf()\n\t{\n\t\tif(!$this->_data->pk)\n\t\t\treturn false;\n\t\treturn true;\n\t}", "function idealEnabled() {\n\t\t$db = & JFactory::getDBO();\n\t\t$sql = 'SELECT COUNT(id) FROM #__eb_payment_plugins WHERE name=\"os_ideal\" AND published=1';\n\t\t$db->setQuery($sql) ;\n\t\t$total = $db->loadResult() ;\n\t\tif ($total) {\n\t\t\trequire_once JPATH_COMPONENT.DS.'payments'.DS.'ideal'.DS.'ideal.class.php';\n\t\t\treturn true ;\n\t\t} else {\n\t\t\treturn false ;\t\n\t\t}\t\t\t\n\t}", "protected function _enabled()\n {\n return Mage::helper('marketingsoftware')->enabled();\n }", "public function checkAccess()\n {\n return (bool)$this->getBackendUser()->getTSConfigVal('options.enableBookmarks');\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('snm/auit_publicationbasic/jobqueue');\n }", "function is_available() {\n\t\tif ( $this->enabled == \"yes\" )\n\t\t\treturn true;\n\t}", "public function enableByPass() {\n return $this->enableByPass and YII_ENV_DEV;\n }", "static function set_global_allow_purchase($allow = false){\n\t\tself::$global_allow_purchase = $allow;\n\t}", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')\n ->isAllowed('system/tools/fraisrconnect_synchronisation');\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('system/config/instagramwidget');\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_report/routine');\n }", "function check_more_seller_product_tab( ) {\n global $post;\n $store_info = dokan_get_store_info( $post->post_author );\n if( isset( $store_info['show_more_ptab'] ) AND $store_info['show_more_ptab'] == 'yes' ){\n return true;\n }else {\n return false;\n }\n}", "function is_allowed()\n{\n return TRUE;\n}", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('avatax');\n }", "private function isModuleEnabled()\n {\n $helper = Mage::helper('paybyfinance');\n return (((boolean) Mage::getStoreConfig($helper::XML_PATH_SAGEPAY_INITIATOR)) == true) ;\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')\n ->isAllowed('newsletter/contactlab/template_types');\n }", "function is_theStockPlayBookPremium(){\n\t\treturn $_SESSION['TheStockPlayBookPremium'];\n\t}", "protected function _isAllowed()\r\n\t{\r\n\t\treturn Mage::getSingleton('admin/session')->isAllowed('ordergroove');\r\n\t}", "protected function _isAllowed()\n {\n return parent::_isAllowed() && $this->_authorization->isAllowed('Vnecoms_VendorsConfigApproval::pending_config');\n }", "public function getFbStatus(){\n\t\n\t return Mage::getStoreConfig('techinflosocialmedia/facebook/fbenabled');\n\t}", "public function _chk_permit()\n\t{\n\t\t$cmod = $this->get_sys_cmod();\n\t\t$type = $this->get_sys_typemod($cmod);\n\t\tif(!$type) $type = 'pub'; //if null then 'pub'\n\t\tif($type != 'pub')\n\t\t{\n\t\t\tif(!$this->is_authenticated())\n\t\t\t{\n\t\t\t\terror_log(\"PLASER_Web: [Client {$_SERVER['REMOTE_ADDR']}] Access Denied: {$_SERVER['PHP_SELF']}\");\n\t\t\t\tif($this->error_returnxml)\n\t\t\t\t{\n\t\t\t\t\t$pf = new plaf('Sorry, your session has expired or you are not authenticated in the system.', 1400);\n\t\t\t\t\t$pf->fault(1);\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\telse $this->go('/error.html');\n\t\t\t}\n\t\t\tif($type == 'rtd' && !$this->isset_mod($cmod))\n\t\t\t{\n\t\t\t\t$permit = false;\n\t\t\t\tforeach($GLOBALS['plaser_conf']->get('Web_rtd_exempt') as $exempt) if(stristr($_SERVER['PHP_SELF'], $exempt)) { $permit = true; break; }\n\t\t\t\tif(!$permit) throw new plaf('You do not have the permission to access this resource, please contact the administrator.', 1401);\n\t\t\t}\n\t\t}\n\t\t//if 'pub' do nothing\n\t}", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('BlueMedia_BluePayment::gateways');\n }", "public function isEnabled()\n {\n return (bool)Mage::getStoreConfig('privatesales/general/enable');\n }", "public function getAllow(){\n $model = \\Magento\\Framework\\App\\ObjectManager::getInstance()->create('Magento\\Framework\\App\\Config\\ScopeConfigInterface');\n $allow = $model->getValue('ordermanager_labels/ordermanager_editor/ordermanager_edit_item', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n\n if($allow == 0 || $this->getAccept()==1){\n return \"none\";\n }\n return \"block\";\n }", "public function allow_save_settings($allow)\n {\n }", "public function allow_save_settings($allow)\n {\n }", "public function isApiEnabled()\n {\n\n return Mage::getStoreConfig('sms/main_conf/active');\n\n }", "public function isEnabled() {\n\t\tif (empty($this->_enabled)) {\n\t\t\t$bkNumber = $this->getBKNumber();\n\t\t\t$this->_enabled = Mage::getStoreConfigFlag(self::XML_PATH_BLUEKNOW_ENABLED) && !empty($bkNumber);\n\t\t}\n\t\treturn $this->_enabled;\n\t}", "public function getIsUsedForPromoRules();", "protected function is_using_sitewide_stock_threshold_only()\n {\n }", "function isValidSetting() ;", "public function checkModuleIsEnabled()\n {\n $grpSecPath = \"carriers/ENWweSmpkg/active\";\n return $this->scopeConfig->getValue($grpSecPath, \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n }" ]
[ "0.63418347", "0.62205136", "0.6215853", "0.62074816", "0.61892384", "0.6178337", "0.6077797", "0.60502857", "0.604645", "0.6005992", "0.6004616", "0.59875774", "0.5968961", "0.5953756", "0.59403855", "0.59368205", "0.5928259", "0.591194", "0.59015733", "0.5900413", "0.58621293", "0.5860557", "0.5859488", "0.5853282", "0.5827805", "0.58146816", "0.5799136", "0.5794273", "0.5794161", "0.57922715", "0.578127", "0.57787645", "0.57711375", "0.5768941", "0.5762498", "0.57554203", "0.57461596", "0.57444733", "0.57341576", "0.5728", "0.57264155", "0.5725097", "0.57131857", "0.5710122", "0.56927407", "0.56837463", "0.56804276", "0.5679551", "0.5678421", "0.5677723", "0.5677164", "0.5667938", "0.56635386", "0.5631293", "0.5631293", "0.5629736", "0.5628647", "0.56248254", "0.561405", "0.5610523", "0.5609108", "0.56072384", "0.5605853", "0.5603459", "0.5601367", "0.5596621", "0.55874157", "0.5585727", "0.5583006", "0.55814433", "0.5578207", "0.55687124", "0.5567692", "0.5567106", "0.5564877", "0.5560179", "0.5557403", "0.55571103", "0.555449", "0.555007", "0.5549015", "0.5542998", "0.5538928", "0.55350363", "0.55310076", "0.5527549", "0.5526227", "0.552167", "0.55143857", "0.55115664", "0.550385", "0.5501869", "0.54948646", "0.5493244", "0.5489009", "0.5481717", "0.54807866", "0.54792863", "0.5472461", "0.54714113" ]
0.7481228
0
Is this a Dutch shipment
Это дутчевский груз?
private function isDutchShipment($order) { return $order->getShippingAddress()->getCountry() == 'NL'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_dutch_project(): bool {\n\t\t$attributes = $this->get_attributes();\n\t\tif ( ! isset( $attributes[ Taxonomy_Attribute::COUNTRY()->value ] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn 'nederland' === $attributes[ Taxonomy_Attribute::COUNTRY()->value ]->get_slugs()[0];\n\t}", "public function isShippable();", "public function hasShipment(): bool\n {\n foreach ($this->getOrders() as $order) {\n if ($order->hasShipments()) {\n return true;\n }\n }\n\n return false;\n }", "function isDelivery(): bool\n{\n return parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) == '/delivery/';\n}", "public function isShippingAdminRoute() {\n // Get current route. Skip admin path.\n return \\Drupal::routeMatch()->getRawParameter('commerce_shipment');\n }", "function is_domestic_session()\n{\n return get_country_code() === 'US';\n}", "public function is_shippable()\n\t{\n\t\treturn ! $this->no_shipping;\n\t}", "function is_hsSanDiego(){\n\t\tglobal $_SESSION;\n\t\treturn $_SESSION['HS-SanDiego'];\n\t}", "public function show_mark_shipped()\n\t{\n\t\treturn $this->status == 'paid';\n\t}", "function isOrderWithDynamicShipping()\n {\n return get_option(GootenWCOptionNames::ORDER_DYNAMIC_SHIPPING) === '1';\n }", "public function isPreferredDeliveryDateEnabled()\n {\n return (bool)Mage::getStoreConfig('intraship/dhlaccount/active');\n }", "protected function isSentToServiceDonateur()\r\n\t{\r\n\t\t$db = false; $origin = __CLASS__.'::'.__FUNCTION__;\r\n\t\t$is_sent_to_sd = false;\r\n\t\t$mails = $this->getMails();\r\n\t\t$mail_ed = $mails['service donateur']['Medecins sans frontieres'];\r\n\t\tif ($db) {\r\n\t\t\tvar_dump($origin, $this->_to);\r\n\t\t}\r\n\t\tif (in_array($mail_ed, $this->_to) ) {\r\n\t\t\t$is_sent_to_sd = true;\r\n\t\t}\r\n\t\treturn $is_sent_to_sd;\r\n\t}", "public function canViewShippingInfo()\n {\n if (is_object($this->getVendorOrder()->getShippingMethod())\n && !$this->getVendorOrder()->getShippingMethod()->getMethod()) {\n return false;\n } elseif (!$this->getVendorOrder()->getShippingMethod()) {\n return false;\n }\n return true;\n }", "public function isShippable()\n {\n $product = $this->getProduct();\n\n return (bool)$product->getShippingGroup();\n }", "public function deliveryOnly(): bool\n {\n return $this->allow_delivery === 1;\n }", "public function isNational()\n {\n // assure that the transformer is prepared\n if (!$this->_prepared) {\n $this->_prepare();\n }\n\n return (!is_null($this->_getNational()));\n }", "public function isDelivered()\n {\n if (!$this->isSufficient())\n return false;\n\n if (!$this->packages->count())\n return false;\n\n foreach ($this->packages as $package) {\n if ($package->delivered_at == null)\n return false;\n }\n\n return true;\n }", "public function hasShipments() : bool\n {\n return count($this->getShipments()) > 0;\n }", "public function hasLocale(){\n return $this->_has(2);\n }", "public function isShipSeparately()\n {\n $parentItem = $this->getParentItem();\n if ($parentItem) {\n $options = $parentItem->getProductOptions();\n } else {\n $options = $this->getProductOptions();\n }\n\n if (isset(\n $options['shipment_type']\n ) && $options['shipment_type'] == \\Magento\\Catalog\\Model\\Product\\Type\\AbstractType::SHIPMENT_SEPARATELY\n ) {\n return true;\n }\n return false;\n }", "public function isNational()\n {\n return $this->national;\n }", "public function isIntoGeneralEnglish()\n {\n $into = self::fetchInto($this->osuid);\n\n if (null === $into) {\n return false;\n }\n\n return $into['person']['current_program'] === 'GE' ? true : false;\n }", "function is_hsWashingtonDC(){\n\t\tglobal $_SESSION;\n\t\treturn $_SESSION['HS-WashingtonDC'];\n\t}", "function is_international_session()\n{\n return get_country_code() !== 'US';\n}", "public function isDomestic() {\n return ($this->getCountryCode() == 'US');\n }", "public function isExpressDelivery()\n {\n return $this->expressDelivery;\n }", "protected function _initShipment()\n {\n $this->_title($this->__('Sales'))->_title($this->__('Shipments'));\n $helper = Mage::helper('chronorelais');\n $shipment = false;\n $shipmentId = $this->getRequest()->getParam('shipment_id');\n $orderId = $this->getRequest()->getParam('order_id');\n if ($shipmentId) {\n $shipment = Mage::getModel('sales/order_shipment')->load($shipmentId);\n } elseif ($orderId) {\n $order = Mage::getModel('sales/order')->load($orderId);\n\n /**\n * Check order existing\n */\n if (!$order->getId()) {\n $this->_getSession()->addError($this->__('The order no longer exists.'));\n return false;\n }\n /**\n * Check shipment is available to create separate from invoice\n */\n if ($order->getForcedDoShipmentWithInvoice()) {\n $this->_getSession()->addError($this->__('Cannot do shipment for the order separately from invoice.'));\n return false;\n }\n /**\n * Check shipment create availability\n */\n if (!$order->canShip()) {\n $this->_getSession()->addError($this->__('Cannot do shipment for the order.'));\n return false;\n }\n $savedQtys = $this->_getItemQtys();\n\n /* If shipping method is Chronopost => check if shipping weight isn't over limit */\n $chronopostMethods = array('chronopost_chronopost','chronoexpress_chronoexpress','chronorelais_chronorelais','chronopostc10_chronopostC10','chronopostc18_chronopostC18','chronopostcclassic_chronopostCClassic','chronopostsrdv_chronopostsrdv','chronopostsameday_chronopostsameday');\n $shippingMethod = $order->getShippingMethod();\n if(in_array($shippingMethod, $chronopostMethods)) {\n $weightShipping = 0;\n $shippingMethod = explode(\"_\", $shippingMethod);\n $shippingMethod = $shippingMethod[0];\n $weight_limit = Mage::getStoreConfig('carriers/'.$shippingMethod.'/weight_limit');\n foreach($savedQtys as $iditem => $qty) {\n $item = $order->getItemById($iditem);\n $weightShipping += $item->getWeight()*$qty;\n }\n if($helper->getConfigWeightUnit() == 'g')\n {\n $weightShipping = $weightShipping / 1000; // conversion g => kg\n }\n if($weightShipping > $weight_limit) {\n\n /* Create one shipment by product ordered */\n foreach($savedQtys as $iditem => $qty) {\n $item = $order->getItemById($iditem);\n $weightShipping += $item->getWeight()*$qty;\n for($i = 1; $i <= $qty; $i++) {\n $shipment[] = Mage::getModel('sales/service_order', $order)->prepareShipment(array($item->getId() => '1'));\n\n }\n }\n }\n }\n\n\n if(!$shipment)\n {\n $shipment = Mage::getModel('sales/service_order', $order)->prepareShipment($savedQtys);\n\n $tracks = $this->getRequest()->getPost('tracking');\n if ($tracks) {\n foreach ($tracks as $data) {\n if (empty($data['number'])) {\n Mage::throwException($this->__('Tracking number cannot be empty.'));\n }\n $track = Mage::getModel('sales/order_shipment_track')\n ->addData($data);\n $shipment->addTrack($track);\n }\n }\n }\n }\n\n Mage::register('current_shipment', $shipment);\n return $shipment;\n }", "public function isFromGateway()\n\t{\n\t\tif (strpos($this->creation_system, 'gateway') === 0) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function isShipToAllCountries()\n {\n return $this->isShipToAllCountries;\n }", "public function shipcomplete() {\n\t\treturn strtoupper($this->credithold) == self::YN_TRUE;\n\t}", "protected function isShippable()\n {\n $result = false;\n\n foreach ($this->getItems() as $item) {\n if ($item->isShippable()) {\n $result = true;\n break;\n }\n }\n\n return $result;\n }", "function my_shipping () {\n\t\t$this->internal_name = \"my_shipping\";\n\t\t\n\t\t// $this->name is how the method will appear to end users\n\t\t$this->name = \"My Shipping Method\";\n\n\t\t// Set to FALSE - doesn't really do anything :)\n\t\t$this->is_external = FALSE;\n\n\t\treturn true;\n\t}", "public function isNewsletterEnabled() {\n \t/** Is News letter Enabled */\n return Mage::helper ( 'core' )->isModuleOutputEnabled ( 'Mage_Newsletter' );\n }", "function is_us(){\n\t\n\treturn is_country( 'US' );\n\t\n}", "public function hasPostage()\n {\n $settings = $this->getSettings();\n\n return ($this->getData('enable_shipping') ||\n ($settings['enable_shipping'] && $this->getData('pending'))) ? true : false;\n }", "function is_translatable()\n {\n }", "function isUgandan() {\n \treturn $this->getCountry() == 'UG' || isEmptyString($this->getCountry()) ? true : false; \n }", "public function check_shipping_location($param) {\n\t\t$this->load->model('location_model');\n\t\treturn ($param == 'worldwide' || ($this->location_model->location_by_id($param) !== FALSE)) ? TRUE : FALSE;\n\t}", "public function is_wporg() {\n\t\t\treturn $this->is_wporg;\n\t\t}", "public static function is_package( array $order ) {\n\t\treturn ! self::is_advertisement( $order );\n\t}", "public static function is_package( array $order ) {\n\t\treturn ! self::is_advertisement( $order );\n\t}", "public function isPartialShipment($shipment)\n {\n $order = $shipment->getOrder();\n //Check if it is a cod order\n $orderHelper = Mage::helper('hermes/validate_order');\n $orderHelper->setOrder($order);\n if (false === $orderHelper->isShippedAsCod()) {\n return false;\n }\n //Build shipment item array\n $shipment_items = array();\n foreach ($shipment->getItemsCollection()->getItems() as $shipment_item) {\n\n //Ignore doublette simple/configurable shipment items\n if ((float) $shipment_item->getPrice()==0) {\n continue;\n }\n $shipment_items[$shipment_item->getSku()] = $shipment_item->getQty();\n }\n\n //Loop through every order item and look if it is existing in the shipment too\n foreach ($order->getAllItems() as $order_item) {\n //Ignore doublette simple/configurable order items\n if ((float) $order_item->getPrice()==0 || '' !=$order_item->getParentItemId() || $order_item->getIsVirtual()) {\n continue;\n }\n if (false === isset($shipment_items[$order_item->getSku()])) {\n return true;\n }\n if ($shipment_items[$order_item->getSku()] != (int) $order_item->getQtyOrdered()) {\n return true;\n }\n }\n return false;\n }", "public function canSendShipmentEmail()\n {\n return Mage::helper('sales')->canSendNewShipmentEmail($this->getOrder()->getStore()->getId());\n }", "public function isDelivered()\n {\n return $this->status_id == self::STATUS_DELIVERED;\n }", "public function canShowShippingInfo()\n {\n return Mage::getStoreConfig(\n 'marketplace_configuration/orders/can_show_shipping_info'\n );\n }", "function store_is_shipping_enabled(){\n\t\t$sw_settings = get_option('store_sw_settings');\n\t\treturn $sw_settings['enabled'];\n\t}", "function is_techStrat(){\n\t\tglobal $_SESSION;\n\t\treturn $_SESSION['TechStrat'];\n\t}", "public function canShip()\n {\n return $this->getQtyToShip() > 0;\n }", "public static function isCanUseYandexExport(): bool\n\t{\n\t\t$lang = LANGUAGE_ID;\n\n\t\tif (self::isBitrix24())\n\t\t{\n\t\t\t$lang = \\CBitrix24::getLicensePrefix();\n\t\t}\n\t\telseif (Loader::includeModule('intranet'))\n\t\t{\n\t\t\t$lang = \\CIntranetUtils::getPortalZone();\n\t\t}\n\t\telseif (Option::get('main', 'vendor') === '1c_bitrix')\n\t\t{\n\t\t\t$lang = 'ru';\n\t\t}\n\n\t\treturn in_array($lang, ['ru', 'by', 'kz'], true);\n\t}", "function is_hsChicago(){\n\t\tglobal $_SESSION;\n\t\treturn $_SESSION['HS-Chicago'];\n\t}", "public function isShippingLabelsAvailable()\n {\n return false;\n }", "public function requiresShipment();", "public function isTranslation()\n {\n $result = false;\n\n if (!$this->isInstalled()) {\n\n $tags = $this->getTags();\n\n if (is_array($tags) && in_array('Translation', $tags)) {\n $result = true;\n }\n }\n\n return $result;\n }", "public function hasShipping()\n\t{\n\t\treturn $this->shipping;\n\t}", "function is_available() {\n\t\t\tglobal $woocommerce;\n\n\t\t\tif ($this->enabled == \"no\")\n\t\t\t\treturn false;\n\n\t\t\t/* if (isset($woocommerce->cart->cart_contents_total) && isset($this->min_amount) && $this->min_amount && $this->min_amount > $woocommerce->cart->cart_contents_total)\n\t\t\t return false; */\n\n\t\t\tif (!$this->origin):\n\t\t\t\treturn false;\n\t\t\tendif;\n\n\t\t\t$ship_to_countries = '';\n\n\t\t\tif ($this->packing == \"custom_box\" && (!$this->custom_box_height || !$this->custom_box_length || !$this->custom_box_width))\n\t\t\t\treturn false;\n\n\t\t\tif ($this->availability == 'specific') :\n\t\t\t\t$ship_to_countries = $this->countries;\n\t\t\telse :\n\t\t\t\tif (get_option('woocommerce_allowed_countries') == 'specific') :\n\t\t\t\t\t$ship_to_countries = get_option('woocommerce_specific_allowed_countries');\n\t\t\t\tendif;\n\t\t\tendif;\n\n\t\t\tif (is_array($ship_to_countries)) :\n\t\t\t\tif (!in_array($woocommerce->customer->get_shipping_country(), $ship_to_countries))\n\t\t\t\t\treturn false;\n\t\t\tendif;\n\n\t\t\treturn true;\n\t\t}", "function is_maintenance() {\n\t\tglobal $myMaMo; \n\t\tif ( substr($myMaMo->g_opt['mamo_activate'], 0, 2) == 'on' ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function is_shop()\n {\n }", "function sydney_wc_archive_check() {\n if ( is_shop() || is_product_category() || is_product_tag() ) {\n return true;\n } else {\n return false;\n }\n}", "public function is_package_install() {\n\n\t\tif ( empty( $_SESSION['monstroid_install_type'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$type = esc_attr( $_SESSION['monstroid_install_type'] );\n\n\t\tif ( in_array( $type, array( 'advanced', 'full' ) ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\n\t}", "function systemHasNewsletter() {\n\t\tif ((ConfigModule::get(\"registration\",\"newsletterSubscription\")) && (ModulePeer::hasNewslettersModule()))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "function isXRDS()\n { return ($this->usedYadisLocation() ||\n $this->content_type == Auth_Yadis_CONTENT_TYPE);\n }", "public function is_translated() {\n return count($this->languages) > 0;\n }", "public function canCreateShippingLabel()\n {\n $shippingCarrier = $this->getOrder()->getShippingCarrier();\n return $shippingCarrier && $shippingCarrier->isShippingLabelsAvailable();\n }", "public function canUseForCountryDelivery($country)\r\n {\r\n if(Mage::app()->getStore()->isAdmin()){\r\n $quote = Mage::getSingleton('adminhtml/session_quote')->getQuote();\r\n }\r\n else{\r\n $quote = Mage::getSingleton('checkout/session')->getQuote();\r\n }\r\n $availableCountries = explode(',', $this->getHelper()->getRpConfigData($quote, $this->_code, 'specificcountry_delivery'));\r\n if(!in_array($country, $availableCountries)){\r\n return false;\r\n }\r\n return true;\r\n }", "function is_store_notice_showing()\n {\n }", "public function isSingleShipOriginQuote(){\n $numberOfAssignedShipOrigin = $this->getNumberOfAssignedShipOrigin();\n if($numberOfAssignedShipOrigin == 1){\n return true;\n } else{\n return false;\n }\n }", "function islive(){\n return strpos(strtolower($_SERVER['HTTP_HOST']), \"didueat.ca\") !== false;\n }", "function is_adFree(){\n\t\tglobal $_SESSION;\n\t\treturn $_SESSION['AdsFree'];\n\t}", "private static function isSystemInMaintenanceMode()\n {\n $release = ReleaseNotification::model()->getNotFinishedRelease();\n if (empty($release))\n return !self::allowByTime();\n \n return true;\n }", "public function getIsDistribut()\n {\n return $this->is_distribut;\n }", "public function getIsDistribut()\n {\n return $this->is_distribut;\n }", "function is_order_received_page()\n {\n }", "public function actionisPaymentOnDeliveryPossibleInThisCity(){\n $model = new City;\n $city_id = $_REQUEST['city_id'];\n if($model->isPaymentOnDeliveryAllowedInThisCity($city_id)){\n header('Content-Type: application/json');\n echo CJSON::encode(array(\n \"success\" => mysql_errno() == 0,\n \"ondelivery_payment\" => true)\n );\n }else{\n header('Content-Type: application/json');\n echo CJSON::encode(array(\n \"success\" => mysql_errno() == 0,\n \"ondelivery_payment\" => false)\n );\n }\n }", "function isKenyan() {\n \treturn $this->getCountry() == 'KE' ? true : false; \n }", "private function isDealer()\n {\n return ($this->getService('session')->user['role'] === 'dealer');\n }", "public function getShipmentStatus();", "public function is_available()\n\t{\n\t\treturn parent::is_available() && $this->getTransactionAddress('country') == WC_EBANX_Gateway_Utils::COUNTRY_CHILE;\n\t}", "public function isDevel()\n {\n return $this->getGame_devel();\n }", "function idg_products_get_delivery_text( $record ) : string {\n\n\t\tif ( ! empty( $record['freeShipping'] ) && true === $record['freeShipping'] ) {\n\t\t\treturn _x( 'Free', 'Delivery charges of a product', 'idg-base-theme' );\n\t\t} elseif ( ! empty( $record['inStock'] ) && false === $record['inStock'] ) {\n\t\t\treturn __( 'Out of stock', 'idg-base-theme' );\n\t\t} else {\n\t\t\treturn __( '--', 'idg-base-theme' );\n\t\t}\n\n\t\treturn '';\n\t}", "public function isShippable()\n {\n return (bool) $this->cart->lines->filter(function ($line) {\n return $line->purchasable->isShippable();\n })->count();\n }", "function is_available() {\n\t\tglobal $woocommerce;\n\t\t\n\t\tif ( !$this->enabled )\n\t\t\treturn false;\n\t\t\t\n\t\tif($this->debug)\n\t\t\t$woocommerce->add_message('Aramex is enabled<br />');\n\n\t\tif (isset($woocommerce->cart->cart_contents_total) && isset($this->min_amount) && $this->min_amount && $this->min_amount > $woocommerce->cart->cart_contents_total)\n\t\t\treturn false;\n\n\t\tif (!$this->origin_postalcode):\n\t\t\treturn false;\n\t\tendif;\n\n\t\t$ship_to_countries = '';\n\n\t\tif ($this->availability == 'specific') :\n\t\t\t$ship_to_countries = $this->countries;\n\t\telse :\n\t\t\tif (get_option('woocommerce_allowed_countries') == 'specific') :\n\t\t\t\t$ship_to_countries = get_option('woocommerce_specific_allowed_countries');\n\t\t\tendif;\n\t\tendif;\n\n\t\tif (is_array($ship_to_countries)) :\n\t\t\tif (!in_array($woocommerce->customer->get_shipping_country(), $ship_to_countries))\n\t\t\t\treturn false;\n\t\tendif;\n\n\t\treturn true;\n\t}", "public function hasFreeShipping()\n\t{\n\t\treturn $this->freeShipping;\n\t}", "public function isSellerProductShipping(){\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n return $objectManager->get ( 'Apptha\\Marketplace\\Block\\Product\\Add' )->isSellerProductShipping();\n }", "public function hasShipment(OrderShipmentInterface $orderShipment);", "public function isLocalize()\n {\n return (boolean)$this->fusionValue('localize');\n }", "public function hasLocales(): bool;", "function is_checkout()\n {\n }", "function isForSite()\n {\n if (count($this->getInvitee()) == 1) {\n return true;\n }\n \n return false;\n }", "public function labelPrinted()\n {\n $details = $this->getOrderDetails();\n\n if ($details === null) {\n return false;\n }\n\n $labels = $details->getShipmentLabels();\n\n return !empty($labels) && $labels[0]->isPrinted();\n }", "public function getInternationalDestinations()\n {\n if ($this->accountType === 'starter') {\n $this->errors[301] = 'Unsupported International Destination Request. Tipe akun starter tidak mendukung tingkat international.';\n\n return false;\n }\n\n return $this->request('v2/internationalDestination');\n }", "function is_an_ARF(){\r\n \t\tif(preg_match('/feedback-report/',$this->head_hash['Content-type']['report-type'])) return true;\r\n \t\tif(preg_match('/scomp/',$this->head_hash['X-loop'])) return true;\r\n if(isset($this->head_hash['X-hmxmroriginalrecipient'])){\r\n $this->is_hotmail_fbl = true;\r\n return true;\r\n }\r\n return false;\r\n }", "public function isSold()\n {\n return ($this->state === $this::STATE_COMMERCE_SOLD ? true : false);\n }", "public function is_featured() {\n\t\treturn $this->package->package_featured == 1;\n\t}", "public function is_in_display_as_translated_mode();", "public function getShipmentType(): ?string\n {\n return $this->shipmentType;\n }", "public function getIsDeliveryOrCollection(): string\n {\n return $this->is_delivery ? 'Delivery' : 'Collection';\n }", "public function hasLanguage(){\n return $this->_has(1);\n }", "function is_hsNewYorkMetro(){\n\t\tglobal $_SESSION;\n\t\treturn $_SESSION['HS-NewYorkMetro'];\n\t}", "function shipped(Transaction $transaction,$shipping_id);", "public function is_d3_locale() {\n\n\t\treturn in_array( get_locale(), [ 'en_US', 'en_CA' ], true );\n\n\t}" ]
[ "0.66504335", "0.5971561", "0.5970947", "0.5847394", "0.58457536", "0.5711233", "0.57003045", "0.5681472", "0.5677878", "0.5649732", "0.5646872", "0.5629978", "0.55881906", "0.5543663", "0.55426043", "0.55418426", "0.5534139", "0.5517887", "0.5510017", "0.5508745", "0.5500996", "0.54986924", "0.5482428", "0.5478398", "0.54654807", "0.5456364", "0.54517704", "0.5447839", "0.54430723", "0.5434554", "0.543394", "0.5429541", "0.5417162", "0.5405545", "0.53699976", "0.5364023", "0.53633624", "0.53604865", "0.5351247", "0.53484935", "0.53484935", "0.5344558", "0.53354913", "0.5333078", "0.53312665", "0.53298134", "0.53186643", "0.5317224", "0.53132385", "0.53016424", "0.5301272", "0.5297347", "0.5291384", "0.52866095", "0.5277891", "0.52711636", "0.5266635", "0.5259851", "0.5250554", "0.5247711", "0.52466846", "0.52227205", "0.5221168", "0.52208567", "0.5201993", "0.5197221", "0.51965266", "0.51913524", "0.51761824", "0.5175868", "0.5175868", "0.5174893", "0.51700854", "0.5167435", "0.516556", "0.51617104", "0.51610374", "0.5154591", "0.51487565", "0.5143279", "0.5136772", "0.5132814", "0.5124118", "0.51213133", "0.51200014", "0.5116042", "0.51142895", "0.51140594", "0.5107161", "0.5107097", "0.510172", "0.51013917", "0.5100687", "0.50997424", "0.509807", "0.50963247", "0.50960594", "0.50874877", "0.50839895", "0.5083059" ]
0.7298088
0
Check type of share and return $URL or FALSE
Проверьте тип доли и верните $URL или FALSE
function share_check( $type='' ){ $url = array( 'twitter' => 'http://twitter.com/share', 'facebook' => 'http://facebook.com/sharer.php', 'buzz' => 'http://www.google.com/buzz/post', 'vkontakte' => 'http://vkontakte.ru/share.php', 'google' => 'https://plus.google.com/share' ); return (isset($url[$type])) ? $url[$type] : FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function share_url( $type='', $args=array() ){\r\n\t\t$url = share_check( $type );\r\n\t\tif( $url === FALSE ){\r\n\t\t\tlog_message( 'debug', 'Please check your type share_url('.$type.')' );\r\n\t\t\treturn \"#ERROR-check_share_url_type\";\r\n\t\t}\r\n\r\n\t\t$params = array();\r\n\t\tif( $type == 'twitter' ){\r\n\t\t\tforeach( explode(' ', 'url via text related count lang counturl') as $v ){\r\n\t\t\t\tif( isset($args[$v]) ) $params[$v] = $args[$v];\r\n\t\t\t}\r\n\t\t}elseif( $type == 'facebook' ){\r\n\t\t\t$params['u']\t\t= $args['url'];\r\n\t\t\t$params['t']\t\t= $args['text'];\r\n\t\t}elseif( $type == 'google' ){\r\n\t\t\t$params['url']\t\t= $args['url'];\r\n\t\t}elseif( $type == 'buzz'){\r\n\t\t\t$params['url']\t\t= $args['url'];\r\n\t\t\t$params['imageurl']\t= $args['image'];\r\n\t\t\t$params['message']\t= $args['text'];\r\n\t\t}elseif( $type == 'vkontakte'){\r\n\t\t\t$params['url']\t\t= $args['url'];\r\n\t\t}\r\n\r\n\t\t$param = '';\r\n\t\tforeach( $params as $k=>$v ) $param .= '&'.$k.'='.urlencode($v);\r\n\t\treturn $url.'?'.trim($param, '&');\r\n\t}", "public function isShareTypeAllowed($shareType);", "function mixtape_qodef_check_link_post_format_type(){\n\n\t\t$type = 'link';\n\n\t\tif ( mixtape_qodef_get_tweeter_post()){\n\t\t\t$type = 'twitter';\n\t\t} if (mixtape_qodef_get_instagram_post()){\n\t\t\t$type = 'instagram';\n\t\t}\n\n\t\treturn $type;\n\t}", "public function hasUrl(): bool;", "public function FacebookShareLink()\n {\n if (!$this->owner->hasMethod('AbsoluteLink')) {\n return false;\n }\n $pageURL = rawurlencode($this->owner->AbsoluteLink());\n\n return ($pageURL) ? \"https://www.facebook.com/sharer/sharer.php?u=$pageURL\" : false;\n }", "public function getShareImage()\n {\n preg_match(\"/\\/media\\/([0-9]*)/\", $this->getValue('MainContent'), $images);\n \n if (ctype_digit($images[1])) {\n return 'https://'.$_SERVER['SERVER_NAME'].'/media/thumbnail/'.$images[1].'/500x500/cropped/';\n } else {\n return false;\n }\n }", "public function TwitterShareLink()\n {\n if (!$this->owner->hasMethod('AbsoluteLink')) {\n return false;\n }\n $pageURL = rawurlencode($this->owner->AbsoluteLink());\n $text = rawurlencode($this->owner->getOGTitle());\n\n return ($pageURL) ? \"https://twitter.com/intent/tweet?text=$text&url=$pageURL\" : false;\n }", "static function share_enabled() {\n\t\t\t$enabled = self::get_option( self::$name . '_ui_share_enabled' );\n\t\t\tif ($enabled == '0') {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn self::get_option( self::$name . '_rpx_share_providers' );\n\t\t}", "public function slcr_social_media_url_check() {\n global $slcr_redux;\n $twitter_url = esc_url($slcr_redux['twitter-url']);\n $google_plus_url = esc_url($slcr_redux['google-plus-url']);\n $vimeo_url = esc_url($slcr_redux['vimeo-url']);\n $dribbble_url = esc_url($slcr_redux['dribbble-url']);\n $pinterest_url = esc_url($slcr_redux['pinterest-url']);\n $youtube_url = esc_url($slcr_redux['youtube-url']);\n $tumblr_url = esc_url($slcr_redux['tumblr-url']);\n $linkedin_url = esc_url($slcr_redux['linkedin-url']);\n $rss_url = esc_url($slcr_redux['rss-url']);\n $behance_url = esc_url($slcr_redux['behance-url']);\n $flickr_url = esc_url($slcr_redux['flickr-url']);\n $spotify_url = esc_url($slcr_redux['spotify-url']);\n $instagram_url = esc_url($slcr_redux['instagram-url']);\n $github_url = esc_url($slcr_redux['github-url']);\n $stackexchange_url = esc_url($slcr_redux['stackexchange-url']);\n $soundcloud_url = esc_url($slcr_redux['soundcloud-url']);\n $vk_url = esc_url($slcr_redux['vk-url']);\n $vine_url = esc_url($slcr_redux['vine-url']);\n $houzz_url = esc_url($slcr_redux['houzz-url']);\n $yelp_url = esc_url($slcr_redux['yelp-url']);\n $email_url = esc_url($slcr_redux['email-url']);\n $phone_url = esc_url($slcr_redux['phone-url']);\n $facebook_url = esc_url($slcr_redux['facebook-url']);\n if ($facebook_url == true || $twitter_url == true || $google_plus_url == true || $vimeo_url == true || $dribbble_url == true || $pinterest_url == true || $youtube_url == true || $tumblr_url == true || $linkedin_url == true || $rss_url == true || $behance_url == true || $flickr_url == true || $spotify_url == true || $instagram_url == true || $github_url == true || $stackexchange_url == true || $soundcloud_url == true || $vk_url == true || $vine_url == true || $houzz_url == true || $yelp_url == true || $email_url == true || $phone_url == true) { \n return \"1\";\n }else{ \n return \"0\"; \n } \n }", "function worx_share() {\n\n\t\t\treturn class_exists( 'TVA_Share' );\n\t\t\t\n\t\t}", "public function hasPublicUrl(): bool;", "public function isShareable();", "function set_share_link($link) {\r\n\t\t$this->share_link = urlencode($link); return true;\r\n\t}", "private function get_url()\n {\n switch (get_option('hb_sharegroop_mode')) {\n case 'test':\n return 'https://widget.sandbox.sharegroop.com/widget.js';\n case 'live':\n return 'https://widget.sharegroop.com/widget.js';\n }\n }", "public static function has_share( $context ) {\n\t\treturn apply_filters(\n\t 'wpv_has_share',\n\t ( wpv_get_option( \"share-$context-twitter\" ) || wpv_get_option( \"share-$context-facebook\" ) ||\n\t wpv_get_option( \"share-$context-googleplus\" ) || wpv_get_option( \"share-$context-pinterest\" ) ),\n\t $context\n\t\t);\n\t}", "function hasSharePermission()\n \t{\n \treturn $this->perms_map[\"share\"];\n \t}", "function checkOEmbedUrl($url) {\n\n $parsedUrl = parse_url($url);\n $domain = str_replace('www.','',$parsedUrl['host']);\n \n switch ($domain) { \n \n case 'youtube.com':\n return true;\n break;\n \n case 'm.youtube.com':\n return true;\n break;\n \n case 'flickr.com':\n return true;\n break;\n \n case 'm.flickr.com':\n return true;\n break;\n \n /*case 'viddler.com':\n return true;\n break;*/\n \n case 'vimeo.com':\n return true;\n break;\n \n case 'dribbble.com':\n return true;\n break;\n \n case 'drbl.in':\n return true;\n break;\n \n case 'instagr.am':\n return true;\n break;\n \n case 'instagram.com':\n return true;\n break;\n \n /*case 'amazon.com':\n return true;\n break;\n \n case 'amzn.com':\n return true;\n break;*/\n \n case 'twitpic.com':\n return true;\n break;\n \n case 'speakerdeck.com':\n return true;\n break;\n \n case 'slideshare.net':\n return true;\n break;\n \n case 'skitch.com':\n return true;\n break;\n \n case 'img.skitch.com':\n return true;\n break;\n \n case 'gist.github.com':\n return true;\n break;\n \n case 'huffduffer.com':\n return true;\n break;\n \n case 'soundcloud.com':\n return true;\n break;\n \n case 'ted.com':\n return true;\n break;\n \n /*case 'wikipedia.org':\n return true;\n break;\n \n case 'en.wikipedia.org':\n return true;\n break;*/\n \n default:\n return false;\n break;\n \n }\nreturn false;\n}", "public function isSocial()\n {\n $user_data = $this->getUserData();\n if (empty($user_data)) {\n return null;\n } else {\n return $user_data['fb_share'] && $this->hasFb() ? true : false;\n }\n }", "public function get_url ()\n\t{\n\t\treturn FALSE;\n\t}", "public function isUrl() {\n return PortableStringProcesser::isUrl($this->_s);\n }", "public function PinterestShareLink()\n {\n $pinImage = ($this->owner->hasMethod('getPinterestImage')) ? $this->owner->getPinterestImage() : $this->owner->getOGImage();\n if ($pinImage) {\n // OGImage may be an Image object or an absolute URL\n $imageURL = rawurlencode((is_string($pinImage)) ? $pinImage : $pinImage->getAbsoluteURL());\n $pageURL = rawurlencode($this->owner->AbsoluteLink());\n $description = rawurlencode($this->owner->getOGTitle());\n // Combine Title, link and image in to rich link\n return \"http://www.pinterest.com/pin/create/button/?url=$pageURL&media=$imageURL&description=$description\";\n }\n\n return false;\n }", "function is_url($url){\n\n\tif (get_headers($url)){\n\t\t\n\t\treturn true;\t\n\t}\n\telse{\n\t\n\t\treturn false;\n\t}\n}", "private function is_on_url() {\n $scheme = empty($_SERVER[\"HTTPS\"]) ? \"http\" : \"https\" ;\n $host = $_SERVER[\"HTTP_HOST\"];\n $this_url = parse_url($this->url);\n return ($scheme == $this_url[\"scheme\"] && $host == $this_url[\"host\"]);\n }", "public function hasUrl()\n\t{\n\t\treturn false;\n\t}", "public function isShare(): bool\n {\n return $this->shared;\n }", "function share_button( $type='', $args=array() ){\r\n\t\t$url = share_check( $type );\r\n\t\tif( $url === FALSE ){\r\n\t\t\tlog_message( 'debug', 'Please check your type share_button('.$type.')' );\r\n\t\t\treturn \"#ERROR-check_share_button_type\";\r\n\t\t}\r\n\r\n\t\t$params = array();\r\n\t\t$param\t= '';\r\n\r\n\t\tif( $type == 'twitter'){\r\n\t\t\tif( isset($args['iframe']) ){\r\n\t\t\t\t$url = share_url( $type, $args );\r\n\t\t\t\tlist($url, $param) = explode('?', $url);\r\n\t\t\t\t$button = <<<DOT\r\n\t\t\t\t<iframe allowtransparency=\"true\" frameborder=\"0\" scrolling=\"no\" style=\"width:130px; height:50px;\"\r\n\t\t\t\tsrc=\"http://platform.twitter.com/widgets/tweet_button.html?{$param}\"></iframe>\r\nDOT;\r\n\t\t\t}else{\r\n\t\t\t\tforeach( explode(' ', 'url via text related count lang counturl') as $v ){\r\n\t\t\t\t\tif( isset($args[$v]) ) $params[] = 'data-'.$v.'=\"'.$args[$v].'\"';\r\n\t\t\t\t}\r\n\t\t\t\t$param = implode( ' ', $params );\r\n\t\t\t\t$button = <<<DOT\r\n\t\t\t\t<a href=\"http://twitter.com/share\" class=\"twitter-share-button\" {$param}>Tweet</a>\r\n\t\t\t\t<script type=\"text/javascript\" src=\"http://platform.twitter.com/widgets.js\"></script>\r\nDOT;\r\n\t\t\t}\r\n\t\t}elseif( $type == 'facebook' ){\r\n\t\t\tif( !isset($args['type']) ) $args['type'] = 'button_count';\r\n\t\t\tif( isset($args['fb']) ){\r\n\t\t\t\t$params = array( 'type'=>'type', 'href'=>'url', 'class'=>'class' );\r\n\t\t\t\tforeach( $params as $k=>$v ){\r\n\t\t\t\t\tif( isset($args[$v]) ) $param .= $k.'=\"'.$args[$v].'\"';\r\n\t\t\t\t}\r\n\t\t\t\t$button = \"<fb:share-button {$param}></fb:share-button>\";\r\n\t\t\t}else{\r\n\t\t\t\t$params = array( 'type'=>'type', 'share_url'=>'url' );\r\n\t\t\t\tforeach( $params as $k=>$v ){\r\n\t\t\t\t\tif( isset($args[$v]) ) $param .= $k.'=\"'.$args[$v].'\"';\r\n\t\t\t\t}\r\n\t\t\t\tif( !isset($args['button_text']) ) $args['button_text'] = 'Share to Facebook';\r\n\t\t\t\t$button = <<<DOT\r\n\t\t\t\t<a name=\"fb_share\" {$param}>{$args['button_text']}</a>\r\n\t\t\t\t<script src=\"http://static.ak.fbcdn.net/connect.php/js/FB.Share\" type=\"text/javascript\"></script>\r\nDOT;\r\n\t\t\t}\r\n\t\t}elseif( $type == 'buzz' ){\r\n\t\t\t$params = array( 'button-style'=>'type', 'local'=>'lang', 'url'=>'url', 'imageurl'=>'image');\r\n\t\t\tforeach( $params as $k=>$v ){\r\n\t\t\t\tif( isset($args[$v]) ) $param .= ' data-'.$k.'=\"'.$args[$v].'\"';\r\n\t\t\t}\r\n\t\t\tif( !isset($args['title']) ) $args['title'] = 'Share to Google Buzz';\r\n\t\t\t$button = <<<DOT\r\n\t\t\t<a title=\"{$args['title']}\" class=\"google-buzz-button\" href=\"http://www.google.com/buzz/post\" {$param}></a>\r\n\t\t\t<script type=\"text/javascript\" src=\"http://www.google.com/buzz/api/button.js\"></script>\r\nDOT;\r\n\t\t}elseif( $type == 'vkontakte' ){\r\n\t\t\t$url = isset($args['url']) ? '{url: \"'.$args['url'].'\"}' : 'false';\r\n\t\t\tforeach( explode(' ', 'type text') as $v ){\r\n\t\t\t\tif( isset($args[$v]) ) $param[] = $k.': \"'.urlencode($args[$v]).'\"';\r\n\t\t\t}\r\n\t\t\t$param = implode( ', ', $params );\r\n\t\t\tif( !empty($param) ) $param = ', {'.$param.'}';\r\n\t\t\t$button = <<<DOT\r\n\t\t\t<script type=\"text/javascript\" src=\"http://vkontakte.ru/js/api/share.js?9\" charset=\"windows-1251\"></script>\r\n\t\t\t<script type=\"text/javascript\">document.write(VK.Share.button({$url}{$param}));</script>\r\nDOT;\r\n\t\t}\r\n\t\treturn $button;\r\n\t}", "public function isDownload(): bool;", "public function shareUrlProvider()\n {\n return [[\"a string\"]];\n }", "public function getShareUrl($post);", "public function LinkedInShareLink()\n {\n if (!$this->owner->hasMethod('AbsoluteLink')) {\n return false;\n }\n $pageURL = rawurlencode($this->owner->AbsoluteLink());\n $title = rawurlencode($this->owner->getOGTitle());\n $description = rawurlencode($this->owner->getOGDescription());\n $source = rawurlencode($this->owner->getOGSiteName());\n\n return \"https://www.linkedin.com/shareArticle?mini=true&url=$pageURL&title=$title&summary=$description&source=$source\";\n }", "protected function checkForShare()\n {\n\n $ok = true;\n $doSaveResourceLink = true;\n\n $id = $this->resourceLink->primaryResourceLinkId;\n\n $shareRequest = isset($_POST['custom_share_key']) && !empty($_POST['custom_share_key']);\n if ($shareRequest) {\n if (!$this->allowSharing) {\n $ok = false;\n $this->reason = 'Your sharing request has been refused because sharing is not being permitted.';\n } else {\n// Check if this is a new share key\n $shareKey = new ResourceLinkShareKey($this->resourceLink, $_POST['custom_share_key']);\n if (!is_null($shareKey->primaryConsumerKey) && !is_null($shareKey->primaryResourceLinkId)) {\n// Update resource link with sharing primary resource link details\n $key = $shareKey->primaryConsumerKey;\n $id = $shareKey->primaryResourceLinkId;\n $ok = ($key !== $this->consumer->getKey()) || ($id != $this->resourceLink->getId());\n if ($ok) {\n $this->resourceLink->primaryConsumerKey = $key;\n $this->resourceLink->primaryResourceLinkId = $id;\n $this->resourceLink->shareApproved = $shareKey->autoApprove;\n $ok = $this->resourceLink->save();\n if ($ok) {\n $doSaveResourceLink = false;\n $this->user->getResourceLink()->primaryConsumerKey = $key;\n $this->user->getResourceLink()->primaryResourceLinkId = $id;\n $this->user->getResourceLink()->shareApproved = $shareKey->autoApprove;\n $this->user->getResourceLink()->updated = time();\n// Remove share key\n $shareKey->delete();\n } else {\n $this->reason = 'An error occurred initialising your share arrangement.';\n }\n } else {\n $this->reason = 'It is not possible to share your resource link with yourself.';\n }\n }\n if ($ok) {\n $ok = !is_null($key);\n if (!$ok) {\n $this->reason = 'You have requested to share a resource link but none is available.';\n } else {\n $ok = (!is_null($this->user->getResourceLink()->shareApproved) && $this->user->getResourceLink()->shareApproved);\n if (!$ok) {\n $this->reason = 'Your share request is waiting to be approved.';\n }\n }\n }\n }\n } else {\n// Check no share is in place\n $ok = is_null($id);\n if (!$ok) {\n $this->reason = 'You have not requested to share a resource link but an arrangement is currently in place.';\n }\n }\n\n// Look up primary resource link\n if ($ok && !is_null($id)) {\n $consumer = new ToolConsumer($key, $this->dataConnector);\n $ok = !is_null($consumer->created);\n if ($ok) {\n $resourceLink = ResourceLink::fromConsumer($consumer, $id);\n $ok = !is_null($resourceLink->created);\n }\n if ($ok) {\n if ($doSaveResourceLink) {\n $this->resourceLink->save();\n }\n $this->resourceLink = $resourceLink;\n } else {\n $this->reason = 'Unable to load resource link being shared.';\n }\n }\n\n return $ok;\n\n }", "function rp_gpo_home_share () {\r\n $output = rp_social_share(network_site_url());\r\n echo $output;\r\n}", "private function _URLexists()\r\n {\r\n $urlHeaders = get_headers($this->_urlInFull);\r\n if (!$urlHeaders || $urlHeaders[0] == 'HTTP/1.1 404 Not Found') {\r\n $exists = false;\r\n } else {\r\n $exists = true;\r\n } \r\n return $exists;\r\n }", "function cellular_social_media_share() {\n if (theme_get_setting('social_media_share') === 1) {\n global $base_url;\n $set = cellular_sm_settings('share');\n $output = '';\n $page = array(\n 'url' => $base_url . '/' . current_path(),\n 'title' => drupal_get_title(),\n );\n $block_title = theme_get_setting('sm_share_title');\n $media_block = array(\n 'title' => !empty($block_title) ? \"<h3>$block_title</h3>\\n\" : '',\n 'id' => 'social-media-share',\n 'link_class' => 'social icon',\n 'link_text' => 'Share this page on ',\n );\n\n $links = array();\n $set['google'] === 1 ? $links['google+'] = array(\n 'name' => 'Google+',\n 'script' => NULL,\n 'url' => 'http://plus.google.com/share?url=' . $page['url'],\n 'class' => 'google',\n ) : NULL;\n $set['twitter'] === 1 ? $links['twitter'] = array(\n 'name' => 'Twitter',\n 'script' => NULL,\n 'url' => 'https://twitter.com/share',\n 'class' => 'twitter-bird',\n ) : NULL;\n $set['linkedin'] === 1 ? $links['linkedin'] = array(\n 'name' => 'LinkedIn',\n 'url' => 'http://www.linkedin.com/shareArticle?mini=true&url=' .\n $page['url'] . '&title=' . $page['title'] . '&source=' . $base_url,\n 'class' => 'linkedin',\n ) : NULL;\n $set['pinterest'] === 1 ? $links['pinterest'] = array(\n 'name' => 'Pinterest',\n 'url' => 'http://pinterest.com/pin/create/bookmarklet/?media=&url=' .\n $page['url'] . '&is_video=false&description=' . $page['title'],\n 'class' => 'pinterest',\n ) : NULL;\n $set['reddit'] === 1 ? $links['reddit'] = array(\n 'name' => 'Reddit',\n 'url' => 'http://www.reddit.com/submit?url=' . $page['url'],\n 'class' => 'reddit',\n ) : NULL;\n\n if ($set['fb'] === 1) {\n // Set variables to appease PAReview.\n $fbscript = '(function(d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0];\n if (d.getElementById(id)) return;\n js = d.createElement(s); js.id = id;\n js.src = \"//connect.facebook.net/en_US/all.js#xfbml=1\";\n fjs.parentNode.insertBefore(js, fjs);\n }(document, \\'script\\', \\'facebook-jssdk\\'));';\n $fbtag = '<div class=\"fb-like\" data-href=\"' . $page['url'] . '\"\n data-layout=\"button\" data-action=\"like\" data-show-faces=\"false\"\n data-share=\"true\"></div><div id=\"fb-root\"></div>';\n\n $links['facebook'] = array(\n // Facebook javascript.\n 'script' => $fbscript,\n // Set fb markup.\n 'tag' => $fbtag,\n // Push script to end of body.\n 'weight' => 1000,\n );\n }\n\n $content = cellular_build_links($links, $media_block);\n\n if (!empty($content)) {\n $output .= \"\\n<div id=\\\"\" . $media_block['id'] . \"\\\">\\n\";\n $output .= $media_block['title'] . $content . \"\\n</div>\\n\";\n }\n\n return $output;\n }\n}", "public function hasUrl(){\n return $this->_has(5);\n }", "public static function get_share($unc) {\n\t\t$unc = self::_remove_file_scheme($unc);\n\t\t$count = self::_count_leading_slashes($unc);\n\t\tif ($count != 2) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\t$parts = self::_explode_path($unc);\n\t\t\tif (count($parts) > 1) {\n\t\t\t\treturn $parts[1];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "private function url()\n {\n if (filter_var($data, FILTER_VALIDATE_URL)) {\n return true;\n }else {\n return $data . 'is not a valid url';\n }\n }", "public function getShareType()\n {\n return isset($this->share_type) ? $this->share_type : '';\n }", "function share_url(Model_Blog_Post $post);", "function mace_vp_get_url_type( $url ) {\n\t$type_regex = mace_vp_get_video_type_regex();\n\n\tforeach ( $type_regex as $type => $regex ) {\n\t\tif ( preg_match( $regex, $url ) ) {\n\t\t\treturn $type;\n\t\t}\n\t}\n\n\t// Self-hosted?\n\tif ( false !== strpos( $url, get_home_url() ) ) {\n\t\treturn 'SelfHosted';\n\t}\n\n\treturn false;\n}", "function url_exists($url) \n\t\t{\n\t\t $mylinks=$url;\n\t\t\t$handlerr = curl_init($mylinks);\n\t\t\tcurl_setopt($handlerr, CURLOPT_RETURNTRANSFER, TRUE);\n\t\t\t$resp = curl_exec($handlerr);\n\t\t\t$ht = curl_getinfo($handlerr, CURLINFO_HTTP_CODE);\n\n\t\t\t// echo \"$ht\";\n\n\t\t\tif ($ht == '404' or empty($ht) )\n\t\t\t{ \n\t\t\t\t// echo 'not online';\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse \n\t\t\t{ \n\t\t\t\t// echo 'online';\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}", "public function getShareUrl(){\n\t\treturn $this->_baseUrl.\n\t\t'?url='.urlencode($this->getUrl()).\n\t\t'&title='.urlencode($this->getTitle()).\n\t\t'&description='.urlencode($this->getDescription())\n\t\t;\n\t}", "function w3_is_url($url) {\n return preg_match('~^(https?:)?//~', $url);\n}", "function vantage_premium_show_social_share(){\n\tif( siteorigin_setting('social_share_post') && is_single() ) {\n\t\tsiteorigin_share_render( array(\n\t\t\t'twitter' => siteorigin_setting('social_twitter'),\n\t\t) );\n\t}\n}", "function _EmbedVideo()\r\n{\r\n return ((get_option('sharingrule', 1) == 1) || is_moderator());\r\n}", "public function GetShareServiceUrl() {\t\t\r\r\n\t\t$queryStringArray = array(\r\r\n\t\t\t\"url\" => $this->GetUrl(),\r\r\n\t\t\t\"title\" => $this->GetTitle(),\r\r\n\t\t\t\"bodytext\" => $this->GetDescription()\r\r\n\t\t);\r\r\n\t\t\r\r\n\t\tif(!empty($this->media)){\r\r\n\t\t\t$queryStringArray[\"media\"] = $this->media;\r\r\n\t\t}\r\r\n\t\t\r\r\n\t\tif(!empty($this->topic)){\r\r\n\t\t\t$queryStringArray[\"topic\"] = $this->topic;\r\r\n\t\t}\r\r\n\r\r\n\t\t\r\r\n\t\treturn $this->GetBasicShareServiceUrl() . http_build_query($queryStringArray);\r\r\n\t}", "function wpai_feed_type( $type, $url ){\n}", "function _check_url_remote( $url )\n{\n\treturn $this->class_snoopy->fetch( $url );\n}", "protected function isLink() {}", "public function shareFacebook()\n {\n return 'http://'\n . $_SERVER['HTTP_HOST']\n . $_SERVER['REQUEST_URI'];\n\n }", "public function exists()\n\t{\n\t\tif(!parse_url($this->file, PHP_URL_SCHEME))\n\t\t{\n\t\t\tif(!file_exists($path = ($this->source . DS . $this->file)))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->external = true;\n\t\t}\n\n\t\treturn true;\n\t}", "public function hasUrl()\n {\n return isset($this->oHttpUrl) && $this->oHttpUrl instanceof Url;\n }", "protected function hasUrl()\n {\n return !empty($this->getUrl());\n }", "public function hasImageUri(){\n return $this->_has(2);\n }", "public function destinationUrlCheck($url)\n {\n $count = 0;\n $protocols = array('http://', 'https://', 'ftp://', 'mailto:');\n foreach ($protocols as $protocol) {\n if (substr($url, 0, strlen($protocol)) !== $protocol)\n $count++;\n }\n if (count($protocols) == $count) {\n if ($url == \"baseurl\") {\n $url = Mage::getUrl();\n } else {\n $url = Mage::getUrl() . $url;\n }\n }\n return $url;\n }", "function url_exists($url){ \n $url_data = parse_url($url); // scheme, host, port, path, query\n if(!fsockopen($url_data['host'], isset($url_data['port']) ? $url_data['port'] : 80)){\n $this->set_message('url_exists', 'The URL you entered is not accessible.');\n return FALSE;\n } \n \n return TRUE;\n }", "function rp_gpo_share ($text = null, $url = null) {\r\n $output = rp_social_share($url, $text);\r\n echo $output;\r\n}", "function any_url_exists_alt($url){\n\treturn (@fopen($url,\"r\") == true);\n}", "public function isFacebook() {}", "function is_url($url) {\r\n return (preg_match(\",^https*://,\",$url) > 0);\r\n}", "public function checkUrlExists($url);", "protected function _updateUrl()\r\n\t{\r\n\t\t$update\t=\t$this->getUpdate();\r\n\t\tif ( $update == null ) return false;\r\n\t\treturn ( isset ( $update->downloads->downloadurl->value ) ? $update->downloads->downloadurl->value : false );\r\n\t}", "private function url_exists( $url = NULL ) {\n\n if(empty($url)){\n return false;\n }\n\n $ch = curl_init( $url );\n\n //Establecer un tiempo de espera\n curl_setopt( $ch, CURLOPT_TIMEOUT, 5 );\n curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 5 );\n\n //establecer NOBODY en true para hacer una solicitud tipo HEAD\n curl_setopt( $ch, CURLOPT_NOBODY, true );\n //Permitir seguir redireccionamientos\n curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );\n //recibir la respuesta como string, no output\n curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );\n\n $data = curl_exec( $ch );\n\n //Obtener el código de respuesta\n $httpcode = curl_getinfo( $ch, CURLINFO_HTTP_CODE );\n //cerrar conexión\n curl_close( $ch );\n\n //Aceptar solo respuesta 200 (Ok), 301 (redirección permanente) o 302 (redirección temporal)\n $accepted_response = array( 200, 301, 302 );\n\n if( in_array( $httpcode, $accepted_response ) ) {\n\n return true;\n\n } else {\n\n return false;\n\n }\n }", "public function isShared($type);", "public static function isWebPMediaUsed(): bool {}", "private function url_exists( $url = NULL ) {\n\n if(empty($url)){\n return false;\n }\n\n $ch = curl_init( $url );\n\n //Establecer un tiempo de espera\n curl_setopt( $ch, CURLOPT_TIMEOUT, 5 );\n curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, 5 );\n\n //establecer NOBODY en true para hacer una solicitud tipo HEAD\n curl_setopt( $ch, CURLOPT_NOBODY, true );\n //Permitir seguir redireccionamientos\n curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );\n //recibir la respuesta como string, no output\n curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );\n\n $data = curl_exec( $ch );\n\n //Obtener el código de respuesta\n $httpcode = curl_getinfo( $ch, CURLINFO_HTTP_CODE );\n //cerrar conexión\n curl_close( $ch );\n\n //Aceptar solo respuesta 200 (Ok), 301 (redirección permanente) o 302 (redirección temporal)\n $accepted_response = array( 200, 301, 302 );\n\n if( in_array( $httpcode, $accepted_response ) ) {\n\n return true;\n\n } else {\n\n return false;\n\n }\n\n }", "function isURLValid($origURL)\r\n {\r\n $curl = curl_init($origURL);\r\n // Use curl_setopt() to set an option for cURL transfer\r\n curl_setopt($curl, CURLOPT_NOBODY, true);\r\n // Use curl_exec() to perform cURL session\r\n $result = curl_exec($curl);\r\n if ($result !== false) \r\n { \r\n // Use curl_getinfo() to get information\r\n // regarding a specific transfer\r\n $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE); \r\n if ($statusCode == 404)\r\n {\r\n echo (\"INVALID OR BLANK URL: $origURL, CANNOT CONVERT!<br>\");\r\n return FALSE;\r\n }\r\n else\r\n {\r\n echo \"URL $origURL OK!<br>\";\r\n return TRUE;\r\n }\r\n }\r\n else \r\n {\r\n echo (\"INVALID OR BLANK URL $origURL, CANNOT CONVERT!<br>\");\r\n return FALSE;\r\n }\r\n}", "public function share (\n\t)\t\t\t\t\t// RETURNS <bool> TRUE on success, FALSE on failure.\n\t\n\t// $contentTrack->share();\n\t{\n\t\tif($this->userShared) { return true; }\n\t\t\n\t\t$this->userShared = true;\n\t\t\n\t\tDatabase::startTransaction();\n\t\t\n\t\tif($pass = Database::query(\"UPDATE content_tracking_users SET shared=? WHERE uni_id=? AND content_id=? LIMIT 1\", array(1, $this->uniID, $this->contentID)))\n\t\t{\n\t\t\t$pass = Database::query(\"UPDATE content_tracking SET shared=shared+? WHERE content_id=? LIMIT 1\", array(1, $this->contentID));\n\t\t}\n\t\t\n\t\tif(Database::endTransaction($pass))\n\t\t{\n\t\t\t$this->updateRating();\n\t\t}\n\t\t\n\t\treturn $pass;\n\t}", "function is_stream( $url ) {\n\treturn strpos( $url, 'type=get_live_streams' ) !== false || strpos( $url, 'type=get_vod_streams' ) !== false;\n}", "function social_share($meta, $entry, $id) {\n\n\t\t$social_share_debug = false;\n\n\t\t// Social share setting\n\t\tif(isset($meta['settings']['socialshare'])):\n\n\t\t\t$contest_content_holder = \"\"; \n\n\t\t\t// Setup 0 counts\n\t\t\t$count = array(\n\t\t\t\t'twitter' => 0,\n\t\t\t\t'facebook' => 0,\n\t\t\t\t'googleplus' => 0,\n\t\t\t\t'pinterest' => 0\n\t\t\t);\n\n\t\t\t// Build the url for the entry\n\t\t\t$entryURL = get_permalink( $id ) . \"?entryid=\" . $entry['entryID'];\n\t\t\t// $entryURL = 'http://google.com'; // testing\n\t\t\t//Encode url for use on some api's\n\t\t\t$entryURLencoded = urlencode($entryURL);\n\t\t\t$shortenedURL = $entryURL;\n\nif(!$social_share_debug):\n\n\t\t\t// make sure that cURL is enabeled\n\t\t\tif ( in_array('curl', get_loaded_extensions()) ):\n\t\t\t\t// ==================================================\n\t\t\t\t// ---------------- General cURL --------------------\n\t\t\t\t// ==================================================\n\t\t\t\t$curlObj = curl_init();\n\t\t\t\tcurl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1);\n\t\t\t\tcurl_setopt($curlObj, CURLOPT_SSL_VERIFYPEER, 0);\n\t\t\t\tcurl_setopt($curlObj, CURLOPT_HEADER, 0);\n\t\t\t\tcurl_setopt($curlObj, CURLOPT_HTTPHEADER, array('Content-type:application/json'));\n\t\t\t\tcurl_setopt($curlObj, CURLOPT_POST, 1);\n\t\t\t\tcurl_setopt($curlObj,CURLOPT_CONNECTTIMEOUT, 5);\n\n\t\t\t\t// ==================================================\n\t\t\t\t// ------------ Get shortened url -------------------\n\t\t\t\t// ==================================================\n\t\t\t\tif(isset($meta['settings']['ssshortenedlink'])):\n\n\t\t\t\t\t$apiKey = 'AIzaSyApBUGmbUj5tYojIzL-Nep7fS9JoDQOMLM';\n\t\t\t\t\t$postData = array('longUrl' => $entryURL, 'key' => $apiKey);\n\t\t\t\t\t$jsonData = json_encode($postData);\n\t\t\t\t\tcurl_setopt($curlObj, CURLOPT_URL, 'https://www.googleapis.com/urlshortener/v1/url');\n\t\t\t\t\tcurl_setopt($curlObj, CURLOPT_POSTFIELDS, $jsonData);\n\n\t\t\t\t\t$response = curl_exec($curlObj);\n\t\t\t\t\t//change the response json string to object\n\t\t\t\t\t$json = json_decode($response);\n\t\t\t\t\t// Set out variable\n\t\t\t\t\tif(isset($json->id)) $shortenedURL = $json->id;\n\n\t\t\t\tendif; // end shortened link\n\n\t\t\t\t// Setup for rest of requests\n\t\t\t\tcurl_setopt($curlObj, CURLOPT_POSTFIELDS, \"\");\n\t\t\t\tcurl_setopt($curlObj, CURLOPT_POST, 0);\n\n\t\t\t\t// ==================================================\n\t\t\t\t// ------------ Get twitter count -------------------\n\t\t\t\t// ==================================================\n\t\t\t\tif(isset($meta['settings']['sstwitter'])):\n\t\t\t\t\t\n\t\t\t\t\tcurl_setopt($curlObj, CURLOPT_URL, 'http://urls.api.twitter.com/1/urls/count.json?url=' . $entryURLencoded);\n\n\t\t\t\t\t$response = curl_exec($curlObj);\n\t\t\t\t\t$json = json_decode($response);\n\n\t\t\t\t\tif(isset($json->count)) $count['twitter'] = $json->count;\n\n\t\t\t\tendif; // end twitter\n\n\t\t\t\t// ==================================================\n\t\t\t\t// ------------ Get facebook count ------------------\n\t\t\t\t// ==================================================\n\t\t\t\tif(isset($meta['settings']['ssfacebook'])):\n\t\t\t\t\tcurl_setopt($curlObj, CURLOPT_URL, \"http://graph.facebook.com/fql?q=SELECT%20url,%20total_count%20FROM%20link_stat%20WHERE%20url='\".$entryURLencoded.\"'\");\n\n\t\t\t\t\t$response = curl_exec($curlObj);\n\t\t\t\t\t$json = json_decode($response);\n\n\t\t\t\t\tif(isset($json->data[0]->total_count)) $count['facebook'] = $json->data[0]->total_count;\n\t\t\t\tendif; // end facebook\n\n\t\t\t\t// ==================================================\n\t\t\t\t// ------------ Get pinterest count -----------------\n\t\t\t\t// ==================================================\n\t\t\t\tif(isset($meta['settings']['sspinterest'])):\n\t\t\t\t\tcurl_setopt($curlObj, CURLOPT_URL, 'http://api.pinterest.com/v1/urls/count.json?url='.$entryURLencoded);\n\n\t\t\t\t\t$response = curl_exec($curlObj);\n\t\t\t\t\t$json_string = preg_replace('/^receiveCount\\((.*)\\)$/', \"\\\\1\", $response);\n\t\t\t\t\t$json = json_decode($json_string);\n\n\t\t\t\t\tif(isset($json->count)) $count['pinterest'] = intval($json->count);\n\t\t\t\tendif; // end pinterest\n\n\t\t\t\t// ==================================================\n\t\t\t\t// ------------ Get google+ count ------------------\n\t\t\t\t// ==================================================\n\t\t\t\tif(isset($meta['settings']['ssgoogleplus'])):\n\t\t\t\t\tcurl_setopt($curlObj, CURLOPT_URL, \"https://clients6.google.com/rpc?key=AIzaSyCKSbrvQasunBoV16zDH9R33D88CeLr9gQ\");\n\t\t\t\t\tcurl_setopt($curlObj, CURLOPT_POST, 1);\n\t\t\t\t\tcurl_setopt($curlObj, CURLOPT_RETURNTRANSFER, true);\n\t\t\t\t\tcurl_setopt($curlObj, CURLOPT_POSTFIELDS, '[{\"method\":\"pos.plusones.get\",\"id\":\"p\",\"params\":{\"nolog\":true,\"id\":\"' . $entryURL . '\",\"source\":\"widget\",\"userId\":\"@viewer\",\"groupId\":\"@self\"},\"jsonrpc\":\"2.0\",\"key\":\"p\",\"apiVersion\":\"v1\"}]');\n\n\t\t\t\t\t$response = curl_exec($curlObj);\n\t\t\t\t\t$json = json_decode($response, true);\n\n\t\t\t\t\tif(isset($json[0]['result']['metadata']['globalCounts']['count'])) $count['googleplus'] = intval($json[0]['result']['metadata']['globalCounts']['count']);\n\n\t\t\t\tendif; // end google+\n\n\t\t\t\t// Close cURL\n\t\t\t\tcurl_close($curlObj);\n\n\t\t\tendif; // end cURL check\n\n\t\t\t// Format numbers\n\t\t\tforeach($count as $s => $n){\n\t\t\t\tif ($n < 1000) {\n\t\t\t\t\t // Anything less than a million\n\t\t\t\t\t $n_format = number_format($n);\n\t\t\t\t}else if ($n < 1000000){\n\t\t\t\t\t// Anthing less than a thousand\n\t\t\t\t\tif($n > 10000){\n\t\t\t\t\t\t$n_format = number_format($n / 10000, 0) . 'K';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$n_format = number_format($n / 10000, 1) . 'K';\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t} else if ($n < 1000000000) {\n\t\t\t\t\t // Anything less than a billion\n\t\t\t\t\t if($n < 10000000){\n\t\t\t\t\t $n_format = number_format($n / 1000000, 1) . 'M';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$n_format = number_format($n / 1000000, 0) . 'M';\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t // At least a billion\n\t\t\t\t\t $n_format = number_format($n / 1000000000, 0) . 'B';\n\t\t\t\t}\n\t\t\t\t$count[$s] = $n_format;\n\t\t\t}\nendif;\n\n\t\t\t// Share vars\n\t\t\tif( !empty($entry['img_url']) ){\n\t\t\t\t$shareImage = urlencode($entry['img_url']);\n\t\t\t}elseif( is_numeric($thumbID = get_post_thumbnail_id($id)) ){\n\t\t\t\t$shareImage = urlencode(wp_get_attachment_url( $thumbID ));\n\t\t\t}else{\n\t\t\t\t$shareImage = \"\";\n\t\t\t}\n\t\t\t// Set the title\n\t\t\tif( !empty($entry['entryTitle']) ){\n\t\t\t\t$shareTitle = urlencode($entry['entryTitle']);\n\t\t\t}else{\n\t\t\t\t$shareTitle = urlencode(get_the_title($id));\n\t\t\t}\n\t\t\t// Share summary message\n\t\t\tif(isset($meta['settings']['sharedesc']) & !empty($meta['settings']['sharedesc'])){\n\t\t\t\t$shareSummary = urlencode($meta['settings']['sharedesc']);\n\t\t\t}else{\n\t\t\t\t$shareSummary = \"\";\n\t\t\t}\n\n\t\t\t\t\n\t\t\t$contest_content_holder .= '<div class=\"meta-act\">';\n\t\t\t\t$contest_content_holder .= '<div class=\"meta-share\">';\n\t\t\t\t\t$contest_content_holder .= '<a href=\"#\" class=\"share-button\"><span class=\"share-icons social-share-icon-share\"></span>Share</a>';\n\t\t\t\t$contest_content_holder .= '</div>'; // end meta-share\n\n\t\t\t\t$contest_content_holder .= '<div class=\"share-links\">';\n\t\t\t\t\t$contest_content_holder .= '<div class=\"group\">';\n\t\t\t\t\t\n\t\t\t\t\tif(isset($meta['settings']['sstwitter'])):\n\t\t\t\t\t\t$twitterShareJS = \"http://twitter.com/intent/tweet?url=\".$entryURLencoded.\"&text=\".$shareTitle;\n\n\t\t\t\t\t\t$dataholder = \"data-url='{$twitterShareJS}' data-h='275' data-w='600' data-popname='Tweet'\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t$contest_content_holder .= '<a href=\"javascript:void(0)\" ' . $dataholder . ' alt=\"Tweet\" class=\"share-button-popup share-button-twitter meta-share-wrap\">';\n\t\t\t\t\t\t\t\t$contest_content_holder .= '<span class=\"share-icons social-share-icon-twitter\" aria-hidden=\"true\"></span><span class=\"social-count\">' . $count['twitter'] . '</span>';\n\t\t\t\t\t\t$contest_content_holder .= '</a>';\n\t\t\t\t\tendif; // End twitter\n\n\n\t\t\t\t\tif(isset($meta['settings']['ssfacebook'])):\n\n\t\t\t\t\t\t$fbShareJS = \"http://www.facebook.com/sharer.php?s=100&amp;\";\n\t\t\t\t\t\t$fbShareJS .= \"p[title]={$shareTitle}&amp;\";\n\t\t\t\t\t\t$fbShareJS .= \"p[summary]={$shareSummary}&amp;\";\n\t\t\t\t\t\t$fbShareJS .= \"p[url]={$entryURLencoded}&amp;\";\n\t\t\t\t\t\t$fbShareJS .= \"p[images][0]={$shareImage}\";\n\n\t\t\t\t\t\t$dataholder = \"data-url='{$fbShareJS}' data-h='436' data-w='626' data-popname='sharer'\";\n\n\t\t\t\t\t\t$contest_content_holder .= '<a href=\"javascript:void(0)\" ' . $dataholder . ' alt=\"Share on Facebook\" class=\"share-button-popup share-button-fb meta-share-wrap\">';\n\t\t\t\t\t\t\t$contest_content_holder .= '<span class=\"share-icons social-share-icon-facebook\"></span><span class=\"social-count\">' . $count['facebook'] . '</span>';\n\t\t\t\t\t\t$contest_content_holder .= '</a>';\n\t\t\t\t\t\t\t\n\t\t\t\t\tendif; // End facebook\n\t\t\n\n\t\t\t\t\tif(isset($meta['settings']['ssgoogleplus'])):\n\n\t\t\t\t\t\t$gplusShareJS = \"https://plus.google.com/share?url={$entryURLencoded}\";\n\n\t\t\t\t\t\t$dataholder = \"data-url='{$gplusShareJS}' data-h='500' data-w='700' data-popname='Plus One'\";\n\t\t\t\t\t\n\t\t\t\t\t\t$contest_content_holder .= '<a href=\"javascript:void(0)\" ' . $dataholder . ' alt=\"Share on Google+\" class=\"share-button-popup share-button-gp meta-share-wrap\">';\n\t\t\t\t\t\t\t$contest_content_holder .= '<span class=\"share-icons social-share-icon-google-plus\"></span><span class=\"social-count\">' . $count['googleplus'] . '</span>';\n\t\t\t\t\t\t$contest_content_holder .= '</a>';\n\t\t\t\t\tendif; // end google plus\n\n\n\t\t\t\t\tif(isset($meta['settings']['sspinterest'])):\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$pinShareJS = \"http://pinterest.com/pin/create/button/?url={$entryURLencoded}&media={$shareImage}\";\n\n\t\t\t\t\t\t$dataholder = \"data-url='{$pinShareJS}' data-h='270' data-w='630' data-popname='Pinterest'\";\n\n\t\t\t\t\t\t$contest_content_holder .= '<a href=\"javascript:void(0)\" ' . $dataholder . ' alt=\"Pin it\" class=\"share-button-popup share-button-pin meta-share-wrap\">';\n\t\t\t\t\t\t\t$contest_content_holder .= '<span class=\"share-icons social-share-icon-pinterest\"></span><span class=\"social-count\">' . $count['pinterest'] . '</span>';\n\t\t\t\t\t\t$contest_content_holder .= '</a>';\n\t\t\t\t\tendif; // end pinterest\n\t\t\t\t\t\n\n\t\t\t\t\tif(isset($meta['settings']['ssshortenedlink'])):\n\t\t\t\t\t\t$contest_content_holder .= '<div class=\"meta-link\" style=\"float: left;\">';\n\t\t\t\t\t\t\t$contest_content_holder .= '<span class=\"share-icons social-share-icon-link\"></span>';\n\t\t\t\t\t\t\t$contest_content_holder .= '<input type=\"url\" class=\"share-form-url\" value=\"' . $shortenedURL . '\" readonly=\"\">';\n\t\t\t\t\t\t\t$contest_content_holder .= '<a class=\"meta-short-url meta-link-text\" href=\"' . $shortenedURL . '\" >' . $shortenedURL . '</a>';\n\t\t\t\t\t\t$contest_content_holder .= '</div>';\n\t\t\t\t\tendif; // end shortened link\n\n\t\t\t\t$contest_content_holder .= '</div></div></div>';\n\n\t\t\t\treturn $contest_content_holder;\n\n\t\t\tendif; // end social share setting\n\n\t}", "static function url_exists($url)\n {\n $fp = curl_init($url);\n if (!$fp) return false;\n return true;\n }", "function ext_isLinkable($v)\t{\n\t\t$webpath=t3lib_BEfunc::getPathType_web_nonweb($v['path']);\n\t\tif ($GLOBALS['SOBE']->act=='magic') return 1;\t//$webpath='web';\t// The web/non-web path does not matter if the mode is 'magic'\n\n\t\tif (strstr($v['path'],'_recycler_') || strstr($v['path'],'_temp_') || $webpath!='web')\t{\n\t\t\treturn 0;\n\t\t}\n\t\treturn 1;\n\t}", "public function hasUrl()\n {\n return $this->url !== null;\n }", "public function url($type, $url)\r\n\t{\r\n\t\t/* set the fallback of the url for non premium users */\r\n\t\t$fallback = page('membership');\r\n\t\t/* get logged in user */\r\n\t\t$user = new user_info();\r\n\t\t/* store the premium status */\r\n\t\t$premium = $user->premium;\r\n\t\tswitch ($type) {\r\n\t\t\t/* friend request is not active to non premium members */\r\n\t\t\tcase 'friend-request':\r\n\t\t\t\t\t/* check for premium and do the fallback */\r\n\t\t\t\t\tif(!$premium) :\r\n\t\t\t\t\t\t$url = $fallback;\r\n\t\t\t\t\tendif;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'meeting':\r\n\t\t\t\t\t/* check for premium and do the fallback */\r\n\t\t\t\t\tif(!$premium) :\r\n\t\t\t\t\t\t$url = $fallback;\r\n\t\t\t\t\tendif;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'user-message':\r\n\t\t\t\t\t/* check for premium and do the fallback */\r\n\t\t\t\t\tif(!$premium) :\r\n\t\t\t\t\t\t$url = $fallback;\r\n\t\t\t\t\tendif;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t\tif(!$premium) :\r\n\t\t\t\t\t\t$url = $fallback;\r\n\t\t\t\t\telse:\r\n\t\t\t\t\t\t$url = $url;\r\n\t\t\t\t\tendif;\r\n\t\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn $url;\r\n\t}", "public function isShare($id){\n \n $share = $this->_model::where('user_id',Auth::id())\n ->where('post_id',$id)->first();\n return !is_null($share);\n }", "function url_exists($url){\n $check = @fopen($url, 'r');\n if ($check)\n {\n return true;\n }\n return false;\n}", "function get_share_action_url($provider, $guid = 0, $referrer = '') {\r\n\r\n\treturn elgg_http_add_url_query_elements(elgg_normalize_url('action/discovery/share'), array(\r\n\t\t'provider' => $provider,\r\n\t\t'guid' => $guid,\r\n\t\t'referrer' => $referrer\r\n\t));\r\n}", "public function URLIsCompatible() : bool;", "function wc_is_external_resource($url)\n {\n }", "public function hasUrl($item) {\n return isset($item['url']);\n }", "public function sitestoreproductGutterShare() {\n if (!Engine_Api::_()->core()->hasSubject('sitestoreproduct_product')) {\n return false;\n }\n\n //GET SUBJECT\n $sitestoreproduct = Engine_Api::_()->core()->getSubject('sitestoreproduct_product');\n\n //GET VIEWER ID\n $viewer_id = Engine_Api::_()->user()->getViewer()->getIdentity();\n\n //RETURN IF VIEWER IS EMPTY\n if (empty($viewer_id)) {\n return false;\n }\n\n return array(\n 'class' => 'smoothbox seaocore_icon_share buttonlink',\n 'route' => 'default',\n 'params' => array(\n 'module' => 'activity',\n 'controller' => 'index',\n 'action' => 'share',\n 'type' => $sitestoreproduct->getType(),\n 'id' => $sitestoreproduct->getIdentity(),\n 'format' => 'smoothbox',\n ),\n );\n }", "function type(): array { return wp_check_filetype($this->url()); }", "function snax_link_already_exists( $url ) {\n\t$demo_links = snax_link_get_demos();\n\t$demo_urls = array();\n\n\tforeach( $demo_links as $demo_link ) {\n\t\t$demo_urls[] = $demo_link['url'];\n\t}\n\n\t// Skip checking demo urls.\n\tif ( in_array( $url, $demo_urls ) ) {\n\t\treturn false;\n\t}\n\n\t// Fetch all Snax Link formats.\n\t$posts = get_posts( apply_filters( 'snax_link_check_duplicates_query_args', array(\n\t\t'post_type' => 'post',\n\t\t'post_status' => array( 'publish', 'pending' ),\n\t\t'tax_query' => array(\n\t\t\tarray(\n\t\t\t\t'taxonomy' => 'snax_format',\n\t\t\t\t'field' => 'slug',\n\t\t\t\t'terms' => array( 'link' ),\n\t\t\t)\n\t\t),\n\t\t'posts_per_page' => -1\n\t) ) );\n\n\tforeach ( $posts as $post ) {\n\t\t$link_url = get_url_in_content( $post->post_content );\n\n\t\tif ( ! empty( $link_url ) && trim( $link_url ) === trim( $url ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}", "public function hasUrl()\n {\n $url = $this->getUrl();\n\n return ! empty($url);\n }", "function facebook_share_link() {\n\t$url = get_permalink();\n\t$title = get_the_title();\n\t$summary = get_the_content();\n\t$encodedUrl = urlencode($url);\n\t$encodedTitle = urlencode($title);\n\t$encodedSummary = urlencode($summary);\n\n\treturn \t\"http://www.facebook.com/sharer.php?s=100\" .\n\t\t\t\"&amp;p[url]=$encodedUrl\" .\n\t\t\t\"&amp;p[title]=$encodedTitle\" .\n\t\t\t\"&amp;p[summary]=$encodedSummary\";\n\treturn get_permalink();\n\treturn 'http://facebook.com';\n}", "function on_page($link, $type = \"name\")\n {\n switch ($type) {\n case \"url\":\n $result = ($link == request()->fullUrl());\n break;\n\n default:\n $result = ($link == request()->route()->getName());\n }\n\n return $result;\n }", "function url_exists($url) {\n if (!$fp = curl_init($url)) return false;\n return true;\n}", "function does_url_exists($url) {\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_NOBODY, true);\n curl_exec($ch);\n $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n \n if ($code == 200) {\n $status = true;\n } else {\n $status = false;\n }\n curl_close($ch);\n return $status;\n }", "function canFetchURL($url)\n {\n if ($this->isHTTPS($url) && !$this->supportsSSL()) {\n Auth_OpenID::log(\"HTTPS URL unsupported fetching %s\",\n $url);\n return false;\n }\n\n if (!$this->allowedURL($url)) {\n Auth_OpenID::log(\"URL fetching not allowed for '%s'\",\n $url);\n return false;\n }\n\n return true;\n }", "private function is_url($url) { \n return filter_var($url, FILTER_VALIDATE_URL);\n }", "function wc_is_valid_url($url)\n {\n }", "function url_existe($url)\n\t{\n\t\t$cabeceras = get_headers($url);\n\t $estatus = array();\n\t preg_match('/HTTP\\/.* ([0-9]+) .*/', $cabeceras[0] , $estatus);\n\t return ($estatus[1] == 200);\n\t}", "public function is_stream(){\n\t\t$source = $this->get_param('sourcetype', 'gallery');\n\t\t\n\t\treturn (!in_array($source, array('post', 'posts', 'specific_posts', 'specific_post', 'current_post', 'woocommerce', 'woo', 'gallery'), true)) ? $source : false;\n\t}", "function is_url($var)\n{\n return CValidate::url($var);\n}", "function isweb($url) {\n\n $ini = expr();\n\n $p1 = $ini['reg1'];\n $p2 = $ini['reg2'];\n\n if (preg_match($p1, $url) || preg_match($p2, $url)) {\n\n return true;\n\n }\n\n else {\n\n return false;\n\n }\n\n }", "function waorder_is_url($string){\n\n $regex = '/(http|https|ftp|ftps)\\:\\/\\/[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,6}(\\/\\S*)?/';\n\n if (preg_match($regex, $string, $url) ) return true;\n\n return false;\n}", "public function check(string $link): bool;", "public function hasUrl()\n {\n return isset($this->url);\n }", "static public function isUrl($input) {\n\t\tif (filter_var($input, FILTER_VALIDATE_URL)) {\n\t\t\treturn false;\n\t\t}else {\n\t\t\treturn true;\n\t\t}\n\t}", "private function _isUrl($path) {\n return strpos($path, '://') !== false;\n }" ]
[ "0.6970071", "0.68104225", "0.65187883", "0.64945376", "0.64650184", "0.64126647", "0.6399754", "0.6369455", "0.63674027", "0.632698", "0.6241091", "0.61705804", "0.6107829", "0.61018324", "0.6072821", "0.60691047", "0.60688263", "0.6067543", "0.601865", "0.5969873", "0.59580195", "0.59494245", "0.59458876", "0.5930287", "0.59180367", "0.58913875", "0.5872738", "0.5870396", "0.5863977", "0.58620185", "0.58602554", "0.58486056", "0.5847031", "0.5844015", "0.5835454", "0.58204293", "0.5816583", "0.58015054", "0.57902753", "0.57881427", "0.57791924", "0.57751334", "0.5767038", "0.5757781", "0.57571906", "0.57337254", "0.57227147", "0.57198614", "0.57102543", "0.5709432", "0.570759", "0.56980747", "0.5687397", "0.5683887", "0.56616426", "0.5657976", "0.56217945", "0.56166625", "0.56075186", "0.56054974", "0.56049347", "0.5593448", "0.55885124", "0.5579599", "0.55785424", "0.5577384", "0.5575417", "0.55726916", "0.55715907", "0.5566957", "0.5554568", "0.55472636", "0.55407083", "0.55401504", "0.553975", "0.55327225", "0.55310065", "0.5529397", "0.55260366", "0.55251414", "0.55217075", "0.55190015", "0.55173117", "0.55168283", "0.5505874", "0.55051893", "0.5503659", "0.5502637", "0.55021864", "0.54962105", "0.54869527", "0.5485147", "0.54830927", "0.5477541", "0.5473933", "0.54727876", "0.5472037", "0.54701304", "0.5469502", "0.5467572" ]
0.8338786
0
/ Get tembusan by idtembusan
/ Получить тембусан по idtembusan
function get_tembusan($idtembusan) { return $this->db->get_where('tembusan',array('idtembusan'=>$idtembusan))->row_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get($anuncio_id);", "public function getByMuatanId($id) {\n $this->db->select('transaksi.*, wilayah.wilayah');\n $this->db->join('wilayah', 'transaksi.id_wilayah = wilayah.id_wilayah');\n return $this->db->get_where($this->table, [\"id_muatan\" => $id])->result();\n }", "function get_item_tunda_bykode($id)\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('item_transaksi_tunda');\n\t\t$this->db->where('id_transaksi_tunda', $id);\n\t\t$hasil = $this->db->get()->result();\n\t\treturn $hasil;\n\t}", "function getByIdtamu($idtamu)\n {\n $this->db->where('idtamu', $idtamu);\n return $this->db->get($this->table)->row();\n }", "public function tampil($id) \n {\n $this->db->where('ideksploitasi', $id);\n $rd = $this->db->get('eksploitasi')->result();\n return $rd;\n }", "public function set_akunwalikelas_terdaftar($id){\n\t\treturn $this->db->get_where('admin',array('ID'=>$id))->row();\n\t}", "function gettema($cod){\r\n $con = new dbmanager;\r\n //usamos el metodo conectar para realizar la conexion\r\n if($con->conectar()==true){\r\n $query = \"SELECT * FROM tbl_tema WHERE (((id_tema)=$cod));\"; \r\n\t $result = @mysql_query($query);\r\n\t \r\n\t if (!$result){\r\n\t return false;\r\n\t }\r\n\t else{\r\n\t $row = mysql_fetch_assoc($result);\t \r\n\t return $row['tema'];\r\n\t }\r\n }\r\n }", "public function get_paket_by_toid($id) {\n\t$query = \"SELECT p.token, p.id_paket,nm_paket,deskripsi,p.status,jumlah_soal,durasi,random FROM `tb_paket` p\n\tJOIN `tb_mm-tryoutpaket` mm\n\tON p.`id_paket` = mm.`id_paket`\n\tJOIN `tb_tryout` t ON t.`id_tryout` = mm.`id_tryout`\n\tWHERE t.`id_tryout` = '$id' \";\n\t$result = $this->db->query($query);\n\treturn $result->result_array();\n}", "public function getTipeTiket($id){\n $where = \"fk_pariwisata='$id' AND nama='Tiket Weekday' OR nama='Tiket Weekend'\";\n $this->db->where($where);\n return $this->db->get(\"detail\");\n }", "function get_by_id($id)\n {\n $this->db->select($this->table.'.*');\n $this->db->select('t30_tamu.Name');\n $this->db->from($this->table);\n $this->db->where($this->id, $id);\n $this->db->join('t30_tamu', 't30_tamu.idtamu = '.$this->table.'.idtamu', 'left');\n return $this->db->get()->row();\n }", "function gettema_remoto($cod){\r\n $con_remoto = new dbmanager;\r\n //usamos el metodo conectar para realizar la conexion\r\n if($con_remoto->conectar_remoto()==true){\r\n $query = \"SELECT * FROM tbl_tema WHERE (((id_tema)=$cod));\"; \r\n\t $result = @mysql_query($query);\r\n\t \r\n\t if (!$result){\r\n\t return false;\r\n\t }\r\n\t else{\r\n\t $row = mysql_fetch_assoc($result);\t \r\n\t return $row['tema'];\r\n\t }\r\n }\r\n }", "public function show($id_transaksi, $id = null)\n {\n if ($id != null) {\n return Tindakan::with('daftarTindakan', 'hasilLab')->findOrFail($id);\n }\n else {\n return $response = Tindakan::with('daftarTindakan', 'hasilLab')->where('id_transaksi', '=', $id_transaksi)->get();\n }\n }", "public function tampil_detail_transaksi($id_transaksi)\n {\n $query = $this->db->prepare(\"SELECT transaksi.id_transaksi, transaksi.id_outlet, transaksi.tgl, transaksi.id_member,\n transaksi.id_user, detail_transaksi.id_paket, paket.nama_paket, detail_transaksi.qty, detail_transaksi.sub_total \n FROM transaksi,detail_transaksi,paket\n WHERE transaksi.id_transaksi = detail_transaksi.id_transaksi AND detail_transaksi.id_paket = paket.id_paket\n AND transaksi.id_transaksi = '$id_transaksi'\");\n $query->execute();\n $hasil = $query->get_result();\n return $hasil;\n }", "public function temaporid($id) {\n\t\t$id = mysqli_real_escape_string($this->mysqli, $id);\n\t\t$this->data = array();\n\t\t\n $resultado = $this->mysqli->query(\"SELECT *\n FROM foro_temas\n WHERE id_tema = $id\");\n\n while ( $fila = $resultado->fetch_assoc() ) {\n $this->data[] = $fila;\n }\n\t\t\n\t\treturn $this->data;\n }", "public function getDataTanah($id)\n {\n // $query = $this->db->get_where('tanah',$where);\n $query = $this->db->query(\"SELECT * FROM data WHERE kode_node = '$id' AND topik LIKE '%tanah%'\");\n return $query->result();\n\n }", "public function load($id){\n\t\t$sql = 'SELECT * FROM kelas_tugas WHERE id_tugas = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->getRow($sqlQuery);\n\t}", "public function load($id){\n\t\t$sql = 'SELECT * FROM kelas_tugas WHERE id_tugas = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->getRow($sqlQuery);\n\t}", "public function buscaId($id){\n $query = $this->db->query(\n \"SELECT *\n FROM tipo\n WHERE idtipo = $id\");\n if ($query->num_rows() == 1){\n return $this->getObjByRow($query->row());\n } else{\n return NULL;\n }\n }", "public function getById($id)\n {\n $this->db->select('transaksi.*, wilayah.wilayah, jenis_barang.jenis_barang, pembayaran.pembayaran');\n $this->db->join('wilayah', 'transaksi.id_wilayah = wilayah.id_wilayah');\n $this->db->join('jenis_barang', 'transaksi.id_jns_barang = jenis_barang.id_jenis_barang');\n $this->db->join('pembayaran', 'transaksi.id_jns_pembayaran = pembayaran.id_pembayaran');\n return $this->db->get_where($this->table, [\"id_transaksi\" => $id])->row();\n }", "public function getById($id)\n {\n $this->db->select('transaksi.*, wilayah.wilayah, jenis_barang.jenis_barang, pembayaran.pembayaran');\n $this->db->join('wilayah', 'transaksi.id_wilayah = wilayah.id_wilayah');\n $this->db->join('jenis_barang', 'transaksi.id_jns_barang = jenis_barang.id_jenis_barang');\n $this->db->join('pembayaran', 'transaksi.id_jns_pembayaran = pembayaran.id_pembayaran');\n return $this->db->get_where($this->table, [\"id_transaksi\" => $id])->row();\n }", "public function get_detail_keluhan($id)\n\t{\n $this->db->select('*');\n $this->db->from('keluhan');\n $this->db->where('id', $id);\n return $this->db->get()->row();\n\t}", "public function getTipePariwisata($id){\n $this->db->like('nama', 'Tiket');\n $this->db->where('fk_pariwisata', $id);\n return $this->db->get('detail')->row();\n }", "public static function getById($id){\n\t\t$sql = \"select * from tipo where id='\".$id.\"'\";\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::one($query[0],new TipoData());\n\n\t}", "public function testing($id)\n {\n $tampilan = Coba::where('jurusan', 'like', $id)-> orwhere('nama', 'like', $id)->get(); \n return $tampilan;\n }", "function get_by_id($id)\r\n {\r\n $this->db->where($this->id, $id);\r\n $this->db->or_where('nama', $id);\r\n return $this->db->get($this->table)->row(); \r\n }", "function tampilDetail($id) {\n\t\t\treturn $this->db->get_where('admin', array('username'=>$id));\n\t\t}", "public function getById($tiendaId);", "function get_tarjeta($id_usu) {\n $this->db->where('id_usuario', $id_usu);\n return $this->db->get(\"tb_tarjeta\");\n }", "function get_by_id($id)\n {\n $this->db->where(\"no_hutang\", $id);\n return $this->db->get($this->table_data)->row();\n }", "public static function GetById($id){\n $retorno = null; \n \n $query = \"SELECT id, codigo, mesa_id as mesa, foto FROM `comanda` WHERE id= :id\";\n \n try{\n $db = AccesoDatos::DameUnObjetoAcceso(); \n $sentencia = $db->RetornarConsulta($query); \n $sentencia->bindValue(':id', $id, PDO::PARAM_INT); \n \n $sentencia->execute(); \n $retorno = $sentencia->fetchObject(self::CLASSNAME); \n } catch (PDOException $e) {\n $retorno = -1; \n }\n \n return $retorno;\n }", "public function seleccionTeatro($idTeatro){\n $objTeatro=new Teatro();\n $objTeatro->buscar($idTeatro,true);\n return $objTeatro;\n }", "public function getById($id)\n {\n $this->db->select('tahun, periode, nrp, nama_lengkap, penghasilan_ortu, ukt, ipk, pendaftar_id, biodata.biodata_id');\n $this->db->from('pendaftar');\n $this->db->join('biodata', 'biodata.biodata_id = pendaftar.biodata_id');\n $this->db->join('beasiswa', 'beasiswa.beasiswa_id = pendaftar.beasiswa_id');\n $this->db->where(['beasiswa.beasiswa_id'=>$id]);\n $query = $this->db->get();\n return $query->result();\n }", "function getsubtema_remoto($cod){\r\n $con_remoto = new dbmanager;\r\n //usamos el metodo conectar para realizar la conexion\r\n if($con_remoto->conectar_remoto()==true){\r\n $query = \"SELECT * FROM tbl_subtema WHERE (((id_subtema)=$cod));\"; \r\n\t $result = @mysql_query($query);\r\n\t \r\n\t if (!$result){\r\n\t return false;\r\n\t }\r\n\t else{\r\n\t $row = mysql_fetch_assoc($result);\t \r\n\t return $row['subtema'];\r\n\t }\r\n }\r\n }", "public function getMotNhaTro($id) {\n \t$query = $this->db->get_where('nhatro', array('MANT'=>$id));\n \treturn $query->result();\n }", "public static function getById($tem_id_tema)\r\n {\r\n // Consulta de la tabla de preguntas\r\n $consulta = \"SELECT tem_id,\r\n tem_id_cat,\r\n tem_id_tema,\r\n tem_enunciado,\r\n tem_opcion_1,\r\n tem_opcion_2,\r\n tem_opcion_3,\r\n tem_opcion_4,\r\n tem_opcion_5,\r\n tem_respuesta,\r\n tem_ayuda\r\n FROM preguntas\r\n WHERE tem_id_tema = ? ORDER BY RAND() LIMIT 10\";\r\n try {\r\n // Preparar sentencia\r\n $comando = Database::getInstance()->getDb()->prepare($consulta);\r\n // Ejecutar sentencia preparada\r\n $comando->execute(array($tem_id_tema));\r\n // Capturar primera fila del resultado\r\n $row = $comando->fetchAll(PDO::FETCH_ASSOC);\r\n return $row;\r\n } catch (PDOException $e) {\r\n return -1;\r\n }\r\n }", "public function buscar_transferenciaId($id_trans)\n {\n $conexLocalHost= $this->conexionBD();\n\t$sql = \"SELECT * FROM `transferencia` WHERE idtrans = '\".$id_trans.\"'\";\n\t$resp = $conexLocalHost->query($sql);\n $conexLocalHost->close();\n\t$obj=$resp->fetch_object();\n\tif(empty($obj->id_obra))\n\t{\n\t return false;\n\t}\n\treturn $obj; \n }", "function getsubtema($cod){\r\n $con = new dbmanager;\r\n //usamos el metodo conectar para realizar la conexion\r\n if($con->conectar()==true){\r\n $query = \"SELECT * FROM tbl_subtema WHERE (((id_subtema)=$cod));\"; \r\n\t $result = @mysql_query($query);\r\n\t \r\n\t if (!$result){\r\n\t return false;\r\n\t }\r\n\t else{\r\n\t $row = mysql_fetch_assoc($result);\t \r\n\t return $row['subtema'];\r\n\t }\r\n }\r\n }", "public function getTimbulanById($id)\n\t{\n\t\t$this->db->where('id', $id);\n\t\treturn $this->db->get('timbulan')->row_array();\n\t}", "public function getByID($id){\r\n $id = $this->dataBase->toInt($id);\r\n $sql = \"SELECT * FROM kilos_encargo WHERE id = '{$id}';\";\r\n $return = $this->dataBase->query($sql);\r\n if( count($return) > 0 ){\r\n return $return[0]['valor'];\r\n }\r\n return $return;\r\n }", "function get_info_jadwal_pelayanan_tetap($jadwal_id)\n {\n $info_jadwal_pelayanan_tetap = $this->db->query(\"\n SELECT\n *\n\n FROM\n `info_jadwalpelayananterpusat`\n\n WHERE\n `jadwal_id` = ?\n \",array($jadwal_id))->row_array();\n\n return $info_jadwal_pelayanan_tetap;\n }", "function getBuktiByIdPaket($id){\n\t\t$query = $this->db->query(\"SELECT * from bukti_pengadaan where ID_PAKET = '$id'\")->result_array();\n\t\treturn $query;\n\t}", "function getTanggapan($id){\n\n global $conn;\n $sql = \"SELECT * FROM pengaduan INNER JOIN tanggapan ON pengaduan.id_pengaduan=tanggapan.id_pengaduan JOIN petugas ON petugas.id_petugas=tanggapan.id_petugas WHERE tanggapan.id_tanggapan='$id'\";\n $query = mysqli_query($conn, $sql);\n $row = mysqli_fetch_assoc($query);\n\n return $row;\n\n }", "function get_tr_luas_tanah_kering($id)\n {\n return $this->db->get_where('tr_luas_tanah_kering',array('id'=>$id))->row_array();\n }", "public static function GetById($id){\n $retorno = null; \n $query = \"SELECT * FROM `empleado` WHERE `id`= :id\";\n \n try{\n $db = AccesoDatos::DameUnObjetoAcceso(); \n $sentencia = $db->RetornarConsulta($query); \n $sentencia->bindValue(':id', $id, PDO::PARAM_INT); \n \n $sentencia->execute(); \n \n $retorno = $sentencia->fetchObject(self::CLASSNAME); \n \n } catch (PDOException $e) {\n $retorno = -1; \n }\n \n return $retorno;\n }", "static function getTentativas($id){\n return self::where('cliente_potencia_id', '=', $id)->get();\n\n }", "public static function GetBaiVietTheoID($id){\n\n $result = DB::table('tintucsukien')\n ->where('id',$id)\n ->get();\n return $result;\n }", "public function get_by_id($id)\r\n {\r\n $this->db->where('idInteliguia', $id);\r\n $dta = $this->db->get('inteliguia');\r\n return $dta->row();\r\n }", "public function mostrarTipoAtencionId($idTipoAtencion)\n {\n try {\n $result = DB::table('tipoatencion')\n ->where('IdTipoAtencion',$idTipoAtencion)\n ->where(['Activado' => 1])\n ->first();\n $tipoAtencion = new TipoAtencion();\n $tipoAtencion->setIdTipoAtencion($result->IdTipoAtencion);\n $tipoAtencion->setNombre($result->NombreTipoAtencion);\n $tipoAtencion->setDescripcion($result->Descripcion);\n return $tipoAtencion;\n } catch (Exception $e) {\n }\n }", "function get_by_id($id)\n {\n $this->db->select('*');\n $this->db->join('rute', 'tiket.id_rute = rute.id_rute','inner');\n $this->db->join('kereta', 'tiket.id_kereta = kereta.id_kereta','inner');\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }", "function getBuktiById($id){\n\t\t$res = $this->db->query(\"SELECT * FROM bukti_pengadaan WHERE ID_PAKET = '$id'\")->result_array();\n\t\treturn $res;\n\t}", "public function get_by_id($id)\r\n {\r\n $item=new alumno();\r\n $query=$this->db->connect()->prepare(\"SELECT * FROM tercero WHERE matricula=:matricula\");\r\n try\r\n {\r\n $query->execute(['matricula'=>$id]);\r\n while($row=$query->fetch())\r\n {\r\n $item->matricula=$row['matricula'];\r\n $item->nombre=$row[\"nombre\"];\r\n $item->apellido=$row[\"apellido\"];\r\n }\r\n return $item;\r\n }catch(PDOException $e)\r\n {\r\n return null;\r\n }\r\n }", "function get_by_al($id)\n {\n $this->db->where('id_akta', $id);\n return $this->db->get($this->table)->row();\n }", "public function getKesehatan($id)\n {\n $this->db->where('id_kes_akun', $id);\n $query = $this->db->get('tb_kesehatan');\n\n // melemparkan isinya\n return $query->last_row('array');\n }", "public function showTemas($id)\n {\n $materia = Materia::findOrFail($id);\n //$id_profesor = $id;\n $temas =\n DB::select(\n DB::raw('SELECT *\n FROM temas\n WHERE id_materia = '.$id.'\n ORDER BY title\n ')\n );\n\n return view('front.select_tema', compact('temas','error','materia'));\n //return $temas;\n }", "function get($id)\n {\n $q = $this->db->get_where('usuariotipo', array('id' => $id));\n return $q->row();\n }", "public function getById($id)\n {\n $sql = \"SELECT * FROM praktikum WHERE id=$id\";\n $query = koneksi()->query($sql);\n return $query->fetch_assoc();\n }", "function get_by_id($id)\n {\n \t$this->db->select(\"*\");\n \t$this->db->select(\"pembelian_paket.bukti_pembayaran as bukti_pembayaran1\");\n \t$this->db->select(\"pembelian_paket.status_pembayaran as status_pembayaran1\");\n\t\t$this->db->join('paket', 'pembelian_paket.id = paket.id', 'left')\n\t\t\t->join('pembelian', 'pembelian_paket.pembelian_id_pembelian = pembelian.id_pembelian', 'left')\n\t\t\t->join('users', 'pembelian.users_id = users_id', 'left')\n\t\t\t->where('pembelian_paket.id_pembelian', $id);\n return $this->db->get($this->table)->row();\n }", "public function findUnit($id) {\n $sql = \"SELECT * FROM $this->tabela WHERE id = :id\";\n $stm = DB::prepare($sql);\n $stm->bindParam(':id', $id, PDO::PARAM_INT);\n $stm->execute();\n return $stm->fetch();\n }", "function get($id) {\n $this->db->where('id', $id);\n $query = $this->db->get('typePersoon');\n return $query->row(); // genereert een typepersoon object\n }", "public function getbyId($id);", "public function get_suplemen_terdata_by_id($id)\n\t{\n\t\t$data = $this->db->where('id', $id)->get('suplemen_terdata')->row_array();\n\t\t// Data tambahan untuk ditampilkan\n\t\t$terdata = $this->get_terdata($data['id_terdata'], $data['sasaran']);\n\t\tswitch ($data['sasaran'])\n\t\t{\n\t\t\tcase 1:\n\t\t\t\t$data['judul_terdata_nama'] = 'NIK';\n\t\t\t\t$data['judul_terdata_info'] = 'Nama Terdata';\n\t\t\t\t$data['terdata_nama'] = $terdata['nik'];\n\t\t\t\t$data['terdata_info'] = $terdata['nama'];\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$data['judul_terdata_nama'] = 'No. KK';\n\t\t\t\t$data['judul_terdata_info'] = 'Kepala Keluarga';\n\t\t\t\t$data['terdata_nama'] = $terdata['no_kk'];\n\t\t\t\t$data['terdata_info'] = $terdata['nama'];\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t}\n\n\t\treturn $data;\n\t}", "public function load($id){\n\t\t$sql = 'SELECT * FROM tipos_despesa_mec WHERE id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->getRow($sqlQuery);\n\t}", "public function getTransaksiByID($idTransaksi)\n {\n $sql = \"SELECT transaksi.tanggal, pembeli.nama_pembeli, pembeli.notelp_pembeli, \n pegawai.nama_pegawai FROM transaksi\n JOIN pembeli ON transaksi.pembeli_id = pembeli.id_pembeli\n JOIN pegawai ON transaksi.pegawai_id = pegawai.id_pegawai\n WHERE transaksi.id_transaksi = $idTransaksi\";\n $query = koneksi()->query($sql);\n return $query->fetch_assoc();\n }", "public function getById($id)\r\n\t{\r\n\t\treturn $this->db->query(\"Select\r\n tb_paket_makeup.id_paket,\r\n tb_paket_makeup.id_makeup,\r\n tb_paket_makeup.nm_paket,\r\n tb_makeup.nm_makeup,\r\n tb_makeup.lokasi_makeup,\r\n tb_paket_makeup.harga_paket,\r\n tb_paket_makeup.deskripsi,\r\n tb_paket_makeup.biaya_dp,\r\n tb_paket_makeup.foto,\r\n tb_paket_makeup.batas_booking_per_hari,\r\n tb_paket_makeup.jumlah_orang,\r\n tb_makeup.nm_makeup\r\n From\r\n tb_paket_makeup Join\r\n tb_makeup On tb_paket_makeup.id_makeup = tb_makeup.id_makeup Where tb_paket_makeup.id_paket='$id'\")->result();\r\n\t}", "public function getTentamen(){\n $tentamen = Tentamen::find($this->_tentamenCode);\n return $tentamen;\n }", "public function tampil($id = null) {\n\t\t\t$db = $this->mysqli->conn;\n\t\t\t$sql = \"SELECT * FROM tb_matakuliah\";\n\t\t\tif($id != null) {\n\t\t\t\t$sql .= \" WHERE kode_mk = $id\";\n\t\t\t}\n\t\t\t$query = $db->query($sql) or die ($db->error);\n\t\t\treturn $query;\n\t\t}", "public function getMahasiswaById($id)\n {\n $response = $this->_client->request('GET','mahasiswa',[\n 'query' => [//params yang dikirim saat get,dan hanya ada di params\n 'apikey'=>'generatekey1',//apikey\n 'id'=>$id// params id dengan value $id\n ]\n ]);\n\n $result = json_decode($response->getBody()->getContents(),true);//decode json menjadi array disimpan ke $result\n return $result['data'][0];//kembalikan $result yang di dalamnya ada array data, dengan index 0, karna hanya 1 data yang mau diambil\n }", "public function getTipoTarefaId($id){\r\n $this->db->where('id_categoria', $id);\r\n return $this->db->get('tarefas_categorias')->row(0);\r\n }", "function find_territory_by_id($id=0) {\n global $db;\n $sql = \"SELECT * FROM territories \";\n $sql .= \"WHERE id='\" . $id . \"';\";\n $territory_result = db_query($db, $sql);\n return $territory_result;\n }", "function cetakKwitansi($id){\r\n $query = $this->db->select('*')\r\n //->from('transaksi_darat,pengguna_jasa,pembeli_darat')\r\n ->from('transaksi_darat,pembeli_darat')\r\n ->where('id_transaksi', $id)\r\n ->where('pembeli_darat_id_pengguna_jasa = id_pengguna_jasa')\r\n //->where('pengguna_jasa_id_tarif = id_tarif')\r\n ->get();\r\n\r\n return $query->row();\r\n }", "public function show($id)\n {\n return Turmas::find($id);\n }", "function get_by_id($id)\n {\n\t\t$id_patner = $this->session->userdata('DX_id_patner');\n\t\tif($id_patner > 0){\n\t\t\t//$this->db->where('id_patner', $id_patner);\n\t\t}\n $this->db->where($this->id, $id);\n return $this->db->get($this->table)->row();\n }", "public function getByPais($id)\n {\n \n }", "public function show($id)\n\t{\n\t\treturn $this->tipo->findOrFail($id);\n\t}", "public function tampil($id = null) {\n\t\t\t$db = $this->mysqli->conn;\n\t\t\t$sql = \"SELECT * FROM t_perkuliahan\";\n\t\t\tif($id != null) {\n\t\t\t\t$sql .= \" WHERE id_perkuliahan = $id\";\n\t\t\t}\n\t\t\t$query = $db->query($sql) or die ($db->error);\n\t\t\treturn $query;\n\t\t}", "function get($id) \n {\n $this->db->where('id', $id);\n $query = $this->db->get('dagOnderdeel');\n return $query->row(); \n }", "public function get($id) ;", "public function get_ratkaisu($id) {\n include(\"yhteys.php\");\n try {\n $kuvaus = $yhteys->prepare(\"SELECT * FROM ratkaisu WHERE rtunnus = ?\");\n\n $kuvaus->execute(array($id));\n $teksti = $kuvaus->fetch();\n //echo $teksti[\"rtunnus\"] . \" \" . $teksti[\"kuvaus\"] . \"<br>\";\n return $teksti[\"kuvaus\"];\n } catch (Exception $e) {\n die(\"VIRHE: \" . $e->getMessage());\n }\n }", "public function get_jenis_tes_assesment($id){\n\t\t$sql = 'SELECT a.id as id,\n\t\t\t\t\tc.jenis_tes as id_tes_asses,\n\t\t\t\t\tc.singkat as singkat, \n\t\t\t\t\ta.nama_sub_tes as nama_sub_tes,\n\t\t\t\t\ta.bobot as bobot,\n\t\t\t\t\tb.bobot as bobot_tes,\n\t\t\t\t\tb.metode as metode,\n\t\t\t\t\tb.pass_grade as pass_grade\n\t\t\t\t\tFROM '.$this->_table.' a \n\t\t\t\t\tLEFT JOIN tes_asses b ON a.id_tes_asses = b.id\n\t\t\t\t\tLEFT JOIN jenis_tes c ON b.id_jenis_tes = c.id\n\t\t\t\t\tWHERE b.id_assesment='.$id;\n\n\t\t$result = $this->_db->select($sql);\n\t\treturn $result;\n\t}", "public function prikazineodobrentekst($id){\n\t $q = $this->db->query(\"SELECT tekst FROM tekst WHERE id_teksta = $id\");\n\t $rez[0] = $q->result();\n\t return $rez;\n\t}", "function find_treino( $tablea = null, $tabletr = null, $id = null ) {\r\n \r\n $database = getConnection();\r\n $found = null;\r\n\r\n try {\r\n if ($id) {\r\n $sql = \"SELECT T1.nome, T1.celular, T2.id as idtreino, T2.cpftreino, T2.dttreino FROM \" . $tablea . \" T1 INNER JOIN \" . $tabletr . \" T2 ON T2.cpftreino = T1.cpf WHERE T2.id = \" .$id. \" ORDER BY T1.nome\";\r\n $result = $database->query($sql);\r\n \r\n if ($result->rowCount() > 0) {\r\n $found = $result->fetch();\r\n }\r\n \r\n } else {\r\n \r\n $sql = \"SELECT T1.nome, T1.celular, T2.id as idtreino, T2.cpftreino, T2.dttreino FROM \" . $tablea . \" T1 INNER JOIN \" . $tabletr . \" T2 ON T2.cpftreino = T1.cpf ORDER BY T1.nome\";\r\n $result = $database->query($sql);\r\n\r\n if ($result->rowCount() > 0) {\r\n $found = $result->fetchAll();\r\n \r\n /* Metodo alternativo\r\n $found = array();\r\n\r\n while ($row = $result->fetch_assoc()) {\r\n array_push($found, $row);\r\n } */\r\n }\r\n }\r\n } catch (Exception $e) {\r\n $_SESSION['message'] = $e->GetMessage();\r\n $_SESSION['type'] = 'danger';\r\n }\r\n \r\n $database = null;\r\n return $found;\r\n}", "function getApartadoId($tema_id, $conn){\n $sql = \"SELECT id FROM apartado WHERE id_tema=? ORDER BY id desc\";\n $sql = $conn->prepare($sql);\n $sql -> execute([$tema_id]);\n $idApartado = $sql->fetch();\n return $idApartado[\"id\"];\n }", "function get($id) {\n\t\t$q = $this->db->get_where('acara',\n\t\t\t\t\t\t\t\t array('acara_id'=>$id));\n\t\tif ($q->num_rows()) //jika ada\n\t\t{\n\t\t\treturn $q->row(); //berikan datanya\n\t\t} \n\t\t\n\t\t\n\t}", "function get_by_idd($id)\n\t{\n\t\t$this->db->where('pembelian_paket.id_pembelian', $id);\n//\t\treturn $this->db->get($this->table)->row();\n\t\treturn $this->db->get($this->table)->row();\n\t}", "public function get_valor($id);", "function viewSuratTugasKrr($id){\n\t\t$stmt = $this->tampil(\"SELECT a.id_karyawan,a.nama_karyawan,c.nama_departement,b.* FROM karyawan a JOIN permintaan_surat_tugas b ON a.id_karyawan=b.id_karyawan JOIN departement c ON a.id_departement=c.id_departement where a.id_karyawan ='$id' ORDER BY b.id_pst DESC\");\n\t\t\n\t\treturn $stmt ;\n\t }", "public function get_klara_fel_by_id($id){\n $sql = \"SELECT * FROM fel WHERE aktiv = 0 && id = :id\";\n \n try\n {\n $stmt = $this->db->prepare($sql);\n $stmt->bindParam(\":id\", $id);\n $stmt->execute();\n $r = $stmt->fetch();\n }\n catch(Exception $e)\n {\n die($e->getMessage());\n }\n return $r;\n }", "function get_arqueo_detalle($id)\n\t{\n\t\t$u = new Arqueo_detalle();\n\t\t//Buscar en la base de datos\n\t\t$u->get_by_id($id);\n\t\tif($u->c_rows ==1){\n\t\t\treturn $u;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function getDetailTransaksi($idTransaksi)\n {\n $sql = \"SELECT detail_transaksi.transaksi_id,parfum.nama_parfum, \n detail_transaksi.jumlah_parfum, detail_transaksi.parfum_id, \n detail_transaksi.jumlah_parfum * parfum.harga_parfum AS jumlah_harga\n FROM detail_transaksi\n JOIN parfum ON detail_transaksi.parfum_id = parfum.id_parfum\n WHERE detail_transaksi.transaksi_id = $idTransaksi\";\n\n $query = koneksi()->query($sql);\n $hasil = [];\n while ($detailTransaksi = $query->fetch_assoc()) {\n $hasil[] = $detailTransaksi;\n }\n return $hasil;\n }", "function get_list_editorial_tembusan($params) {\n $sql = \"SELECT redaksional_nm\n FROM izin_tembusan a\n LEFT JOIN redaksional b ON b.redaksional_id = a.tembusan_value\n WHERE a.registrasi_id = ? AND b.redaksional_group = 'tembusan'\n ORDER BY a.tembusan_id\";\n $query = $this->db->query($sql, $params);\n if ($query->num_rows() > 0) {\n $result = $query->result_array();\n $query->free_result();\n return $result;\n } else {\n return array();\n }\n }", "function get_ttd($jenis)\n {\n $this->db->where('jenis', $jenis);\n return $this->db->get('ttd')->row();\n }", "public function index($id)\n {\n //di buat array utuk deskrip kode nya\n // 0 => \"DPG.17.1C.12.A\"\n // 1 => \"894\"\n // 2 => \"201704121\"\n $pecah=explode(',',Crypt::decryptString($id));\n $tugas= Tugas::where([\n 'nip' =>Auth::user()->username,\n 'kd_mtk' =>$pecah[1],\n 'kd_lokal' =>$pecah[0]\n ])->get();\n return view('admin.tugas.index',compact('tugas','id'));\n }", "public static function traerMascotaPorId($id)\n {\n $objetoAccesoDato = AccesoDatos::dameUnObjetoAcceso();\n $consulta = $objetoAccesoDato->RetornarConsulta(\"SELECT * FROM mascotas WHERE id_mascota=:id\");\n $consulta->bindValue(\":id\",$id);\n $consulta->execute();\n $datos = $consulta->fetchAll(PDO::FETCH_ASSOC);\n return json_encode($datos); \n }", "function select_id_perusahaan($id_perusahaan){\n $query = $this->db->query (\"SELECT * FROM tb_perusahaan where id_perusahaan='$id_perusahaan'\");\n return $query->result();\n }", "function get_tank_by_id($db, $id = 1) {\n\t\t$sql = \"\n\t\t\tSELECT *\n\t\t\tFROM `tanks`\n\t\t\tWHERE id = :id\n\t\t\tLIMIT 1\n\t\t\";\n\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->execute(array(\n\t\t\t'id' => $id\n\t\t));\n\t\t$results = $stmt->fetchAll();\n\t\tif (count($results) == 0) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $results;\n\t}", "function ListeRappelTechnicien($id)\n{\n// var_dump($id);\n\n\t$pdo = connexion();\n\t\n\tif($pdo != false)\n\t{\n\t$req = \"\n\t\t\tSelect *\n\t\t\t\tfrom relancetechnicien\n\t\t\t\twhere IdActions = $id\n\t\t\t\t\";\n\n\t\t\t$result = $pdo->query($req)->fetchAll();\n\t\n\t}\n\t return $result;\n\t \n\n}", "function delete_tembusan($idtembusan)\n {\n return $this->db->delete('tembusan',array('idtembusan'=>$idtembusan));\n }", "public function get_by_id($id){\n \t$query = $this->db->get_where($this->kabupaten(), array('id' => $id,\"deleted\"=>0));\n\n \t$data = $query->row();\n\n \treturn $data;\n }", "public function getTable($id)\n\t{\n\t\tif(! intval( $id )){\n\t\t\treturn false;\n\t\t}\n\t\t$id=$this->db->real_escape_string($id);\n\t\t$sql= \"SELECT * FROM entrada WHERE id_entrada=$id;\";\n\t\t$res=$this->db->query($sql);\n\t\tif(!$res)\n\t\t\t{die(\"Error getting result entrada\");}\n\t\t$row = $res->fetch_assoc();\n\t\t$res->close();\n\t\treturn $row;\n\n\t}", "public function getById($dat){\n $id = $dat;\n $data['title'] = 'Детальная информация о задаче';\n $tasks = $this->task->getTasksById($id); \n $data['tasks'] = json_decode($tasks);\n return $data;\n //$this->returnData('tasks/task_list',$data);\n }" ]
[ "0.71748364", "0.710662", "0.69803923", "0.6962689", "0.68908274", "0.68194795", "0.6786834", "0.6778495", "0.67555374", "0.6742609", "0.6704188", "0.6668232", "0.6655376", "0.6653866", "0.66365004", "0.66251296", "0.66251296", "0.6616579", "0.6615799", "0.6615799", "0.66052836", "0.65997905", "0.6593518", "0.65889204", "0.658817", "0.65879846", "0.6586162", "0.65695494", "0.6567375", "0.6564845", "0.65612984", "0.6526526", "0.6523827", "0.6502462", "0.64800376", "0.6464311", "0.6459363", "0.6459202", "0.64482534", "0.64436036", "0.6439608", "0.6438702", "0.6422728", "0.64216167", "0.64177203", "0.64021915", "0.63890755", "0.6387456", "0.63844866", "0.63790613", "0.6373233", "0.6367123", "0.6363413", "0.6359047", "0.63546276", "0.6354519", "0.6348315", "0.6340388", "0.63362205", "0.63270384", "0.6319468", "0.63160455", "0.6313063", "0.63112444", "0.6308847", "0.62978387", "0.6297519", "0.629362", "0.62902534", "0.6290066", "0.62887", "0.62877303", "0.62841725", "0.62771845", "0.6271234", "0.6270623", "0.626894", "0.6264141", "0.62640417", "0.6261264", "0.6257269", "0.624808", "0.6245066", "0.6243365", "0.62426066", "0.62414503", "0.6239139", "0.62306994", "0.6222699", "0.622078", "0.6216871", "0.6213274", "0.6210655", "0.6207461", "0.6207024", "0.6205475", "0.620484", "0.61997485", "0.61986005", "0.6197991" ]
0.7913396
0
/ Get all tembusan
/ Получить все тембусан
function get_all_tembusan() { $this->db->order_by('idtembusan', 'desc'); return $this->db->get('tembusan')->result_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function readAllTalla()\n {\n $sql = 'SELECT id_talla, talla, descripcion\n FROM talla\n ORDER BY talla';\n $params = null;\n return Database::getRows($sql, $params);\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM kelas_tugas';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM kelas_tugas';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function getAll(){}", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll();", "public function getAll() {}", "public function getAll() {}", "public function getAll() {}", "public static function getAll();", "public function index()\n\t{\n\t\treturn $this->tipo->all();\n\t}", "public function getall()\n {\n }", "public function getAllEtat()\n {\n return DB::table('etat')\n ->orderBy('id', 'asc')\n ->get();\n\n }", "public function index()\n {\n $taks = taks::all();\n return $taks;\n }", "public function getAllEtfs();", "public function index()\n {\n $torneos = TorneoTft::where('abierto', 1)->get();\n return $torneos;\n }", "public static function showTareas(){\r\n\t\trequire_once 'modelo/tarea.php';\r\n\t\t$tarea = new Tarea();\r\n $tareas = $tarea->getAll(); \r\n\t\treturn $tareas;\t\t\r\n }", "public function getAll(): array;", "public function getAll(): array;", "public function getAll(): array;", "public final function get_all()\n {\n }", "protected function getAll() {}", "public static function getAll()\n {\n }", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM tar_detallepaqueteinsumos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "public function getAll() : array;", "public function getAll() : array;", "public static function all(){\n $query = DB::connection()->prepare('SELECT * FROM Asiakas ORDER BY nimi');\n $query->execute();\n $rows = $query->fetchAll();\n $tuotteet = array();\n\n foreach($rows as $row){\n $tuotteet[] = Asiakas::luoRivista($row);\n }\n\n return $tuotteet;\n }", "public abstract function getAll();", "static function getAll()\n {\n return $_SESSION['list_of_tamagotchis'];\n }", "public function forgetAll(): void;", "public function index()\n {\n return Turmas::all();\n }", "function getAll(): array;", "public function findAll(){\n\t\ttry{\n\t\t\t$conexao = new Atas_Model_Banco();\n\t\t\t$db = $conexao->getConnection();\n\t\t\t$atas = $db->atas->find();\n\t\t\t\n\t\t\treturn $atas;\n\t\t}catch(Exception $e){\n\t\t\tthrow new Exception($e->getMessage());\n\t\t\t\n\t\t}\n\t}", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAll()\n {\n }", "public function getAllTimbulan()\n\t{\n \t\treturn $this->db->get('timbulan')->result();\n\t}", "public static function get_all()\n {\n return self::get();\n }", "public function getAll(){\n }", "public function getTarjetas(){\n return response()->json(Tarjeta::all()->toArray());\n }", "public function fetchAllEtfs(){\n\n $result = $this->service->getAllEtfs();\n\n return response()->json(['success'=>$result], $this->successStatus); \n }", "public function getAllEtudiantsTemp() {\n $this->connexion();\n $statement = $this->connexion->prepare('SELECT * from temp_etudiant order by formationEtu, nomEtu;');\n $statement->execute();\n return $statement->fetchAll(PDO::FETCH_CLASS, \"Etudiant\");\n }", "public static function getAllTablas()\r\n {\r\n return $resultado = TablaMapper::findAll();\r\n }", "public function readAll(){\n $query = \"SELECT * FROM catastro.destinatarios_tasa;\";\n $statement = $this->cdb->prepare($query);\n $statement->execute();\n $rows = $statement->fetchAll(\\PDO::FETCH_OBJ);\n return $rows;\n }", "public function showTramites(){\n $conexion = new Connect();\n $consulta = $conexion->prepare('SELECT * FROM '.self::TABLA.' WHERE id_tramite IS NOT NULL GROUP BY id_responsable DESC');\n $consulta->execute();\n $registros = $consulta->fetchAll();\n return $registros;\n }", "public function get_all()\n {\n return $this->get_many();\n }", "public function all()\r\n\t{\r\n\r\n\t\t$query=$this->db->get('t_transaksi');\r\n\t\tif ($query->num_rows()>0) {\r\n\t\t\treturn $query->result();\r\n\t\t}\r\n\t\telse{\r\n\t\t\t\r\n\t\t\treturn array();\r\n\t\t}\r\n\t}", "abstract function get_all();", "public function getTamanhos(){\n $res = $this->conexao->query(\"select * from tamanho order by tamanho\");\n $tamanhos = $res->fetchAll(PDO::FETCH_ASSOC);\n return $tamanhos;\n }", "abstract public function getAll();", "abstract public function getAll();", "static function get_all()\n {\n }", "function getAll() {\n $query = $this->db->get('typePersoon'); // genereert SELECT * FROM typepersoon\n return $query->result(); // een array met typepersoon-objecten\n }", "public function getAll() {\n try\t{\n $result = array();\n\n $stm = $this->pdo->prepare(\"SELECT T.id, E.nombre AS 'empresa', T.testimonio, T.fecha, E.logo, T.rating\n FROM tbl_Testimonios T\n INNER JOIN tbl_Empresa E\n WHERE T.idEmpresa = E.id\n ORDER BY T.fecha\");\n $stm->execute();\n\n return $stm->fetchAll(PDO::FETCH_OBJ);\n } catch(Exception $e)\t{\n die($e->getMessage());\n }\n }" ]
[ "0.75476587", "0.7444052", "0.7444052", "0.7416156", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.74082154", "0.7378799", "0.7378799", "0.7378799", "0.733253", "0.730715", "0.72999686", "0.7278872", "0.7247649", "0.72022945", "0.7173693", "0.7126115", "0.7084283", "0.7084283", "0.7084283", "0.70790625", "0.7067327", "0.7044492", "0.7029816", "0.7026274", "0.7026274", "0.70207405", "0.7008921", "0.7005119", "0.7004647", "0.69859016", "0.69805527", "0.6973378", "0.69611007", "0.69611007", "0.69611007", "0.69611007", "0.69611007", "0.69611007", "0.69611007", "0.69611007", "0.69611007", "0.6955974", "0.6952212", "0.6942629", "0.6932788", "0.69201154", "0.69052094", "0.6893023", "0.6890048", "0.68881935", "0.6886877", "0.68777764", "0.6876794", "0.684677", "0.6846", "0.6846", "0.6845918", "0.6841653", "0.6841482" ]
0.773565
0
Returns the description for a test suite.
Возвращает описание для набора тестов.
private function _DescribeSuite(\PHPUnit_Framework_TestSuite $suite) { $count = $suite->Count(); return sprintf('%d %s from %s', $count, $this->_Plural('test', $count), $suite->GetName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDescription()\n {\n $this->generate(\n $this->getSuiteDocument(),\n array(\n 'description' => 'Hello World',\n )\n );\n\n $output = $this->getOutput()->fetch();\n $this->assertContains('Hello World', $output);\n }", "abstract public function getTestSuite();", "public function getSuite()\n {\n return $this->_testSuite;\n }", "function suite($title) {\n $desc = new TestSuite($title, function(){});\n Util::set_default_filename_and_lineno($desc, debug_backtrace());\n Preview::$world->pop();\n Preview::$world->push($desc);\n return new TestAPI($desc);\n}", "public function describe();", "public function describe();", "public function getTestSuite(): TestSuiteInterface;", "public function getSuite()\n {\n return $this->suite;\n }", "public function getSuite(/* ... */)\n {\n return $this->_suite;\n }", "static public function suite() {\n return Dev_Unit::load_with_prefix('Test.L10N.', 'RUCase' , 'ENCase' );\n }", "public function testGetDescription()\n {\n $this->assertEquals(\n $this->composy->getDescription(),\n 'Composy is a base composer package template for PHP. You can use Composy to easily build new composer compatible packages.'\n );\n }", "public function toString() {\n $div= str_repeat('=', 72);\n $str= sprintf(\n \"Results for test suite run at %s\\n\".\n \"%d tests, %d succeeded, %d failed, %d skipped\\n\",\n date('r'),\n $this->count(),\n $this->successCount(),\n $this->failureCount(),\n $this->skipCount()\n );\n \n // Details\n if (!empty($this->succeeded)) {\n $str.= \"\\n- Succeeded tests details:\\n\";\n foreach (array_keys($this->succeeded) as $key) {\n $str.= ' * '.$this->succeeded[$key]->toString().\"\\n\";\n }\n }\n if (!empty($this->skipped)) {\n $str.= \"\\n- Skipped tests details:\\n\";\n foreach (array_keys($this->skipped) as $key) {\n $str.= ' * '.$this->skipped[$key]->toString().\"\\n\";\n }\n }\n if (!empty($this->failed)) {\n $str.= \"\\n- Failed tests details:\\n\";\n foreach (array_keys($this->failed) as $key) {\n $str.= ' * '.$this->failed[$key]->toString().\"\\n\";\n }\n }\n return $str.$div.\"\\n\";\n }", "public function toString() {\n $div= str_repeat('=', 72);\n $str= sprintf(\n \"Results for test suite run at %s\\n\".\n \"%d tests, %d succeeded, %d failed, %d skipped\\n\",\n date('r'),\n $this->count(),\n $this->successCount(),\n $this->failureCount(),\n $this->skipCount()\n );\n \n // Details\n if (!empty($this->succeeded)) {\n $str.= \"\\n- Succeeded tests details:\\n\";\n foreach (array_keys($this->succeeded) as $key) {\n $str.= ' * '.$this->succeeded[$key]->toString().\"\\n\";\n }\n }\n if (!empty($this->skipped)) {\n $str.= \"\\n- Skipped tests details:\\n\";\n foreach (array_keys($this->skipped) as $key) {\n $str.= ' * '.$this->skipped[$key]->toString().\"\\n\";\n }\n }\n if (!empty($this->failed)) {\n $str.= \"\\n- Failed tests details:\\n\";\n foreach (array_keys($this->failed) as $key) {\n $str.= ' * '.$this->failed[$key]->toString().\"\\n\";\n }\n }\n return $str.$div.\"\\n\";\n }", "public function getTestSuite(): TestSuiteInterface\n {\n return $this->testSuite;\n }", "public function testGetDescription()\n {\n }", "public function getDescribe()\n {\n return $this->describe;\n }", "public function getDescription(): string\n {\n return 'This is an example module';\n }", "public static function get_description() {\n return static::get_string(\"description\");\n }", "abstract public function describe();", "protected function _getSuite() {\n\t\treturn Deck::getSuite($this->_suite);\n\t}", "public function getDescription()\n {\n return Craft::t('Generate dummies');\n }", "function getDescription() {\n\t\treturn $this->_modulexml->description;\n\t}", "public function provides()\n {\n return ['suite'];\n }", "public function description()\n {\n return $this->_share->get('desc');\n }", "public function getDescription(): string {\n return static::DESCRIPTION;\n }", "public static function suite()\n {\n\t\tself::createTestDb();\n\t\trequire_once('integration_tests/data_model_test.php');\n\t\trequire_once('integration_tests/data_item_test.php');\n\t\trequire_once('integration_tests/article_test.php');\n $suite = new Cognifty_TestSuite_Integration( 'phpUnderControl - Integration Tests' );\n\n\t\t$suite->addTestSuite('Cgn_DataModel_Test');\n\t\t$suite->addTestSuite('Cgn_DataItem_Integration_Test');\n\t\t$suite->addTestSuite('Cgn_Article_Test');\n\n return $suite;\n }", "public function getDescription()\n\t{\n\t\treturn 'Provides basic use information for the stats application.';\n\t}", "protected function getTestSuite($name = '') {\n\t\tif (!empty($this->_testSuite)) {\n\t\t\treturn $this->_testSuite;\n\t\t}\n\t\treturn $this->_testSuite = new PHPUnit_Framework_TestSuite($name);\n\t}", "public static function description()\n\t{\n\t\treturn static::$_description;\n\t}", "public function __toString()\n {\n return \"{$this->suite} {$this->title}\";\n }", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription();", "public function getDescription() {}", "public function getDescription() {}", "public function getDescription() {}", "public function getDescription() {}", "public function getDescription() {}", "public function getDescription() {}", "public function getDescription() {}", "public function getDescription() {}", "public function getDescription() {}", "public function getDescription() {}", "public function getDescription() {}", "public function getDescription() {}", "public function getDescription() \n {\n return $this->getConfig( 'description' );\n }", "public function description();", "public function description();", "public function description();", "static public function getDescription();", "public function formatSuites()\n {\n $attributes = $this->formatAttributes($this->document);\n $suites = $this->reduceSuites($this->document->getSuites());\n\n return sprintf(\n \"<testsuites%s>\\n%s</testsuites>\",\n $attributes,\n $suites\n );\n }", "public function getDescription()\n {\n return $this->getInfo('Description');\n }", "public function getDESCRIPTION()\n {\n\t\treturn $this->getValue('site_description');\n }", "public static function description()\n {\n return static::$_description;\n }", "public static function getDescription() {\n self::create();\n return self::$instance->description;\n }", "abstract protected function describe();", "public static function getDescription() {\n return 'The product group will be displayed as a component of the\n splash page and gives a small description of one of the\n equipment sections that is distributed in ARSLS.';\n }", "public function description() {}", "function description(){\n\t\tconfig(\"app.description\");\n\t}", "public function affiche_les_Tests() {\n\t\treturn \"affiche\";\n\t}", "public static function suite()\n\t{\n\t\t$suite = new PHPUnit_Framework_TestSuite('All tests');\n\t\t$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(dirname(__FILE__).'/haml'));\n\t\t$haml = new PHPUnit_Framework_TestSuite('Haml');\n\t\tforeach ($files as $file)\n\t\t\tif (!$file->isDir())\n\t\t\t\tif (preg_match('/(.*?)\\.class\\.php$/ius', $file->getFilename(), $matches))\n\t\t\t\t\t$haml->addTestFile($file->getPathname());\n\t\t$suite->addTestSuite($haml);\n\t\t$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(dirname(__FILE__).'/sass'));\n\t\t$sass = new PHPUnit_Framework_TestSuite('Sass');\n\t\tforeach ($files as $file)\n\t\t\tif (!$file->isDir())\n\t\t\t\tif (preg_match('/(.*?)\\.class\\.php$/ius', $file->getFilename(), $matches))\n\t\t\t\t\t$sass->addTestFile($file->getPathname());\n\t\t$suite->addTestSuite($sass);\n\t\treturn $suite;\n\t}", "public function testGetDescription() \r\n { \r\n $actu = new Actualite();\r\n $actu->setDescription(\"Test titre 1\");\r\n $resultat = $actu->getDescription(); \r\n $this->assertEquals(\"Test titre 1\", $resultat); \r\n }", "public function getDescription()\n {\n return $this->desc;\n }", "function getDescription()\n {\n }", "public function getDescription() {\n\t\treturn $this->getLanguageLabelForCheck('description');\n\t}", "public function getDescription()\n {\n return $this->__get(\"description\");\n }", "public static function description(): string\n {\n return 'Groups several jobs of the same type together (ideally a group of samples)';\n }", "public function getDescription() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"description\");\n\t}", "public function getDescription() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"description\");\n\t}", "public function getDescription() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"description\");\n\t}", "public function description(): string\n {\n return $this->name();\n }" ]
[ "0.7173694", "0.71301293", "0.6668796", "0.6597055", "0.64113533", "0.64113533", "0.63632286", "0.63274723", "0.63192445", "0.63115025", "0.6276186", "0.6161061", "0.61396676", "0.6087061", "0.6018948", "0.6016641", "0.5982888", "0.5947298", "0.59311986", "0.5919993", "0.5918335", "0.5917535", "0.5904942", "0.5901329", "0.58970517", "0.5892919", "0.5889323", "0.5887198", "0.58809364", "0.5863768", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58613527", "0.58578455", "0.58578455", "0.58578455", "0.58578455", "0.58578455", "0.58578455", "0.58578455", "0.58578455", "0.58578455", "0.58578455", "0.58578455", "0.5857302", "0.5851568", "0.58425474", "0.58425474", "0.58425474", "0.5821752", "0.58054733", "0.5804181", "0.58011407", "0.58009464", "0.57893735", "0.5789123", "0.57885027", "0.57859796", "0.5776858", "0.5775233", "0.57563144", "0.57486963", "0.574135", "0.57348436", "0.5732939", "0.57228", "0.5718857", "0.57161784", "0.57161784", "0.57161784", "0.5715703" ]
0.71727055
1
Returns the test suite marker.
Возвращает маркер набора тестов.
private function _SuiteMarker() { if ($this->suite_depth == 0) return '[==========]'; else return '[----------]'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSuite()\n {\n return $this->_testSuite;\n }", "public function getSuite()\n {\n return $this->suite;\n }", "public function getSuite(/* ... */)\n {\n return $this->_suite;\n }", "protected function _getSuite() {\n\t\treturn Deck::getSuite($this->_suite);\n\t}", "abstract public function getTestSuite();", "public function getMarker(){\n\t\treturn 'marker'.(++$this->marker);\n\t}", "protected function getCurrentTestCase()\n {\n return SimpleTest::getContext()->getTest();\n }", "function GetIdentifier() {\r\n return $this->test_name_identifier;\r\n }", "public function getMarkerHelper()\n {\n return $this->markerHelper;\n }", "public function hasSuiteName(){\n return $this->_has(1);\n }", "public function getMarkerFactoryClassStr()\n {\n return $this->markerFactory->getClass()->getName();\n }", "public function getTestSuite(): TestSuiteInterface\n {\n return $this->testSuite;\n }", "private function _DescribeSuite(\\PHPUnit_Framework_TestSuite $suite)\n {\n $count = $suite->Count();\n return sprintf('%d %s from %s', $count, $this->_Plural('test', $count), $suite->GetName());\n }", "public static function suite()\r\n {\r\n return new PHPUnit_Extensions_PhptTestSuite(dirname(__FILE__));\r\n }", "public function getTestedClass()\n {\n return self::TESTED_CLASS;\n }", "public function getTestedClass()\n {\n return self::TESTED_CLASS;\n }", "public function getTestedClass()\n {\n return self::TESTED_CLASS;\n }", "public function getTestedClass()\n {\n return self::TESTED_CLASS;\n }", "public function getTestSuite(): TestSuiteInterface;", "private function _getNextSuiteId()\n {\n return $this->_getNextId(false);\n }", "protected function getCliToolName()\n {\n return 'phpunit';\n }", "public function getMarker() {\n return $this->marker;\n }", "protected function getFilename() {\n\t\t\t\n\t\t\treturn 'tests' . DS . $this->tag;\n\t\t\t\n\t\t}", "function suite($title) {\n $desc = new TestSuite($title, function(){});\n Util::set_default_filename_and_lineno($desc, debug_backtrace());\n Preview::$world->pop();\n Preview::$world->push($desc);\n return new TestAPI($desc);\n}", "public function getName(): string\n {\n return self::MARKERS;\n }", "protected function getTestEngineName()\n {\n return getenv('ST_ENGINE_NAME');\n }", "function getMarkerClassName() {\n\t\treturn $this->markerClassName;\n\t}", "public function getMarkerFactory()\n {\n return $this->markerFactory;\n }", "protected function getInstanceIdentifier()\n {\n return $this->testSystem->getSystemIdentifier();\n }", "public function __toString()\n {\n return \"{$this->suite} {$this->title}\";\n }", "protected function get_test_filename() {\n\t\treturn 'test.csv';\n\t}", "static public function suite() {\n return Dev_Unit::load_with_prefix('Test.L10N.', 'RUCase' , 'ENCase' );\n }", "public static function suite() {\n $suite = new PHPUnit_Framework_TestSuite('All Tests');\n \n $basePath = App::pluginPath('IMCake') . 'Test' . DS . 'Case' . DS;\n \n $suite->addTestFile($basePath . 'View' . DS . 'Helper' . DS . 'IMCakeHelperTest.php');\n return $suite;\n }", "public static function suite()\n {\n $dir = dirname(__FILE__);\n $phpt = new PHPUnit_Extensions_PhptTestSuite($dir);\n $suite = new PHPUnit_Framework_TestSuite('PEAR_PackageUpdate Test Suite');\n $suite->addTestSuite($phpt);\n $suite->addTestSuite('PEAR_PackageUpdate_TestSuite_Exception');\n $suite->addTestSuite('PEAR_PackageUpdate_TestSuite_Stub');\n return $suite;\n }", "public static function getTesting()\n {\n return self::$testingMode;\n }", "public function getTestMethod()\n {\n return $this->testMethod;\n }", "protected function getCoverageHintingKey(): string {\n return $this->coverageHintingKey;\n }", "public function getTestKey()\n {\n return $this->testKey;\n }", "static function suite()\n\t{\n\t\tstatic $suite = NULL;\n\n\t\tif ($suite instanceof \\PHPUnit\\Framework\\TestSuite)\n\t\t{\n\t\t\treturn $suite;\n\t\t}\n\n\t\tUnittest_Tests::configure_environment();\n\n\t\t$suite = new \\PHPUnit\\Framework\\TestSuite;\n\n\t\t// Add tests\n\t\t$files = Kohana::list_files('tests');\n\t\tself::addTests($suite, $files);\n\n\t\treturn $suite;\n\t}", "protected function marketingTool() {\n return config('email-marketing.tools')[config('email-marketing.tool')];\n }", "public function getTestSetup()\n\t{\n\t return $this->testSetupCallback;\n\t}", "public function getSpecimenId()\n {\n \t$testCategoryName = $this->testType->testCategory->name;\n \treturn substr($testCategoryName, 0 , 3).'-'.$this->specimen->id;\n }", "public function affiche_les_Tests() {\n\t\treturn \"affiche\";\n\t}", "protected function getTestSuite($name = '') {\n\t\tif (!empty($this->_testSuite)) {\n\t\t\treturn $this->_testSuite;\n\t\t}\n\t\treturn $this->_testSuite = new PHPUnit_Framework_TestSuite($name);\n\t}", "public function getTest()\n {\n return $this->test;\n }", "public function getTest()\n {\n return $this->test;\n }", "static public function suite() {\n return Dev_Unit::load_with_prefix('Test.WS.Auth.OpenSocial.', 'ServiceCase');\n }", "public function startTestSuite(\\PHPUnit_Framework_TestSuite $suite)\n\t{\n\t\tparent::startTestSuite($suite);\n\n\t\tif (!$this->headerPrinted) {\n\t\t\t$header = \"██████╗ ██╗ ██╗██████╗ ██╗ ██╗███╗ ██╗██╗████████╗\n██╔══██╗██║ ██║██╔══██╗██║ ██║████╗ ██║██║╚══██╔══╝\n██████╔╝███████║██████╔╝██║ ██║██╔██╗ ██║██║ ██║ \n██╔═══╝ ██╔══██║██╔═══╝ ██║ ██║██║╚██╗██║██║ ██║ \n██║ ██║ ██║██║ ╚██████╔╝██║ ╚████║██║ ██║ \n╚═╝ ╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝ \";\n\n\t\t\t$this->out($header,'fg-blue',true);\n\t\t\t$this->out(\" - - - - T E S T A L L T H E T H I N G S - - - - \",'fg-blue',true);\n\t\t\t$this->out('','',true);\n\t\t\t$this->headerPrinted = true;\n\t\t}\n\n\t\tif ($suite->getName() != 'PHPUnit') $this->out(\"BEGIN SUITE '\".$suite->getName().\"'\\n\");\n\t}", "public function getValidTestToken()\n {\n //\n return \"valid-token\";\n }", "public static function suite()\n {\n $suite = new PHPUnit_Framework_TestSuite();\n $suite->addTestSuite('Orga_Test_CellAttributes');\n $suite->addTestSuite('Orga_Test_CellHierarchy');\n $suite->addTestSuite('Orga_Test_CellAdjacent');\n return $suite;\n }", "static public function suite() {\n return Dev_Unit::load_with_prefix('Test.Validation.', 'ValidatorCase');\n }", "public static function suite() {\n\t\t$suite = new CakeTestSuite('All Monitoring Tests');\n\t\t$basePath = App::pluginPath('Monitoring') . 'Test' . DS . 'Case' . DS;\n\t\t$suite->addTestDirectoryRecursive($basePath);\n\n\t\treturn $suite;\n\t}", "public static function suite()\n {\n $suite = new PHPUnit_Framework_TestSuite();\n\n // Start remaining tests...\n $suite->addTestSuite('Collections_List_ArrayListTest');\n\n return $suite;\n }", "public function getName(): string\n {\n return 'Custom Verifying Runner';\n }", "public function testRunStarted(\\unittest\\TestSuite $suite) {\n $this->write('[');\n }", "public function getTag()\n {\n return 'w-mock';\n }", "function get_setup_section() {\n\t\tif ( isset( $_REQUEST['tix_section'] ) )\n\t\t\treturn strtolower( $_REQUEST['tix_section'] );\n\n\t\treturn 'general';\n\t}", "public function getExerciseTestsNames(): array;", "public function provides()\n {\n return ['suite'];\n }", "public function startTestSuite(\\PHPUnit_Framework_TestSuite $suite)\n {\n // Wrap the suite header.\n ob_start();\n\n $this->_Print($this->_SuiteMarker(), $this->_DescribeSuite($suite), self::COLOR_GREEN);\n $this->suite_start_time = microtime(TRUE);\n ++$this->suite_depth;\n $this->suite_error_count = 0;\n\n // Wrap the suite contents.\n ob_start();\n }", "public function renderBeforeSuite($obj) {\n // $print = $obj->getCurrentSuite()->getName();\n\n return '';\n }", "function getCli_indIEDest() {\r\n return $this->cli_indIEDest;\r\n }", "public function getMark()\n {\n return $this->mark;\n }", "public function getMark()\n {\n return $this->mark;\n }", "public function testGetSeederShellName() {\n\t\t$this->assertEquals('FakeSeeder', $this->_task->getSeederShellName());\n\t}", "public static function suite() {\n\t\t$suite = new CakeTestSuite('All DataTrack test');\n\n\t\t$path = CakePlugin::path('DataTrack') . 'Test' . DS . 'Case' . DS;\n\t\t$suite->addTestDirectoryRecursive($path);\n\n\t\treturn $suite;\n\t}", "public function testGetFeatureFlag()\n {\n }", "public static function suite()\n {\n $suite = new PHPUnit_Framework_TestSuite('PHP_DocBlockGenerator Tests');\n\n $dir = new GlobIterator(dirname(__FILE__) . '/*Test.php');\n $suite->addTestFiles($dir);\n\n return $suite;\n }", "public function findMarker()\n\t{\n\t\treturn $this->markerPosition = 0;\n\t}", "public static function suite() {\n set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . \"/../../\");\n spl_autoload_register(function($name) {\n require_once str_replace(array(\"_\", \"\\\\\"), \"/\", $name) . \".php\";\n });\n \n $suite = new \\PHPUnit_Framework_TestSuite(\"TodoTxt\");\n $suite->addTestSuite('TodoTxt\\Tests\\TaskTest');\n return $suite;\n }", "function test_helper() {\n return 'OK';\n}", "public function startTestSuite(PHPUnit_Framework_TestSuite $suite) {\n $this->currentTestSuiteName = $suite->getName();\n $this->currentTestName = '';\n $this->write(\"Started Suite: \" . $this->currentTestSuiteName . \" (\" . count($suite) . \" tests)\\n\");\n }", "public function getRegMark()\n {\n return $this->reg_mark;\n }", "public function getTestId()\n {\n return $this->test_id;\n }", "public function get_key(): string {\n\t\treturn 'sanity-check';\n\t}", "protected function getControllerTestTemplate() : string\n {\n return static::TEMPLATE_CONTROLLER_TEST_SOURCE;\n }", "public function getPathConfigNode(): string\n {\n return 'tests';\n }", "public function getTestEnvironmentSetup()\n\t{\n\t return $this->testEnvironmentSetupCallback;\n\t}", "public function getTestMode() { return $this->testMode;}", "public static function findTestCase()\n {\n $backtrace = debug_backtrace();\n $classname = self::TESTCASE_CLASSNAME;\n\n do {\n $calling_test = array_shift($backtrace);\n }\n while (isset($calling_test) && !(isset($calling_test['object']) && $calling_test['object'] instanceof $classname));\n\n if (!isset($calling_test)) {\n trigger_error('No calling test found.', E_USER_ERROR);\n }\n\n return $calling_test['object'];\n }", "public static function getTestMainTableName() {\n\t\treturn 'test_main_'.__CLASS__.'_'.getmypid();\n\t}", "public function getMarker();", "public function name()\n {\n return 'Team Matcher';\n }", "public function getCheckSetName()\n {\n return $this->check_set_name;\n }", "public static function suite()\n {\n $suite = new \\PHPUnit\\Framework\\TestSuite('Mito Coding Standards Sniffs');\n\n $standards = [\n 'Application',\n 'Others',\n 'Views',\n 'ViewsAlternate',\n ];\n $path = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'src';\n\n Autoload::addSearchPath($path);\n\n $GLOBALS['PHP_CODESNIFFER_SNIFF_CODES'] = [];\n $GLOBALS['PHP_CODESNIFFER_FIXABLE_CODES'] = [];\n\n foreach ($standards as $standard) {\n\n $testsDir = $path.DIRECTORY_SEPARATOR.$standard.DIRECTORY_SEPARATOR.'Tests'.DIRECTORY_SEPARATOR;\n\n if (is_dir($testsDir) === false) {\n // No tests for this standard.\n continue;\n }\n\n $di = new \\RecursiveIteratorIterator(new \\RecursiveDirectoryIterator($testsDir));\n\n foreach ($di as $file) {\n // Skip hidden files.\n if (substr($file->getFilename(), 0, 1) === '.') {\n continue;\n }\n\n // Tests must have the extension 'php'.\n $parts = explode('.', $file);\n $ext = array_pop($parts);\n if ($ext !== 'php') {\n continue;\n }\n\n $filePath = $file->getPathname();\n $className = str_replace($path.DIRECTORY_SEPARATOR, '', $filePath);\n $className = substr($className, 0, -4);\n $className = '/Mito/'. $className;\n\n // Include the sniff here so tests can use it in their setup() methods.\n $parts = explode('/', $className);\n if (isset($parts[2],$parts[4],$parts[5]) === true) {\n $sniffPath = $path.DIRECTORY_SEPARATOR.$parts[2].DIRECTORY_SEPARATOR.'Sniffs'.DIRECTORY_SEPARATOR.$parts[4].DIRECTORY_SEPARATOR.$parts[5];\n $sniffPath = substr($sniffPath, 0, -8).'Sniff.php';\n\n if (file_exists($sniffPath) === true) {\n $className = Autoload::loadFile($filePath);\n $GLOBALS['PHP_CODESNIFFER_STANDARD_DIRS'][$className] = $path.DIRECTORY_SEPARATOR.$parts[2];\n $GLOBALS['PHP_CODESNIFFER_TEST_DIRS'][$className] = $testsDir;\n $suite->addTestSuite($className);\n } else {\n self::$orphanedTests[] = $filePath;\n }\n } else {\n self::$orphanedTests[] = $filePath;\n }\n }//end foreach\n }//end foreach\n\n return $suite;\n\n }", "public function getSetup()\n {\n return $this->setup;\n }", "public function getSetup()\n {\n return $this->setup;\n }", "public function test() {\n return [\n '#markup' => t('Hello Snehal.'),\n ];\n }", "public static function suite()\n {\n\t\tself::createTestDb();\n\t\trequire_once('integration_tests/data_model_test.php');\n\t\trequire_once('integration_tests/data_item_test.php');\n\t\trequire_once('integration_tests/article_test.php');\n $suite = new Cognifty_TestSuite_Integration( 'phpUnderControl - Integration Tests' );\n\n\t\t$suite->addTestSuite('Cgn_DataModel_Test');\n\t\t$suite->addTestSuite('Cgn_DataItem_Integration_Test');\n\t\t$suite->addTestSuite('Cgn_Article_Test');\n\n return $suite;\n }", "public function getTestMode()\n {\n return $this->test_mode;\n }", "public function getTestSuiteNames() {\n $array = array_keys($this->testsuites);\n sort($array);\n\n return array_values($array);\n }", "public function getTest() {\r\n return $this->_provider->get('PM\\Profiler\\Repository\\Test');\r\n }", "public function startTestSuite(PHPUnit_Framework_TestSuite $suite)\n {\n }", "public function startTestSuite(PHPUnit_Framework_TestSuite $suite)\n {\n }", "protected function getModeInWord(): string\n {\n return $this->isTestMode() ? 'test' : 'production';\n }", "public function testGetSet()\n {\n $this->assertSame($this->suite->reveal(), $this->benchmark->getSuite());\n }", "public function provideTestNamesForSetExtension()\n {\n return array(\n array('1', true),\n array('12', false),\n array('pdf', false),\n array('html', false),\n array('latex', true),\n array('p-f', true),\n array('p_f', true),\n );\n }", "public function getSuiteId($suitePath)\n {\n return $this->_suitePathToId[$suitePath];\n }", "public function getName()\n {\n return('TestAntispam');\n }", "public static function getProjectInstanceID()\n {\n return '0.0';\n\n }" ]
[ "0.66387874", "0.64410025", "0.63761985", "0.6007699", "0.5677168", "0.5583761", "0.556973", "0.5498074", "0.5461612", "0.5449792", "0.5439546", "0.5406145", "0.5400041", "0.53696096", "0.53184605", "0.53184605", "0.53184605", "0.53184605", "0.52415097", "0.5202266", "0.5177269", "0.5131824", "0.51302457", "0.51228267", "0.5122336", "0.5118083", "0.51138127", "0.5106776", "0.509848", "0.50307864", "0.5030335", "0.50246286", "0.5014316", "0.4983828", "0.49795267", "0.4974221", "0.4967832", "0.495547", "0.49509868", "0.49502045", "0.49385637", "0.49369702", "0.49280512", "0.49280256", "0.4904071", "0.4904071", "0.4866104", "0.4863058", "0.48593605", "0.48524517", "0.4844371", "0.4819302", "0.48149854", "0.48013607", "0.4800943", "0.47955146", "0.47896698", "0.47810856", "0.47551644", "0.47430393", "0.4739207", "0.47343108", "0.4725672", "0.4725672", "0.47246447", "0.4719128", "0.4716309", "0.47141504", "0.47037476", "0.46904325", "0.46815288", "0.46800333", "0.46749848", "0.4661107", "0.4658679", "0.464988", "0.46495926", "0.46460736", "0.46305424", "0.46261486", "0.461968", "0.4608815", "0.460348", "0.46019918", "0.46018434", "0.45991853", "0.45991853", "0.45871347", "0.4582612", "0.4581489", "0.45808297", "0.45797095", "0.4574293", "0.4574293", "0.45732266", "0.4559581", "0.45586562", "0.45575103", "0.45480615", "0.4547475" ]
0.7885607
0
Colors |$str| to be a certain |$color|.
Цвета |$str| должны быть определенным |$color|.
private function _Color($str, $color) { $color_code = ''; switch ($color) { case self::COLOR_RED: $color_code = '0;31'; break; case self::COLOR_GREEN: $color_code = '0;32'; break; case self::COLOR_BLUE: $color_code = '0;34'; break; case self::COLOR_PURPLE: $color_code = '0;35'; break; case self::COLOR_CYAN: $color_code = '0;36'; break; } if ($color == self::COLOR_NONE) { return $str; } return "\x1b[{$color_code}m{$str}\x1b[0m"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function doColor($str) {\n return'#'.substr($str, 0, 6);\n }", "public static function colorString(string $string, null|string $color=self::GREEN):string{\n return \"\\033[\".$color.\"m\".$string.\"\\033[0m\"; \n }", "public static function color($str)\r\n\t{\r\n\t\treturn (bool) preg_match('/^#?+[0-9a-f]{3}(?:[0-9a-f]{3})?$/iD', $str);\r\n\t}", "public function addCLIColor($str, $color) {\n $mask2 = 1 << 7;\n\n if (!is_numeric($color) && is_string($color)) {\n $color = $this->strToColor($color);\n } elseif (!is_numeric($color)) {\n return $str;\n }\n $colorCode = '';\n if ($color & self::SET_BOLD) {\n $colorCode .= '1;';\n }\n $bg = ($color >> 8);\n if ($bg && $bg >= 40 && $bg <= 49) {\n $colorCode .= \"$bg;\";\n }\n $fcolor = $bg ? ($color ^ ($bg << 8)) : $color;\n $fcolor && $fcolor = (($fcolor ^ $mask2) >> 1);\n if ($fcolor && $fcolor >= 30 && $fcolor <= 39) {\n $colorCode .= \"$fcolor;\";\n }\n\n if ($colorCode) {\n $colorCode = trim($colorCode, ';');\n return \"\\033[{$colorCode}m{$str}\\033[0m\";\n }\n return $str;\n }", "public static function colorBackgroundString(string $string, int $color):string{\n return \"\\033[\".self::BLACK.';'.$color.'m'.$string.\"\\033[0m\"; \n }", "protected function stringToColor($string)\n {\n // This helps in getting a full range of hues from 0 to 360\n $hue = round(hexdec(substr(md5($string),0,3))/11.375);\n $rgb = $this->hsl2rgb($hue,$this->saturation,$this->luminosity);\n return sprintf(\"#%02X%02X%02X\",$rgb['r'],$rgb['g'],$rgb['b']);\n }", "private function colorString($string, $colorCode)\n {\n return \"<{$colorCode}>{$string}</{$colorCode}>\";\n }", "public function rgbcode($str){\n // if first number is a digit, make it a letter -- to make colors more pastelish, lighter\n $letters = array('a','b','c','d','e','f','a','b','c','d');\n $preliminarystring = substr(md5($str), 0, 6);\n if($preliminarystring[0]<10){ $preliminarystring[0] = $letters[$preliminarystring[0]]; }\n return '#$preliminarystring';\n }", "final private static function string_to_color($string) {\n $constant = __CLASS__.'::'.strtoupper($string);\n if ( defined($constant) ) {\n return constant($constant);\n } else {\n throw new ConsoleException('can not find a color '.$string);\n }\n }", "function output($str,$color='default') {\n $colors=[\n 'black'=>30,\n 'blue'=>34,\n 'green'=>32,\n 'cyan'=>36,\n 'red'=>31,\n 'purple'=>35,\n 'brown'=>33,\n 'gray'=>37\n ];\n if ($this->iscli()) {\n if (array_key_exists($color,$colors))\n print \"\\033[\".$colors[$color].'m'.$str.\"\\033[0m \\n\";\n else print $str.\"\\n\";\n }\n }", "function string_color_code($string) {\n\t$string = md5 ( $string );\n\t$string = array (\n\t\t\t\"R\" => hexdec ( substr ( $string, 0, 2 ) ),\n\t\t\t\"G\" => hexdec ( substr ( $string, 2, 2 ) ),\n\t\t\t\"B\" => hexdec ( substr ( $string, 4, 2 ) ) \n\t);\n\treturn 'rgb(' . implode ( ',', $string ) . ')';\n}", "function add_colors($string) {\n\t// To add words keep arrays matched by numbers\n\t$patterns[0] = '/PASSED/';\n\t$patterns[1] = '/FAILED/';\n\t$patterns[2] = '/Warning/';\n\t$replacements[0] = '<span class=\"text-success\">' . gettext(\"PASSED\") . '</span>';\n\t$replacements[1] = '<span class=\"text-alert\">' . gettext(\"FAILED\") . '</span>';\n\t$replacements[2] = '<span class=\"text-warning\">' . gettext(\"Warning\") . '</span>';\n\tksort($patterns);\n\tksort($replacements);\n\treturn preg_replace($patterns, $replacements, $string);\n}", "function color($color) {\n // Default the return color to false (no match found)\n $returnColor = false;\n // Standard color list with possible synonyms, ordered by color priority\n $colorList = array(\n 'white' => array('snow', 'ghost', 'ivory', 'powder', 'blizzard', 'frost', 'winter'),\n 'red' => array('salmon', 'crimson', 'fire', 'maroon', 'ruby', 'lava', 'garnet', 'cabernet'),\n 'pink' => array('coral'),\n 'orange' => array(),\n 'yellow' => array('lemon'),\n 'purple' => array('violet', 'lavender', 'plum', 'fuchsia', 'magenta'),\n 'blue' => array('indigo','cyan', 'teal', 'aqua', 'turquoise', 'navy', 'sky', 'glacier'),\n 'black' => array('night', 'midnight', 'ebony', 'blk'),\n 'green' => array('forest','olive', 'peacock', 'jade'),\n 'brown' => array('gold', 'bronze', 'java', 'cocoa', 'brunello', 'earth', 'pecan', 'espresso', 'saddle'),\n 'tan' => array('beige', 'cream', 'almond', 'sahara', 'neutral', 'creme', 'bisque', 'parchment', 'pewter', 'khaki', 'sand', 'camel', 'fawn', 'Bisque', 'taupe', 'dune', 'oyster'),\n 'gray' => array('grey', 'silver', 'charcoal', 'graphite', 'ash', 'steel', 'gun', 'smoke', 'stone', 'flint', 'platinum', 'gry'),\n // We might need to add silver, especially for exterior colors\n //'silver' => array(),\n );\n // Convert the users color to lowercase\n $color = strtolower($color);\n // Loop through our standard color list\n foreach($colorList as $standardColorKey => $colorSynonyms) {\n // If the users color includes this key, use it and break of this foreach\n if (strpos($color, $standardColorKey) !== false) {\n $returnColor = $standardColorKey;\n break;\n } else {\n // Loop through the synonyms for this main color looking for matches\n foreach($colorSynonyms as $synonym) {\n // If this synonym matches then set the return to the main key and break out of the foreach\n if (strpos($color, $synonym) !== false) {\n $returnColor = $standardColorKey;\n break;\n }\n }\n }\n }\n return $returnColor;\n }", "public static function strColor($string, $fgColor = null, $bgColor = null)\n {\n $colored_string = \"\";\n\n $fgColor = self::getFgColor($fgColor);\n if (!is_null($fgColor)) {\n $colored_string .= \"\\033[\" . $fgColor . \"m\";\n }\n\n $bgColor = self::getBgColor($bgColor);\n if (!is_null($bgColor)) {\n $colored_string .= \"\\033[\" . $bgColor . \"m\";\n }\n\n if (is_null($fgColor) && is_null($bgColor)) {\n $colored_string = $string;\n } else {\n $colored_string .= $string . \"\\033[0m\";\n }\n return $colored_string;\n }", "public function stringToColorCode($str,$quant) {\n if($quant==0){\n return '#878787';\n }else{\n\n $letters = array('a','b','c','d','e','f','a','b','c','d');\n //$code = dechex(crc32($str));\n $code = substr(crc32($str), 0, 6);\n\n /* I just learned all grayscale hex codes repeat like this for example: #efefef or #ababab, etc... */\n $code[0] = $letters[$code[0]];\n $code[1] = $letters[$code[1]];\n $code[2] = $code[0];\n $code[3] = $code[1];\n //$code[4] = $code[0];\n $code[4] = $letters[$code[4]]; // this one breaks the pattern (of grayscale) to add a little more color variation.\n //$code[5] = $letters[$code[5]];\n $code[5] = $code[1];\n // $code[0] = $letters[$code[0]];\n // $code[0] = $letters[$code[0]];\n return'#'.$code;\n }\n }", "function pickColor($s) {\n\tglobal $ghFieldColors;\n\n\t$aColors = array_values($ghFieldColors);\n\t$len = count($aColors);\n\t$i = (strlen($s)+ord($s)) % $len; // pick a repeatable but random number based on the string\n\t\n\treturn $aColors[$i];\n}", "function color( $dstr, $r ) {\n\n\t if($_GET['list2']==\"tab1\"){\n\t \tif ($dstr[8] == 'BELUM ADA TAGIHAN' ){\n\t \t\treturn \"<font color=red><b>{$dstr[$r]}</b></font>\";\n\t \t}else{\n\t \t\treturn \"<font color=blue><b>{$dstr[$r]}</b></font>\";\n\t \t}\n\t }else{\n\t \tif ($dstr[7] == 'BELUM ADA TAGIHAN' ){\n\t \t\treturn \"<font color=red><b>{$dstr[$r]}</b></font>\";\n\t \t}else{\n\t \t\treturn \"<font color=blue><b>{$dstr[$r]}</b></font>\";\n\t \t}\n\t }\n}", "function cs_red($s){ return \"<span style='color:red;'>$s</span>\"; }", "function get_color($color_string, $default) {\n $color_parts = explode(',', $color_string);\n if(count($color_parts) != 3) {\n return $default;\n }\n\n $component_array = array('r', 'g', 'b');\n\n $result = array();\n foreach($color_parts as $id => $color_part) {\n if(trim($color_part) != (int)trim($color_part)) {\n return $default;\n }\n $result[$component_array[$id]] = (int)trim($color_part);\n }\n\n return $result;\n\n}", "public function setColor ($color) {}", "function preg_color($pattern, $color, $text) { return\n preg_replace($pattern, chr(27).\"[{$color}m\\\\1\".chr(27).'[0m', $text)\n;}", "private function format(string $str): string\n {\n if (Terminal::Posix !== $this->terminal) {\n return $str;\n }\n\n /** @var string|null $regexp */\n static $regexp;\n if (null === $regexp) {\n $regexp = ',<<\\s*((('.implode('|', array_map(fn (Color $c): string => $c->value, Color::cases())).')(\\s*))+)>>,Umsi';\n }\n\n return (string) preg_replace_callback($regexp, $this->formatter(), $str);\n }", "public static function translateColors($string, $symbol = \"&\") {\n\t\t$string = str_replace($symbol . \"0\", TF::BLACK, $string);\n\t\t$string = str_replace($symbol . \"1\", TF::DARK_BLUE, $string);\n\t\t$string = str_replace($symbol . \"2\", TF::DARK_GREEN, $string);\n\t\t$string = str_replace($symbol . \"3\", TF::DARK_AQUA, $string);\n\t\t$string = str_replace($symbol . \"4\", TF::DARK_RED, $string);\n\t\t$string = str_replace($symbol . \"5\", TF::DARK_PURPLE, $string);\n\t\t$string = str_replace($symbol . \"6\", TF::GOLD, $string);\n\t\t$string = str_replace($symbol . \"7\", TF::GRAY, $string);\n\t\t$string = str_replace($symbol . \"8\", TF::DARK_GRAY, $string);\n\t\t$string = str_replace($symbol . \"9\", TF::BLUE, $string);\n\t\t$string = str_replace($symbol . \"a\", TF::GREEN, $string);\n\t\t$string = str_replace($symbol . \"b\", TF::AQUA, $string);\n\t\t$string = str_replace($symbol . \"c\", TF::RED, $string);\n\t\t$string = str_replace($symbol . \"d\", TF::LIGHT_PURPLE, $string);\n\t\t$string = str_replace($symbol . \"e\", TF::YELLOW, $string);\n\t\t$string = str_replace($symbol . \"f\", TF::WHITE, $string);\n\t\t$string = str_replace($symbol . \"k\", TF::OBFUSCATED, $string);\n\t\t$string = str_replace($symbol . \"l\", TF::BOLD, $string);\n\t\t$string = str_replace($symbol . \"m\", TF::STRIKETHROUGH, $string);\n\t\t$string = str_replace($symbol . \"n\", TF::UNDERLINE, $string);\n\t\t$string = str_replace($symbol . \"o\", TF::ITALIC, $string);\n\t\t$string = str_replace($symbol . \"r\", TF::RESET, $string);\n\t\treturn $string;\n\t}", "protected static function setColor ($color, $text = NULL) {\n if (!is_null($text)) {\n return static::setColor($color) . $text . static::setColor(NULL);\n }\n if (is_null($color)) {\n return \"\\e[0m\";\n }\n $c = split(':', $color);\n return (\n array_key_exists($c[0], static::$colors)\n ? static::$colors[$c[0]]\n : \"\\e[0m\"\n ).(\n 2 == sizeof($c)\n ? (\n array_key_exists($c[1], static::$backgrounds)\n ? static::$backgrounds[$c[1]]\n : ''\n )\n : ''\n );\n }", "public static function wrap($color, $string, $intensity = NULL) {\n return static::start($color, $intensity) . $string . static::stop();\n }", "private function _colorize($text, $color = self::DEFAULT_MESSAGE)\n {\n if (!$color) {\n return $text;\n }\n\n switch ($color) {\n case self::ERROR_MESSAGE:\n $color = \"1;31m\";\n break;\n case self::SUCCESS_MESSAGE:\n $color = \"1;32m\";\n break;\n case self::INFO_MESSAGE:\n $color = \"1;36m\";\n break;\n case self::WARNING_MESSAGE:\n $color = \"1;33m\";\n break;\n default:\n $color = \"1;20m\";\n break;\n }\n return \"\\033[\" . $color . $text . \" \\033[m\";\n }", "private function createStyleFromString($string)\n {\n if ( ! preg_match_all('/([^=]+)=([^;]+)(;|$)/', strtolower($string), $matches, PREG_SET_ORDER)) {\n return false;\n }\n\n $style = new OutputFormatterStyle();\n \n foreach ($matches as $match) {\n array_shift($match);\n\n if ('fg' == $match[0]) {\n $style->setForeground($match[1]);\n } elseif ('bg' == $match[0]) {\n $style->setBackground($match[1]);\n } else {\n $style->setOption($match[1]);\n }\n }\n\n return $style;\n }", "public static function isHtmlColor($string = NULL)\n\t{\n\t\t// leaving out rgb(255,255,255) notation\n\t\tif ($string!=NULL &&\n\t\t\tpreg_match('/^#[0-9a-f]{6}$/i', $string)) {\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "function get_cli_color_string($str, $foreground_color = null, $background_color = null){\n\tif(!Client::inCli()){\n\t\t$style = array();\n\t\tif($foreground_color){\n\t\t\t$style[] = \"color:\".$GLOBALS['_CLI_WEB_FORE_COLOR_MAP_'][$foreground_color];\n\t\t}\n\t\tif($background_color){\n\t\t\t$style[] = \"background-color:\".$GLOBALS['_CLI_WEB_BACK_COLOR_MAP_'][$background_color];\n\t\t}\n\t\tif($style){\n\t\t\treturn '<span style=\"'.join(';', $style).'\">'.$str.'</span>';\n\t\t}\n\t\treturn $str;\n\t}\n\n\t//windows console no support ansi color mode\n\tif(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'){\n\t\treturn $str;\n\t}\n\n\t//linux cli\n\t$color_str = '';\n\tif($foreground_color){\n\t\t$color_str .= \"\\033[\".$foreground_color.\"m\";\n\t}\n\tif($background_color){\n\t\t$color_str .= \"\\033[\".$background_color.\"m\";\n\t}\n\tif($color_str){\n\t\treturn $color_str.$str.\"\\033[0m\";\n\t}\n\treturn $str;\n}", "public function color($color = '')\n {\n if ($color) {\n $this->color=$color;\n }\n return $this->color;\n }", "function str_conv($str)\n{\n\t$str = preg_replace(\"/<a(.*)>/iUs\",\"<b style='color:red'>\",$str);\n\t$str = preg_replace(\"/<\\/a>/iUs\",\"</b>\",$str);\n\t$str = addslashes ($str);\n\treturn $str;\n}", "public function setColor(string $color) {\n $this->color = $color ;\n }", "public function setColor(string $newColor)\n {\n $this->color = $newColor;\n }", "private function wordMLColor($color) {\r\n return strtoupper(str_replace('#', '', $color[\"hex\"]));\r\n }", "public static function log($str = '', $color = 'normal', $newline = true, $background_color = null)\n {\n if( is_bool($color) )\n {\n $newline = $color;\n $color = 'normal';\n }\n elseif( is_string($color) && is_string($newline) )\n {\n $background_color = $newline;\n $newline = true;\n }\n $str = $newline ? $str . self::$EOF : $str;\n\n return self::$color($str, $background_color);\n }", "public function getColor($color) {\n }", "public function getColor($color)\n {\n }", "function colored_status($argue){\n if ($argue=='BK') {\n $color ='background:#ff0000';\n }elseif ($argue=='KF') {\n $color ='background:#f7c304';\n }elseif ($argue=='LS') {\n $color ='background:#00ff00';\n }elseif ($argue=='CI') {\n $color ='background:#0000ff';\n }elseif ($argue=='CO') {\n $color ='background:#ff00ff';\n }elseif ($argue=='PP') {\n $color ='background:#696969';\n }elseif ($argue=='RF') {\n $color ='background:#ff8040';\n }\n return $color;\n}", "public static function calculate_textcolor($color)\n {\n $c = str_replace('#', '', $color);\n $rgb[0] = hexdec(substr($c, 0, 2));\n $rgb[1] = hexdec(substr($c, 2, 2));\n $rgb[2] = hexdec(substr($c, 4, 2));\n\n if ($rgb[0]+$rgb[1]+$rgb[2]<382) {\n return '#fff';\n } else {\n return '#000';\n }\n }", "public static function fromString($color)\n {\n if (strpos($color, '(') === false) {\n // Missing required character. Test for hex string and keyword\n $result = self::fromHex($color);\n return $result === null ? self::fromKeyword($color) : $result;\n }\n\n // Remove whitespace and change to lower case\n $color = preg_replace('/\\s+/', '', strtolower($color));\n if (substr($color, -1) !== ')') {\n return null;\n }\n\n $parts = explode('(', substr($color, 0, strlen($color) - 1));\n if (count($parts) !== 2 || preg_match('/[^\\\\d.,%-]/', $parts[1])) {\n return null;\n }\n\n $keyword = $parts[0];\n $colors = explode(',', $parts[1]);\n $alpha = 1;\n\n if (substr($keyword, -1) === 'a') {\n // with alpha\n if (count($colors) !== 4) {\n return null;\n }\n $alpha = floatval(array_pop($colors));\n $alpha = $alpha < 0 ? 0 : ($alpha > 1 ? 1 : $alpha);\n } elseif (count($colors) !== 3) {\n return null;\n }\n\n switch ($keyword) {\n case 'rgb':\n case 'rgba':\n if (substr($colors[0], -1) === '%') {\n // All components must be percentages\n if (substr($colors[1], -1) !== '%' || substr($colors[2], -1) !== '%') {\n return null;\n }\n\n // Convert to numbers and normalize colors\n $r = floatval($colors[0]) * 2.55;\n $g = floatval($colors[1]) * 2.55;\n $b = floatval($colors[2]) * 2.55;\n\n $color = new Color();\n return $color->setRGBA(\n $r < 0 ? 0 : ($r > 255 ? 255 : $r),\n $g < 0 ? 0 : ($g > 255 ? 255 : $g),\n $b < 0 ? 0 : ($b > 255 ? 255 : $b),\n $alpha\n );\n }\n\n // None of components must be percentages\n if (strpos($parts[1], '%') !== false) {\n return null;\n }\n\n // Double values are not allowed in rgb()\n $r = intval($colors[0]);\n $g = intval($colors[1]);\n $b = intval($colors[2]);\n\n $color = new Color();\n return $color->setRGBA(\n $r < 0 ? 0 : ($r > 255 ? 255 : $r),\n $g < 0 ? 0 : ($g > 255 ? 255 : $g),\n $b < 0 ? 0 : ($b > 255 ? 255 : $b),\n $alpha,\n true\n );\n\n case 'hsl':\n case 'hsla':\n if (strpos($colors[0], '%') !== false || substr($colors[1], -1) !== '%' || substr($colors[2], -1) !== '%') {\n // Hue cannot be percentage, saturation and lightness must be percentage\n return null;\n }\n\n // Convert to float numbers\n $h = floatval($colors[0]);\n $s = floatval($colors[1]);\n $l = floatval($colors[2]);\n $rounded = strpos($parts[1], '.') === false;\n\n // Create new object, assign normalized values and return color\n $color = new Color();\n return $color->setHSLA(\n $h < 0 ? $h % 360 + 360 : ($h >= 360 ? $h % 360 : $h),\n $s < 0 ? 0 : ($s > 100 ? 100 : $s),\n $l < 0 ? 0 : ($l > 100 ? 100 : $l),\n $alpha,\n $rounded\n );\n }\n\n return null;\n }", "protected function rule_color() {\r\n if (preg_match(\"/^#[0-9A-Fa-f]{6}$|^$/\", $this->value) == 0) {\r\n $this->errors['color'] = true;\r\n $this->error_messages['color'] = t('Color is not in #hhhhhh format');\r\n }\r\n }", "public static function stringToHslColor(string $str, int $s, int $l): string\n {\n $hash = 0;\n foreach (mb_str_split($str) as $ch) {\n $hash = mb_ord($ch) + (($hash << 5) - $hash);\n }\n $h = abs($hash % 360);\n\n return \"hsl({$h}, {$s}%, {$l}%)\";\n }", "function getCliColorOutput($str, $foreground_color=null, $background_color=null){\n\t\t$color_str = '';\n\t\tif($foreground_color){\n\t\t\t$color_str .= \"\\033[\".$foreground_color.\"m\";\n\t\t}\n\t\tif($background_color){\n\t\t\t$color_str .= \"\\033[\".$background_color.\"m\";\n\t\t}\n\t\tif($color_str){\n\t\t\treturn $str.\"\\033[0m\";\n\t\t}\n\t\treturn $str;\n\t}", "function olmo_color_valid_hexadecimal_string($color) {\n return preg_match('/^#([a-f0-9]{3}){1,2}$/iD', $color);\n}", "function change_color(string $color)\n{\n $arr = explode(\",\", $color);\n $arr[0] += 0;\n $arr[1] += 0;\n $arr[2] += 0;\n $res = \"#\";\n foreach ($arr as $color) {\n $color_hexadecimal = dechex($color);\n if ($color < 16) {\n $res .= (\"0\" . $color_hexadecimal);\n } else {\n $res .= $color_hexadecimal;\n }\n }\n return \"$res\";\n}", "public function color( $color ) {\n\t\tglobal $wgCommandLineDarkBg;\n\t\t$light = $wgCommandLineDarkBg ? \"1;\" : \"0;\";\n\t\treturn \"\\x1b[{$light}{$color}m\";\n\t}", "protected function new_color_stop( $str ) {\n\t\treturn new The7_Less_Gradient_Color_Stop( $str );\n\t}", "final private static function color($color , $background = false) {\n return self::CONTROL_PREFIX.($background ? self::BACKGROUND : self::FORGROUND).$color.self::CONTROL_SUFFEX;\n }", "public function color( $color ) {\n\t\t$colors = array(\n\t\t\t'red_bg' => \"\\e[1;37;41m\",\n\t\t\t'none' => \"\\033[0m\",\n\t\t\t'default' => \"\\033[39m\",\n\t\t\t'black' => \"\\033[30m\",\n\t\t\t'red' => \"\\033[31m\",\n\t\t\t'green' => \"\\033[32m\",\n\t\t\t'yellow' => \"\\033[33m\",\n\t\t\t'blue' => \"\\033[34m\",\n\t\t\t'magenta' => \"\\033[35m\",\n\t\t\t'cyan' => \"\\033[36m\",\n\t\t\t'light_gray' => \"\\033[37m\",\n\t\t\t'dark_gray' => \"\\033[90m\",\n\t\t\t'light_red' => \"\\033[91m\",\n\t\t\t'light_green' => \"\\033[92m\",\n\t\t\t'light_yellow' => \"\\033[93m\",\n\t\t\t'light_blue' => \"\\033[94m\",\n\t\t\t'light_magenta' => \"\\033[95m\",\n\t\t\t'light_cyan' => \"\\033[96m\",\n\t\t\t'white' => \"\\033[97m\",\n\t\t);\n\n\t\treturn $color && isset( $colors[ $color ] )\n\t\t\t? $colors[ $color ]\n\t\t\t: '';\n\t}", "public static function getColoredString($string, \\Andou\\Shelltools\\Shellcolor $fg = NULL, \\Andou\\Shelltools\\Shellcolor $bg = NULL) {\n $fgs = empty($fg) ? \"\" : sprintf(\"\\033[%sm\", $fg);\n $bgs = empty($bg) ? \"\" : sprintf(\"\\033[%sm\", $bg);\n $eols = (empty($fg) && empty($bg) ) ? \"\" : \"\\033[0m\";\n return sprintf(\"%s%s%s%s\", $fgs, $bgs, $string, $eols);\n }", "protected function method_color()\n\t{\n\t\t$secret_word = '';\n\t\t$secret_word_data = array();\n\t\tfor ($i = 0, $k = 0; $i < strlen($this->str); $i++)\n\t\t{\n\t\t\t$letter = $this->str{$i};\n\t\t\t$rand = rand(0, 2);\n\t\t\t$j = 0;\n\t\t\tdo\n\t\t\t{\n\t\t\t\t$secret_word .= $letter;\n\t\t\t\t$secret_word_data[$k++] = array(\n\t\t\t\t\t'letter' =>\t\t$letter,\n\t\t\t\t\t'true' =>\t\t($j) ? false : true,\n\t\t\t\t);\n\t\t\t\t$letter = $this->caracters{rand(0, strlen($this->caracters) - 1)};\n\t\t\t\t$j++;\n\t\t\t}\n\t\t\twhile ($j < $rand);\n\t\t}\n\n\t\t// On determine la taille de l'image en fonction du nombre de lettres\n\t\t$this->width = 10 + (strlen($secret_word) * 40);\n\n\t\t// Generation des couleurs pour les caracteres\n\t\t$list_color = array(\n\t\t\t'blue' =>\t\tarray('00', '6C', 'FF'),\n\t\t\t'cyan' =>\t\tarray('14', 'E3', 'C3'),\n\t\t\t'pink' =>\t\tarray('FF', '58', 'F1'),\n\t\t\t'purple' =>\t\tarray('7E', '17', 'B9'),\n\t\t\t'red' =>\t\tarray('FF', '00', '00'),\n\t\t\t'green' =>\t\tarray('30', 'FF', '00'),\n\t\t\t'orange' =>\t\tarray('FF', 'B4', '00'),\n\t\t\t'darkgreay' =>\tarray('54', '4F', '54'),\n\t\t);\n\n\t\t$selected_color = array_rand($list_color, 1);\n\t\tforeach (str_split($secret_word) AS $key => $value)\n\t\t{\n\t\t\tif ($secret_word_data[$key]['true'])\n\t\t\t{\n\t\t\t\tlist($red, $green, $blue) = $list_color[$selected_color];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\t$index = array_rand($list_color, 1);\n\t\t\t\t}\n\t\t\t\twhile ($index == $selected_color);\n\t\t\t\tlist($red, $green, $blue) = $list_color[$index];\n\t\t\t}\n\n\t\t\t$this->data[$key]['fontcolor'] = array(hexdec($red), hexdec($green), hexdec($blue));\n\t\t}\n\n\t\t$this->explain = sprintf(Fsb::$session->lang('captcha_method_color'), Fsb::$session->lang('captcha_color_' . $selected_color));\n\t\t$this->fill_data($secret_word);\n\t}\n}", "public function setColor(?string $color): void\n {\n $this->color['value'] = $color;\n }", "private function color_input($color)\n {\n // use color if passed\n if (isset($color)) {\n $this->set_color($color);\n }\n // if no color value then set default\n elseif (!isset($this->hsla)) {\n $this->set_color();\n }\n }", "public function fromString($x,$y,$str) {\n\t\tif (!$this->im) return false;\n\t\t\n\t\t$this->imModified = false;\n\t\t\n\t\t$colors = array();\n\t\tfor ($i = 0; $i < 256; $i++) {\n\t\t\t$colors[$i] = imagecolorallocate($this->im, floor(($i & 192) * 1.328125), floor(($i & 56) * 4.55357), floor(($i & 7) * 36.42857));\n\t\t}\n\t\t\n\t\t$i = 0;\n\t\t$len = strlen($str);\n\t\t\n\t\twhile ($y < imagesy($this->im)) {\n\t\t\twhile ($x < imagesx($this->im)) {\n\t\t\t\timagesetpixel($this->im, $x, $y, $colors[ord(substr($str,$i,1)) & 255]);\n\t\t\t\t$i ++;\n\t\t\t\t$x ++;\n\t\t\t\tif ($i >= $len) {\n\t\t\t\t\timagesetpixel($this->im, $x, $y, $colors[0]);\n\t\t\t\t\treturn true;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t$x = 0;\n\t\t\t$y ++;\n\t\t}\n\t\treturn false;\n\t}", "function is_valid_hex_color( $string ) {\n\n $return_value = false;\n if( strlen( $string ) == 6 || strlen( $string ) == 3 ) {\n if( preg_match( '/^[0-9a-fA-F]+$/', $string ) ) {\n $return_value = true;\n }\n }\n return $return_value;\n\n}", "function aerie_lite_set_topiccolor($css, $topiccolor) {\n $tag = '[[setting:topiccolor]]';\n $replacement = $topiccolor;\n if (is_null($replacement)) {\n $replacement = '#e3e3e3';\n }\n $css = str_replace($tag, $replacement, $css);\n return $css;\n}", "private function getMsgColor($strKind, $bgcolor = false){\n switch($strKind){\n case 'warning':\n $strColor = ($bgcolor) ? '#fff3dd' : '#c09853';\n break;\n case 'error':\n $strColor = ($bgcolor) ? '#ffe6e5' : '#b94a48';\n break;\n case 'success':\n $strColor = ($bgcolor) ? '#e5ffe6' : '#468847';\n break;\n case 'info':\n $strColor = ($bgcolor) ? '#dff4ff' : '#3a87ad';\n break;\n\n default:\n $strColor = ($bgcolor) ? '#eeeeee' : '#666966';\n break;\n }\n\n return $strColor;\n }", "function text($string, $x, $y, $color=0, $size=2) {\n\t\tif (! is_numeric($color)) $color = $this->intify($color);\n\t\timagestring($this->img, (int) $size, $x, $y, $string, $color);\n\t}", "public function addHighlighting($string, $cls = 'sisea-highlight',$tag = 'span') {\n $searchStrings = explode(' ', $this->searchString);\n foreach ($searchStrings as $searchString) {\n $quoteValue = preg_quote($searchString, '/');\n $string = preg_replace('/' . $quoteValue . '/i', '<'.$tag.' class=\"'.$cls.'\">$0</'.$tag.'>', $string);\n }\n return $string;\n }", "protected function isValidColor($color) {\n return strlen($color) === 1 && preg_match('#[A-Z]{1}#', $color); \n }", "public function highlight(string $string): string\n {\n\n return $string;\n }", "protected function alter_brightness($colourstr, $steps)\n {\n $colourstr = str_replace('#', '', $colourstr);\n $rhex = substr($colourstr, 0, 2);\n $ghex = substr($colourstr, 2, 2);\n $bhex = substr($colourstr, 4, 2);\n\n $r = hexdec($rhex);\n $g = hexdec($ghex);\n $b = hexdec($bhex);\n\n $r = max(0, min(255, $r + $steps));\n $g = max(0, min(255, $g + $steps));\n $b = max(0, min(255, $b + $steps));\n\n return '#'.str_pad(dechex($r), 2, '0', STR_PAD_LEFT).str_pad(dechex($g), 2, '0', STR_PAD_LEFT).str_pad(dechex($b), 2, '0', STR_PAD_LEFT);\n }", "function check_target($value_str, $target_str) {\r\n // green if True or red if False.\r\n\r\n if ($value_str == null || $target_str == null){\r\n return \"-\";\r\n }\r\n\r\n $value_int = str_replace(array(\"'\",'m'), '',$value_str);\r\n\r\n $target_str = str_replace(\"°\", '.',$target_str);\r\n $target_str = str_replace(array(\"'\",'m'), '',$target_str);\r\n $target_ints = explode(\" +/-\", $target_str);\r\n\r\n\r\n $target_value = $target_ints[0];\r\n $target_error = 0;\r\n if (isset($target_ints[1])) {\r\n $target_error = $target_ints[1];\r\n }\r\n\r\n if (($target_value - $target_error) < $value_int && $value_int < ($target_value + $target_error)) {\r\n $colour = 'green';\r\n } else {\r\n $colour = 'red';\r\n }\r\n\r\n return sprintf('<span style=\"color:%s;\">', $colour) . $value_str . \"</span>\";\r\n }", "function setColor($color){\r\n $this->setProp('color', $color.\"000000\"); \r\n }", "public static function stringToColorCode(string $string): string\n {\n $code = dechex(crc32($string));\n\n return mb_substr($code, 0, 6);\n }", "public static function stringToHexColor(string $string): string\n {\n $code = dechex(crc32($string));\n $code = substr($code, 0, 6);\n\n return $code;\n }", "function store_set_color($id, $color){\n\t\n\tglobal $set_colors;\n\t\n\t$color = str_replace('#', '', $color);\n\t\n\t$set_colors[ $id ] = $color;\n\t\n}", "function printRGB(...$strings) : void\n {\n $line = \"<fg=magenta;bg=black>[ <fg=white;bg=black;options=bold>\" . date(\"Y-m-d h:i:s\") . \"</> ] </>\";\n $length = 0;\n foreach($strings as $string) {\n\n if (!is_string($string))\n continue;\n\n $string = trim($string);\n if(empty($string)) continue;\n $col = $this->randomWebColor();\n $bg = $this->isColorBright($col['rgb']['r'], $col['rgb']['g'], $col['rgb']['b']) ? \"bg=black\" : \"bg=white\";\n $line .= sprintf(\"<fg=#%s;%s> %s </>\", $col['hex'], $bg, $string);\n $length += strlen($string);\n }\n $line . \"</><fg=magenta;bg=black>[ <fg=white;bg=black;options=bold> </> ] </>\";\n $this->line($line);\n }", "function pintaln($str, $color = 'blanco')\n{\n global $log_str;\n global $total_errores;\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 $log_str .= $str . \"\\n\";\n if ('rojo' == $color) $total_errores++;\n}", "public function input_color( $args ) {\n\n\t\t$this->input_text( $args, 'color' );\n\t}", "function SetTextColors($s) {\r\n $this->textcolor = $s;\r\n }", "private function getColorClass($color)\n {\n switch($color)\n {\n case 1:\n return 'colorBlue';\n case 2:\n return 'colorYellow';\n case 3:\n return 'colorRed';\n default:\n return 'colorGreen';\n }\n }", "public function gray(string $string): void\n {\n $this->line($this->inlineGray($string));\n }", "public static function errorBg(string $string):void{\n echo self::colorBackgroundString($string, self::ERROR);\n die;\n }", "private function processEventColor($color) {\n\t\tif ($color == 'transparent') {\n\t\t\treturn $color;\n\t\t}\n\n\t\tif (preg_match(\"/#[0-9A-Fa-f]{6}/\", $color)) {\n\t\t\treturn substr($color, 1);\n\t\t}\n\t\t$result = preg_match_all(\"/rgb\\s?\\((\\d{1,3})\\s?,\\s?(\\d{1,3})\\s?,\\s?(\\d{1,3})\\)/\", $color, $rgb);\n\t\t\n\t\tif ($result) {\n\t\t\t$color = '';\n\t\t\tfor ($i = 1; $i <= 3; $i++) {\n\t\t\t\t$comp = dechex($rgb[$i][0]);\n\t\t\t\tif (strlen($comp) == 1) {\n\t\t\t\t\t$comp = '0'.$comp;\n\t\t\t\t\t}\n\t\t\t\t$color .= $comp;\n\t\t\t}\n\t\t\treturn $color;\n\t\t} else {\n\t\t\treturn 'transparent';\n\t\t}\n\t}", "function GetRedKeyWord($fstr)\r\n\t{\r\n\t\t$ks=$this->wd_array;\r\n\t\t$kwsql = '';\r\n\t\tforeach($ks as $k)\r\n\t\t{\r\n\t\t\t$k = trim($k);\r\n\t\t\tif($k=='')\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif(ord($k[0])>0x80 && strlen($k)<0)\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t$fstr = str_replace($k,\"<font color='#C60A00'>$k</font>\",$fstr);\r\n\t\t}\r\n\t\treturn $fstr;\r\n\t}", "public function setColor(string $color): void\n {\n $this->color = $color;\n }", "function validate_color( $color ) {\n\n\t\t\tif ( $color == \"transparent\" ) {\n\t\t\t\treturn $color;\n\t\t\t}\n\n\t\t\t$named = json_decode( '{\"transparent\":\"transparent\", \"aliceblue\":\"#f0f8ff\",\"antiquewhite\":\"#faebd7\",\"aqua\":\"#00ffff\",\"aquamarine\":\"#7fffd4\",\"azure\":\"#f0ffff\", \"beige\":\"#f5f5dc\",\"bisque\":\"#ffe4c4\",\"black\":\"#000000\",\"blanchedalmond\":\"#ffebcd\",\"blue\":\"#0000ff\",\"blueviolet\":\"#8a2be2\",\"brown\":\"#a52a2a\",\"burlywood\":\"#deb887\", \"cadetblue\":\"#5f9ea0\",\"chartreuse\":\"#7fff00\",\"chocolate\":\"#d2691e\",\"coral\":\"#ff7f50\",\"cornflowerblue\":\"#6495ed\",\"cornsilk\":\"#fff8dc\",\"crimson\":\"#dc143c\",\"cyan\":\"#00ffff\", \"darkblue\":\"#00008b\",\"darkcyan\":\"#008b8b\",\"darkgoldenrod\":\"#b8860b\",\"darkgray\":\"#a9a9a9\",\"darkgreen\":\"#006400\",\"darkkhaki\":\"#bdb76b\",\"darkmagenta\":\"#8b008b\",\"darkolivegreen\":\"#556b2f\", \"darkorange\":\"#ff8c00\",\"darkorchid\":\"#9932cc\",\"darkred\":\"#8b0000\",\"darksalmon\":\"#e9967a\",\"darkseagreen\":\"#8fbc8f\",\"darkslateblue\":\"#483d8b\",\"darkslategray\":\"#2f4f4f\",\"darkturquoise\":\"#00ced1\", \"darkviolet\":\"#9400d3\",\"deeppink\":\"#ff1493\",\"deepskyblue\":\"#00bfff\",\"dimgray\":\"#696969\",\"dodgerblue\":\"#1e90ff\", \"firebrick\":\"#b22222\",\"floralwhite\":\"#fffaf0\",\"forestgreen\":\"#228b22\",\"fuchsia\":\"#ff00ff\", \"gainsboro\":\"#dcdcdc\",\"ghostwhite\":\"#f8f8ff\",\"gold\":\"#ffd700\",\"goldenrod\":\"#daa520\",\"gray\":\"#808080\",\"green\":\"#008000\",\"greenyellow\":\"#adff2f\", \"honeydew\":\"#f0fff0\",\"hotpink\":\"#ff69b4\", \"indianred \":\"#cd5c5c\",\"indigo \":\"#4b0082\",\"ivory\":\"#fffff0\",\"khaki\":\"#f0e68c\", \"lavender\":\"#e6e6fa\",\"lavenderblush\":\"#fff0f5\",\"lawngreen\":\"#7cfc00\",\"lemonchiffon\":\"#fffacd\",\"lightblue\":\"#add8e6\",\"lightcoral\":\"#f08080\",\"lightcyan\":\"#e0ffff\",\"lightgoldenrodyellow\":\"#fafad2\", \"lightgrey\":\"#d3d3d3\",\"lightgreen\":\"#90ee90\",\"lightpink\":\"#ffb6c1\",\"lightsalmon\":\"#ffa07a\",\"lightseagreen\":\"#20b2aa\",\"lightskyblue\":\"#87cefa\",\"lightslategray\":\"#778899\",\"lightsteelblue\":\"#b0c4de\", \"lightyellow\":\"#ffffe0\",\"lime\":\"#00ff00\",\"limegreen\":\"#32cd32\",\"linen\":\"#faf0e6\", \"magenta\":\"#ff00ff\",\"maroon\":\"#800000\",\"mediumaquamarine\":\"#66cdaa\",\"mediumblue\":\"#0000cd\",\"mediumorchid\":\"#ba55d3\",\"mediumpurple\":\"#9370d8\",\"mediumseagreen\":\"#3cb371\",\"mediumslateblue\":\"#7b68ee\", \"mediumspringgreen\":\"#00fa9a\",\"mediumturquoise\":\"#48d1cc\",\"mediumvioletred\":\"#c71585\",\"midnightblue\":\"#191970\",\"mintcream\":\"#f5fffa\",\"mistyrose\":\"#ffe4e1\",\"moccasin\":\"#ffe4b5\", \"navajowhite\":\"#ffdead\",\"navy\":\"#000080\", \"oldlace\":\"#fdf5e6\",\"olive\":\"#808000\",\"olivedrab\":\"#6b8e23\",\"orange\":\"#ffa500\",\"orangered\":\"#ff4500\",\"orchid\":\"#da70d6\", \"palegoldenrod\":\"#eee8aa\",\"palegreen\":\"#98fb98\",\"paleturquoise\":\"#afeeee\",\"palevioletred\":\"#d87093\",\"papayawhip\":\"#ffefd5\",\"peachpuff\":\"#ffdab9\",\"peru\":\"#cd853f\",\"pink\":\"#ffc0cb\",\"plum\":\"#dda0dd\",\"powderblue\":\"#b0e0e6\",\"purple\":\"#800080\", \"red\":\"#ff0000\",\"rosybrown\":\"#bc8f8f\",\"royalblue\":\"#4169e1\", \"saddlebrown\":\"#8b4513\",\"salmon\":\"#fa8072\",\"sandybrown\":\"#f4a460\",\"seagreen\":\"#2e8b57\",\"seashell\":\"#fff5ee\",\"sienna\":\"#a0522d\",\"silver\":\"#c0c0c0\",\"skyblue\":\"#87ceeb\",\"slateblue\":\"#6a5acd\",\"slategray\":\"#708090\",\"snow\":\"#fffafa\",\"springgreen\":\"#00ff7f\",\"steelblue\":\"#4682b4\", \"tan\":\"#d2b48c\",\"teal\":\"#008080\",\"thistle\":\"#d8bfd8\",\"tomato\":\"#ff6347\",\"turquoise\":\"#40e0d0\", \"violet\":\"#ee82ee\", \"wheat\":\"#f5deb3\",\"white\":\"#ffffff\",\"whitesmoke\":\"#f5f5f5\", \"yellow\":\"#ffff00\",\"yellowgreen\":\"#9acd32\"}', true );\n\n\t\t\tif ( isset( $named[ strtolower( $color ) ] ) ) {\n\t\t\t\t/* A color name was entered instead of a Hex Value, convert and send back */\n\t\t\t\treturn $named[ strtolower( $color ) ];\n\t\t\t}\n\n\t\t\t$color = str_replace( '#', '', $color );\n\t\t\tif ( strlen( $color ) == 3 ) {\n\t\t\t\t$color = $color . $color;\n\t\t\t}\n\t\t\tif ( preg_match( '/^[a-f0-9]{6}$/i', $color ) ) {\n\t\t\t\treturn '#' . $color;\n\t\t\t}\n\n\t\t\t//$this->error = $this->field;\n\t\t\treturn false;\n\t\t}", "public function setTextColor($color) {\r\n\t\t$this->textcolor = $this->convert($color);\r\n\t\t$this->rawColor = \"$color\";\r\n\t}", "private function _format_string_value($s)\n {\n return '<{red>\"' . $s . '\"<}>';\n }", "function kleo_calc_similar_color($color, $shade, $amount) \n \t{\n \t\n \t\t//remove # from the begiining if available and make sure that it gets appended again at the end if it was found\n \t\t$newcolor = \"\";\n \t\t$prepend = \"\";\n \t\tif(strpos($color,'#') !== false) \n \t\t{ \n \t\t\t$prepend = \"#\";\n \t\t\t$color = substr($color, 1, strlen($color)); \n \t\t}\n \t\t\n \t\t//iterate over each character and increment or decrement it based on the passed settings\n \t\t$nr = 0;\n\t\twhile (isset($color[$nr])) \n\t\t{\n\t\t\t$char = strtolower($color[$nr]);\n\t\t\t\n\t\t\tfor($i = $amount; $i > 0; $i--)\n\t\t\t{\n\t\t\t\tif($shade == 'lighter')\n\t\t\t\t{\n\t\t\t\t\tswitch($char)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 9: $char = 'a'; break;\n\t\t\t\t\t\tcase 'f': $char = 'f'; break;\n\t\t\t\t\t\tdefault: $char++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if($shade == 'darker')\n\t\t\t\t{\n\t\t\t\t\tswitch($char)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'a': $char = '9'; break;\n\t\t\t\t\t\tcase '0': $char = '0'; break;\n\t\t\t\t\t\tdefault: $char = chr(ord($char) - 1 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$nr ++;\n\t\t\t$newcolor.= $char;\n\t\t}\n \t\t\n\t\t$newcolor = $prepend.$newcolor;\n\t\treturn $newcolor;\n\t}", "public function setColor($var)\n {\n GPBUtil::checkString($var, True);\n $this->color = $var;\n\n return $this;\n }", "public function setColor($var)\n {\n GPBUtil::checkString($var, True);\n $this->color = $var;\n\n return $this;\n }", "public static function __callStatic($foreground_color, $args)\n {\n $string = $args[0];\n $colored_string = \"\";\n \n // Check if given foreground color found\n if( isset(self::$foreground_colors[$foreground_color]) ) {\n $colored_string .= \"\\033[\" . self::$foreground_colors[$foreground_color] . \"m\";\n }\n else{\n die( $foreground_color . ' not a valid color');\n }\n \n array_shift($args);\n\n foreach( $args as $option ){\n // Check if given background color found\n if(isset(self::$background_colors[$option])) {\n $colored_string .= \"\\033[\" . self::$background_colors[$option] . \"m\";\n }\n elseif(isset(self::$options[$option])) {\n $colored_string .= \"\\033[\" . self::$options[$option] . \"m\";\n }\n }\n \n // Add string and end coloring\n $colored_string .= $string . \"\\033[0m\";\n \n return $colored_string;\n \n }", "public function my_force_user_color( $color ){\n\t\treturn 'fresh';\n\t}", "public function is_color( $val ){ \n\t\treturn (preg_match('/^#[a-f0-9]{6}$/i', $val)); //hex color is valid \n\t}", "function colorNucleotides($str) {\n $ncolors['A'] = \"red\";\n $ncolors['T'] = \"blue\";\n $ncolors['U'] = \"blue\";\n $ncolors['C'] = \"green\";\n $ncolors['G'] = \"orange\"; // \"yellow\" ?\n $cstr = '';\n for ($i=0; $i < strlen($str); $i++) {\n $c = $str[$i];\n if (stripos('ATUCG', $c) !== FALSE) {\n $color = $ncolors[strtoupper($c)];\n $c = '<font color=\"' . $color . '\">' . $c . '</font>';\n }\n $cstr = $cstr . $c;\n }\n $cstr = '<div class=\"biopolseq\"><code>' . $cstr . '</code></div>';\n return $cstr;\n}", "protected function assignTextStyle(string $color)\n {\n if (in_array($color, $this->supported_text_styles) === true) {\n $this->classes['main'][] = 'text-' . $color;\n }\n }", "function is_css_color($color){\n\n\tif (preg_match('/^([\\#]{0,1}([a-fA-F0-9]{6}|[a-fA-F0-9]{3})|rgb\\(([0-9]{1},|[1-9]{1}[0-9]{1},|[1]{1}[0-9]{2},|[2]{1}[0-4]{1}[0-9]{1},|25[0-5]{1},){2}([0-9]{1}|[1-9]{1}[0-9]{1}|[1]{1}[0-9]{2}|[2]{1}[0-4]{1}[0-9]{1}|25[0-5]{1}){1}\\)|rgb\\(([0-9]{1}%,|[1-9]{1}[0-9]{1}%,|100%,){2}([0-9]{1}%|[1-9]{1}[0-9]{1}%|100%){1}\\))$/', $color) ){\n\t\t\n\t\treturn true;\t\n\t}\n\telse{\n\t\n\t\treturn false;\n\t}\n}", "public static function is_hexadecimal_color($string) {\n\t\t$regEx = '/^#?([a-f0-9]{6}|[a-f0-9]{3})$/';\n\t\treturn preg_match($regEx, $string);\n\t}", "public function getColorValue ($color) {}", "public function testColor(): void\n {\n $color = 'red';\n $this->assertEquals(true,$this->statisticsUtility->checkColor($color));\n }", "public function string($font, $x, $y, $string, $color)\r\n {\r\n $color = $this->allocateColor($color);\r\n return imagestring($this->src, $font, $x, $y, $string, $color);\r\n }", "function set_color()\n{\n static $background = '#80ffff';\n if ($background == '#80ffff') {\n $background = '#c0ffa0';\n $color = '#3fff1f';\n } else {\n $background = '#80ffff';\n $color = '#9fff1f';\n }\n return \"style=\\\"background:$background;color:black; text-decoration:underline;\\\"\";\n}", "public function setColorValue ($color, $value) {}", "public function toString($color) {\n if (is_string($color))\n return $color;\n $h = $color[0];\n $s = round($color[1] * 100);\n $l = round($color[2] * 100);\n return 'hsl(' . $h . ', ' . $s . '%, ' . $l . '%)';\n }", "protected static function color()\n\t{\n\t\treturn \"brown\";\n\t}", "private function wordMLNamedColor($color) {\r\n $color = strtoupper(str_replace('#', '', $color[\"hex\"]));\r\n $wordMLColors = array('000000' => 'black', '0000ff' => 'blue', '00ffff' => 'cyan', '00ff00' => 'green', 'ff00ff' => 'magenta', 'ff0000' => 'red',\r\n 'ffff00' => 'yellow', 'ffffff' => 'white', '00008b' => 'darkBlue', '008b8b' => 'darkCyan', '006400' => 'darkGreen', '8b008b' => 'darkMagenta',\r\n '8b0000' => 'darkRed', '808000' => 'darkYellow', 'a9a9a9' => 'darkGray', 'd3d3d3' => 'lightGray', '' => 'none');\r\n\r\n if(isset($wordMLColors[$color])) return($wordMLColors[$color]); //exact color\r\n //return closest color\r\n $hex24 = 16777215;\r\n $retCol = '000000';\r\n $red_color = hexdec(substr($color, 0, 2));$green_color = hexdec(substr($color, 2, 4));$blue_color = hexdec(substr($color, 4));\r\n foreach($wordMLColors as $key => $val){\r\n $red = $red_color - hexdec(substr($key, 0, 2));\r\n $green = $green_color - hexdec(substr($key, 2, 4));\r\n $blue = $blue_color - hexdec(substr($key, 4));\r\n\r\n $dist = $red * $red + $green * $green + $blue * $blue; //distance between colors\r\n\r\n if($dist <= $hex24){\r\n $hex24 = $dist;\r\n $retCol = $key;\r\n }\r\n }\r\n\r\n return $wordMLColors[$retCol];\r\n\r\n\r\n\r\n //return strtoupper(str_replace('#', '', $color[\"hex\"]));\r\n }", "public function getHexaColor($reg, $string,$neddle)\n\t{\n\t\tif($string != '')\n\t\t{\n\t\t\t/* Check if comma exist */\n\t\t\tif(strpos($string,$neddle) && strpos($string,$neddle) == 7)\n\t\t\t{\n\t\t\t\t\t/* Explod the color */\n\t\t\t\t\t$eachcolor = explode($neddle,$string);\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/* Check color its hexa string */\n\t\t\t\t\t\n\t\t\t\t\t$allvalid = true;\n\t\t\t\t\t/* Loop each data */\n\t\t\t\t\tforeach($eachcolor as $key => $value)\n\t\t\t\t\t{\n\t\t\t\t\t\t/* Check */\n\t\t\t\t\t\tif(!preg_match($reg, $value))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn \"Invalid hexa color $value.\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn $string;\n\t\t\t\t\t\n\t\t\t\t/* Return string */\n\t\t\t\t\n\t\t\t}\n\t\t\telseif(preg_match($reg,$string))\n\t\t\t{\t\n\t\t\t\treturn $string;\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn \"Invalid hexa color $string.\";\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 'Please enter color';\n\t\t}\t\t\n\t\t\n\t}", "function Html2Rgb($strColor)\n{\n if ($strColor[0] == '#')\n $strColor = substr($strColor, 1);\n\n if (strlen($strColor) == 6)\n list($red, $green, $blue) = array($strColor[0].$strColor[1],\n $strColor[2].$strColor[3],\n $strColor[4].$strColor[5]);\n elseif (strlen($strColor) == 3)\n list($red, $green, $blue) = array($strColor[0].$strColor[0], $strColor[1].$strColor[1], $strColor[2].$strColor[2]);\n else\n return false;\n\n $red = hexdec($red); $green = hexdec($green); $blue = hexdec($blue);\n $arrRGB = '('.$red.','. $green.','. $blue.')';\n// Return colors format liek R(255) G(255) B(255)\n return $arrRGB;\n}" ]
[ "0.75935346", "0.72392267", "0.7099668", "0.702741", "0.6982632", "0.668258", "0.6672047", "0.6565811", "0.65591556", "0.65473515", "0.6437841", "0.6389784", "0.63486", "0.63409907", "0.628386", "0.6224405", "0.6164607", "0.6076727", "0.60761803", "0.60316145", "0.60185", "0.6001718", "0.59850234", "0.5968003", "0.5948827", "0.5945379", "0.5928247", "0.59252596", "0.58978736", "0.5886765", "0.5875875", "0.58436894", "0.581553", "0.5811194", "0.5787982", "0.57803565", "0.57762414", "0.57292795", "0.57070726", "0.57061875", "0.57057995", "0.56884676", "0.5680071", "0.56738126", "0.5671029", "0.56563294", "0.56541145", "0.56092536", "0.56081754", "0.5594544", "0.55714726", "0.55682915", "0.5566294", "0.55609226", "0.55543953", "0.55539876", "0.5542462", "0.55378723", "0.5533408", "0.55304146", "0.5505087", "0.54963684", "0.5487667", "0.5485762", "0.54791945", "0.54700917", "0.54427654", "0.5437264", "0.54358816", "0.54332775", "0.5431026", "0.54280657", "0.5408459", "0.54025126", "0.5402053", "0.53944564", "0.53893244", "0.5379387", "0.5370701", "0.5369241", "0.5364522", "0.5361983", "0.5361983", "0.5356235", "0.53485864", "0.5341861", "0.53412586", "0.5339965", "0.533872", "0.5336848", "0.53328145", "0.5327305", "0.53254914", "0.5323359", "0.53169566", "0.53151476", "0.5302685", "0.5300515", "0.5298719", "0.5297663" ]
0.82818407
0
Apply resample mode during resizing: slightly more CPU usage but smoother rendering.
Применять режим пересэмплирования при изменении размера: немного большее использование CPU, но более плавная отрисовка.
public function resample(): self { $this->resizeMode = static::RESAMPLE; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resampleImage ($x_resolution, $y_resolution, $filter, $blur) {}", "function resampleToWidth($width)\n {\n //\n // h1 x\n // -- = --\n // w1 w2\n //\n // So the formula is (w2 * h1) / w1\n \n $height = floor(($width * imagesy($this->img)) / imagesx($this->img));\n \n $this->resample($width, $height);\n }", "private function proportionalResize()\n\t{\n\t\t/*\n\t\t * Verifica altura e largura proporcional.\n\t\t */\n\t\t$ratio_orig = $this->width/$this->height;\n\n\t\tif($this->newWidth/$this->newHeight > $ratio_orig){\n\t\t\t$dif_w = $this->newHeight*$ratio_orig;\n\t\t\t$dif_h = $this->newHeight;\n\t\t}else{\n\t\t\t$dif_w = $this->newWidth;\n\t\t\t$dif_h = $this->newWidth/$ratio_orig;\n\t\t}\n\n\t\t// cria imagem de destino temporária\n\t\t$this->img_temp = imagecreatetruecolor($dif_w, $dif_h);\n\n\t\t// verifica se transparência está habilitada\n\t\t$this->isTransparency(1, false);\n\t\t\n\t\t// Resample\n\t\timagecopyresampled($this->img_temp, $this->img, 0, 0, 0, 0, $dif_w, $dif_h, $this->width, $this->height);\n\t\t$this->img = $this->img_temp;\n\t}", "function Resampling($tmp_name, $directorio, $name){\r\n\t$imagen_origen = ImageCreateFromJPEG($tmp_name);\r\n\t// Calculo el tamaño de la imagen original\r\n\t$tam_ancho = imagesx ($imagen_origen);\r\n\t$tam_alto = imagesy ($imagen_origen);\r\n\r\n\t//Calculo la medida que va a tener\r\n\tif ($tam_ancho>=$tam_alto){\r\n\t\t$ancho = 38;\r\n\t\t$alto = (38*$tam_alto)/$tam_ancho;\r\n\t}else{\r\n\t\t$ancho = (38*$tam_ancho)/$tam_alto;\r\n\t\t$alto = 38;\r\n\t}\r\n\t\r\n\t//Creo una imagen\r\n\t$imagen_destino = ImageCreateTrueColor ($ancho, $alto);\r\n\t//Resize\r\n\timagecopyresized ($imagen_destino, $imagen_origen, 0,0,0,0, $ancho, $alto, $tam_ancho, $tam_alto);\r\n\t$nombre_destino = $directorio.$name;\r\n\t//Genero Copia Destino\r\n\tImageJPEG ($imagen_destino, $nombre_destino, 100);\r\n\t//Borro imagen virtual\r\n\tImageDestroy ($imagen_destino);\r\n\t\r\n}", "function resample($resim,$max_en,$max_boy)\n {\n ob_start();\n\n # Ilk boyutlar\n $boyut = getimagesize($resim);\n $en = $boyut[0];\n $boy = $boyut[1];\n\n # Yeni boyutlar\n $x_oran = $max_en / $en;\n $y_oran = $max_boy / $boy;\n\n if (($en <= $max_en) and ($boy <= $max_boy)){\n $son_en = $en;\n $son_boy = $boy;\n }\n else if (($x_oran * $boy) < $max_boy){\n $son_en = $max_en;\n $son_boy = ceil($x_oran * $boy);\n }\n else {\n $son_en = ceil($y_oran * $en);\n $son_boy = $max_boy;\n }\n\n # Eski ve yeni resimler\n $eski = imagecreatefromjpeg($resim);\n $yeni = imagecreatetruecolor($son_en,$son_boy);\n\n # Eski resmi yeniden orneklendir\n @imagecopyresampled(\n $yeni,$eski,0,0,0,0,\n $son_en,$son_boy,$en,$boy);\n\n # Yeni resmi bas ve icerigi cek\n @imagejpeg($yeni,null,-1);\n $icerik = ob_get_contents();\n\n # Resimleri yoket ve icerigi cikart\n ob_end_clean();\n @imagedestroy($eski);\n @imagedestroy($yeni);\n\n return $icerik;\n\n}", "public function resizeSource() : AbstractResize\n {\n if ($this->intermediate['maintain_aspect'] === true) {\n if ($this->source['aspect_ratio'] > 1.00) {\n $this->intermediateSizeLandscape();\n } else {\n if ($this->source['aspect_ratio'] === 1.00) {\n $this->intermediateSizeSquare();\n } else {\n $this->intermediateSizePortrait();\n }\n }\n } else {\n $this->intermediate['width'] = $this->canvas['width'];\n $this->intermediate['height'] = $this->canvas['height'];\n }\n\n $this->canvasSpacingX();\n $this->canvasSpacingY();\n\n $this->processed = true;\n\n return $this;\n }", "protected function scaleImages() {}", "function resampleToHeight($height)\n {\n // What we have is w1, h1, and h2. What we need is w2\n //\n // w1 x\n // -- = --\n // h1 h2\n //\n // So, the formula is (h2 * w1) / h1\n \n $width = floor(($height * imagesx($this->img)) / imagesy($this->img));\n \n $this->resample($width, $height);\n }", "function ImageResize($dst_img, &$src_img, $dst_x, $dst_y, $src_x, \n $src_y, $dst_w, $dst_h, $src_w, $src_h, \n $resample = GD_RESIZER_NO_SMOOTHING_MODE ) {\n $pxls = intval($src_w / $dst_w)-1;\n\n\t\t if( $dst_w == $dst_h ) {\n\t\t \t\t$length = min($src_w, $src_h);\n\t\t \t\t$src_x = intval( $src_w / 2 ) - intval( $length / 2 );\n\t\t \t\t$src_y = 0;//intval( $src_h / 2 ) - intval( $length / 2 );\n\t\t \t\t$src_w = $length;\n\t\t \t\t$src_h = $length;\n\t\t }\n\t\t \t\t\n\t\t if( $resample == GD_RESIZER_PHP_IMAGECOPYRESAMPLED ) {\n\t\t\t\timagecopyresampled($dst_img, $src_img, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);\t\n\t\t }\n elseif( $resample == GD_RESIZER_BILINEAR_MODE ) { //slow but better quality\n ImageTrueColorToPalette( $src_img, false, 256 );\n ImagePaletteCopy ($dst_img, $src_img);\n $rX = $src_w / $dst_w;\n $rY = $src_h / $dst_h;\n $nY = 0;\n for ($y=$src_y; $y<$dst_h; $y++) {\n $oY = $nY;\n $nY = intval(($y + 1) * $rY+.5);\n $nX = 0;\n for ($x=$src_x; $x<$dst_w; $x++) {\n $r = $g = $b = $a = 0;\n $oX = $nX;\n $nX = intval(($x + 1) * $rX+.5);\n $c = ImageColorsForIndex ($src_img, ImageColorAt ($src_img, $nX, $nY));\n $r += $c['red']; $g += $c['green']; $b += $c['blue']; $a++;\n $c = ImageColorsForIndex ($src_img, ImageColorAt ($src_img, $nX-$pxls, $nY-$pxls));\n $r += $c['red']; $g += $c['green']; $b += $c['blue']; $a++;\n //you can add more pixels here! eg \"$nX, $nY-$pxls\" or \"$nX-$pxls, $nY\"\n ImageSetPixel ($dst_img, ($x+$dst_x-$src_x), ($y+$dst_y-$src_y), ImageColorClosest ($dst_img, $r/$a, $g/$a, $b/$a));\n }\n }\n } \n elseif ( $resample == GD_RESIZER_BICUBIC_MODE ) { // veeeeeery slow but better quality\n ImagePaletteCopy ($dst_img, $src_img);\n $rX = $src_w / $dst_w;\n $rY = $src_h / $dst_h;\n $nY = 0;\n for ($y=$src_y; $y<$dst_h; $y++) {\n $oY = $nY;\n $nY = intval(($y + 1) * $rY+.5);\n $nX = 0;\n for ($x=$src_x; $x<$dst_w; $x++) {\n $r = $g = $b = $a = 0;\n $oX = $nX;\n $nX = intval(($x + 1) * $rX+.5);\n for ($i=$nY; --$i>=$oY;) {\n for ($j=$nX; --$j>=$oX;) {\n $c = ImageColorsForIndex ($src_img, ImageColorAt ($src_img, $j, $i));\n $r += $c['red'];\n $g += $c['green'];\n $b += $c['blue'];\n $a++;\n }\n }\n ImageSetPixel ($dst_img, ($x+$dst_x-$src_x), ($y+$dst_y-$src_y), ImageColorClosest ($dst_img, $r/$a, $g/$a, $b/$a));\n }\n }\n } \n else {\n $dst_w++; $dst_h++; //->no black border\n imagecopyresized($dst_img, $src_img, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);\n }\n }", "function resample($w,$h) {\n\t\tif(!$this->im) return false;\n\n\t\t//create a destination image\n\t\t$dest = imagecreatetruecolor($w,$h);\n\n\t\t//try and resample\n\t\t$r = imagecopyresampled($dest,$this->im,0,0,0,0,$w,$h,imagesx($this->im),imagesy($this->im));\n\n\t\t//resample was successful so replace original image with new one\n\t\tif($r) {\n\t\t\timagedestroy($this->im);\n\t\t\t$this->im = imagecreatetruecolor($w,$h);\n\t\t\timagecopy($this->im,$dest,0,0,0,0,$w,$h);\n\t\t\timagedestroy($dest);\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t//resample failed\n\t\telse return false;\n\t}", "public function resample($width, $height, $constrainProportions = true)\n {\n if (!is_resource($this->image)) {\n throw new RuntimeException('No image set');\n }\n if ($constrainProportions) {\n if ($this->height >= $this->width) {\n $width = round($height / $this->height * $this->width);\n } else {\n $height = round($width / $this->width * $this->height);\n }\n }\n $temp = imagecreatetruecolor($width, $height);\n imagecopyresampled($temp, $this->image, 0, 0, 0, 0, $width, $height, $this->width, $this->height);\n return $this->_replace($temp);\n }", "function resizer($ID,$width,$height)\n {\n $upd_width = 80;\n $upd_height = 80;\n\n $targLayer = imagecreatetruecolor($upd_width,$upd_height);\n imagecopyresampled($targLayer,$ID,0,0,0,0,$upd_width,$upd_height,$width,$height);\n return $targLayer;\n }", "public function resample(): self\n {\n try {\n $this->source()->resample();\n return $this;\n } catch (ImageSourceException $e) {\n throw new ImageException($e);\n }\n }", "function _resize_gd( $width, $height )\n\t\t{\n $new_img = @imagecreatetruecolor( $width, $height ); \n @imagecopyresampled( $new_img, $this->img, 0, 0, 0 ,0, $width, $height, $this->in_file_width, $this->in_file_height ); \n\n $this->img = $new_img;\n return true;\n\t\t}", "function resizeImage ( ) {/* Contructor */}", "protected function register_filters(){\n\t\tadd_filter(\"image_resize_dimensions\", \"filter_image_resize_dimensions\", 20, 6);\n\t}", "private function setSourceScale()\n\t{\n\t\tlist($width, $height) = getimagesize($this->source[\"filepath\"]);\n\n\t\t$this->source[\"height\"] = $height;\n\t\t$this->source[\"width\"] = $width;\n\n\t\treturn 1;\n\t}", "protected function resampleCopy()\n {\n $result = imagecopyresampled($this->canvas['canvas'], $this->intermediate['copy'],\n $this->canvas['spacing']['x'], $this->canvas['spacing']['y'], 0 ,0,\n $this->intermediate['width'], $this->intermediate['height'], $this->source['width'],\n $this->source['height']);\n\n if($result === false) {\n throw new \\Exception(Helper::ERROR_CALL_IMAGECOPYRESAMPLED);\n }\n }", "public function refresh() {\n\t\t$adjustments = array(\n\t\t\tnew ResizeImageAdjustment(\n\t\t\t\tarray(\n\t\t\t\t\t'maximumWidth' => $this->maximumWidth,\n\t\t\t\t\t'maximumHeight' => $this->maximumHeight,\n\t\t\t\t\t'ratioMode' => $this->ratioMode,\n\t\t\t\t\t'allowUpScaling' => $this->allowUpScaling,\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t$processedImageInfo = $this->imageService->processImage($this->originalAsset->getResource(), $adjustments);\n\n\t\t$this->resource = $processedImageInfo['resource'];\n\t\t$this->width = $processedImageInfo['width'];\n\t\t$this->height = $processedImageInfo['height'];\n\t}", "public function testOpenGraphImageResample(): void\n {\n $image = 'default/le-monde-full.jpg';\n $this->regenerate($image, true, [0, 0, 160, 80]);\n $expected = self::$regenerated . $image;\n $url = self::LOCAL_SERVER . 'default/le-monde.html';\n $wt = new WebThumbnailer();\n $thumb = $wt->resample()->thumbnail($url);\n $this->assertFileEquals($expected, $thumb);\n }", "static protected function getResampled(\n //&$dst,&$src,&$mimeSuf,\n $imageType,$dstName,$srcName,\n $dw,$dh,$sx,$sy,$sw,$sh,\n $dx=0,$dy=0\n ) {\n $dst=false; $src=false; $mimeSuf='';\n switch ($imageType) {\n case 1 : //gif\n $src = ImageCreateFromGif($srcName);\n $dst = imagecreatetruecolor($dw, $dh);\n if( !self::createDir($dstName,true) ) Yii::app()->end();\n imagecopyresampled($dst,$src, $dx,$dy, $sx,$sy, $dw,$dh, $sw,$sh);\n $state = imagegif($dst, $dstName);\n $mimeSuf = \"gif\";\n break;\n case 2 : //jpg\n $src = ImageCreateFromJpeg($srcName);\n $dst = imagecreatetruecolor($dw, $dh);\n if( !self::createDir($dstName,true) ) Yii::app()->end();\n imagecopyresampled($dst, $src, 0, 0, $sx, $sy, $dw, $dh, $sw, $sh);\n $state = imagejpeg($dst, $dstName, 90);\n $mimeSuf = \"jpeg\";\n break;\n case 3 : //png\n $src = ImageCreateFromPng($srcName);\n $dst = imagecreatetruecolor($dw, $dh);\n if( !self::createDir($dstName,true) ) Yii::app()->end();\n // Fill with alpha background\n imagefill($dst, 0, 0, imagecolorallocatealpha($dst, 0, 0, 0, 127));\n //imagetruecolortopalette($img_n, false, 65535);\n imagealphablending($dst, false);\n imagesavealpha($dst, true);\n\n imagecopyresampled($dst, $src, 0, 0, $sx, $sy, $dw, $dh, $sw, $sh);\n $state = imagepng($dst, $dstName, 0);\n $mimeSuf = \"png\";\n break;\n default :\n Yii::log(\"Тип не поддерживается!!!\");\n $state = false;\n break;\n }\n if ($src) imagedestroy($src);\n if ($dst) imagedestroy($dst);\n \n if (!$state && $mimeSuf) {\n $mimeSuf = '';\n Yii::log(\"Ошибка записи файла!!!\");\n }\n \n return $mimeSuf;\n }", "function display_scaled_by_width(\r\n\t\t\t$original_image,\r\n \t \t$original_width,\r\n \t\t $original_height,\r\n $param_width,\r\n\t\t\t$param_height) {\r\n//error_log(\"display_scaled_by_width\");\r\n $new_width = $param_width;\r\n $new_height = floor($original_height * ($param_width / $original_width));\r\n $scaled_image = imagecreatetruecolor($new_width, $new_height);\r\n imagecopyresampled($scaled_image, $original_image, 0,0,0,0,$new_width, \r\n $new_height, $original_width, $original_height);\r\n// JLR\r\n// imagetruecolortopalette($scaled_image, true, 255);\r\n ImageTrueColorToPalette2 ($scaled_image, true, 255);\r\n header('Content-type: image/png');\r\n imagepng($scaled_image);\r\n }", "public function scale() {}", "function adaptive_resize($width, $height = null) {\n\n\t\treturn $this->thumbnail($width, $height);\n\n\t}", "public function set_resize($param)\n\t{\n\t\t$this->resize = $param; return $this;\n\t}", "public function scale( $scale ){\n\t\t$new_width = round( $scale * .01 * $this->width );\n\t\t$new_height= round( $scale * .01 * $this->height );\n\n\t\t$new_im = imagecreatetruecolor( $new_width, $new_height );\n\n\t\timagecopyresampled( $new_im, $this->im, 0, 0, 0, 0, $new_width, $new_height, $this->width, $this->height );\n\n\t\t$this->im = $new_im;\n\t\t$this->width = $new_width;\n\t\t$this->height = $new_height;\n\t\tunset( $new_im );\n\t}", "function img_resize($in_img_file, $out_img_file, $req_width, $req_height, $quality=100) {\n\n// Get image file details\nlist($width, $height, $type, $attr) = getimagesize($in_img_file);\n$src = @imagecreatefromjpeg($in_img_file);\n\n// Open file according to file type \n // Check if image is smaller (in both directions) than required image\n if ($width < $req_width and $height < $req_height) {\n // Use original image dimensions\n $new_width = $width;\n $new_height = $height;\n } else {\n // Test orientation of image and set new dimensions appropriately\n // (makes sure largest dimension never exceeds the target thumb size)\n if ($width > $height) {\n // landscape\n $sf = $req_width / $width;\n } else {\n // portrait \n $sf = $req_height / $height;\n }\n $new_width = round($width * $sf);\n $new_height = round($height * $sf);\n }\n\n // Create the new canvas ready for resampled image to be inserted into it\n $new = imagecreatetruecolor($new_width, $new_height);\n\n // Resample input image into newly created image\n imagecopyresampled($new, $src, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\n\n // Create output jpeg\n imagejpeg($new, $out_img_file, $quality);\n // Destroy any intermediate image files\n imagedestroy($src);\n imagedestroy($new);\n\n return true;\n}", "public function resizeImage ($columns, $rows, $filter, $blur, $bestfit = false, $legacy = false) {}", "private function resize(){\r\n $tmp = [$this->size * 2];\r\n for($i = 0; $i < $this->count; $i++){\r\n $tmp[$i] = $this->array[$i];\r\n }\r\n $this->size *= 2;\r\n $this->array = $tmp;\r\n }", "abstract public function getResizedImage($image);", "function ak_img_resize($target, $newcopy, $ext) {\n \n \n $w = 1200;\n $h = 1200;\n \n list($w_orig, $h_orig) = getimagesize($target);\n $scale_ratio = $w_orig / $h_orig;\n if (($w / $h) > $scale_ratio) {\n $w = $h * $scale_ratio;\n } else {\n $h = $w / $scale_ratio;\n }\n $img = \"\";\n $ext = strtolower($ext);\n if ($ext == \"gif\"){ \n $img = imagecreatefromgif($target);\n } else if($ext ==\"png\"){ \n $img = imagecreatefrompng($target);\n } else { \n $img = imagecreatefromjpeg($target);\n }\n $tci = imagecreatetruecolor($w, $h);\n // imagecopyresampled(dst_img, src_img, dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h)\n imagecopyresampled($tci, $img, 0, 0, 0, 0, $w, $h, $w_orig, $h_orig);\n if ($ext == \"gif\"){ \n imagegif($tci, $newcopy);\n } else if($ext ==\"png\"){ \n imagepng($tci, $newcopy);\n } else { \n imagejpeg($tci, $newcopy, 84);\n }\n}", "function ImageResizer($imgf,$wd2,$ht2) {\n\n\t$src = DIR_FS_CATALOG_IMAGES.$imgf;\n\t$srcw = DIR_WS_CATALOG_IMAGES.$imgf;\n\n\t$frm = sprintf('%dx%d',$wd2,$ht2);\n\t$dst = DIR_FS_CATALOG_IMAGES_CACHE.\"$frm/$imgf\";\n\t$dstw = DIR_WS_CATALOG_IMAGES_CACHE.\"$frm/$imgf\";\n\n if (!file_exists(DIR_FS_CATALOG_IMAGES_CACHE)) mkdir(DIR_FS_CATALOG_IMAGES_CACHE,0775);\n\n\n $sstat=@stat($src);\n if (!$sstat) return $srcw;\n if ($dstat=@stat($dst)) {\n if ($dstat[9]>=$sstat[9]) return $dstw;\n }\n\n\n $quality=80;\n $extm=Array();\n preg_match('/.*\\.(.*)/',$imgf,$extm);\n $ext=strtolower($extm[1]);\n $img;\n $tc=false;\n switch ($ext) {\n case 'jpeg':\n case 'jpg':\n $tc=true;\n $img=imagecreatefromjpeg($src);\n break;\n case 'gif':\n $img=@imagecreatefromgif($src);\n if (!function_exists('imagegif')) $dst.='.'.($ext='jpg');\n break;\n case 'png':\n $img=@imagecreatefrompng($src);\n break;\n }\n if (!$img) return $srcw;\n $wd=imagesx($img);\n $ht=imagesy($img);\n $ipar=$ImageParameters[$frm];\n $img2;\n if ($wd2==0) $wd2=floor($ht2*$wd/$ht+0.5);\n if ($ht2==0) $ht2=floor($wd2*$ht/$wd+0.5);\n\n\tif(($wd!=$wd2) || ($ht!=$ht2)) {\n\t\t$sc = min($wd2/$wd,$ht2/$ht);\n\n $img2 = ($tc ? imagecreatetruecolor($wd2,$ht2) : imagecreate($wd2,$ht2));\n\n $x2t=floor(($wd2-$wd*$sc+1)/2);\n $y2t=floor(($ht2-$ht*$sc+1)/2);\n $wd2t=floor($wd*$sc+0.5);\n $ht2t=floor($ht*$sc+0.5);\n $bg=imagecolorallocate($img2,255,255,255);\n imagefilledrectangle($img2,0,0,$wd2-1,$ht2-1,$bg);\n if (!$tc) imagecolortransparent($img2,$bg);\n if ($tc && function_exists('imagecopyresampled')) {\n imagecopyresampled($img2,$img,$x2t,$y2t,0,0,$wd2t,$ht2t,$wd,$ht);\n } else {\n imagecopyresized($img2,$img,$x2t,$y2t,0,0,$wd2t,$ht2t,$wd,$ht);\n }\n } else {\n\t$img2=$img;\n }\n\nif(!file_exists(DIR_FS_CATALOG_IMAGES_CACHE .$frm)) mkdir(DIR_FS_CATALOG_IMAGES_CACHE.$frm,0777);\n\n\tswitch ($ext) {\n\t\tcase 'jpeg':\n\t\tcase 'jpg':\n\t\t\timagejpeg($img2,$dst,$quality);\n\t\tbreak;\n\n\t\tcase 'gif':\n\t\t\timagegif($img2,$dst);\n\t\tbreak;\n\t\n\t\tcase 'png':\n\t\t\timagepng($img2,$dst);\n\t\tbreak;\n\t}\n\n\tCleanupImageCache($frm);\n\n\treturn $dstw;\n}", "function img_resize($target, $newcopy, $w, $h, $ext)\n{\n list($w_orig, $h_orig) = getimagesize($target);\n \n $scale_ratio = $w_orig / $h_orig;\n if (($w / $h) > $scale_ratio) {\n $w = $h * $scale_ratio;\n } else {\n $h = $w / $scale_ratio;\n }\n $img = \"\";\n $ext = strtolower($ext);\n if ($ext == \"gif\") {\n $img = imagecreatefromgif($target);\n } elseif ($ext ==\"png\") {\n $img = imagecreatefrompng($target);\n } else {\n $img = imagecreatefromjpeg($target);\n }\n $tci = imagecreatetruecolor($w, $h);\n\n // imagecopyresampled(dst_img, src_img, dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h)\n imagecopyresampled($tci, $img, 0, 0, 0, 0, $w, $h, $w_orig, $h_orig);\n imagejpeg($tci, $newcopy, 80);\n}", "public function testReluctanceToResampling()\n {\n $image = $this->objFromFixture(Image::class, 'imageWithoutTitle');\n $this->assertTrue($image->isSize(300, 300));\n\n // Set width to 300 pixels\n $imageScaleWidth = $image->ScaleWidth(300);\n $this->assertEquals($imageScaleWidth->getWidth(), 300);\n $this->assertEquals($image->Filename, $imageScaleWidth->Filename);\n\n // Set height to 300 pixels\n $imageScaleHeight = $image->ScaleHeight(300);\n $this->assertEquals($imageScaleHeight->getHeight(), 300);\n $this->assertEquals($image->Filename, $imageScaleHeight->Filename);\n\n // Crop image to 300 x 300\n $imageCropped = $image->Fill(300, 300);\n $this->assertTrue($imageCropped->isSize(300, 300));\n $this->assertEquals($image->Filename, $imageCropped->Filename);\n\n // Resize (padded) to 300 x 300\n $imageSized = $image->Pad(300, 300);\n $this->assertTrue($imageSized->isSize(300, 300));\n $this->assertEquals($image->Filename, $imageSized->Filename);\n\n // Padded image 300 x 300 (same as above)\n $imagePadded = $image->Pad(300, 300);\n $this->assertTrue($imagePadded->isSize(300, 300));\n $this->assertEquals($image->Filename, $imagePadded->Filename);\n\n // Resized (stretched) to 300 x 300\n $imageStretched = $image->ResizedImage(300, 300);\n $this->assertTrue($imageStretched->isSize(300, 300));\n $this->assertEquals($image->Filename, $imageStretched->Filename);\n\n // Fit (various options)\n $imageFit = $image->Fit(300, 600);\n $this->assertTrue($imageFit->isSize(300, 300));\n $this->assertEquals($image->Filename, $imageFit->Filename);\n $imageFit = $image->Fit(600, 300);\n $this->assertTrue($imageFit->isSize(300, 300));\n $this->assertEquals($image->Filename, $imageFit->Filename);\n $imageFit = $image->Fit(300, 300);\n $this->assertTrue($imageFit->isSize(300, 300));\n $this->assertEquals($image->Filename, $imageFit->Filename);\n }", "private function scaleImage()\n\t{\n\t\t$ret = imagecopyresized($this->destination[\"imagehandler\"], $this->source[\"imagehandler\"], 0, 0, 0, 0, $this->destination[\"width\"], $this->destination[\"height\"], $this->source[\"width\"], $this->source[\"height\"]);\n\n\t\timagedestroy($this->source[\"imagehandler\"]);\n\t\treturn $ret;\n\t}", "protected function _refreshDimensions() {\n $this->_height = imagesy ( $this->_image );\n $this->_width = imagesx ( $this->_image );\n }", "function normal_resize_image($source, $destination, $image_type, $max_size, $image_width, $image_height, $quality){\n \n if($image_width <= 0 || $image_height <= 0){return false;} //return false if nothing to resize\n \n //do not resize if image is smaller than max size\n if($image_width <= $max_size && $image_height <= $max_size){\n if(save_image($source, $destination, $image_type, $quality)){\n return true;\n }\n }\n \n //Construct a proportional size of new image\n $image_scale = min($max_size/$image_width, $max_size/$image_height);\n $new_width = ceil($image_scale * $image_width);\n $new_height = ceil($image_scale * $image_height);\n \n $new_canvas = imagecreatetruecolor( $new_width, $new_height ); //Create a new true color image\n \n //Copy and resize part of an image with resampling\n if(imagecopyresampled($new_canvas, $source, 0, 0, 0, 0, $new_width, $new_height, $image_width, $image_height)){\n save_image($new_canvas, $destination, $image_type, $quality); //save resized image\n }\n\n return true;\n}", "public function scale() { }", "function ak_img_resize($target, $newcopy, $w, $h, $ext) {\r\n list($w_orig, $h_orig) = getimagesize($target);\r\n $scale_ratio = $w_orig / $h_orig;\r\n if (($w / $h) > $scale_ratio) {\r\n $w = $h * $scale_ratio;\r\n } else {\r\n $h = $w / $scale_ratio;\r\n }\r\n $img = \"\";\r\n $ext = strtolower($ext);\r\n if ($ext == \"gif\"){ \r\n $img = imagecreatefromgif($target);\r\n } else if($ext ==\"png\"){ \r\n $img = imagecreatefrompng($target);\r\n } else { \r\n $img = imagecreatefromjpeg($target);\r\n }\r\n $tci = imagecreatetruecolor($w, $h);\r\n // imagecopyresampled(dst_img, src_img, dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h)\r\n imagecopyresampled($tci, $img, 0, 0, 0, 0, $w, $h, $w_orig, $h_orig);\r\n if ($ext == \"gif\"){ \r\n imagegif($tci, $newcopy);\r\n } else if($ext ==\"png\"){ \r\n imagepng($tci, $newcopy);\r\n } else { \r\n imagejpeg($tci, $newcopy, 84);\r\n }\r\n}", "function _previews_ImageScale($filename, $type) {\r\n include_once('resize-class.php');\r\n // Path to previews in filesystem\r\n $path = file_directory_path().'/previews';\r\n\r\n // File-Extension jpg or png\r\n $ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));\r\n \r\n $src = $path.'/raw/'.$filename;\r\n // Check if raw-File exist\r\n if (!file_exists($src) || !is_readable($src)) {echo 'Error: '.$src.'<br />'; return false;}\r\n\r\n switch ($type) {\r\n case 'screen':\r\n $max_side = 250;\r\n $q = 10;\r\n $folder = 'screen';\r\n $new_ext = 'jpg';\r\n break;\r\n case 'medium':\r\n $max_side = 2000;\r\n $q = 30;\r\n $folder = 'medium';\r\n $new_ext = 'jpg';\r\n break;\r\n case 'thumbnail':\r\n $max_side = 60;\r\n $q = 40;\r\n $folder = 'thumbnails';\r\n $new_ext = 'jpg';\r\n break;\r\n case 'big':\r\n $max_side = 5000;\r\n $q = 60;\r\n $folder = 'big';\r\n $new_ext = $ext;\r\n break;\r\n }\r\n\r\n $outputFileName = $path.'/'.$folder.'/'.str_replace('.'.$ext,'.'.$new_ext,$filename);\r\n list($width, $height, , ) = getimagesize($src);\r\n\r\n if($width*$height > 65571200) {\r\n return $outputFileName;\r\n }\r\n \r\n // Delete any old Files -> overwrite\r\n if (file_exists($outputFileName)) unlink ($outputFileName);\r\n \r\n $ratio = $width/$height; \r\n $max_width = ($width > $height)?$max_side:$max_side*$ratio;\r\n $max_height = ($height > $width )?$max_side:$max_side/$ratio;\r\n \r\n $resizeObj = new resize($src);\r\n \r\n // Scale Images\r\n switch ($type) {\r\n case 'screen':\r\n if (!$width || $width > $max_side || $height > $max_side) {\r\n $resizeObj->resizeImage($max_width, $max_height, 0);\r\n $resizeObj -> saveImage($outputFileName, $q);\r\n }\r\n else copy($src, $outputFileName);\r\n break;\r\n case 'thumbnail':\r\n $resizeObj->resizeImage(60, 60, 'crop');\r\n $resizeObj->saveImage($outputFileName, $q);\r\n break;\r\n case 'big':\r\n if (!$width || $width > $max_side || $height > $max_side) {\r\n $resizeObj->resizeImage($max_width, $max_height, 0);\r\n $resizeObj -> saveImage($outputFileName, $q);\r\n }\r\n else copy($src, $outputFileName);\r\n break;\r\n case 'medium':\r\n if (!$width || $width > $max_side || $height > $max_side) {\r\n $resizeObj->resizeImage($max_width, $max_height, 0);\r\n $resizeObj -> saveImage($outputFileName, $q);\r\n }\r\n else copy($src, $outputFileName);\r\n break;\r\n default: \r\n }\r\n // return Filename of the created scaled image\r\n return $outputFileName;\r\n}", "function createResizedImages(){\n\t\t$this->createLarge();\n\t\t$this->createMedium();\n\t\t$this->createSmall();\n\t\t$this->createThumbnail();\n\t\t$this->createSquare();\n\t}", "private function resize() {\n\t\t$width = $this->original_info['width'];\n\t\t$height = $this->original_info['height'];\n\t\tif ($this->width > 0 && $this->height > 0) {\n\t\t\tif ($this->fixed_given_size) {\n\t\t\t\t$this->given_width = $this->width;\n\t\t\t\t$this->given_height = $this->height;\n\t\t\t\tif (!$this->keep_ratio){\n\t\t\t\t\t$width = $this->width;\n\t\t\t\t\t$height = $this->height;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->keep_ratio){\n\t\t\t\t$drawWidth = $this->width;\n\t\t\t\t$drawHeight = $this->height;\n\t\t\t\t$sourceRatio = doubleval( $width / $height);\n\t\t\t\t$targetRatio = doubleval( $this->width / $this->height);\n\t\t\t\t\n\t\t\t\tif ($sourceRatio != $targetRatio) {\n\t\t\t\t\tif ($sourceRatio > $targetRatio) {\n\t\t\t\t\t\t$drawHeight = round(round($this->width / $sourceRatio));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$drawWidth = round(round($this->height * $sourceRatio));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!$this->fixed_given_size) {\n\t\t\t\t\t$this->given_width = $drawWidth;\n\t\t\t\t\t$this->given_height = $drawHeight;\n\t\t\t\t}\n\t\t\t\t$width = $drawWidth;\n\t\t\t\t$height = $drawHeight;\n\t\t\t}\n\t\t} else if ($this->scale > 0) {\n\t\t\t$width = round($width * $this->scale);\n\t\t\t$height = round($height * $this->scale);\n\t\t} else if ($this->width > 0 && $this->height == 0) {\n\t\t\t$height = round($this->width * $height / $width);\n\t\t\t$width = round($this->width);\n\t\t} else if ($this->width == 0 && $this->height > 0) {\n\t\t\t$width = round($this->height * $width / $height);\n\t\t\t$height = round($this->height);\n\t\t}\n\t\tif ($width <= 1 || $height <= 1) {\n\t\t\tthrow new \\Exception(\"width or height value error!\");\n\t\t}\n\t\t$this->width = $width;\n\t\t$this->height = $height;\n\t\t\n\t\t$this->given_width = ($this->given_width == 0 ? $width : $this->given_width);\n\t\t$this->given_height = ($this->given_height == 0 ? $height : $this->given_height);\n\t\t\n\t\t$this->copy($width, $height, 0, 0, 0, 0, $width, $height);\n\t}", "private function set_scale_info() {\n $width = $this->get_width();\n $height = $this->get_height();\n\n $this->scaleorig = array($width, $height);\n $this->scaleinfo[] = array($width, $height);\n\n $tilesize = $this->get_tile_size();\n\n while (($width > $tilesize) || ($height > $tilesize)) {\n $width = floor($width / 2.0);\n $height = floor($height / 2.0);\n\n $this->scaleinfo[] = array($width, $height);\n }\n\n $this->scaleinfo = array_reverse($this->scaleinfo);\n }", "protected function resampleBicubic(\n\t\t&$dst,\n\t\t&$src,\n\t\t$dstx,\n\t\t$dsty,\n\t\t$srcx,\n\t\t$srcy,\n\t\t$w,\n\t\t$h,\n\t\t$zoomX,\n\t\t$zoomY=''\n\t) {\n\t\tif (!$zoomY) {\n\t\t\t$zoomY = $zoomX;\n\t\t}\n\t\t$palsize = ImageColorsTotal($src);\n\t\tfor ($i = 0; $i<$palsize; $i++) {\n\t\t\t$colors = ImageColorsForIndex($src, $i);\n\t\t\tImageColorAllocate(\n\t\t\t\t$dst,\n\t\t\t\t$colors['red'],\n\t\t\t\t$colors['green'],\n\t\t\t\t$colors['blue']\n\t\t\t);\n\t\t}\n\t\t$zoomX2 = (int)($zoomX/2);\n\t\t$zoomY2 = (int)($zoomY/2);\n\t\t$dstX = imagesx($dst);\n\t\t$dstY = imagesy($dst);\n\t\t$srcX = imagesx($src);\n\t\t$srcY = imagesy($src);\n\t\n\t\tfor ($j=0; $j<($h-$dsty); $j++) {\n\t\t\t$sY = (int)($j*$zoomY) + $srcy;\n\t\t\t$y13 = $sY+$zoomY2;\n\t\t\t$dY = $j+$dsty;\n\t\t\n\t\t\tif (($sY >= $srcY) or ($dY >= $dstY) or ($y13 >= $srcY)) {\n\t\t\t\tbreak 1;\n\t\t\t}\n\t\t\tfor ($i=0; $i<($w-$dstx); $i++) {\n\t\t\t\t$sX = (int)($i*$zoomX)+$srcx;\n\t\t\t\t$x34 = $sX+$zoomX2;\n\t\t\t\t$dX = $i+$dstx;\n\t\t\t\tif (($sX >= $srcX) or ($dX >= $dstX) or ($x34 >= $srcX)) {\n\t\t\t\t\tbreak 1;\n\t\t\t\t}\n\t\t\t\t$c1 = ImageColorsForIndex($src, ImageColorAt($src, $sX, $y13));\n\t\t\t\t$c2 = ImageColorsForIndex($src, ImageColorAt($src, $sX, $sY));\n\t\t\t\t$c3 = ImageColorsForIndex($src, ImageColorAt($src, $x34, $y13));\n\t\t\t\t$c4 = ImageColorsForIndex($src, ImageColorAt($src, $x34, $sY));\n\t\t\n\t\t\t\t$r = ($c1['red']+$c2['red']+$c3['red']+$c4['red'])/4;\n\t\t\t\t$g = ($c1['green']+$c2['green']+$c3['green']+$c4['green'])/4;\n\t\t\t\t$b = ($c1['blue']+$c2['blue']+$c3['blue']+$c4['blue'])/4;\n\t\t\n\t\t\t\tImageSetPixel($dst, $dX, $dY, ImageColorClosest(\n\t\t\t\t\t$dst,\n\t\t\t\t\t$r,\n\t\t\t\t\t$g,\n\t\t\t\t\t$b\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\t}", "public function resize(){\n\t\t$imgSplit = explode(\"/\",$this->image);\n\t\t$srcName = end($imgSplit);\n\t\t//$srcUrl = str_ireplace($srcName, \"\", $this->image);\n\t\t$srcUrl = str_ireplace($srcName, \"\", $this->image);\n\t\t\n\t\t\n\t\t//$srcPath = $_SERVER['DOCUMENT_ROOT'] .\"/resize/\". str_ireplace($srcName, \"\", $this->image);\n\t\t//$srcPath = $this->image;\n\t\t$srcPath = $srcUrl;\n\t\t// Get extension\n \n\t\t$split = explode(\".\",$srcName);\n\t\t$ext = strtolower($split[1]);\n\n\t\t// Misc variables\n\t\t$rszUrl = $srcUrl . $this->folder;\n\t\t$rszName = $this->prefix . $srcName;\n\t\t$rszPath = $this->folder;\n\t\t$rszQuality = $this->quality;\n\t\t\n\t\t// If save path doesn't exist, create it\n\t\t//echo \"<br />resize Path : $rszPath <br />\";\n\t\t//echo \"<br />and :\".$targetImage;\n \n\t\tif (!file_exists($rszPath)){ mkdir($rszPath, 0777);\t}\n\t\t\t\n\t\t// If the resized img doesn't exist, create it\n\t\t\n\t\t//if(file_exists(\"$rszPath/$rszName\") || !file_exists(\"$rszPath/$rszName\")){ \n\t\t\t\n\t\t\tswitch($ext){\n\t\t\t\tcase('jpg'): $srcImage = imagecreatefromjpeg(\"$srcPath$srcName\"); break;\n\t\t\t\tcase('jpeg'): $srcImage = imagecreatefromjpeg(\"$srcPath$srcName\"); break;\n\t\t\t\tcase('png'): $srcImage = imagecreatefrompng(\"$srcPath$srcName\"); if($rszQuality==10){ $rszQuality=9; } break;\n\t\t\t\tcase('gif'): $srcImage = imagecreatefromgif(\"$srcPath$srcName\"); break;\n\t\t\t}\n\t\t\t\n\t\t\t$srcWidth = imagesx($srcImage);\n\t\t\t$srcHeight = imagesy($srcImage);\n\t\t\t\n\t\t\t// Determine specs based on type\n\t\t\t$rszWidth = $this->width;\n\t\t\t$rszHeight = $this->height;\n\t\t\t/*if(strtolower($this->type)==\"width\"){\n\t\t\t\t$rszWidth = $this->max;\n\t\t\t\t$rszHeight = $srcHeight/($srcWidth/$rszWidth);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$rszHeight = $this->max;\n\t\t\t\t$rszWidth = $srcWidth/($srcHeight/$rszHeight);\n\t\t\t}\n\t\t\t*/\n\t\t\t\n\t\t\t// Determine specs if crop applied\n\t\t\t\n\t\t\t$srcX = 0; $srcY = 0;\n\t\t\t$srcNewWidth = $srcWidth; $srcNewHeight = $srcHeight;\n\t\t\t$dest = $srcImage;\n\t\t\t\n\t\t\t// Square crop\n\t\t\t\n\t\t\tif($this->square==true){\n\t\t\t\t$rszWidth = $this->width;\n\t\t\t\t$rszHeight = $this->height;\n\t\t\t\t\n\t\t\t\tif($srcHeight>$srcWidth){\n\t\t\t\t\t$srcX = 0;\n\t\t\t\t\t$srcY = floor(($srcHeight-$srcWidth)/2);\n\t\t\t\t\t$srcNewHeight = $srcWidth;\n\t\t\t\t\t$srcNewWidth = $srcWidth;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($srcWidth>$srcHeight){\n\t\t\t\t\t$srcX = floor(($srcWidth-$srcHeight)/2);\n\t\t\t\t\t$srcY = 0;\n\t\t\t\t\t$srcNewHeight = $srcHeight;\n\t\t\t\t\t$srcNewWidth = $srcHeight;\n\t\t\t\t}\n\t\t\t\t// Create new image with a new width and height.\n\t\t\t\t$dest = imagecreatetruecolor($srcNewWidth, $srcNewHeight);\n\t\t\t\t$this->resize_png($this->image,$srcImage,$dest);\n\t\t\t\t// Copy new image to memory after cropping.\n\t\t\t\timagecopy($dest, $srcImage, 0, 0, $srcX, $srcY, $srcNewWidth, $srcNewHeight);\n\t\t\t}\n\t\t\t\t\n\t\t\t$targetImage = imagecreatetruecolor($rszWidth,$rszHeight);\n\t\t\t\n\t\t\t/* starts */\n\t\t\tif($ext == 'png'){\n\t\t\t\t\n\t\t\t\t$this->resize_png($this->image,$srcImage,$targetImage);\n\t\t\t\t// Save file, quality=9, Add filters... although sometimes better without.\n\t\t\t\t//imagepng( $d, substr($rszUrl . $rszName,1), 9, PNG_ALL_FILTERS);\n\t\t\t}\n\t\t\t/* ends */\n\t\t\t\n\t\t\t\t\n\t\t\timagecopyresampled($targetImage,$dest,0,0,0,0,$rszWidth,$rszHeight,$srcNewWidth,$srcNewHeight);\n\t\t\t\n\t\t\tswitch($ext){\n\t\t\t\tcase('jpg'): imagejpeg($targetImage, \"$rszPath/$rszName\", $rszQuality * 10); break;\n\t\t\t\tcase('jpeg'): imagejpeg($targetImage, \"$rszPath/$rszName\", $rszQuality * 10);\tbreak;\n\t\t\t\tcase('png'): imagepng($targetImage, \"$rszPath/$rszName\", $rszQuality); break;\n\t\t\t\tcase('gif'): imagegif($targetImage, \"$rszPath/$rszName\"); break;\n\t\t\t}\n\t\t\t\n\t\t//}\n\t\t\n\t\t// Return the resized image\n\t\t\n\t\treturn($rszUrl . $rszName);\n\t\t\n\t\t// Clear temps\n\t\timagedestroy($dest);\n\t\timagedestroy($targetImage);\n\t\t\n\t}", "function resampimagejpg($forcedwidth, $forcedheight, $sourcefile, $destfile, $imgcomp) {\r\n $g_imgcomp = 100 - $imgcomp;\r\n $g_srcfile = $sourcefile;\r\n $g_dstfile = $destfile;\r\n $g_fw = $forcedwidth;\r\n $g_fh = $forcedheight;\r\n\r\n if (file_exists($g_srcfile)) {\r\n $g_is = @getimagesize($g_srcfile);\r\n if (($g_is[0] - $g_fw) >= ($g_is[1] - $g_fh)) {\r\n $g_iw = $g_fw;\r\n $g_ih = ($g_fw / $g_is[0]) * $g_is[1];\r\n }\r\n else {\r\n $g_ih = $g_fh;\r\n $g_iw = ($g_ih / $g_is[1]) * $g_is[0];\r\n }\r\n\r\n $img_src = imagecreatefromjpeg($g_srcfile);\r\n $img_dst = imagecreate($g_iw,$g_ih);\r\n imagecopyresampled($img_dst, $img_src, 0, 0, 0, 0, $g_iw, $g_ih, $g_is[0], $g_is[1]);\r\n imagejpeg($img_dst, $g_dstfile, $g_imgcomp);\r\n imagedestroy($img_dst);\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n}", "private function initThumb()\n {\n if($this->scale)\n {\n if($this->sourceWidth > $this->sourceHeight)\n {\n /* DEBUG\n echo '<br />sourceW > sourceHeight<br />';\n echo 'maxWidth: '.$this->maxWidth.'<br />';\n /**/\n $this->thumbWidth = $this->maxWidth;\n $this->thumbHeight = floor($this->sourceHeight * ($this->maxWidth/$this->sourceWidth));\n // DEBUG echo 'thumbW = : '.$this->thumbWidth.'<br />';\n }\n else if($this->sourceWidth < $this->sourceHeight)\n {\n /** DEBUG\n echo '<br />sourceW < sourceHeight<br />';\n echo 'maxHeight: '.$this->maxHeight.'<br />';\n /**/\n $this->thumbHeight = $this->maxHeight;\n $this->thumbWidth = floor($this->sourceWidth * ($this->maxHeight/$this->sourceHeight));\n // DEBUG echo 'thumbH = : '.$this->thumbHeight.'<br />';\n }\n else\n {\n $this->thumbWidth = $this->maxWidth;\n $this->thumbHeight = $this->maxHeight;\n } \n }\n else\n {\n $this->thumbWidth = $this->mawWidth;\n $this->thumbHeight = $this->maxHeight;\n }\n /* DEBUG\n echo 'thumbW : '.$this->thumbWidth.'<br />';\n echo 'thumbH : '.$this->thumbHeight.'<br />';\n /**/\n $this->thumb = imagecreatetruecolor($this->thumbWidth,$this->thumbHeight);\n if($this->sourceWidth <= $this->mawWidth &&\n $this->sourceHeight <= $this->maxHeight &&\n $this->inflate == false\n )\n {\n $this->thumb = $this->source;\n }\n else\n {\n imagecopyresampled($this->thumb,$this->source,0,0,0,0,\n $this->thumbWidth,$this->thumbHeight,\n $this->sourceWidth,$this->sourceHeight);\n }\n }", "public function scale($scale) {\n $width = $this->getWidth() * $scale/100;\n $height = $this->getheight() * $scale/100;\n $this->resize($width,$height);\n }", "function resize($newWidth, $newHeight=0, $keepAspect=true, $preferHeight=true)\n {\n mjlog(DEBUG,__METHOD__,\"newWidth[$newWidth] newHeight[$newHeight] keepAspect[$keepAspect] preferHeight[$preferHeight]\",__LINE__);\n\n if (!$newHeight) $newHeight = $newWidth;\n\n $w = $this->width; // $imagedata[0];\n $h = $this->height; // $imagedata[1];\n\n if ($keepAspect)\n {\n if (($h - $newHeight) > ($w - $newWidth) && $preferHeight) \n {\n $new_w = ($newWidth / $h) * $w;\n $new_h = $newHeight;\n } else {\n $new_h = ($newHeight / $w) * $h;\n $new_w = $newWidth;\n }\n mjlog(DEBUG,__METHOD__,\"keepAspect: new_w[$new_w] new_h[$new_h]\",__LINE__);\n }\n else // force to new size, loose aspect\n {\n $new_h = $newHeight;\n $new_w = $newWidth;\n mjlog(DEBUG,__METHOD__,\"force dimensions: new_w[$new_w] new_h[$new_h]\",__LINE__);\n }\n\n if ($this->imagetmp !== NULL) \n {\n imagedestroy($this->imagetmp);\n $this->imagetmp = NULL;\n }\n // if imagetmp exists then we have already done something with this image. so keep it and \n $image = $this->imagetmp ? $this->imagetmp : $this->image;\n $this->imagetmp = ImageCreateTrueColor($new_w, $new_h);\n if (!imagecopyResampled($this->imagetmp, $image, 0, 0, 0, 0, $new_w, $new_h, $w, $h))\n {\n $this->_err = \"image.resizeFailed\";\n mjlog(ERROR,__METHOD__,\"Error resizing image\",__LINE__);\n }\n }", "function imagecopyresampled($dst_im,$src_im,$dst_x,$dst_y,$src_x,$src_y,$dst_w,$dst_h,$src_w,$src_h)\n{\n\treturn true;\n}", "function createZoom($originalimage, $thumbDirectory, $imageName, $areaWidth, $areaHeight)\n{\n$imgtype=Get_File_type($originalimage);\nswitch (trim($imgtype)) {\n\tcase \"jpg\":\n\t\t$srcImg = imagecreatefromjpeg($originalimage);\t\n\tbreak;\n\tcase \"png\":\n\t\t$srcImg = imagecreatefrompng($originalimage);\t\n\tbreak;\n\tcase \"gif\":\n\t\t$srcImg = imagecreatefromgif($originalimage);\t\n\tbreak;\n\tcase \"bmp\":\n\t\t$srcImg = imagecreatefromwbmp($originalimage);\t\n\tbreak;\n\tdefault:\n\t\treturn ;\t\n\tbreak;\n}\n//Getting Original Width & Height\n$origWidth = imagesx($srcImg);\n$origHeight = imagesy($srcImg);\n\n//Calculating New Size\n\t//1-Step one: Resize to fit area width\n\t\t$thumbWidth=$areaWidth;\n\t\t$thumbHeight=($thumbWidth * $origHeight) / $origWidth;\n\t\t\n\t//2-Step two: If neccessary resize to fit area height\n\t\tif ($thumbHeight > $areaHeight) {\n\t\t\t$thumbHeight=$areaHeight;\n\t\t\t$thumbWidth=($thumbHeight * $origWidth) / $origHeight;\n\t\t}\n\n//Creating Resized Image\n$thumbImg = imagecreatetruecolor($thumbWidth, $thumbHeight);\nimagecopyresampled($thumbImg, $srcImg, 0, 0, 0, 0, $thumbWidth, $thumbHeight, imagesx($srcImg), imagesy($srcImg));\n\n//Saving new thumb\nswitch ($imgtype) {\n\tcase \"jpg\":\n\t\tfile_exists(\"$thumbDirectory/$imageName.jpg\") ? unlink(\"$thumbDirectory/$imageName.jpg\") : $a=\"ok\";\n\t\treturn imagejpeg($thumbImg, \"$thumbDirectory/$imageName.jpg\", 100);\t\n\tbreak;\n\tcase \"png\":\n\t\tfile_exists(\"$thumbDirectory/$imageName.png\") ? unlink(\"$thumbDirectory/$imageName.png\") : $a=\"ok\";\n\t\treturn imagepng($thumbImg, \"$thumbDirectory/$imageName.png\");\t\n\tbreak;\n\tcase \"gif\":\n\t\tfile_exists(\"$thumbDirectory/$imageName.gif\") ? unlink(\"$thumbDirectory/$imageName.gif\") : $a=\"ok\";\n\t\treturn imagegif($thumbImg, \"$thumbDirectory/$imageName.gif\");\t\n\tbreak;\n\tcase \"bmp\":\n\t\tfile_exists(\"$thumbDirectory/$imageName.bmp\") ? unlink(\"$thumbDirectory/$imageName.bmp\") : $a=\"ok\";\n\t\treturn imagewbmp($thumbImg, \"$thumbDirectory/$imageName.bmp\");\t\n\tbreak;\n\tdefault:\n\t\treturn ;\t\n\tbreak;\n}\n}", "function imageTransform($srcSpec, $destSpec, $size, &$config, $aspect_ratio='')\n{\n $mod = cmsms()->GetModuleInstance('Cataloger');\n $fn = cms_join_path(\n $mod->GetModulePath(),\n 'lib',\n 'external',\n 'Image',\n 'Transform.php'\n );\n \n require_once($fn);\n\n $it = new Image_Transform;\n $img = $it->factory('GD');\n $img->load($srcSpec);\n \n if ($img->img_x < $img->img_y)\n {\n $long_axis = $img->img_y;\n }\n else\n {\n $long_axis = $img->img_x;\n }\n\n if ($long_axis > $size)\n {\n $img->scaleByLength($size);\n $img->save($destSpec, 'jpeg');\n }\n else\n {\n $img->save($destSpec, 'jpeg');\n }\n \n $img->free();\n}", "function resizeThumbnailImage($thumb_image_name, $image, $width, $height, $start_width, $start_height, $scale){\n list($imagewidth, $imageheight, $imageType) = getimagesize($image);\n $imageType = image_type_to_mime_type($imageType);\n\n $newImageWidth = ceil($width * $scale);\n $newImageHeight = ceil($height * $scale);\n $newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n\n imagealphablending($newImage, false);\n imagesavealpha($newImage,true);\n $transparent = imagecolorallocatealpha($newImage, 255, 255, 255, 127);\n imagefilledrectangle($newImage, 0, 0, $newImageWidth, $newImageHeight, $transparent);\n\n\n switch($imageType) {\n case \"image/gif\":\n $source=imagecreatefromgif($image);\n break;\n case \"image/pjpeg\":\n case \"image/jpeg\":\n case \"image/jpg\":\n $source=imagecreatefromjpeg($image);\n break;\n case \"image/png\":\n case \"image/x-png\":\n $source=imagecreatefrompng($image);\n break;\n }\n\n\n\n//imagefilledrectangle($newImage, 0, 0, $nWidth, $nHeight, $transparent);\n//imagecopyresampled($newImage, $im, 0, 0, 0, 0, $nWidth, $nHeight, $imgInfo[0], $imgInfo[1]);\n//imagecopyresampled($newImage, $source, 0, 0, 0, 0, $start_width, $start_height, $newImageWidth, $newImageHeight);\n\n\n imagecopyresampled($newImage,$source,0,0,$start_width,$start_height,$newImageWidth,$newImageHeight,$width,$height);\n switch($imageType) {\n case \"image/gif\":\n imagegif($newImage,$thumb_image_name);\n break;\n case \"image/pjpeg\":\n case \"image/jpeg\":\n case \"image/jpg\":\n imagejpeg($newImage,$thumb_image_name,90);\n break;\n case \"image/png\":\n case \"image/x-png\":\n imagepng($newImage,$thumb_image_name);\n break;\n }\n chmod($thumb_image_name, 0777);\n return $thumb_image_name;\n}", "function resample($rows){\n\t$n=count($rows,COUNT_NORMAL);\n\t$lastx=0;\n\t$inx=0;\n\tfor($i=0;$i<$n;$i++){\n\t\t$x=$rows[$i]['x'];\n\t\t$y=$rows[$i]['y'];\n\t\tfor($j=$lastx; $j<$x;$j++)\n\t\t{\n\t\t\t$samp[$inx]['x']=$j;\n\t\t\t$samp[$inx]['y']=$y;\n\t\t\t$inx++;\n\t\t}\n\n\t}\n\treturn $samp;\n}", "public function testForceResample()\n {\n $imageHQ = $this->objFromFixture(Image::class, 'highQualityJPEG');\n $imageHQR = $imageHQ->Resampled();\n $imageLQ = $this->objFromFixture(Image::class, 'lowQualityJPEG');\n $imageLQR = $imageLQ->Resampled();\n\n // Test resampled file is served when force_resample = true\n Config::modify()->set(DBFile::class, 'force_resample', true);\n $this->assertLessThan($imageHQ->getAbsoluteSize(), $imageHQR->getAbsoluteSize(), 'Resampled image is smaller than original');\n $this->assertEquals($imageHQ->getURL(), $imageHQR->getSourceURL(), 'Path to a resampled image was returned by getURL()');\n\n // Test original file is served when force_resample = true but original file is low quality\n $this->assertGreaterThanOrEqual($imageLQ->getAbsoluteSize(), $imageLQR->getAbsoluteSize(), 'Resampled image is larger or same size as original');\n $this->assertNotEquals($imageLQ->getURL(), $imageLQR->getSourceURL(), 'Path to the original image file was returned by getURL()');\n\n // Test original file is served when force_resample = false\n Config::modify()->set(DBFile::class, 'force_resample', false);\n $this->assertNotEquals($imageHQ->getURL(), $imageHQR->getSourceURL(), 'Path to the original image file was returned by getURL()');\n }", "function image_size() {\n //Resources\n add_image_size('sample_pack', 720, 337, true);\n add_image_size( 'slider', 1920, 500, true);\n}", "public function resize($width,$height) {\n $new_image = imagecreatetruecolor($width, $height);\n imagecopyresampled($new_image, $this->image, 0, 0, 0, 0, $width, $height, $this->getWidth(), $this->getHeight());\n $this->image = $new_image;\n }", "protected function _resizeElements()\n {\n $oQuery = AM_Model_Db_Table_Abstract::factory('element_data')\n ->select()\n ->where(sprintf('key_name IN (\"%s\", \"%s\", \"%s\")', AM_Model_Db_Element_Data_Resource::DATA_KEY_RESOURCE\n , AM_Model_Db_Element_Data_MiniArticle::DATA_KEY_THUMBNAIL\n , AM_Model_Db_Element_Data_MiniArticle::DATA_KEY_THUMBNAIL_SELECTED));\n $oElementDatas = AM_Model_Db_Table_Abstract::factory('element_data')->fetchAll($oQuery);\n\n foreach ($oElementDatas as $oElementData) {\n $this->_resizeImage($oElementData->value, $oElementData->id_element, AM_Model_Db_Element_Data_Resource::TYPE, $oElementData->key_name);\n }\n }", "function imagecopyresampled($dst_im, $src_im, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h)\n{\n return true;\n}", "function make_thumb($image, $target_file, $image_type, $width, $height ) {\n //list($width, $height) = getimagesize($image);\n\n //setup the new size of the image\n $ratio = $width/$height;\n $new_height = 100;\n $new_width = $new_height * $ratio;\n\n //move the file in the new location\n //move_uploaded_file($image, $target_file);\n \n // resample the image \n \n $new_image = imagecreatetruecolor($new_width, $new_height);\n\n\t\tswitch(strtolower($image_type))\n\t\t{\n\t\t\tcase 'image/png':\n\t\t\t\t$old_image = imagecreatefrompng($image);\t\t\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 'image/gif':\n\t\t\t\t$old_image = imagecreatefromgif($image);\t\t\t\t\t\n\t\t\t\tbreak;\t\t\t\n\t\t\tcase 'image/jpeg':\n\t\t\tcase 'image/pjpeg':\n\t\t\t\tif( !$old_image = imagecreatefromjpeg($image) ) return false;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\t\t\n\t \n //$old_image = imagecreatefromjpeg($image);\n imagecopyresampled($new_image,$old_image,0,0,0,0,$new_width, $new_height, $width, $height); \n\n //output\n imagejpeg($new_image, $target_file, 50 );\n return true;\n}", "public function image_resize() {\n\t\treturn $this->image_process('resize');\n\t}", "function _thumbnail_gd( $width, $height )\n {\n if( ! ( $width && $height ) )\n {\n $sizes = $this->get_proportional_values( $width, $height ); \n $width = $sizes['newx'];\n $height = $sizes['newy'];\n }\n\n $new_img = imagecreatetruecolor( $width, $height ); \n imagecopyresampled( $new_img, $this->img, 0, 0, 0 ,0, $width, $height, $this->in_file_width, $this->in_file_height ); \n\n $this->img = $new_img;\n\n return true;\n }", "public function equalizeImage () {}", "function ImageResize(\\raylib\\Image &$image, int $newWidth, int $newHeight): void { }", "function wp_shrink_dimensions($width, $height, $wmax = 128, $hmax = 96)\n{\n}", "public function resize(): self\n {\n $this->resizeMode = static::RESIZE;\n\n return $this;\n }", "private function resizeImage(&$img)\n {\n // create a new image the correct shape and size\n $newimg = imagecreatetruecolor($this->output_width, $this->output_height);\n $metadata = $this->entry->getMetadata();\n imagecopyresampled($newimg, $img, 0, 0, 0, 0, $this->output_width, $this->output_height, $metadata->getLoadedWidth(), $metadata->getLoadedHeight());\n // clean up old image\n imagedestroy($img);\n return $newimg;\n }", "public function resize($options = array())\n {\n $pagesCount = $this->getAdapter()->getPagesCount();\n $limit = sfConfig::get('app_mediatorMediaLibraryPlugin_pdf_max_pages', 10);\n\n if (!isset($options['width']) || !isset($options['height']))\n {\n $dimensions = $this->getAdapter()->getDimensions();\n\n if (!isset($options['width']))\n {\n $options['width'] = $dimensions['width'];\n }\n\n if (!isset($options['height']))\n {\n $options['height'] = $dimensions['height'];\n }\n }\n\n $adapter_options = array();\n $i = 0;\n\n while ($i < $pagesCount && $i < $limit)\n {\n $adapter_options = array(\n 'scale' => !isset($options['scale']) || $options['scale'],\n 'inflate' => isset($options['inflate']) && $options['inflate'],\n 'crop' => isset($options['crop']) && $options['crop'],\n 'dest_mime' => isset($options['dest_mime']) ? $options['dest_mime'] : 'image/png',\n 'quality' => isset($options['quality']) ? $options['quality'] : 90,\n 'extract' => $i\n );\n\n // foreach page, generate the variation for these options\n $image = $this->getAdapter()->resize(\n $options['width'],\n $options['height'],\n $adapter_options\n );\n $filename = sprintf(\n '%s-%s.png',\n $options['directory'].DIRECTORY_SEPARATOR.$this->file,\n $i\n );\n $this->filesystem->write($filename, $image);\n $i++;\n }\n }", "public function resizeDownsizeToMoreHorizontalAspect()\n {\n $source = new \\Imagick('pattern:gray0');\n $source->scaleImage(100, 50);\n\n $imagick = Image::resize($source, 40, 10);\n\n //making sure source didnt resize\n $this->assertSame(100, $source->getImageWidth());\n $this->assertSame(50, $source->getImageHeight());\n\n $this->assertSame(40, $imagick->getImageWidth());\n $this->assertSame(10, $imagick->getImageHeight());\n\n $whiteBarLeft = $imagick->getImagePixelColor(9, 4)->getHsl();\n $whiteBarRight = $imagick->getImagePixelColor(30, 4)->getHsl();\n\n $imageLeft = $imagick->getImagePixelColor(10, 4)->getHsl();\n $imageRight = $imagick->getImagePixelColor(29, 4)->getHsl();\n $imageTop = $imagick->getImagePixelColor(19, 0)->getHsl();\n $imageBottom = $imagick->getImagePixelColor(19, 9)->getHsl();\n\n $this->assertGreaterThan(0.9, $whiteBarLeft['luminosity']);\n $this->assertGreaterThan(0.9, $whiteBarRight['luminosity']);\n\n $this->assertLessThan(0.1, $imageLeft['luminosity']);\n $this->assertLessThan(0.1, $imageRight['luminosity']);\n $this->assertLessThan(0.1, $imageTop['luminosity']);\n $this->assertLessThan(0.1, $imageBottom['luminosity']);\n }", "public function adaptiveResizeImage ($columns, $rows, $bestfit = false, $legacy = false) {}", "function thumbnail_upscale( $default, $orig_w, $orig_h, $new_w, $new_h, $crop ){\n if ( !$crop ) return null;\n\n $aspect_ratio = $orig_w / $orig_h;\n $size_ratio = max($new_w / $orig_w, $new_h / $orig_h);\n\n $crop_w = round($new_w / $size_ratio);\n $crop_h = round($new_h / $size_ratio);\n\n $s_x = floor( ($orig_w - $crop_w) / 2 );\n $s_y = floor( ($orig_h - $crop_h) / 2 );\n\n return array( 0, 0, (int) $s_x, (int) $s_y, (int) $new_w, (int) $new_h, (int) $crop_w, (int) $crop_h );\n}", "function ming_setscale($scale)\n{\n}", "public function resizeRatio($width, $height, $useAsMinimum = false);", "function _resize_gd1( $width, $height )\n\t\t{\n $new_img = @imagecreate( $width, $height ); \n @imagecopyresized( $new_img, $this->img, 0, 0, 0 ,0, $width, $height, $this->in_file_width, $this->in_file_height ); \n $this->img = $new_img;\n return true;\n\t\t}", "function resize_image($file_name, $path, $size) {\n $full_path = $path.$file_name;\n $manipulator = new ImageManipulator($full_path);\n switch($size) {\n case \"large\":\n $newImage = $manipulator->resample(1200, 1200);\n break;\n case \"medium\":\n $newImage = $manipulator->resample(800, 800);\n break;\n case \"small\":\n $newImage = $manipulator->resample(400, 400);\n break;\n case \"thumbnail\":\n $newImage = $manipulator->resample(200, 200);\n break;\n }\n $manipulator->save($_SERVER[\"DOCUMENT_ROOT\"].'/my_website/uploaded_files/'.$size.\"/\".$file_name);\n}", "public function resizeUpsizeToMoreHorizontalAspectWithoutGrow()\n {\n $source = new \\Imagick('pattern:gray0');\n $source->scaleImage(100, 50);\n\n $imagick = Image::resize($source, 400, 100);\n\n //making sure source didnt resize\n $this->assertSame(100, $source->getImageWidth());\n $this->assertSame(50, $source->getImageHeight());\n\n $this->assertSame(400, $imagick->getImageWidth());\n $this->assertSame(100, $imagick->getImageHeight());\n\n $whiteBarLeft = $imagick->getImagePixelColor(99, 49)->getHsl();\n $whiteBarRight = $imagick->getImagePixelColor(300, 49)->getHsl();\n\n $imageTop = $imagick->getImagePixelColor(200, 26)->getHsl();\n $imageBottom = $imagick->getImagePixelColor(200, 74)->getHsl();\n $imageLeft = $imagick->getImagePixelColor(151, 50)->getHsl();\n $imageRight = $imagick->getImagePixelColor(249, 50)->getHsl();\n\n $this->assertGreaterThan(0.9, $whiteBarLeft['luminosity']);\n $this->assertGreaterThan(0.9, $whiteBarRight['luminosity']);\n\n $this->assertLessThan(0.1, $imageLeft['luminosity']);\n $this->assertLessThan(0.1, $imageRight['luminosity']);\n $this->assertLessThan(0.1, $imageTop['luminosity']);\n $this->assertLessThan(0.1, $imageBottom['luminosity']);\n }", "public function testResizeExact10x15()\n {\n $this->setSource(self::SRC_SQUARE);\n $this->createFixtureResizer();\n $this->resizer->resize(10, 15, ['mode' => 'exact']);\n $this->assertImageSameAsFixture(__METHOD__);\n }", "public function liquidRescale($width, $height, $delta_x=null, $rigidity=null){ }", "function adaptiveResize($width, $height) {\n if(!is_null($this->image)) {\n $this->image->adaptiveResize($width, $height);\n }\n }", "protected function fastimagecopyresampled (&$dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h, $quality = 3) {\n\t\t// Just include this function and change all \"imagecopyresampled\" references to \"fastimagecopyresampled\".\n\t\t// Typically from 30 to 60 times faster when reducing high resolution images down to thumbnail size using the default quality setting.\n\t\t// Author: Tim Eckel - Date: 09/07/07 - Version: 1.1 - Project: FreeRingers.net - Freely distributable - These comments must remain.\n\t\t//\n\t\t// Optional \"quality\" parameter (defaults is 3). Fractional values are allowed, for example 1.5. Must be greater than zero.\n\t\t// Between 0 and 1 = Fast, but mosaic results, closer to 0 increases the mosaic effect.\n\t\t// 1 = Up to 350 times faster. Poor results, looks very similar to imagecopyresized.\n\t\t// 2 = Up to 95 times faster. Images appear a little sharp, some prefer this over a quality of 3.\n\t\t// 3 = Up to 60 times faster. Will give high quality smooth results very close to imagecopyresampled, just faster.\n\t\t// 4 = Up to 25 times faster. Almost identical to imagecopyresampled for most images.\n\t\t// 5 = No speedup. Just uses imagecopyresampled, no advantage over imagecopyresampled.\n\t\t\n\t\t// work to do?\n\t\tif (empty($src_image) || empty($dst_image) || $quality <= 0) {\n\t\t\treturn false;\t\t\t\n\t\t}\n\t\t\n\t\t// This is the resizing/resampling/transparency-preserving magic\n\t\t// https://github.com/maxim/smart_resize_image/blob/master/smart_resize_image.function.php\n\t\tif ($this->_type == 'png' || $this->_type == 'gif') {\n\n\t\t\t$transparency = imagecolortransparent($src_image);\n\t\t\tif ($transparency >= 0) {\n\t\t\t\t$transparent_color = imagecolorsforindex($src_image, $trnprt_indx);\n\t\t\t\t$transparency = imagecolorallocate($dst_image, $trnprt_color['red'], $trnprt_color['green'], $trnprt_color['blue']);\n\t\t\t\timagefill($dst_image, 0, 0, $transparency);\n\t\t\t\timagecolortransparent($dst_image, $transparency);\n\t\t\t} elseif ($this->_type == 'png') {\n\t\t\t\timagealphablending($dst_image, false);\n\t\t\t\t$color = imagecolorallocatealpha($dst_image, 0, 0, 0, 127);\n\t\t\t\timagefill($dst_image, 0, 0, $color);\n\t\t\t\timagesavealpha($dst_image, true);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// do the resize\n\t\tif ($quality < 5 && (($dst_w * $quality) < $src_w || ($dst_h * $quality) < $src_h)) {\n\t\t\t$temp = imagecreatetruecolor ($dst_w * $quality + 1, $dst_h * $quality + 1);\n\t\t\timagecopyresized ($temp, $src_image, 0, 0, $src_x, $src_y, $dst_w * $quality + 1, $dst_h * $quality + 1, $src_w, $src_h);\n\t\t\timagecopyresampled ($dst_image, $temp, $dst_x, $dst_y, 0, 0, $dst_w, $dst_h, $dst_w * $quality, $dst_h * $quality);\n\t\t\timagedestroy ($temp);\n\t\t} else {\n\t\t\timagecopyresampled ($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "function resizeImage($filename, $filesizes) {\n /// $imagick = new \\Imagick(realpath($imagePath));\n /// https://stackoverflow.com/questions/34687115/image-color-ruined-while-resizing-it-using-imagecopyresampled;\n\n\n\n list($width, $height) = getimagesize( $filename);\n\n //split filename on the dot.\n $extractFile = $this->extractFilename($filename , '/');\n $folder = $extractFile[0] . '/';\n $fileExt = $this->extractFilename(substr($extractFile[1], 1), '.');\n\n foreach ($filesizes as $key => $maxWidth) {\n\n $useUploadFolder = $folder . '_'. $key ;\n $this->createFolderIfnotExist($useUploadFolder);\n\n $thumbFilename = $useUploadFolder . '/' . $fileExt[0] . $fileExt[1];\n\n if(file_exists($thumbFilename) && !$this->overwrite){\n $thumbFilename = $useUploadFolder . '/' . $fileExt[0] . '-' . date('ymdHis'). $fileExt[1];\n }\n\n // calculate new sizes\n $percent = ($maxWidth / $width);\n if($percent > 1){\n $percent = 1;\n }\n $newwidth = $width * $percent;\n $newheight = $height * $percent;\n\n // Load\n $thumb = imagecreatetruecolor($newwidth, $newheight);\n\n if($fileExt[1] === '.png'){\n $source = imagecreatefrompng( $filename);\n imagecopyresampled($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);\n imagepng($thumb, $thumbFilename , 9);\n }else if($fileExt[1] === '.gif'){\n $source = imagecreatefromgif( $filename);\n imagecopyresampled($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);\n imagegif($thumb, $thumbFilename );\n }else{\n $source = imagecreatefromjpeg( $filename);\n imagecopyresampled($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);\n imagejpeg($thumb, $thumbFilename , 100);\n }\n\n imagedestroy($thumb);\n $this->success[] = [$thumbFilename,$newwidth, $newheight];\n }\n }", "public function resizeUpsizeToMoreHorizontalAspectWithGrow()\n {\n $source = new \\Imagick('pattern:gray0');\n $source->scaleImage(100, 50);\n\n $imagick = Image::resize($source, 400, 100, ['upsize' => true]);\n\n //making sure source didnt resize\n $this->assertSame(100, $source->getImageWidth());\n $this->assertSame(50, $source->getImageHeight());\n\n $this->assertSame(400, $imagick->getImageWidth());\n $this->assertSame(100, $imagick->getImageHeight());\n\n $whiteBarLeft = $imagick->getImagePixelColor(99, 49)->getHsl();\n $whiteBarRight = $imagick->getImagePixelColor(300, 49)->getHsl();\n\n $imageTop = $imagick->getImagePixelColor(249, 0)->getHsl();\n $imageBottom = $imagick->getImagePixelColor(249, 99)->getHsl();\n $imageLeft = $imagick->getImagePixelColor(100, 49)->getHsl();\n $imageRight = $imagick->getImagePixelColor(299, 49)->getHsl();\n\n $this->assertGreaterThan(0.9, $whiteBarLeft['luminosity']);\n $this->assertGreaterThan(0.9, $whiteBarRight['luminosity']);\n\n $this->assertLessThan(0.1, $imageLeft['luminosity']);\n $this->assertLessThan(0.1, $imageRight['luminosity']);\n $this->assertLessThan(0.1, $imageTop['luminosity']);\n $this->assertLessThan(0.1, $imageBottom['luminosity']);\n }", "function fastimagecopyresampled (&$dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h, $quality = 3) {\r\n if (empty($src_image) || empty($dst_image)) { return false; }\r\n \r\n if ($quality <= 1) {\r\n $temp = imagecreatetruecolor ($dst_w + 1, $dst_h + 1);\r\n imagecopyresized ($temp, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w + 1, $dst_h + 1, $src_w, $src_h);\r\n imagecopyresized ($dst_image, $temp, 0, 0, 0, 0, $dst_w, $dst_h, $dst_w, $dst_h);\r\n imagedestroy ($temp);\r\n } elseif ($quality < 5 && (($dst_w * $quality) < $src_w || ($dst_h * $quality) < $src_h)) {\r\n $tmp_w = $dst_w * $quality;\r\n $tmp_h = $dst_h * $quality;\r\n $temp = imagecreatetruecolor ($tmp_w + 1, $tmp_h + 1);\r\n imagecopyresized ($temp, $src_image, $dst_x * $quality, $dst_y * $quality, $src_x, $src_y, $tmp_w + 1, $tmp_h + 1, $src_w, $src_h);\r\n imagecopyresampled ($dst_image, $temp, 0, 0, 0, 0, $dst_w, $dst_h, $tmp_w, $tmp_h);\r\n imagedestroy ($temp);\r\n } else {\r\n imagecopyresampled ($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);\r\n }\r\n return true;\r\n }", "function normal_resize_image($source, $destination, $image_type, $max_size, $image_width, $image_height, $quality){\n\n if ($image_width <= 0 || $image_height <= 0){return false;} //return false if nothing to resize\n\n //do not resize if image is smaller than max size\n if ($image_width <= $max_size && $image_height <= $max_size){\n if(save_image($source, $destination, $image_type, $quality)){\n return true;\n }\n }\n\n //Construct a proportional size of new image\n $image_scale\t= min($max_size/$image_width, $max_size/$image_height);\n $new_width\t\t= ceil($image_scale * $image_width);\n $new_height\t\t= ceil($image_scale * $image_height);\n\n $new_canvas\t\t= imagecreatetruecolor( $new_width, $new_height ); //Create a new true color image\n\n //Copy and resize part of an image with resampling\n if (imagecopyresampled($new_canvas, $source, 0, 0, 0, 0, $new_width, $new_height, $image_width, $image_height)) {\n save_image($new_canvas, $destination, $image_type, $quality); //save resized image\n }\n\n return true;\n}", "function _thumbnail_gd1( $width, $height )\n {\n if( ! ( $width && $height ) )\n {\n $sizes = $this->get_proportional_values( $width, $height ); \n $width = $sizes['newx'];\n $height = $sizes['newy'];\n }\n\n $new_img = @imagecreate( $width, $height ); \n @imagecopyresized( $new_img, $this->img, 0, 0, 0 ,0, $width, $height, $this->in_file_width, $this->in_file_height ); \n $this->img = $new_img;\n\n return true;\n }", "function fastImageCopyResampled(&$dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h, $quality = 4) {\n\n\tif (empty($src_image) || empty($dst_image) || $quality <= 0) { return false; }\n\n\tif ($quality < 5 && (($dst_w * $quality) < $src_w || ($dst_h * $quality) < $src_h)) {\n\n\t\t$temp = imagecreatetruecolor($dst_w * $quality + 1, $dst_h * $quality + 1);\n\t\timagecopyresized($temp, $src_image, 0, 0, $src_x, $src_y, $dst_w * $quality + 1, $dst_h * $quality + 1, $src_w, $src_h);\n\t\timagecopyresampled($dst_image, $temp, $dst_x, $dst_y, 0, 0, $dst_w, $dst_h, $dst_w * $quality, $dst_h * $quality);\n\t\timagedestroy($temp);\n\n\t} else imagecopyresampled($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);\n\n\treturn true;\n\n}", "protected function _liquidRescale($width, $height, $deltaX, $rigidity) {}", "function ehc_resize_feature_image( $args ) {\n\treturn array_merge( $args, array(\n\t\t'resize' => array( 400, 400, true ),\n\t) );\n}", "function change_scale($factor = 2)\n {\n }", "public function autoRegisterThumb200()\n {\n $this->getMediaCollections()->filter->isImage()->each(function ($mediaCollection) {\n $this->addMediaConversion('thumb_200')\n ->width(200)\n ->height(200)\n ->fit('crop', 200, 200)\n ->optimize()\n ->performOnCollections($mediaCollection->getName())\n ->nonQueued();\n });\n }", "public function magnifyImage () {}", "public function resize($iNewSizeX = 0, $iNewSizeY = 0, $sHexBkgColor = \"FFFFFF\") \n\t{\n\t\t$rImage = $this->getImage();\n\t\t$iSourceX = $this->getSizeX();\n\t\t$iSourceY = $this->getSizeY();\n \n\t\t$iW = $iNewSizeX;\n\t\t$iH = $iNewSizeY;\n \n\t\t//$iNewSizeX = min($iNewSizeX, $iSourceX); - reduce only\n\t\t//$iNewSizeY = min($iNewSizeY, $iSourceY);\n \n\t\t$fAspectX = $iNewSizeX / $iSourceX;\n\t\t$fAspectY = $iNewSizeY / $iSourceY;\n\t\t\n\t\tif (!$iH) \n\t\t{\n\t\t\t$fAspect = $fAspectX;\n\t\t\t$iSourceY = imagesy($rImage);\n\t\t\t$iNewSizeY = $iSourceY * $fAspect;\n\t\t} \n\t\telse {\n\t\t\t$fAspect = min($fAspectX, $fAspectY);\n\t\t\t$iNewSizeX = $iSourceX * $fAspect;\n\t\t}\n\t\t$iDestX = $iSourceX * $fAspect;\n\t\t$iDestY = $iSourceY * $fAspect;\n\t\t\n\t\t$rImage = imagecreatetruecolor($iNewSizeX, $iNewSizeY);\n\t\t$aColor = $this->getAColor($sHexBkgColor);\n\t\timagefill($rImage, 1, 1, imagecolorallocate($rImage, $aColor[0], $aColor[1], $aColor[2]));\n\t\timagecopyresampled($rImage, $this->getImage(), ($iNewSizeX - $iDestX) / 2, ($iNewSizeY - $iDestY) / 2, 0, 0, $iDestX, $iDestY, $iSourceX, $iSourceY);\n\t\t// imagecopyresized($rImage, $this->getImage(), ($iNewSizeX - $iDestX) / 2, ($iNewSizeY - $iDestY) / 2, 0, 0, $iDestX, $iDestY, $iSourceX, $iSourceY);\n\t\t$this->setImage($rImage);\n\t}", "public function testResize20x0()\n {\n $this->setSource(self::SRC_PORTRAIT);\n $this->createFixtureResizer();\n $this->resizer->resize(20, 0);\n $this->assertImageSameAsFixture(__METHOD__);\n }", "function scaleImg($filename,$zoom=190)\n{\n// gets img from $filename roteare and zoom to \n $smallImg=\"small.jpg\";\n $im = new Imagick($filename);\n autoRotateImage($im); \n\n //finnd short side to zoom based on it\n $d = $im->getImageGeometry();\n if ($d['width'] > $d['height'])\n $im->scaleImage($zoom,0);\n else\n $im->scaleImage(0,$zoom);\n\n \n $imgFile=fopen ($smallImg, \"wb\");\n $im->writeImageFile($imgFile);\n fclose($imgFile);\n return get64Img($smallImg);\n}", "function rescale($scale, $x, $y, $fit_w, $fit_h) {\r\n\treturn array(\r\n\t\t'x' => (float)$x / (float)$scale * (float)$fit_w\r\n\t\t, 'y' => (float)$y / (float)$scale * (float)$fit_h\r\n\t);\r\n}", "function scaler($im, $w, $h) {\n $origw = imagesx($im);\n $origh = imagesy($im);\n $scalew = $origw / $w;\n $scaleh = $origh / $h;\n if ($scalew > $scaleh) {\n $nw = ceil($origw / $scaleh);\n $nh = ceil($origh / $scaleh);\n } else {\n $nw = ceil($origw / $scalew);\n $nh = ceil($origh / $scalew);\n }\n decho(\"Scaling image from $origw $origh to $nw $nh to be bigger than $w $h\");\n $n = imagescale($im, $nw, $nh);\n decho(\"Scaled image to new handle\");\n if ($n === FALSE) {\n decho(\"Image scale failed!\");\n }\n if ($nw > $w) {\n $cx = ceil(($nw - $w) / 2);\n $cy = 0;\n } else if ($nh > $h) {\n $cx = 0;\n $cy = ceil(($nh - $h) / 2);\n }\n decho(\"Cropping image of size $nw $nh to be size $w $h from point $cx $cy\");\n $n = imagecrop($n, array(\"x\" => $cx, \"y\" => $cy, \"width\" => $w, \"height\" => $h));\n return $n;\n}", "public function callResizeImagesInsideUploadFolder(){\n\n $this->resizeImagesInsideUploadFolder(public_path().'/uploads/pix');\n\n\n\n }", "function resize( $iNewWidth, $iNewHeight )\n\t{\n\t\tif ( !$this->imageStream ) \n\t\t{\n\t\t\t$this->error( 'Image not loaded' );\n\t\t}\n\n\t\tif( function_exists( \"imagecopyresampled\" ) )\n\t\t{\n\t\t\t$resizedImageStream = imagecreatetruecolor( $iNewWidth, $iNewHeight );\n\t\t\timagecopyresampled( $resizedImageStream, $this->imageStream, 0, 0, 0, 0, $iNewWidth, $iNewHeight, $this->width, $this->height );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$resizedImageStream = imagecreate( $iNewWidth, $iNewHeight );\n\t\t\timagecopyresized( $resizedImageStream, $this->imageStream, 0, 0, 0, 0, $iNewWidth, $iNewHeight, $this->width, $this->height );\n\t\t}\n\t\t$this->imageStream\t=\t$resizedImageStream;\n\t\t$this->width\t=\t$iNewWidth;\n\t\t$this->height\t=\t$iNewHeight;\n\t}", "public function file_resized($filename);", "public function resize_and_crop()\n\t{\n\t\t// need these set\n\t\t$this->maintain_ratio = TRUE;\n\t\t\n\t\tforeach($this->_save_props as $sp)\n\t\t{\n\t\t\t$p = '_'.$sp;\n\t\t\t$this->$sp = $this->$p;\n\t\t}\n\n\t\t// get the current dimensions and see if it is a portrait or landscape image\n\t\t$props = $this->get_image_properties($this->source_folder.$this->source_image, TRUE);\n\t\t$orig_width = $props['width'];\n\t\t$orig_height = $props['height'];\n\n\t\t// if ($orig_width < $orig_height )\n\t\t// {\n\t\t// \t$this->master_dim = 'width';\n\t\t// }\n\t\t// \n\n\t\tif (empty($this->width))\n\t\t{\n\t\t\t$this->width = $orig_width;\n\t\t}\n\n\t\tif (empty($this->height))\n\t\t{\n\t\t\t$this->height = $orig_height;\n\t\t}\n\n\t\tif (empty($orig_width) OR empty($orig_height))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t$w_ratio = $this->width/$orig_width;\n\t\t$h_ratio = $this->height/$orig_height;\n\t\tif ($w_ratio > $h_ratio)\n\t\t{\n\t\t\t$this->master_dim = 'width';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->master_dim = 'height';\n\t\t}\n\t\t\n\t\t$this->image_reproportion();\n\n\t\t// resize image\n\t\tif (!$this->resize())\n\t\t{\n\t\t\t// TODO... put in lang file\n\t\t\t$this->set_error('Could not resize');\n\t\t}\n\t\t\n\t\tif (!empty($this->dest_image))\n\t\t{\n\t\t\t// now crop if it is too wide\n\t\t\t$thumb_src = $this->explode_name($this->dest_image);\n\t\t\t$thumb_source = $thumb_src['name'].$this->thumb_marker.$thumb_src['ext'];\n\t\t\t$new_source = $this->dest_folder.$thumb_source;\n\t\t\t$props = $this->get_image_properties($new_source, TRUE);\n\t\t\t$new_width = $props['width'];\n\t\t\t$new_height = $props['height'];\n\t\t\t\n\t\t\t$config = array();\n\t\t\t$config['width'] = $this->_width;\n\t\t\t$config['height'] = $this->_height;\n\t\t\t$config['source_image'] = $new_source;\n\t\t\t$config['maintain_ratio'] = FALSE;\n\t\t\t$config['create_thumb'] = FALSE;\n\n\n\t\t\t// portrait\n\t\t\tif ($new_width < $new_height)\n\t\t\t{\n\t\t\t\t$this->x_axis = 0;\n\t\t\t\t$this->y_axis = round(($new_height - $this->_height)/2);\n\t\t\t}\n\n\t\t\t// landscape\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->x_axis = round(($new_width - $this->_width)/2);\n\t\t\t\t$this->y_axis = 0;\n\t\t\t}\n\t\t\t$this->dest_folder = '';\n\t\t\t$this->initialize($config);\n\t\t\tif (!$this->crop())\n\t\t\t{\n\t\t\t\t// TODO... put in lang file\n\t\t\t\t$this->set_error('Could not crop');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// TODO... put in lang file\n\t\t\t$this->set_error('Could not crop');\n\t\t}\n\n\t\treturn (empty($this->error_msg));\n\t\t\n\t}" ]
[ "0.63775426", "0.6263699", "0.60987103", "0.6071684", "0.59455323", "0.58370095", "0.5823277", "0.58065003", "0.5769998", "0.57435966", "0.5732793", "0.56849074", "0.5384096", "0.5343785", "0.5339548", "0.53153336", "0.53142023", "0.529332", "0.52826226", "0.52660966", "0.5225926", "0.52243716", "0.5216759", "0.52135307", "0.5196125", "0.51932585", "0.51890105", "0.51779956", "0.51760995", "0.51754904", "0.5173118", "0.5163471", "0.51440704", "0.5138784", "0.51333123", "0.51305217", "0.51261437", "0.5121536", "0.5121533", "0.5114229", "0.510286", "0.51010877", "0.5086589", "0.5085273", "0.5082015", "0.50763553", "0.5067756", "0.5063325", "0.50595784", "0.5054976", "0.50539774", "0.5050108", "0.5048497", "0.50443375", "0.5033233", "0.50330204", "0.5025735", "0.50216764", "0.50180596", "0.5014538", "0.5004218", "0.49986953", "0.49841937", "0.49754044", "0.4969653", "0.49687365", "0.4963062", "0.49620897", "0.495101", "0.4943876", "0.49408528", "0.49307698", "0.49280345", "0.4916085", "0.4915615", "0.4912722", "0.4903454", "0.4882769", "0.48800892", "0.4879592", "0.48769724", "0.48727676", "0.48707628", "0.48689657", "0.4862064", "0.4854862", "0.48463777", "0.484413", "0.48381397", "0.48361015", "0.48255578", "0.48213366", "0.48208094", "0.48161876", "0.4811378", "0.48109576", "0.48068568", "0.47988322", "0.47929585", "0.4792301" ]
0.72176445
0
Get an array of all users in a channel, active or inactive
Получите массив всех пользователей в канале, активных или неактивных
public function getChannelUsers($channel) { $users = array(); $stmt = $this->prepare('SELECT `users`.`name`, `user_channels`.`permissions` FROM `user_channels` INNER JOIN `users` ON `user_channels`.`user` = `users`.`id` WHERE `channel` = ?;'); $stmt->execute(array($channel)); while ($res = $stmt->fetch()) { $users[$res['name']] = array('permissions' => $res['permissions'], 'active' => false); } $stmt->closeCursor(); return $users; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUsersFromChannel() {\n if ( empty($this->redisChannel) ) {\n return null;\n }\n $users = Redis::smembers('patterns:online:user:' . $this->redisChannel);\n return str_replace(\"online:user:\" . $this->redisChannel . \":\", \"\", $users);\n }", "static function getUsersOnline($channel) {\n $sql = \"SELECT SQL_CACHE `chat_accounts`.`name` as `user`\n FROM `chat_users_online`\n CROSS JOIN `chat_accounts`\n WHERE (\n `timestamp` >= ( UNIX_TIMESTAMP( ) - 45)\n AND channel = ?\n AND `chat_users_online`.`user` = `chat_accounts`.`id`\n )\";\n return DB::select($sql, array($channel));\n }", "function get_all_users()\n {\n include('connect.php');\n $users_query = \"SELECT * FROM tbl_user WHERE `user_active` = true\";\n\n $get_users = $pdo->prepare($users_query);\n $get_users->execute();\n\n $users = [];\n while ($row = $get_users->fetch(PDO::FETCH_ASSOC)) {\n $users[] = $row;\n }\n return $users;\n }", "public function getComplainedUsers()\n {\n \t$criteria = Criteria::create()->where(Criteria::expr()->eq(\"status\", 5));\n \treturn $this->subsribers_connection->matching($criteria);\n }", "public function getAllEnabledUsers() {\r\n\t\t$user = \\creamy\\CreamyUser::currentUser();\r\n\t\t$userGroup = $this->getUserGroup($user->getUserId());\r\n\t\t\r\n\t\t// $this->dbConnector->where(\"status\", \"1\");\r\n\t\t$this->dbConnectorAsterisk->where(\"active\", \"Y\");\r\n\t\t$this->dbConnectorAsterisk->where(\"user\", array('VDAD', 'VDCL', 'goAPI'), 'not in');\r\n\t\tif ($user->getUserRole() == CRM_DEFAULTS_USER_ROLE_AGENT) {\r\n\t\t\t$this->dbConnectorAsterisk->where('user_level', '7', '>=');\r\n\t\t\tif ($userGroup != false) {\r\n\t\t\t\t$userGroup = ($userGroup == 'AGENTS') ? 'ADMIN' : $userGroup;\r\n\t\t\t\t$this->dbConnectorAsterisk->where('user_group', $userGroup);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// $cols = array(\"id\", \"name\", \"email\", \"phone\", \"role\", \"avatar\", \"creation_date\", \"status\");\r\n\t\t$cols = array(\"user_id\", \"user\", \"email\", \"phone_login\", \"user_level\", \"active\", \"full_name\");\r\n\t\treturn $this->dbConnectorAsterisk->get(CRM_USERS_TABLE_NAME_ASTERISK, null, $cols);\r\n\t}", "function getSubscribedChannels($username) {\n $db = Database::instance()->db();\n\n $stmt = $db->prepare('SELECT channel.id, channel.name, channel.image\n FROM user, subscription, channel\n WHERE user.username = ? AND subscription.user_id = user.id AND subscription.channel_id = channel.id\n ORDER BY channel.name');\n\n $stmt->execute(array($username));\n\n $subscribed_channels = $stmt->fetchAll(PDO::FETCH_OBJ);\n return $subscribed_channels;\n }", "public static function getUsers(){\n\t\tif($_SESSION['user']['name']){\n\t\t\t$user = new ChatUser(array('name' => $_SESSION['user']['name']));\n\t\t\t$user->update();\n\t\t}\n\n\t\t/*Deleting chat messages that is older than 5 min\n and users that haven't been active the last 30 sec.*/\n\t\tDB::query(\"DELETE FROM webchat_lines WHERE ts < SUBTIME(NOW(),'0:5:0')\");\n\t\tDB::query(\"DELETE FROM webchat_users WHERE last_activity < SUBTIME(NOW(),'0:0:30')\");\n\n\t\t$result = DB::query('SELECT * FROM webchat_users ORDER BY name ASC LIMIT 18');\n\t\t$users = array();\n\n\t\t//Here we might get some problems ====\n\t\twhile($user = $result->fetch_object()){\n\t\t\t$users[] = $user;\n\t\t}\n\n\t\treturn array(\n\t\t\t'users' => $users,\n\t\t\t'total' => DB::query('SELECT COUNT(*) as cnt FROM webchat_users')->fetch_object()->cnt\n\t\t);\n\t}", "public function active_users_list() {\n $users = $this->where('site_id', kohana::config('chapterboard.site_id'))->orderby('searchname', 'ASC')\n ->where('status', 1)\n ->find_all();\n foreach ($users as $user) {\n $results[$user->id] = $user->name();\n }\n return $results;\n }", "public function getActiveUsers()\n {\n \t$criteria = Criteria::create()->where(Criteria::expr()->eq(\"status\", 1));\n \treturn $this->subsribers_connection->matching($criteria);\n }", "public static function getAllActiveUser()\n {\n return DB::table('users')\n ->where('user_type', '=', '0')\n ->where('state', '=', '1')\n ->get();\n }", "static public function getActiveUsers(){\n $conn = DbHandler::getConnection();\n $query = \"SELECT id, username FROM users \".\n \"WHERE id != \".$conn->escapeString(static::getCurrentUserId()).\n \" AND last_activity >= \" . $conn->escapeString(getMicrotime() - 3000);\n\n $result = $conn->query($query);\n\n $data = array();\n if($result instanceof Sqlite3Result) {\n while ($row = $result->fetchArray()) {\n $data[] = array('id' => $row['id'], 'username' => $row['username']);\n }\n }\n\n return $data;\n }", "public static function getAllUsersArray(){\n return SubscribeManagerDB::getAllUsersArray();\n }", "function &getCustomUsers() {\n\t\t$users = null;\n\t\t#$Users = User::model()->findAll();\n\t\t$Users = YiiUser::model()->findAll();\n\t\tforeach($Users as $user) {\n\t\t\tswitch($user->superuser) {\n\t\t\t\tcase 0: $role=AJAX_CHAT_USER; break;\n\t\t\t\tcase 1: $role=AJAX_CHAT_MODERATOR; break;\n\t\t\t\tcase 2: $role=AJAX_CHAT_ADMIN; break;\n\t\t\t\tcase -1: $role=AJAX_CHAT_VIP; break;\n\t\t\t}\n\t\t\t$def = AJAXChatDefaults::model()->findByPk(0);\n\t\t\tif($role == AJAX_CHAT_USER) {\n\t\t\t\t$c = explode(\",\",$def->userChannels);\n\t\t\t\tforeach($c as $cID) {\n\t\t\t\t\tif(!empty($cID)) $channels[]=$cID;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$c = explode(\",\",$def->adminChannels);\n\t\t\t\tforeach($c as $cID) {\n\t\t\t\t\tif(!empty($cID)) $channels[]=$cID;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$users[$user->id]=array(\n\t\t\t\t'userName'=>$user->username,\n\t\t\t\t'userRole'=>$role,\n\t\t\t\t'channels'=>$channels\n\t\t\t);\n\t\t}\n\t\treturn $users;\n\t}", "function getActiveUsers($roomID) {\n\t//Find all users active within interval\n\t$interval = time() - PHPSC_USER_EXPIRE_INTERVAL;\n\t$users = array();\n\t$sql = \"SELECT DISTINCT usr FROM chat_users WHERE roomid = $roomID AND lastaction > $interval\";\n\tif ($result = dbQuery($sql)) {\n\t\twhile ($row = dbFetchArray($result)) {\n\t\t\t$users[]=$row[\"usr\"];\n\t\t}\n\t}\n\treturn $users;\n}", "public function broadcastOn()\n {\n $channels = [];\n foreach($this->instance->users as $user){\n $channels[] = $user->id;\n }\n return $channels;\n }", "public function getUsers();", "public function getUsers();", "public function getUsers();", "public static function getAllUsers(){\n return SubscribeManagerDB::getAllUsers();\n }", "public function users()\n {\n $users = $this->members()->with('profile.jobTitle')\n ->where('company_id', $this->id)\n ->where('active', true)\n ->get();\n \n return $users->filter(function ($user) {\n if($user->role != 'admin') {\n return $user;\n }\n });\n }", "public function getAllActiveUsers()\n {\n // generate a cache name\n $cacheName = CacheUtility::getCacheName(self::CACHE_ACTIVE_USERS);\n\n // check data in cache\n if (null === ($users = $this->staticCacheInstance->getItem($cacheName))) {\n $select = $this->select();\n $select->from('user_list')\n ->columns([\n 'user_id',\n 'nick_name',\n 'slug',\n 'date_edited'\n ])\n ->where([\n 'status' => self::STATUS_APPROVED\n ]);\n\n $statement = $this->prepareStatementForSqlObject($select);\n $resultSet = new ResultSet;\n $resultSet->initialize($statement->execute());\n $users = $resultSet->toArray();\n\n // save data in cache\n $this->staticCacheInstance->setItem($cacheName, $users);\n $this->staticCacheInstance->setTags($cacheName, [self::CACHE_USER_DATA_TAG]); \n }\n\n return $users;\n }", "public function getHardBouncedUsers()\n {\n \t$criteria = Criteria::create()->where(Criteria::expr()->eq(\"status\", 4));\n \treturn $this->subsribers_connection->matching($criteria);\n }", "public function getUsers()\n {\n return Cache::remember('slack_user_list', 3, function() {\n $response = $this->guzzle->get('users.list');\n if (json_decode($response->getBody(), true)['ok']) {\n $members = json_decode($response->getBody(), true)['members'];\n array_pop($members);\n return $members;\n }\n throw new SlackException(json_decode($response->getBody(), true)['error']);\n });\n }", "public function getUsers(): array {\n return $this->users;\n }", "public function get_subscribed_user_list()\n\t{\n\t\t$result = $this->db->from(\"email_subscribe\")\n\t\t\t\t->where(array(\"suscribe_city_status\" => 1,\"suscribe_status\" => 1,\"category_id !=\" =>\"\" ,\"category_id !=\" =>\"0\" ))\n\t\t\t\t//->join(\"email_subscribe\",\"email_subscribe.user_id\",\"users.user_id\")\n\t\t\t\t->get();\n\t\treturn $result;\n\t}", "public function getUsers(): array\n {\n return $this->users;\n }", "private function getUsers() {\n\n\t\treturn $this->_userService->getUsers();\n\t}", "public static function allUsers() {\r\n\t\t$teamconf = self::getConfig();\r\n\t\t$outuser = array();\r\n\t\tforeach($teamconf as $teams) {\r\n\t\t\r\n\t\t\tforeach($teams['member'] as $user) {\r\n\t\t\t\t$outuser[] = $user;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$outuser = array_flip($outuser);\r\n\t\t$outuser = array_flip($outuser);\r\n\t\treturn $outuser;\r\n\t}", "public function getAllUsers() {\r\n\t \t// $cols = array(\"id\", \"name\", \"email\", \"phone\", \"creation_date\", \"role\", \"avatar\", \"status\");\r\n\t \t$cols = array(\"user_id\", \"user\", \"email\", \"phone_login\", \"user_level\", \"active\");\r\n\t \treturn $this->dbConnectorAsterisk->get(CRM_USERS_TABLE_NAME_ASTERISK, null, $cols);\r\n\t}", "public function getPushUserChannelList()\n {\n return $this->push_user_channel_list;\n }", "public function getAllActiveUsers()\n {\n return $this->getEntityManager()->createQueryBuilder()\n ->select('u')\n ->from('ApplicationSonataUserBundle:User', 'u')\n ->andWhere('u.departureDate IS NULL')\n ->andWhere('u.enabled = 1')\n ->getQuery()\n ->getResult()\n ;\n }", "public function getAllUser()\n {\n $data = ['status' => 0];\n $users = User::where(['is_active'=>1])->get();\n if ($users) {\n $data['status'] = 1;\n $data['users'] = $users;\n }\n\n return $data;\n }", "public function get_all_users() {\n\t\t$current_session_id = $this->session->userdata('id');\n\t\t$get_all_q = \"SELECT * FROM users WHERE id != {$current_session_id}\";\n\t\treturn $this->db->query($get_all_q)->result_array();\n\t}", "function get_all_users(){ // Get all users\n\t\t\n\t}", "public function getUnsubscribedUsers()\n {\n \t$criteria = Criteria::create()->where(Criteria::expr()->eq(\"status\", 2));\n \treturn $this->subsribers_connection->matching($criteria);\n }", "public function getByUsers();", "public function get_limited_users()\n\t{\n\t\t$db = Database::instance();\n\t\t$query = 'SELECT u.username FROM users u, ninja_user_authorization nua '.\n\t\t\t'WHERE nua.all_hosts=0 AND u.id=nua.user_id ORDER BY u.username';\n\t\t$user_res = $db->query($query);\n\n\t\tif (count($user_res)==0) {\n\t\t\treturn false;\n\t\t}\n\t\t$users = false;\n\t\tforeach ($user_res as $user) {\n\t\t\t$users[$user->username] = $user->username;\n\t\t}\n\t\treturn $users;\n\n\t}", "public function getAllUsers(): array;", "public function get_users() {\n\t\t\treturn $this->run( 'users' );\n\t\t}", "public function getSubscribedUsers() : array\n {\n $queryBuilder = $this\n ->createQueryBuilder('u')\n ->select('u.email')\n ->andWhere('u.subscribed = 1');\n\n return $queryBuilder->getQuery()->getResult();\n }", "function &getChannels() {\n\t\tif($this->_channels === null) {\n\t\t\t$this->_channels = array();\n\t\t\t\n\t\t\t$customUsers = $this->getCustomUsers();\n\t\t\t// Get the channels, the user has access to:\n\t\t\tif($this->getUserRole() == AJAX_CHAT_GUEST) {\n\t\t\t\t$validChannels = $customUsers[0]['channels'];\n\t\t\t} else {\n\t\t\t\t$userData = $this->getValidLoginUserData();\n\t\t\t\t$validChannels = $userData['channels'];\n\t\t\t}\n\t\t\t\n\t\t\t// Add the valid channels to the channel list (the defaultChannelID is always valid):\n\t\t\tforeach($this->getAllChannels() as $key=>$value) {\n\t\t\t\t// Check if we have to limit the available channels:\n\t\t\t\tif($this->getConfig('limitChannelList') && !in_array($value, $this->getConfig('limitChannelList'))) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(in_array($value, $validChannels) || $value == $this->getConfig('defaultChannelID')) {\n\t\t\t\t\t$this->_channels[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->_channels;\n\t}", "public function getSoftBouncedUsers()\n {\n \t$criteria = Criteria::create()->where(Criteria::expr()->eq(\"status\", 3));\n \treturn $this->subsribers_connection->matching($criteria);\n }", "public function index()\n {\n $users = $this->wechat->user->lists();\n return $users;\n }", "function get_users($enabled=''){\n $data = array();\n\n $filter = array();\n if ($enabled !== '') $filter['ENABLE'] = $enabled;\n\n $this->db->select('users.*');\n $this->db->from('users');\n $query = $this->db->where($filter)->get();\n\n if ($query->num_rows > 0){\n foreach ($query->result() as $row){\n $data[] = $row;\n }\n }\n\n return $data;\n }", "static function user_list(){\n return self::$db->where(array('role_id' => 2,'activated' => 1))->get('users')->result();\n }", "public static function getUsersAllVendedor()\r\n {\r\n $read = new Read();\r\n $read->ExeRead('users', 'where tipo_user = 2');\r\n return $read->getResult();\r\n }", "function get_my_channels(){\n if (!$sername){\n throw new Exception('Please provide a username slug in settings.php.');\n } \n return $this->make_request($this->arena_api_url.'channels?user='.$this->username);\n }", "function get_users()\r\n\t{\r\n\t\t// First, get the list of IDs.\r\n\t\t$query = \"SELECT user_id as id from emails_users where email_id='$this->id' AND deleted=0\";\r\n\r\n\t\treturn $this->build_related_list($query, new User());\r\n\t}", "function getUsers( )\n\t{\n\t\treturn $this->os->getUsers( );\n\t}", "public static function GetAllUsers()\n {\n $db = Database::getInstance()->getConnection();\n $query = \"SELECT u.*, c.Username as cUsername, s.Username as uUsername,\n DATE_FORMAT(DATE(u.CreatedAt), '%d/%m/%Y') as cDate,\n DATE_FORMAT(DATE(u.UpdatedAt), '%d/%m/%Y') as uDate\n FROM users as u\n JOIN users as c\n ON u.CreatedBy = c.UsersId\n LEFT JOIN users as s\n ON u.UpdatedBy = s.UsersId\n WHERE u.isDeleted='0'\";\n\n $result = mysqli_query($db, $query);\n if ($result) {\n $userData = [];\n while ($row = mysqli_fetch_assoc($result)) {\n $userData[] = $row;\n }\n return $userData;\n } else {\n return [];\n }\n }", "public function getAllUsers();", "public function getAllUsers();", "public function getUserList()\n {\n $requestManager= new ServerRequestManager();\n $requestManager->setDatabase($requestManager->getDatabaseUsers());\n $requestManager->setOperation('WS:OP:GET');\n $requestManager->setCollection('CUser');\n $requestManager->setQuery(Tags::kTAG_USER_DOMAIN,Types::kTYPE_STRING,'TIP', Operators::kOPERATOR_EQUAL);\n \n return $requestManager->sendRequest();\n }", "public static function getActiveUsersList() {\n $sql = \"SELECT u.id, u.username, concat(p.firstname,' ',p.middlename,' ',p.lastname) \"\n . \"as emp_name FROM infinity._user u INNER JOIN infinity.person p \"\n . \"ON u.person_id=p.id where u.isactive=1;\";\n $result = self::findBySql($sql)->asArray()->all();\n return $result;\n }", "public function get_all_users()\n {\n return $this->request_handler('GET', $url_addon='users/');\n\n }", "public function getUsers()\n {\n return Database::getInstance()\n ->prepare(\"SELECT * FROM `tl_user`\")\n ->execute()\n ->fetchAllAssoc();\n }", "public function all_users(){\n return $this->user::all();\n }", "public function getUsers()\n { \n $result = $this->conn->query(\"SELECT * FROM qn_user\") or die($this->conn->error);\n \n $rows = array();\n \n while ($row = $result->fetch_assoc()) {\n $rows[] = $row;\n }\n \n return $rows;\n }", "public function getUsers()\n {\n \treturn $this->users;\n }", "public function getAllUsers()\n {\n // sql statement\n $sql = \"SELECT * FROM users AS t1 LEFT JOIN users_info as t2 ON t2.id=t1.id;\";\n return $this->execQuery($sql);\n\n }", "function list_users() {\n return $this->DB->get('users', null);\n }", "public function getSubscribedUsers()\n {\n //for today and previous 6 days shops\n $start_time = new \\DateTime(\"now\");\n $start_time->modify('-6 days');\n $expired_time = $start_time->format('Y-m-d');\n \n $current_time = new \\DateTime(\"now\");\n $current_time_format = $current_time->format('Y-m-d');\n \n $result = array();\n $qb = $this->createQueryBuilder('sm')\n ->select('sm.id, sm.subscriberId, sm.shopId, sm.intervalDate, sm.contractId')\n ->innerJoin('StoreManagerStoreBundle:Store', 'co', 'WITH', 'sm.shopId = co.id')\n ->where('sm.intervalDate >=:intervalat')\n ->andWhere('sm.intervalDate <=:currenttime')\n ->andWhere('co.isSubscribed =:subscribe')\n ->setParameter('intervalat', $expired_time)\n ->setParameter('currenttime', $current_time_format)\n ->setParameter('subscribe', 1)\n ->getQuery(); \n $result = $qb->getResult();\n return $result;\n }", "public function getUsers()\n {\n $users = array();\n $usersEm = $this->em->getRepository('AWHmacBundle:User')->findAll();\n foreach ($usersEm as $user) {\n $users[] = $user->toArray();\n }\n \n return $users;\n }", "public static function listUsers() {\n $db = Database::connect();\n $userdata = $db\n ->from(\"user\")\n ->leftJoin(\"group\", array(\n \"group.level\" => \"user.permission\"\n ))\n ->many();\n\n $users = array();\n foreach ($userdata as $data) {\n $users[] = new User($data);\n }\n return $users;\n }", "public function getAvailableUsers()\r\n {\r\n\t \r\n return self::create()\r\n\t\t\t\t\t\t->useLnkUsersOrganisationsQuery()->filterByLnkUsersOrganisationsOrganisationId(zend_Auth::getInstance()->getStorage()->read()->getCurrentOrganisation()->getOrganisationId())->endUse()\r\n\t\t\t\t\t\t->withColumn('CASE WHEN user_nom IS NOT NULL THEN CONCAT(users.user_nom, \\' \\', user_prenom) ELSE CONCAT(users.user_id, \\' \\', user_prenom) END', 'label')\r\n ->withColumn('users.user_id', 'value')\r\n ->select('label')\r\n ->orderBy('label', Criteria::ASC)\r\n ->find()\r\n ->toArray('value', false, Basepeer::TYPE_FIELDNAME);\r\n }", "public function getUsers() {\n return [\n 'no users' => [\n 'users' => [],\n ],\n 'multiple users' => [\n 'users' => ['user1', 'user2', 'user3'],\n ],\n ];\n }", "function GetOnlineUsers(){\n\t\n\t$OnlineUsers = array();\n\t$Sql = \"\n\t\tSELECT\n\t\t\tU.Id AS Id, CONCAT( U.FirstName, ' ', U.LastName ) AS Name,\n\t\t\tBus.Name As BusinessName\n\t\tFROM User U, Accounts Acc, Business Bus\n\t\tWHERE\n\t\t\tU.IsOnlineChat != 0 AND\n\t\t\tU.Account_Id = Acc.Id AND\n\t\t\tAcc.Business_Id = Bus.Id\";\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\twhile( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) )\n\t\t$OnlineUsers[] = $row;\n\tmysql_free_result( $result );\n\treturn( $OnlineUsers );\n}", "public function fetch_all_active_members(){\n $query = $this->db->select(array('writer_id', 'writer_name', 'writer_active', 'writer_online', 'member_picture'))\n ->where('writer_active', 1)\n ->get('tbl_members');\n \n return $query->row_array();\n }", "public function getUsers()\n {\n $sql = \"SELECT * FROM tbl_users\";\n $usuarios = $this->cn()->query($sql); \n return $usuarios;\n }", "function getUsers() {\n\t\t$usData\t= array();\n\t\t$brData\t= array();\n\t\t\n\t\t$usData\t= $this->us->usersList();\n\t\t$brData\t= $this->br->usersList();\n\t\t\n\t\t\n\t\t$us\t= array();\n\t\t$br\t= array();\n\t\t\n\t\tforeach($usData as $r) {\n\t\t\t$us['1-'.$r['userid']]\t= trim($r['username']);\n\t\t}\n\t\t\n\t\tforeach($brData as $r) {\n\t\t\t$br['2-'.$r['userid']]\t= trim($r['username']);\n\t\t}\n\t\t\n\t\t$data\t\t\t\t\t= array();\n\t\t$data['Brazil (WHMCS)']\t= $br;\n\t\t$data['US (AWBS)']\t\t= $us;\n\t\t\n\t\treturn $data;\n\t}", "public function getUsers()\n\t\t{\n\t\t\t$query =\"SELECT * FROM usuarios\";\n\t\t\t$result =mysqli_query($this->link,$query);\n\t\t\t$data =array();\n\t\t\twhile ($data[]=mysqli_fetch_assoc($result));\n\t\t\t\tarray_pop($data);\n\t\t\treturn $data;\n\t\t}", "public function getUsers()\n {\n return $this->users()->get()->toArray();\n }", "public function findActiveUsers(): array\n {\n return $this->findBy(\n ['role' => 'ROLE_USER', 'state' => 1],\n ['name' => 'ASC']\n );\n }", "protected function getAllUsers()\n\t{\n\t\t$db = JFactory::getDBO();\n\t\t$sql = \"SELECT * FROM #__users\";\n\t\t$db->setQuery($sql);\n\t\t$users = $db->loadObjectList();\n\n\t\treturn $users;\n\t}", "public function getListOfUsers() {\n $requestBody = null;\n $inputArray = [];\n $ret = $this->fetch('GET', 'identity/users', $requestBody, $inputArray, array (\n ), array (\n ), array (\n 200 => 'Indicates the requested users were returned.',\n ));\n return $ret;\n }", "public function getUsers()\n {\n $response = $this->request('GET', self::URI_USERS , [\n 'query' => $this->getQuery([\n 'limit' => 1000,\n ])\n ]);\n \n if($response->getStatusCode() != Response::HTTP_OK) {\n return false;\n }\n $body = json_decode($response->getBody()->getContents(), true);\n \n $users = [];\n foreach($body['resources'] as $user){\n $users [] = [\n 'uuid' => $user['uuid'],\n 'email' => $user['email'],\n ];\n }\n \n return $users;\n }", "public static function getUsers() {\n\t\t$dbw = wfGetDB( DB_MASTER );\n\t\t$tables = array( 'user', 'user_groups' );\n\t\t$fields = User::selectFields();\n\t\t$conds = array(\n\t\t\t'ug_group' => 'translate-sandboxed',\n\t\t\t'ug_user = user_id',\n\t\t);\n\n\t\t$res = $dbw->select( $tables, $fields, $conds, __METHOD__ );\n\n\t\treturn UserArray::newFromResult( $res );\n\t}", "public function users(): array\n\t{\n\t\t$users = [];\n\n\t\tforeach ($this->client->users->read() as $user) {\n\t\t\t$users[] = new User($user);\n\t\t}\n\n\t\treturn $users;\n\t}", "public function getUsers(){\n\t\t\n\t}", "public static function get_all_users() {\n $users = glueserver_user_db::glueserver_get_all_users();\n $returns = array();\n foreach ($users as $user) {\n $user = new glueserver_user($user);\n $returns[] = $user->get_data();\n }\n return $returns;\n }", "public static function getChannelUsers(string $channelName, TcpConnection $connection)\n\t{\n\t\t$users = self::$_channels[$channelName]->getUsers();\n\t\tforeach ($users as $user) {\n\t\t\t$connection->send(\"{$channelName} {$user->getNick()} {$user->getHost()} localhost.localdomain {$user->getNick()} H :0 realname\\n\\r\");//TODO Fix\n\t\t}\n\t\t$user = self::getUser($connection);\n\t\t$connection->send(\"{$user->getNick()} {$channelName} :End of /WHO list.\\n\\r\");//TODO Debug\n\t}", "public function getUsers(){\r\n\t\treturn $this->_users;\r\n\t}", "function getUsers() {\r\n\t\t$sql = \"SELECT * FROM users\";\r\n\t\t$result = $this->query ( $sql );\r\n\t\t\r\n\t\tif ($result === FALSE) {\r\n\t\t\techo '<pre class=\"bg-danger\">';\r\n\t\t\tprint_r ( $this->errorInfo () );\r\n\t\t\techo '</pre>';\r\n\t\t\treturn array ();\r\n\t\t}\r\n\t\t\r\n\t\t$users = array ();\r\n\t\tforeach ( $result as $row ) {\r\n\t\t\t$users [] = User::getUserFromRow ( $row );\r\n\t\t}\r\n\t\tif (empty ( $users )) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn $users;\r\n\t}", "public function getUsers(): array {\n\t\t$stmt = $this->pdo->query('SELECT * FROM user ORDER BY name');\n\t\t$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t$classUsers = [];\n\t\tforeach($rows as $row) {\n\t\t\t$user = $this->rowToUser($row);\n\t\t\t$classUsers[] = $user;\n\t\t}\n\n\t\treturn $classUsers;\n\t}", "protected function fetchAllUsers() {\n return $this->makeGetRequest('http://jsonplaceholder.typicode.com/users');\n }", "public function getAllUsers() {\n $q = $this->query(\" SELECT count(id) AS c FROM users WHERE confirmed = 1\");\n\n $this->allUsers = $q[0]['c'];\n }", "public function getUsers() {\n $pdo = $this->getPdo();\n\n try {\n $stmt = $pdo->prepare('SELECT username FROM users WHERE TIME_TO_SEC(TIMEDIFF(NOW(), updated)) < :timedelta');\n } catch (PDOException $e) {\n error_log($e->getMessage());\n return FALSE;\n }\n $stmt->execute([\n ':timedelta' => POLL_INTERVAL * OFFLINE_CYCLES,\n ]);\n $result = $stmt->fetchAll(PDO::FETCH_NUM);\n\n if (!$result) {\n return FALSE; // TODO: Add JSON error message, oder einfach ein assoc array mit error feld?\n } else {\n $stmt = null;\n return $result; // TODO: Evtl. kümmert sich auch eine andere Funktion um das JSON encoding.\n }\n }", "public static function getAllChannels() { \n $data = Channel::get(); \n return (!empty($data)) ? $data->toArray() : array();\n }", "public function getUsers() {\n }", "public function getUsers()\n {\n return $this->users;\n }", "public function getUsers()\n {\n return $this->users;\n }", "public function getUsers()\n {\n return $this->users;\n }", "public function getUsers()\n {\n return $this->users;\n }", "public function getUsers()\n {\n return $this->users;\n }", "public function getUsers()\n {\n return $this->users;\n }", "public function getUsers(){\n\t\t\treturn $this->db->GetAll('SELECT '. self::USER_ID . ',' . self::USER_NAME . ','. self::USER_EMAIL .' FROM '. self::USERS_TABLE .' WHERE 1 ORDER BY '. self::USER_NAME .' ASC ');\n\t\t}", "function listOfUsers(){\n\t\n\t\t$users = [];\n\t\tforeach ($this->members as $obj){\n\t\t\t$user = array('name'=> $obj->getUserFullName(),'id'=>$obj->getUserID());\n\t\t\tarray_push($users, $user);\n\t\t}\n\t\treturn $users;\n\t}", "public function getUsers()\n\t{\n\t\t$obj = Users::all();\n\t\treturn $obj;\n\t}", "public function getUsersRoom() {\n\t\t$db = Database::getInstance();\n\t\t$x = $this->curr_room->getX();\n\t\t$y = $this->curr_room->getY();\n\t\t$z = $this->curr_room->getZ();\n\t\t$coord = \"{$x}{$y}{$z}\";\n\t\t$sql = \"SELECT * FROM users WHERE room_coord = '$coord' AND logged_in = 1 AND username <> '$this->username'\";\n\t\t$db->ExecQuery($sql);\n\t\t$users = array();\n\t\twhile($user = $db->GetAssoc())\n\t\t\t$users[] = $user['username'];\n\t\t\n\t\treturn $users;\n\t}", "function getAllResisteredUser(){\n\tglobal $mysqli;\n\t$rec = \"SELECT *\n\tFROM\n\tuser\n\tWHERE\n\tis_active='1'\";\n\t$uRes = mysqli_query($mysqli, $rec);\n\t$user_array = array();\n\twhile ($uRow = mysqli_fetch_assoc($uRes)) {\n\t\tarray_push($user_array, $uRow);\n\t}\n\treturn $user_array;\n\n}" ]
[ "0.7629945", "0.73041546", "0.72175205", "0.7211917", "0.71566504", "0.7105382", "0.7098097", "0.7068451", "0.70493656", "0.70325583", "0.7006368", "0.6960099", "0.6946155", "0.692964", "0.68869203", "0.6883586", "0.6883586", "0.6883586", "0.68825155", "0.6876432", "0.68568283", "0.6815443", "0.68088144", "0.6767051", "0.6763084", "0.6755665", "0.674966", "0.6740242", "0.6733505", "0.67327183", "0.671373", "0.671231", "0.6711223", "0.6698737", "0.6694069", "0.6674315", "0.66712993", "0.66685176", "0.6664262", "0.66613925", "0.6658933", "0.6658157", "0.66470855", "0.6645382", "0.66432875", "0.6631467", "0.6625741", "0.6624507", "0.66243035", "0.6614291", "0.6601712", "0.6601712", "0.65887105", "0.6588411", "0.65855014", "0.6583993", "0.65783", "0.65715516", "0.6565793", "0.65623814", "0.65476316", "0.65402466", "0.65353435", "0.652492", "0.65245616", "0.6522095", "0.6518379", "0.6515023", "0.6512234", "0.65110165", "0.6511016", "0.6505609", "0.64970994", "0.6493453", "0.64885706", "0.6487529", "0.64873797", "0.6485533", "0.6471329", "0.64677995", "0.645513", "0.6453668", "0.64519244", "0.64493734", "0.6448892", "0.6448659", "0.64485264", "0.6448157", "0.6446728", "0.64460146", "0.64460146", "0.64460146", "0.64460146", "0.64460146", "0.64460146", "0.64429736", "0.6441865", "0.6440111", "0.64336395", "0.64333296" ]
0.77400374
0
Get offline messages of a user
Получить офлайн-сообщения пользователя
public function getOfflineMessages(User $user, $limit = 30) { $result = array(); $stmt = $this->prepare(" SELECT `users`.`name` AS `from`, `message`, `date` FROM `events` INNER JOIN `users` ON `users`.`id` = `userid` WHERE `type` = 'message' AND `to` = :to AND `date` > :date LIMIT :limit;"); $stmt->bindParam(':to', $user->getName(), PDO::PARAM_STR); $stmt->bindParam(':date', $user->getLastLogout(), PDO::PARAM_INT); $temp = PHP_INT_MAX; $stmt->bindParam(':limit', $temp, PDO::PARAM_INT); $stmt->execute(); $result[$user->getName()] = $stmt->fetchAll(PDO::FETCH_ASSOC); $stmt->closeCursor(); foreach($user->getChannels(true) as $name => $arr) { $stmt->bindParam(':to', $name, PDO::PARAM_STR); $stmt->bindParam(':date', $user->getLastLogout(), PDO::PARAM_INT); $stmt->bindParam(':limit', $limit, PDO::PARAM_INT); $stmt->execute(); $result[$name] = $stmt->fetchAll(PDO::FETCH_ASSOC); $stmt->closeCursor(); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function d4os_io_db_os_services_offline_message_retrievemessages($params) {\n $uuid = $params['Guid'];\n\n // get the messages\n $messages_list = array();\n d4os_io_db_set_active('os_offline_message');\n $messages = db_query(\"SELECT * FROM {offline_msgs} WHERE uuid = '%s'\", array($uuid));\n while ($message = db_fetch_object($messages)) {\n $messages_list[] = $message->message;\n }\n d4os_io_db_set_active('default');\n\n // delete the messages\n d4os_io_db_set_active('os_offline_message');\n db_query(\"DELETE FROM {offline_msgs} WHERE uuid = '%s'\", array($uuid));\n d4os_io_db_set_active('default');\n\n return array(\n 'success' => TRUE,\n 'data' => $messages_list,\n );\n}", "public function pullUnreadMessages()\n {\n try {\n $result = $this->getBootic()->getAccountMessages();\n } catch (Exception $e) {\n // We do nothing\n return;\n }\n\n $messages = array_reverse($result->getData());\n\n foreach ($messages as $message) {\n $booticMessage = Mage::getModel('bootic/message')->load($message['id']);\n\n if ($booticMessage->isObjectNew()) {\n $content = 'From <strong>' . $message['user_name'] . '</strong><br/>';\n $content .= $message['content'];\n\n $magentoMessage = Mage::getModel('adminnotification/inbox');\n $magentoMessage->setSeverity(2);\n $magentoMessage->setTitle($message['subject']);\n $magentoMessage->setDescription($content);\n $magentoMessage->setDateAdded($message['date']);\n $magentoMessage->save();\n\n $booticMessage->setMagentoMessageId($magentoMessage->getId());\n $booticMessage->setBooticMessageId($message['id']);\n $booticMessage->save();\n }\n }\n }", "private function getNotifications(){\n // Ensure the API key is valid\n if($this->_validated === true) {\n if(!isset($_GET['uuid']))\n $this->throwError(26, $this->_language->get('api', 'invalid_get_contents'));\n\n // Remove -s from UUID (if present)\n $query = str_replace('-', '', $_GET['uuid']);\n\n // Ensure the user exists\n $this->_db = DB::getInstance();\n\n // Check UUID\n $user = $this->_db->query('SELECT id FROM nl2_users WHERE uuid = ?', array($query));\n\n if(!$user->count()){\n $this->throwError(16, $this->_language->get('api', 'unable_to_find_user'));\n }\n $user = $user->first()->id;\n\n $return = array('notifications' => array());\n\n // Get unread alerts\n $alerts = $this->_db->query('SELECT id, type, url, content_short FROM nl2_alerts WHERE user_id = ? AND `read` = 0', array($user));\n if($alerts->count()){\n foreach($alerts->results() as $result){\n $return['notifications'][] = array(\n 'type' => $result->type,\n 'message_short' => $result->content_short,\n 'message' => ($result->content) ? strip_tags($result->content) : $result->content_short,\n 'url' => rtrim(Util::getSelfURL(), '/') . URL::build('/user/alerts/', 'view=' . $result->id)\n );\n }\n }\n\n // Get unread messages\n $messages = $this->_db->query('SELECT nl2_private_messages.id, nl2_private_messages.title FROM nl2_private_messages WHERE nl2_private_messages.id IN (SELECT nl2_private_messages_users.pm_id as id FROM nl2_private_messages_users WHERE user_id = ? AND `read` = 0)', array($user));\n\n if($messages->count()){\n foreach($messages->results() as $result){\n $return['notifications'][] = array(\n 'type' => 'message',\n 'url' => Util::getSelfURL() . ltrim(URL::build('/user/messaging/', 'action=view&message=' . $result->id), '/'),\n 'message_short' => $result->title,\n 'message' => $result->title\n );\n }\n }\n\n $this->returnArray($return);\n\n } else $this->throwError(1, $this->_language->get('api', 'invalid_api_key'));\n }", "public function notseen_messages() {\n return $this->hasMany('App\\Message', 'room_id', 'id')->where('user_id', '!=', Auth::user()->id)->where('status', 'not_seen');\n }", "public function getUnreadSMS() {\n\t\t// Login to the service if not already done.\n\t\t$this->_logIn();\n\n\t\t// Send HTTP POST request.\n\t\tcurl_setopt($this->_ch, CURLOPT_URL, 'https://www.google.com/voice/inbox/recent/sms/');\n\t\tcurl_setopt($this->_ch, CURLOPT_POST, FALSE);\n\t\tcurl_setopt($this->_ch, CURLOPT_RETURNTRANSFER, TRUE);\n\t\t$xml = curl_exec($this->_ch);\n\n\t\t// Load the \"wrapper\" xml (contains two elements, json and html).\n\t\t$dom = new DOMDocument();\n\t\t$dom->loadXML($xml);\n\t\t$json = $dom->documentElement->getElementsByTagName(\"json\")->item(0)->nodeValue;\n\t\t$json = json_decode($json);\n\n\t\t// Loop through all of the messages.\n\t\t$results = array();\n\t\tforeach($json->messages as $mid=>$convo) {\n\t\t\tif($convo->isRead == FALSE) {\n\t\t\t\t$results[] = $convo;\n\t\t\t}\n\t\t}\n\t\treturn $results;\n\t}", "public function get_messages()\n {\n $this->token_checker();\n\n $call = \"messages\";\n $key = ($call.$this->_hash);\n $result = $this->_get_cache($key);\n\n if(!$result)\n {\n $this->_api_headers();\n $url = $this->_apiUrl .$call;\n $this->_call_api($url, 'GET');\n $result = $this->result;\n\n $expire = 3600;\n\n if(isset($result[0]->expire))\n {\n $expire = $result[0]->expire;\n }\n\n $this->_set_cache($key,$result,$expire);\n }\n return $result;\n }", "function message_get(&$messages,$user,$get_all=false,$sort_desc=false)\r\n\t{\r\n\t$messages=sql_query(\"SELECT user_message.ref, user.username AS owner, user_message.seen, message.created, message.expires, message.message, message.url \" .\r\n\t\t\"FROM `user_message`\r\n\t\tINNER JOIN `message` ON user_message.message=message.ref \" .\r\n\t\t\"LEFT OUTER JOIN `user` ON message.owner=user.ref \" .\r\n\t\t\"WHERE user_message.user='{$user}'\" .\r\n\t\t($get_all ? \" \" : \" AND message.expires > NOW()\") .\r\n\t\t($get_all ? \" \" : \" AND user_message.seen='0'\") .\r\n\t\t\" ORDER BY user_message.ref \" . ($sort_desc ? \"DESC\" : \"ASC\"));\r\n\treturn(count($messages) > 0);\r\n\t}", "public static function getMessages($user)\n\t{\n\t\t$db_connection = self::getConn(self::$MESS);\n\t\t$query = \"SELECT id, title, from_id, create_time, is_read FROM MESSAGE WHERE OWNER_ID=$user ORDER BY CREATE_TIME DESC\";\n\t\treturn self::selectDataList($db_connection, $query);\n\t}", "public function getMessages()\n {\n //PEMBAHASAN MENGENAI EAGER LOADING BISA DI CARI DI DAENGWEB.ID\n return Grub_message::with('user')->get();\n }", "function getDirectMessages()\n { \n $response = $this->twitter->request('User Token Here','User Token Secret here','GET', 'https://api.twitter.com/1.1/direct_messages.json', array('count' => '5'));\n }", "function messagesforadmin()\r\n\t{\r\n\t\tglobal $conn;\r\n\t\t$sql = \"SELECT * FROM `Notifications` WHERE receiver='Admin'\";\r\n\t\t$msg = mysqli_query($conn, $sql);\r\n\t\t$msgs = mysqli_fetch_all($msg, MYSQLI_ASSOC);\r\n\t\treturn $msgs;\r\n\t}", "function GetUnreadMessages( $User_Id ){\n\n\tif( ! is_int( $User_Id ) )\n\t\treturn( \"Param error: User_Id - wrong type or empty.\" );\n\t\t\n\t$Messages = array();\n\t$Sql = \"SELECT \n\t\t\t\tm.Conversation_Id AS Conversation_Id, m.Id AS MessageId, \n\t\t\t\tm.FromUser_Id as FromUser_Id, CONCAT( u.FirstName, ' ', u.LastName ) AS FromUser_Name,\n\t\t\t\tm.DateSent as DateSent,\n\t\t\t\tm.Message\n\t\t\tFROM ChatMessages m,User u,ChatConversationParticipants p\n\t\t\tWHERE \n\t\t\t\t(m.FromUser_Id = u.Id) AND\n\t\t\t\t(m.Id > p.LastReadMessage_Id) AND\n\t\t\t\t(m.Conversation_Id = p.Conversation_Id) AND\n\t\t\t\t(p.User_Id = $User_Id)\n\t\t\tORDER BY m.Id ASC\";\n\t$result = mysql_query( $Sql );\n\t$errno = mysql_errno();\n\tif( 0 != $errno )\n\t\treturn( \"mysql error: $errno\" );\n\twhile( $row = mysql_fetch_array( $result, MYSQL_ASSOC ) )\n\t\t$Messages[] = $row;\n\tmysql_free_result( $result );\n\treturn( $Messages );\n}", "function getMessages()\n\t{\n\t\t$db = e107::getDb('nodejs_chatbox');\n\n\t\t$query = 'SELECT c.*, u.user_id, u.user_name, u.user_login, u.user_image FROM #nodejs_chatbox AS c ';\n\t\t$query .= 'LEFT JOIN #user AS u ON SUBSTRING_INDEX(c.ncb_nick,\".\",1) = u.user_id ';\n\t\t$query .= 'ORDER BY c.ncb_datestamp DESC ';\n\t\t$query .= 'LIMIT 0, ' . (int) $this->plugPrefs['ncb_posts'];\n\t\t$db->gen($query);\n\n\t\twhile($row = $db->fetch())\n\t\t{\n\t\t\t$message = $row;\n\t\t\t// If the author is not a registered user, we have to get the nickname.\n\t\t\tif((int) $row['user_id'] === 0)\n\t\t\t{\n\t\t\t\tlist($cb_uid, $cb_nick) = explode(\".\", $row['ncb_nick'], 2);\n\t\t\t\t$message['user_name'] = $cb_nick;\n\t\t\t\t$message['user_image'] = '';\n\t\t\t}\n\n\t\t\t$this->messages[] = $message;\n\t\t}\n\t}", "function get_messages_for($for_user) {\r\n\r\n\t$sql = \"SELECT * FROM messages WHERE to_user = $for_user\";\r\n\t$result = mysql_query($sql) or die(mysql_error());\r\n\t$messages = array();\r\n\twhile ($message = mysql_fetch_assoc($result)){\r\n\t\tarray_push($messages,$message);\r\n\t}\r\n\treturn $messages;\r\n\r\n}", "public function getUnreadVoicemail() {\n\t\t// Login to the service if not already done.\n\t\t$this->_logIn();\n\n\t\t// Send HTTP POST request.\n\t\tcurl_setopt($this->_ch, CURLOPT_URL, 'https://www.google.com/voice/inbox/recent/voicemail/');\n\t\tcurl_setopt($this->_ch, CURLOPT_POST, FALSE);\n\t\tcurl_setopt($this->_ch, CURLOPT_RETURNTRANSFER, TRUE);\n\t\t$xml = curl_exec($this->_ch);\n\n\t\t// Load the \"wrapper\" xml (contains two elements, json and html)\n\t\t$dom = new DOMDocument();\n\t\t$dom->loadXML($xml);\n\t\t$json = $dom->documentElement->getElementsByTagName(\"json\")->item(0)->nodeValue;\n\t\t$json = json_decode($json);\n\n\t\t// Loop through all of the messages.\n\t\t$results = array();\n\t\tforeach($json->messages as $mid=>$convo) {\n\t\t\tif($convo->isRead == FALSE) {\n\t\t\t\t$results[] = $convo;\n\t\t\t}\n\t\t}\n\t\treturn $results;\n\t}", "public static function getUnreadMessages(Account $acc) {\n self::T(DB::MESSAGE)->db_set_order(array('created'=>true));\n $l = self::getAll(self::T(DB::MESSAGE), new DBBool(array(new DBCond('account', $acc->id), new DBCond('read_time', null))));\n self::T(DB::MESSAGE)->db_set_order();\n return $l;\n }", "public function unread_message_alert()\n {\n $activeUser = loggedin_role_id() . '-' . get_loggedin_user_id();\n $activeUser = $this->db->escape($activeUser);\n $sql = \"SELECT id,body,created_at,IF(sender = \" . $activeUser . \", 'sent','inbox') as `msg_type`,IF(sender = \" . $activeUser . \", reciever,sender) as `get_user` FROM message WHERE (sender = \" . $activeUser . \" AND trash_sent = 0 AND reply_status = 1) OR (reciever = \" . $activeUser . \" AND trash_inbox = 0 AND read_status = 0) ORDER BY id DESC\";\n $result = $this->db->query($sql)->result_array();\n foreach ($result as $key => $value) {\n $result[$key]['message_details'] = $this->getMessage_details($value['get_user']);\n }\n return $result;\n }", "function messages_list($user, $options = array('mode' => 'recieved'))\r\n{\r\n\r\n\tif(!is_numeric($options['offset']))\r\n\t{\r\n\t\t$options['offset'] = 0;\r\n\t}\r\n\tif(!is_numeric($options['limit']))\r\n\t{\r\n\t\t$options['limit'] = MESSAGES_ITEMS_PER_PAGE;\r\n\t}\r\n\tif(isset($options['user']) && !is_numeric($options['user']))\r\n\t{\r\n\t\tdie('Icke numerisk konversationspartner har angivits, dödar scriptet.');\r\n\t}\r\n\r\n\t$query = 'SELECT m.id, m.timestamp, CONCAT(mm.title, m.title) AS title, m.recipient_status, SUBSTRING(CONCAT(mm.message, m.message), 1, 150) AS message, ';\r\n\tif($options['mode'] == 'recieved')\r\n\t{\r\n\t\t$query .= 'm.sender AS sender_id, slogin.username AS sender_username, sinfo.birthday AS sender_birthday, ';\r\n\t\t$query .= 'sinfo.gender AS sender_gender, sinfo.image AS sender_image ';\r\n\t\t$query .= 'FROM messages_new AS m, mass_messages AS mm, login AS slogin, userinfo AS sinfo ';\r\n\t\t$query .= 'WHERE mm.id = m.mass_message_id AND slogin.id = m.sender AND sinfo.userid = m.sender AND m.recipient = \"' . $user . '\" ';\r\n\t\t$query .= 'AND m.recipient_status != 2 ';\r\n\t}\r\n\telseif($options['mode'] == 'sent')\r\n\t{\r\n\t\t$query .= 'm.recipient AS recipient_id, rlogin.username AS recipient_username, rinfo.birthday AS recipient_birthday, ';\r\n\t\t$query .= 'rinfo.gender AS recipient_gender, rinfo.image AS recipient_image ';\r\n\t\t$query .= 'FROM messages_new AS m, mass_messages AS mm, login AS rlogin, userinfo AS rinfo ';\r\n\t\t$query .= 'WHERE mm.id = m.mass_message_id AND rlogin.id = m.recipient AND rinfo.userid = m.recipient AND m.sender = \"' . $user . '\" ';\r\n\t}\r\n\telseif($options['mode'] == 'conversation' || $options['mode'] == 'associated')\r\n\t{\r\n\t\t$query .= 'm.discussion AS discussion, m.recipient AS recipient_id, m.sender AS sender_id, rlogin.username AS recipient_username, ';\r\n\t\t$query .= 'slogin.username AS sender_username, rinfo.birthday AS recipient_birthday, sinfo.birthday AS sender_birthday, ';\r\n\t\t$query .= 'rinfo.gender AS recipient_gender, sinfo.gender AS sender_gender, ';\r\n\t\t$query .= 'rinfo.image AS recipient_image, sinfo.image AS sender_image ';\r\n\t\t$query .= 'FROM messages_new AS m, mass_messages AS mm, login AS slogin, login AS rlogin, userinfo AS sinfo, userinfo AS rinfo ';\r\n\t\t$query .= 'WHERE mm.id = m.mass_message_id AND rlogin.id = m.recipient AND slogin.id = m.sender AND rinfo.userid = m.recipient AND sinfo.userid = m.sender ';\r\n\t\t$query .= 'AND ((m.sender = \"' . $options['user'] . '\" AND m.recipient = \"' . $user . '\") OR ';\r\n\t\t$query .= '(m.sender = \"' . $user . '\" AND m.recipient = \"' . $options['user'] . '\")) ';\r\n\t\tif($options['mode'] == 'associated')\r\n\t\t{\r\n\t\t\t$query .= 'AND (discussion > ' . ($options['discussion']-5) . ' AND discussion < ' . ($options['discussion']+5) . ') ';\r\n\t\t}\r\n\t}\r\n\tswitch($options['order'])\r\n\t{\r\n\t\tcase 'sender':\r\n\t\t\t$query .= 'ORDER BY m.sender ';\r\n\t\tbreak;\r\n\t\tcase 'recipient':\r\n\t\t\t$query .= 'ORDER BY m.recipient ';\r\n\t\tbreak;\r\n\t\tcase 'title':\r\n\t\t\t$query .= 'ORDER BY m.title ';\r\n\t\tbreak;\r\n\t\tdefault:\r\n\t\t\t$query .= 'ORDER BY m.id ';\r\n\t\tbreak;\r\n\t}\r\n\tif($options['direction'] == 'ASC')\r\n\t{\r\n\t\t$query .= 'ASC ';\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$query .= 'DESC ';\r\n\t}\r\n\t$query .= 'LIMIT ' . $options['offset'] . ', ' . $options['limit'];\r\n\t\r\n\t\r\n\t\r\n\t$result = mysql_query($query) or die(report_sql_error($query));\r\n\tif(mysql_num_rows($result) == 0)\r\n\t{\r\n\t\techo 'Här var det tomt!';\r\n\t}\r\n\telse\r\n\t{\r\n\t\tif($options['mode'] == 'recieved')\r\n\t\t{\r\n\t\t\techo '<form action=\"' . $_SERVER['PHP_SELF'] . '?action=delete\" method=\"post\">';\r\n\t\t}\r\n\t\techo '</div><table style=\"width: 100%; margin-bottom: 3px;\" cellspacing=\"0\">';\r\n\t\techo '<tr style=\"font-weight: bold;\">';\r\n\r\n\t\tif(strlen($_GET['action']) < 1)\r\n\t\t{\r\n\t\t\t$link_action = 'inbox';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$link_action = $_GET['action'];\r\n\t\t}\r\n\r\n\t\tif($options['mode'] == 'conversation' || $options['mode'] == 'recieved' || $options['mode'] == 'associated')\r\n\t\t{\r\n\t\t\techo '<td style=\"width: 150px;\">';\r\n\t\t\tif($options['mode'] != 'associated')\r\n\t\t\t{\r\n\t\t\t\tif($options['direction'] == 'ASC' && $options['order'] == 'sender')\r\n\t\t\t\t{\r\n\t\t\t\t\t$link_direction = 'DESC';\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$link_direction = 'ASC';\r\n\t\t\t\t}\r\n\t\t\t\techo '<a href=\"' . $_SERVER['PHP_SELF'] . '?action=' . $link_action . '&order=sender&direction=' . $link_direction;\r\n\t\t\t\tif($options['mode'] == 'conversation')\r\n\t\t\t\t{\r\n\t\t\t\t\techo '&user=' . $_GET['user'];\r\n\t\t\t\t}\r\n\t\t\t\techo '\">Avsändare</a>';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\techo 'Avsändare';\r\n\t\t\t}\r\n\t\t\techo '</td>';\r\n\t\t}\r\n\t\tif($options['mode'] == 'conversation' || $options['mode'] == 'sent')\r\n\t\t{\r\n\t\t\tif($options['direction'] == 'ASC' && $options['order'] == 'recipient')\r\n\t\t\t{\r\n\t\t\t\t$link_direction = 'DESC';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$link_direction = 'ASC';\r\n\t\t\t}\r\n\t\t\techo '<td style=\"width: 150px;\">';\r\n\t\t\techo '<a href=\"' . $_SERVER['PHP_SELF'] . '?action=' . $link_action . '&order=recipient&direction=' . $link_direction;\r\n\t\t\tif($options['mode'] == 'conversation')\r\n\t\t\t{\r\n\t\t\t\techo '&user=' . $_GET['user'];\r\n\t\t\t}\r\n\t\t\techo '\">Mottagare</a></td>';\r\n\t\t}\r\n\t\techo '<td style=\"width: 150px;\">';\r\n\t\tif($options['mode'] != 'associated')\r\n\t\t{\r\n\t\t\tif(($options['direction'] == 'DESC' && $options['order'] == 'time') || !isset($options['order']))\r\n\t\t\t{\r\n\t\t\t\t$link_direction = 'ASC';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$link_direction = 'DESC';\r\n\t\t\t}\r\n\t\t\techo '<a href=\"' . $_SERVER['PHP_SELF'] . '?action=' . $link_action . '&order=time&direction=' . $link_direction;\r\n\t\t\tif($options['mode'] == 'conversation')\r\n\t\t\t{\r\n\t\t\t\techo '&user=' . $_GET['user'];\r\n\t\t\t}\r\n\t\t\techo '\">Tid</a>';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo 'Tid';\r\n\t\t}\r\n\t\techo '</td>';\r\n\r\n\t\techo '<td>';\r\n\t\tif($options['mode'] != 'associated')\r\n\t\t{\r\n\t\t\tif(($options['order'] == 'title' || !isset($options['order'])) && $options['direction'] == 'ASC')\r\n\t\t\t{\r\n\t\t\t\t$link_direction = 'DESC';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$link_direction = 'ASC';\r\n\t\t\t}\r\n\t\t\techo '<a href=\"' . $_SERVER['PHP_SELF'] . '?action=' . $link_action . '&order=title&direction=' . $link_direction;\r\n\t\t\tif($options['mode'] == 'conversation')\r\n\t\t\t{\r\n\t\t\t\techo '&user=' . $_GET['user'];\r\n\t\t\t}\r\n\t\t\techo '\">Rubrik</a>';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo 'Rubrik';\r\n\t\t}\r\n\t\techo '</td>';\r\n\t\tif($options['mode'] == 'recieved')\r\n\t\t{\r\n\t\t\techo '<td style=\"width: 50px;\">Radera</td>';\r\n\t\t}\r\n\t\techo '</tr>';\r\n\t\t$background = '#e7e7e7';\r\n\t\twhile($data = mysql_fetch_assoc($result))\r\n\t\t{\r\n\t\t\techo '<tr style=\"';\r\n\t\t\tif($data['recipient_status'] == 0)\r\n\t\t\t{\r\n\t\t\t\techo 'font-weight: bold;';\r\n\t\t\t}\r\n\t\t\tif($options['mode'] == 'associated' && $data['discussion'] == $options['discussion'])\r\n\t\t\t{\r\n\t\t\t\techo 'background-image: url(\\'\\');';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\techo 'background: ' . $background . ';';\r\n\t\t\t}\r\n\t\t\techo '\";>';\r\n\t\t\tif($options['mode'] == 'conversation' || $options['mode'] == 'recieved' || $options['mode'] == 'associated')\r\n\t\t\t{\r\n\t\t\t\t$tooltip_sender = '<b>' . $data['sender_username'] . '</b>';\r\n\t\t\t\tif($data['sender_image'] == 1 || $data['sender_image'] == 2)\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_sender .= '<br /><img src=' . IMAGE_URL . '/images/users/thumb/' . $data['sender_id'] . '.jpg />';\r\n\t\t\t\t}\r\n\t\t\t\tif($data['sender_gender'] == 'P')\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_sender .= '<br />Kön: kille';\r\n\t\t\t\t}\r\n\t\t\t\telseif($data['sender_gender'] == 'F')\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_sender .= '<br />Kön: tjej';\r\n\t\t\t\t}\r\n\t\t\t\tif(isset($data['sender_birthday']) && $data['sender_birthday'] != '0000-00-00')\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_sender .= '<br />Ålder: ' . date_get_age($data['sender_birthday']) . 'år';\r\n\t\t\t\t}\r\n\t\t\t\tif(strlen($data['sender_location']) > 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_sender .= '<br />Bor: ' . $data['sender_location'];\r\n\t\t\t\t}\r\n\t\t\t\techo '<td><a href=\"/traffa/profile.php?id=' . $data['sender_id'] . '\" onmouseover=\"return makeTrue(domTT_activate(this, event, \\'content\\', \\'' . $tooltip_sender . '\\', \\'trail\\', true));\">' . $data['sender_username'] . '</a></td>';\r\n\t\t\t}\r\n\t\t\tif($options['mode'] == 'conversation' || $options['mode'] == 'sent')\r\n\t\t\t{\r\n\t\t\t\t$tooltip_recipient = '<b>' . $data['recipient_username'] . '</b>';\r\n\t\t\t\tif($data['recipient_image'] == 1 || $data['recipient_image'] == 2)\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_recipient .= '<br /><img src=' . IMAGE_URL . '/images/users/thumb/' . $data['recipient_id'] . '.jpg />';\r\n\t\t\t\t}\r\n\t\t\t\tif($data['recipient_gender'] == 'P')\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_recipient .= '<br />Kön: kille';\r\n\t\t\t\t}\r\n\t\t\t\telseif($data['recipient_gender'] == 'F')\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_recipient .= '<br />Kön: tjej';\r\n\t\t\t\t}\r\n\t\t\t\tif(isset($data['recipient_birthday']) && $data['recipient_birthday'] != '0000-00-00')\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_recipient .= '<br />Ålder: ' . date_get_age($data['recipient_birthday']) . 'år';\r\n\t\t\t\t}\r\n\t\t\t\tif(strlen($data['recipient_location']) > 1)\r\n\t\t\t\t{\r\n\t\t\t\t\t$tooltip_recipient .= '<br />Bor: ' . $data['recipient_location'];\r\n\t\t\t\t}\r\n\t\t\t\techo '<td><a href=\"/traffa/profile.php?id=' . $data['recipient_id'] . '\" ';\r\n\t\t\t\techo 'onmouseover=\"return makeTrue(domTT_activate(this, event, \\'content\\', \\'' . $tooltip_recipient . '\\', \\'trail\\', true));\">';\r\n\t\t\t\techo $data['recipient_username'] . '</a></td>';\r\n\t\t\t}\r\n\t\t\t$tooltip_title = '<b>' . $data['title'] . '</b><br />' . str_replace('\\'', '\\\\\\'', str_replace('\"', '\\\\\\\\', $data['message']));\r\n\t\t\tif(strlen($data['message']) == 150)\r\n\t\t\t{\r\n\t\t\t\t$tooltip_title .= '...';\r\n\t\t\t}\r\n\r\n\t\t\t$tooltip_title = str_replace(array(\"\\n\", \"\\r\"), '', $tooltip_title);\r\n\t\t\t\r\n\t\t\techo '<td>' . fix_time($data['timestamp']) . '</td>';\r\n\t\t\t$data['title'] = (strlen($data['title']) == 0) ? '[Rubrik saknas]' : $data['title'];\r\n\t\t\techo '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?action=read&message_id=' . $data['id'] . '\" ';\r\n\t\t\techo 'onmouseover=\"return makeTrue(domTT_activate(this, event, \\'content\\', \\'' . $tooltip_title . '\\', \\'trail\\', true));\">' . $data['title'] . '</a></td>';\r\n\t\t\tif($options['mode'] == 'recieved')\r\n\t\t\t{\r\n\t\t\t\techo '<td><input name=\"' . $data['id'] . '\" value=\"delete\" type=\"checkbox\" style=\"border: 5x solid blue;\" /></td>';\r\n\t\t\t}\r\n\t\t\techo '</tr>';\r\n\t\t\tif($background == '#e7e7e7')\r\n\t\t\t{\r\n\t\t\t\t$background = '#ffffff';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$background = '#e7e7e7';\r\n\t\t\t}\r\n\t\t}\r\n\t\techo '</table>';\r\n\t}\r\n\tif($options['mode'] != 'associated')\r\n\t{\r\n\t\techo '<div class=\"grey_faded_div\">';\r\n\t\techo '<strong>Sida:</strong> ';\r\n\t\tif($options['mode'] == 'conversation')\r\n\t\t{\r\n\t\t\t$query = 'SELECT MAX(discussion) AS messages FROM messages_new WHERE ';\r\n\t\t\t$query .= '(sender = ' . $user . ' AND recipient = ' . $options['user'] . ') OR ';\r\n\t\t\t$query .= '(sender = ' . $options['user'] . ' AND recipient = ' . $user . ')';\r\n\t\t}\r\n\t\telseif($options['mode'] == 'recieved')\r\n\t\t{\r\n\t\t\t$query = 'SELECT messages_recieved AS messages FROM userinfo WHERE userid = ' . $_SESSION['login']['id'] . ' LIMIT 1';\r\n\t\t}\r\n\t\telseif($options['mode'] == 'sent')\r\n\t\t{\r\n\t\t\t$query = 'SELECT messages_sent AS messages FROM userinfo WHERE userid = ' . $_SESSION['login']['id'] . ' LIMIT 1';\r\n\t\t}\r\n\t\t$result = mysql_query($query) or die(report_sql_error($query));\r\n\t\t$data = mysql_fetch_assoc($result);\r\n\t\t$pages = ceil($data['messages'] / MESSAGES_ITEMS_PER_PAGE);\r\n\t\tfor($i = 0; $i < $pages; $i++)\r\n\t\t{\r\n\t\t\tif(($options['offset'] / MESSAGES_ITEMS_PER_PAGE) == $i)\r\n\t\t\t{\r\n\t\t\t\techo '<strong>' . ($i+1) . '</strong> ';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\techo '<a href=\"' . $_SERVER['PHP_SELF'] . '?action=' . $link_action;\r\n\t\t\t\tif(isset($options['order']))\r\n\t\t\t\t{\r\n\t\t\t\t\techo '&order=' . $options['order'];\r\n\t\t\t\t}\r\n\t\t\t\tif(isset($options['direction']))\r\n\t\t\t\t{\r\n\t\t\t\t\techo '&direction=' . $options['direction'];\r\n\t\t\t\t}\r\n\t\t\t\tif(isset($options['user']))\r\n\t\t\t\t{\r\n\t\t\t\t\techo '&user=' . $options['user'];\r\n\t\t\t\t}\r\n\t\t\t\techo '&offset=' . ($i * MESSAGES_ITEMS_PER_PAGE);\r\n\t\t\t\techo '\">' . ($i+1) . '</a> ';\r\n\t\t\t}\r\n\t\t}\r\n\t\techo '</div>';\r\n\t}\r\n\t//echo '<div>';\r\n\tif($options['mode'] == 'recieved')\r\n\t{\r\n\t\techo '<input type=\"submit\" value=\"Ta bort markerade\" class=\"button\" style=\"float: right; margin: 3px;\" onclick=\"return confirm(\\'Detta kommer ta bort alla markerade inlägg. Vill du fortsätta?\\');\" /> ';\r\n\t\techo '</form>';\r\n\t}\r\n\tif($options['mode'] == 'recieved')\r\n\t{\r\n\t\techo '<input type=\"button\" class=\"button\" style=\"float: left; margin: 3px;\" value=\"Gå till utkorgen\" onclick=\"window.location=\\'' . $_SERVER['PHP_SELF'];\r\n\t\techo '?action=list_sent\\';\" /> ';\r\n\t}\r\n\telse\r\n\t{\r\n\t\techo '<input type=\"button\" style=\"float: left; margin: 3px;\" class=\"button\" value=\"Gå till inkorgen\" onclick=\"window.location=\\'' . $_SERVER['PHP_SELF'];\r\n\t\techo '\\';\" /> ';\r\n\t}\r\n\tif($options['mode'] == 'associated')\r\n\t{\r\n\t\techo ' <input type=\"button\" class=\"button\" style=\"float: left; margin: 3px;\" value=\"Visa hela konversationen\" onclick=\"window.location=\\'' . $_SERVER['PHP_SELF'];\r\n\t\techo '?action=conversation&user=' . $options['user'] . '\\';\" /> ';\r\n\t}\r\n\t//echo '</div>';\r\n\techo '<br style=\"clear: both;\" />';\r\n}", "public function getUserNotReadMessages($user_id = null)\n {\n if(!$user_id) $user_id = Auth::guard('user')->user()->id;\n $messages = $this->userRepository->getNotReadMessages($user_id);\n return response()->json(['status' => true, 'data' => $messages]);\n }", "function sf_get_pm_inbox($userid)\n{\n\tglobal $wpdb;\n\n\t# Get sorted lst of pm inbox titles first\n\t$titles = $wpdb->get_results(\n\t\t\t\"SELECT DISTINCT title, message_slug\n\t\t\t FROM \".SFMESSAGES.\"\n\t\t\t LEFT JOIN \".SFMEMBERS.\" ON \".SFMESSAGES.\".from_id = \".SFMEMBERS.\".user_id\n\t\t\t WHERE to_id = \".$userid.\" AND inbox=1\n\t\t\t ORDER BY sent_date DESC\");\n\tif(!$titles) return;\n\n\t# Now grab the full records\n\t$pms = $wpdb->get_results(\n\t\t\t\"SELECT SQL_CALC_FOUND_ROWS message_id, sent_date, from_id, to_id, title, message_status, inbox, sentbox, is_reply, message_slug, display_name\n\t\t\t FROM \".SFMESSAGES.\"\n\t\t\t LEFT JOIN \".SFMEMBERS.\" ON \".SFMESSAGES.\".from_id = \".SFMEMBERS.\".user_id\n\t\t\t WHERE to_id = \".$userid.\" AND inbox=1\n\t\t\t ORDER BY message_id ASC\");\n\n\treturn sf_sort_pms($titles, $pms);\n}", "function getAllMessages($uid)\n{\n\t$now = new \\DWDateTime();\n\t$sql = '\n\t\tSELECT msgid, title FROM dw_message\n\t\tWHERE uid_recipient = '.\\util\\mysql\\sqlval($uid).'\n\t\t\tAND ((read_datetime >= '.\\util\\mysql\\sqlval($now->format()).'\n\t\t\t\tOR read_datetime = 0)\n\t\t\t\tOR archive = 1)\n\t';\n\treturn \\util\\mysql\\query($sql, true);\n}", "public function get_recieved(){\n\t\t\tglobal $db;\n\n\n\t\t\t$user_id = $_SESSION['logged_admin_id'];\n\n\t\t\t\n\t\t\t$sql = \"SELECT * FROM message \";\n\t\t\t$sql .= \" WHERE reciever_id = {$user_id} \";\n\t\t\t$sql .= \" ORDER BY stamp DESC \";\n\n\t\t\t$messages = $db->query($sql);\n\n\t\t\tconfirm($messages);\n\n\t\t\treturn $messages;\n\t\t}", "public function allUnreadForUser($userId)\n {\n return $this->model->where('user_id','=',$userId)->where('is_read','=',false)->orderBy('created_at', 'desc')->get();\n }", "public function get_unread_messages($id)\n {\n $this->db->select('*');\n $this->db->where('user_id', $id);\n $this->db->where('read', 0);\n $this->db->limit(10);\n $this->db->order_by('date', 'DESC');\n $query = $this->db->get('tbl_messages');\n return $query->result();\n }", "function listMessages($service, $userId) {\n\n $opt_param = array();\n //////////////// temporary for test /////////////////\n\n if($_GET && array_key_exists('date', $_GET)) {\n $ini_date = date_create($_GET['date']);\n $end_date = date_add(date_create($_GET['date']), new DateInterval('P2D')) ;\n } else {\n $ini_date = date_create('02/28/2016');\n $end_date = date_create('03/01/2016');\n }\n $opt_param = array('q'=>'after:' . $ini_date->format('Y/m/d') . ' before:' . $end_date->format('Y/m/d') );\n //var_dump($opt_param);\n //////////////////////////////////////////////////////\n\n $pageToken = NULL;\n $messages = array();\n\n do {\n try {\n if ($pageToken) {\n $opt_param['pageToken'] = $pageToken;\n\n }\n $messagesResponse = $service->users_messages->listUsersMessages($userId, $opt_param);\n if ($messagesResponse->getMessages()) {\n $messages = array_merge($messages, $messagesResponse->getMessages());\n $pageToken = $messagesResponse->getNextPageToken();\n }\n } catch (Exception $e) {\n print 'An error occurred: ' . $e->getMessage();\n }\n } while ($pageToken);\n\n return $messages;\n}", "public function getMessages() {}", "public function getMessages() {}", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function getunReadNotifications($user_id, $role)\r\n {\r\n if ($role == 2 || $role == 5) {\r\n $query = \"SELECT * FROM notification WHERE status=0 AND to_user IN('$user_id','$role') ORDER BY id DESC\";\r\n $result = $this->conn->query($query);\r\n return $result;\r\n }\r\n \r\n // if user isn't a clerck\r\n $query = \"SELECT * FROM notification WHERE status=0 AND to_user='$user_id' ORDER BY id DESC\";\r\n $result = $this->conn->query($query);\r\n return $result;\r\n }", "public function getNotSeen() {\n // Get authenticated user rooms\n $auth_rooms = RoomMember::where('user_id', Auth::user()->id)->pluck('room_id');\n\n $notseen_messages_count = Message::whereIn('room_id', $auth_rooms)->where('user_id', '!=', Auth::user()->id)->where('status', 'not_seen')->count();\n return response()->json(['notseen_messages_count' => $notseen_messages_count]);\n }", "public function get_all_unread_messages($limit = 5, $page) {\r\n\r\n\t\t$max = $limit;\r\n\t\tif ($page==1) {\r\n\t\t\t$start_from = 0;\r\n\t\t} else {\r\n\t\t\t$start_from = ($page-1)*$limit;\r\n\t\t}\r\n\t\tglobal $wpdb;\r\n\t\t$table = $wpdb->prefix.$this->table_name;\r\n\t\t$ID = $this->ID;\r\n\t\t$query = \"SELECT * FROM $table WHERE `user_id`= $ID AND `post_type` = 'user-message' ORDER BY `date` DESC \";\r\n\r\n\t\t$rows = $wpdb->get_results($query);\r\n\r\n\t\treturn $rows;\r\n\t}", "function get_list() {\n\t\t\n\t\t$return = array();\n\t\t\n\t\t$query = \"SELECT *\"\n\t\t\t\t.\" FROM \".$this->table.\" M\"\n\t\t\t\t.\" WHERE \"\n\t\t\t\t.\" (user_from_ID = '{{user_ID}}' OR user_to_ID = '{{user_ID}}')\"\n\t\t\t\t.\" AND timestamp = (SELECT MAX(timestamp) FROM messages WHERE user_key = M.user_key LIMIT 0,1)\"\n\t\t\t\t.\" GROUP BY user_key ORDER BY timestamp DESC\"\n\t\t\t\t.\" LIMIT 0,25\";\n\t\t\n\t\t\n\t\t$where = array(\n\t\t\t'user_ID' => USER_ID\n\t\t);\n\t\t\n\t\t$messages = $this->db->query($query, $where);\n\t\twhile ($messages && $message = $this->db->fetch_assoc($messages)) {\n\t\t\t// get user details\n\t\t\t$user_ID = ($message['user_to_ID'] == USER_ID) ? $message['user_from_ID'] : $message['user_to_ID'];\n\t\t\t\n\t\t\t$user_obj = $this->db->select(\"users\",\n\t\t\t\tarray(\"user_ID\" => $user_ID),\n\t\t\t\tarray(\"user_ID\", \"user_username\", \"user_name_first\", \"user_name_last\")\n\t\t\t);\n\t\t\tif ($user_obj) $message['user'] = $this->db->fetch_assoc($user_obj);\n\t\t\t\n\t\t\t$return[] = $message;\n\t\t}\n\n\t\treturn $return;\n\t}", "public function getUnreadConversations()\n {\n $conversations = Chat::conversations()->for(Auth::user())->get();\n \n if($conversations)\n {\n foreach($conversations as $conv)\n {\n $unreadCount = Chat::conversation($conv)->for(Auth::user())->unreadCount();\n\n $conv['unread'] = $unreadCount;\n\n $get_receiver_id = MessageNotification::where('conversation_id', $conv['id'])->where('user_id', '<>', Auth::user()->id)->first();\n\n $user = User::where('id', $get_receiver_id['user_id'])->first();\n\n $conv['user'] = $user;\n }\n\n $unread_list = view('host.renders.unread_conversations_list_render')->with('conversations', $conversations)->render();\n \n return response()->json(['status' => 'success', 'conversations' => $unread_list]);\n }\n return response()->json(['status' => 'success', 'conversations' => '']);\n }", "public function unreadMessages(){\n //Find data where statas is 0 form contactUsMessage Table \n $unReadMessages = ContactUsMessage::where('status', 0)->paginate(10);\n \n //store data unreadmessages to user messages for use same view\n $usersMessages=$unReadMessages;\n\n $viewTitle= 'View All Unread Message';\n //return view with data \n return view('backEnd.user.viewUserMessage',['usersMessages'=>$usersMessages, 'viewTitle'=>$viewTitle ]);\n \n }", "public function getMessages(){\n\n $db = $this->db;\n $id = $this->id;\n\n $q = new QueryObject;\n\n try{\n $db->setTable('messages as m');\n \n $q->setRule(['reader_id', '=', $id]);\n $q->setJoin(['INNER', 'users as u', 'u.id', 'm.sender_id']);\n \n $q->setCondition('ORDER BY created ASC');\n \n $messages = $db->whereJoin($q, [\n 'u.name',\n 'u.nickname',\n \n 'm.content',\n 'm.status',\n 'm.created',\n ])->getAll();\n }\n catch(PDOException $e){\n echo $e->getMessage();\n }\n\n $poruke = [];\n\n foreach($messages as $m){\n\n $m['date-diff'] = contentAge($m['created']);\n die($m['date-diff']);\n\n if($m['status'])\n $poruke['read'][] = $m;\n else\n $poruke['unread'][] = $m;\n\n \n\n }\n\n return $poruke;\n }", "function message_seen_all($user,$seen_type=MESSAGE_ENUM_NOTIFICATION_TYPE_SCREEN)\r\n\t{\r\n\t$messages = array();\r\n\tif (message_get($messages,$user))\r\n\t\t{\r\n\t\tforeach($messages as $message)\r\n\t\t\t{\r\n\t\t\tmessage_seen($message['ref']);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function getUnread(Request $request) {\n $username = $request->username;\n $user = User::where('name', $username)->get()->first(); // Must use find() or first() to get entire object.\n $messages = $user->unreadNotifications;\n return response::json($messages);\n }", "public function allUnreadForUser($userId) {\n return $this->cache\n ->tags($this->entityName, 'global')\n ->remember(\"{$this->locale}.{$this->entityName}.allUnreadForUser.{$userId}\", $this->cacheTime, function () use ($userId) {\n return $this->repository->allUnreadForUser($userId);\n }\n );\n }", "private function get_user_messages($game, $user_id)\n {\n $limit = config('app.chat_limit');\n return Message::where('game_id', $game->id)->where('user_id', $user_id)->paginate($limit);\n }", "public function pageGetMyMessages()\n {\n $page = isset($_POST['page']) && (int)($_POST['page']) ? (int)($_POST['page']) : 1;\n $length = isset($_POST['length']) && (int)($_POST['length']) ? (int)($_POST['length']) : 10;\n\n $res = message_api::getMyMessages($this->uid, $page, $length);\n if (!empty($res['data'])) {\n return interface_func::setData(\n [\n 'messageList' => $res['data'],\n ]\n );\n }\n\n return interface_func::setMsg(3002);\n }", "function getMessages();", "public function testgetOfflineUsers()\n {\n $user = factory('Suyabay\\User', 3)->create(['active' => 0]);\n\n $offlineUsers = self::$userRepository->getOfflineUsers();\n $this->assertEquals(3, $offlineUsers->count());\n }", "function newMessages($uid){\n\t\t\t\t$query = \"SELECT COUNT(id) AS unreadMsgs FROM messages WHERE rid='\".$uid.\"' AND viewed='1'\";\n\t\t\t\t$result = mysqli_query($conn, $query) or die('Error, query failed');\n\t\t\t\t$row = mysqli_fetch_array($result, MYSQL_ASSOC);\n\t\t\t\t$unreadMsgs = $row['unreadMsgs'];\n\t\t\t\treturn $unreadMsgs;\n\t\t\t}", "function d4os_io_db_os_offline_messages_is_alive() {\n return array(\n 'success' => d4os_io_db_mysql_is_alive('os_offline_messages', 'os offline messages'),\n );\n}", "public function unreadReceivedSiteMessages(User $from = null)\n {\n return $this->receivedSiteMessages($from)\n ->whereNull('read_at');\n }", "public function unread()\n {\n $count = Auth::user()->newMessagesCount();\n return ['msg_count' => $count];\n }", "public function getUnreadMessageCollection(){\n if(!$this->_unreadMessageCollection){\n $this->_unreadMessageCollection = $this->_messageFactory->create()->getCollection();\n $this->_unreadMessageCollection->addFieldToFilter('customer_email','')->addFieldToFilter('customer_id',$this->helper->getCustomerId())\n ->addFieldToFilter('is_read',0)\n ->setOrder('message_id','DESC')\n ->setPageSize(5);\n }\n \n return $this->_unreadMessageCollection;\n }", "public function fetchMessages( $params )\n {\n \n $db = $this->getDb();\n \n // filter für die query konfigurieren\n $condition = array();\n $condition['filters'] = array();\n $condition['filters']['mailbox'] = 'in';\n $condition['filters']['archive'] = false;\n\n $query = $db->newQuery( 'GroupwareMessage_Table' );\n\n $query->fetch\n (\n $condition,\n $params\n );\n \n return $query->getAll();\n \n }", "public function getUnreadByUserId($user_id) {\n\t\t$sql = 'SELECT * FROM ' . NOTIFICATIONS_TABLE_NAME . ' where user_id = :user_id AND is_read = 0';\n\t\t$params = array(':user_id' => $user_id);\n\n\t\t$result = $this->db->query_db($sql, $params)->fetchAll(PDO::FETCH_ASSOC);\n\n\t\treturn $result;\t\n\t}", "function getPrivateMessage($id_user2, PrivateMessageManager $messageManager){\n $messages = $messageManager->getMessage($id_user2);\n $response = [];\n foreach($messages as $content){\n $response[] = [\n \"message\" => $content->getText(),\n \"date\" => $content->getDate(),\n \"sent\" => $content->getSent(),\n \"pseudo\" => $content->getUsername(),\n ];\n }\n return json_encode($response);\n}", "public function listOutboxMessageFull($userid){\n\t\tglobal $dblink;\n\t\t$v = $dblink->prepare(\"SELECT * FROM message WHERE msg_from=? ORDER BY time DESC\");\n\t\t$v->bind_param(\"i\", $userid);\n\t\t$v->execute();\n\t\t$v->store_result();\n\n\t\t$data = $v->num_rows;\n\n\t\t\n\t\treturn $data;\n\t}", "public static function get_new_messages(){\r\n $query = DB::$conn->prepare('select users.id as user,users.last_name,users.first_name,messages.id,messages.message,messages.date_and_time,messages.from_user from messages join users on users.id=from_user where messages.to_user=? and is_read=0');\r\n $query->execute([$_COOKIE['id']]);\r\n $messages = $query->fetchAll(PDO::FETCH_ASSOC);\r\n return $messages;\r\n \r\n }", "function list_message($user, $user_type='m_to_username', $read=1, $page=1, $no=20, $count=0,$m_type=0,$start_time=null) {\r\n $this->db->where($user_type, $user);\r\n \r\n //private message\r\n if($m_type==4)\r\n $this->db->where('m_type', 4);\r\n \r\n //for received message, $m_read is ignored\r\n if($user_type=='m_to_username'&&$read!=-1){\r\n $this->db->where('m_read', $read);\r\n }\r\n \r\n //count only\r\n if ($count){\r\n $new=0;\r\n $all=$this->db->from(self::MSG_TABLE)->count_all_results();\r\n //if $start_time given, then get the messages received after the $start_time\r\n if($start_time){\r\n $this->db->where('m_time >=',$start_time);\r\n $new =$this->db->from(self::MSG_TABLE)->count_all_results();\r\n return array($all,$new,$start_time);\r\n }\r\n return $all; \r\n }\r\n\r\n $this->db->order_by('m_id', 'DESC')->limit($no, count_offset($page, $no));\r\n $message = $this->db->get(self::MSG_TABLE);\r\n $rs = $message->result_array();\r\n foreach ($rs as $k => $v) {\r\n $rs[$k]['sub'] = json_decode($v['m_subject'], true);\r\n unset($rs[$k]['m_subject']);\r\n }\r\n return $rs;\r\n }", "function getMessages($post, $user, $db) {\r\n\t\t//if((preg_match('!#!', $message) !== FALSE) || (preg_match(':&:', $message) !== FALSE)) {\r\n\t\t// Format sent to client:\r\n\t\t// Friend!#!Message:&:Friend!#!Message ... Message\r\n\t\t$thisUser = $user['Login'];\r\n\t\t$query = \"SELECT * FROM Messages WHERE `To`='$thisUser' ORDER BY Time DESC LIMIT 50\";\r\n\t\t$res = $db->squery($query);\r\n\t\t$list = '';\r\n\t\tif($res->num_rows == 0) {\r\n\t\t\tdie(\"MSG: No Messages\");\r\n\t\t}\r\n\t\twhile($row = $res->fetch_assoc()) {\r\n\t\t\t$list .= $row['From'].'!#!'.$row['Message'].':&:';\r\n\t\t}\r\n\t\t$list = substr($list, 0, -3);\r\n\t\treturn $list;\r\n\t}", "public function listInboxMessage($userid, $from, $to){\n\t\tglobal $dblink;\n\t\t$v = $dblink->prepare(\"SELECT * FROM message WHERE msg_to=? ORDER BY time DESC LIMIT ?,?\");\n\t\t$v->bind_param(\"iii\", $userid, $from, $to);\n\t\t$v->execute();\n\t\t\n\t\t$data = get_result($v);\n\t\treturn $data;\n\t}", "public function get_new(){\n\t\t\tglobal $db;\n\n\t\t\t$user_id = $_SESSION['logged_admin_id'];\n\n\t\t\t$sql = \"SELECT * FROM message \";\n\t\t\t$sql .= \" WHERE seen = 0 \";\n\n\t\t\t$messages = $db->query($sql);\n\n\t\t\tconfirm($messages);\n\n\t\t\treturn $messages;\n\t\t}", "public function fetchMessages(Request $request)\n {\n $sender = $request->get('sender');\n $receiver = $request->get('receiver');\n // sender = user_id\n // receiver = user_with\n $messages = Userchat::with('user')->whereIn('user_id', [$receiver, $sender])->whereIn('user_to', [$receiver, $sender])->where('deleted_by', '<>', $sender)->get();\n $first_unread_flag = 0;\n foreach ($messages as $message) {\n if($message->read == 0 && $first_unread_flag == 0){\n $message->first_unread = 1;\n $first_unread_flag = 1;\n }else{\n $message->first_unread = 0;\n }\n if ($message->user_id == $sender) {\n $message->type = 1;\n } else {\n $message->type = 0;\n }\n }\n\n return $messages;\n }", "public static function get_new_messages()\n {\n $table = Database::get_main_table(TABLE_MESSAGE);\n if (!api_get_user_id()) {\n return false;\n }\n $sql = \"SELECT * FROM $table\n WHERE\n user_receiver_id=\" . api_get_user_id() . \" AND\n msg_status=\" . MESSAGE_STATUS_UNREAD;\n $result = Database::query($sql);\n $i = Database::num_rows($result);\n\n return $i;\n }", "public function listInboxMessageFull($userid){\n\t\tglobal $dblink;\n\n\t\t$v = $dblink->prepare(\"SELECT * FROM message WHERE msg_to=? ORDER BY time DESC\");\n\t\t$v->bind_param(\"i\", $userid);\n\t\t$v->execute();\n\t\t$v->store_result();\n\n\t\t$data = $v->num_rows;\n\t\treturn $data;\n\t}", "public function lastMessages()\n {\n return response()->json(array_reverse(Chat::with('User')->orderBy('id', 'desc')->limit(20)->get()->toArray()));\n }", "public function unread() {\n $unread = $this->cache->get_value('subscriptions_user_new_' . $this->userId);\n if ($unread === false) {\n $user = new \\Gazelle\\User($this->userId);\n $unread = (new \\Gazelle\\Manager\\Forum)->unreadSubscribedForumTotal($user)\n + (new \\Gazelle\\Manager\\Comment)->unreadSubscribedCommentTotal($user);\n $this->cache->cache_value('subscriptions_user_new_' . $this->userId, $unread, 0);\n }\n return $unread;\n }", "function receivedMessagesFromSender(User $user)\n {\n return Message::where('recipient_id', $this->id)->where('sender_id', $user->id)->where('read', 0)->get();\n }", "function get_messages($user_id, $start, $limit) {\n $messages = good_query_table(\"SELECT * FROM msgs_rec LEFT JOIN msgs_thread ON msgs_thread.thread_id = msgs_rec.tid WHERE recipient_id = '$user_id' AND del = '1' ORDER BY `last_update` DESC LIMIT $start, $limit\");\n return $messages;\n}", "public function index()\n {\n $offlinemessages = OfflineMessage::where(\"company_id\",company_id())\n\t\t\t\t\t\t\t\t\t ->orderBy(\"id\",\"desc\")->get();\n return view('backend.offline_message.list',compact('offlinemessages'));\n }", "function getLastMessages($user=NULL){\n \tif($user == NULL){\n \t\t$user = getUser();\n \t}else{\n \t\t$user = save($user);\n \t}\n \n $returner = array();\n \t$listedUsers[] = $user;\n $session = '';\n $db = new db();\n $newMessagesSQL = $db->shiftResult($db->query(\"SELECT * FROM `messages` WHERE receiver='$user' OR sender='$user' ORDER BY timestamp DESC LIMIT 0, 5\"),'id');\n\tforeach($newMessagesSQL AS $newMessagesData){\n\t\t$session .= \"newMessage \".$newMessagesData['id'];\n\t\t\n\t\t\n\t\t//each sender is only listed once\n\t\tif(!in_array($newMessagesData['sender'], $listedUsers)){\n\t $text = substr($newMessagesData['text'], 0, 100);\n\n\t\t//define everything that is important\t \n\t\t$return['messageId'] = $newMessagesData['id'];\n\t\t$return['sender'] = $newMessagesData['sender'];\n\t\t$return['receiver'] = $newMessagesData['receiver'];\n\t\t$return['timestamp'] = $newMessagesData['timestamp'];\n\t\t$return['text'] = $newMessagesData['text'];\n\t\t\n\t\t$return['seen'] = $newMessagesData['seen'];\n\t\t$return['read'] = $newMessagesData['read'];\n\t\t$return['senderUsername'] = useridToUsername($newMessagesData['sender']);\n\t\t\n\t\t//add sender too users array\n\t\t$listedUsers[] = $newMessagesData['sender'];\n\t\t\n\t\t//add all return data to returner array\n\t\t$returner[] = $return;\n\t\t\t\n\t\t}\n\t}\n\t\n\treturn $returner;\n\t\n }", "public function getFnfWithUnreadMsgForApp($app_user_id, $timestamp) {\n\t\t$sent_time = date(\"Y-m-d H:i:s\", $timestamp);\n\t\t//$user_results = $this->conn->query(\"SELECT user_id, user_role, first_name, last_name, organisation_name,image_url FROM users WHERE user_id IN ( SELECT first_user_id FROM appusersappusers WHERE second_user_id = $app_user_id AND active = 1 ) OR user_id IN ( SELECT second_user_id FROM appusersappusers WHERE first_user_id = $app_user_id AND active = 1 )\");\n\t\t$user_results = $this->conn->query(\"SELECT user_id, user_role, first_name, last_name, organisation_name,image_url,email FROM users WHERE user_id IN ( SELECT first_user_id FROM appusersappusers WHERE second_user_id = $app_user_id AND active = 1 )\");\n\t\t$no_of_rows_user = $user_results->num_rows;\n\t\tif ($no_of_rows_user > 0) //if data exist\n\t\t{\n\t\t\t$i = 0;\n\t\t\twhile( $row = $user_results->fetch_assoc() )\n\t\t\t{\n\t\t\t\t$user_id = $row['user_id'];\n\t\t\t\t$message_results = $this->conn->query(\"SELECT message_id FROM messages WHERE sent_time > '\".$sent_time.\"' AND receiver_id = $app_user_id AND (sender_id <> $app_user_id AND sender_id = $user_id)\");\n\t\t\t\t$no_of_msg = $message_results->num_rows;\n\t\t\t\t$rows[] = array(\n\t\t\t\t\t'user_id'=> $row['user_id'],\n\t\t\t\t\t'user_role'=> $row['user_role'],\n\t\t\t\t\t'first_name' => $row['first_name'],\n\t\t\t\t\t'last_name' => $row['last_name'], \n\t\t\t\t\t'organisation_name' => $row['organisation_name'], \n\t\t\t\t\t'image_url' => ROOT_PATH.\"images/profile/\".$row['image_url'],\n\t\t\t\t\t'email' => $row['email'], \n\t\t\t\t\t'sender_id' => $row['user_id'], \n\t\t\t\t\t'receiver_id' => $app_user_id, \n\t\t\t\t\t'active' => 1,\n\t\t\t\t\t'no_of_msg' => $no_of_msg \n\t\t\t\t);\n\t\t\t\t$i++;\n\t\t\t}\n//\t\t\t$return = array(\n//\t\t\t\t'message'=>\"Ok\",\n//\t\t\t\t'categories' => $rows \n//\t\t\t);\n\t\t}\n\t\t\n\t\t$user_results1 = $this->conn->query(\"SELECT user_id, user_role, first_name, last_name, organisation_name,image_url,email FROM users WHERE user_id IN ( SELECT second_user_id FROM appusersappusers WHERE first_user_id = $app_user_id AND active = 1 )\");\n\t\t$no_of_rows_user1 = $user_results1->num_rows;\n\t\tif ($no_of_rows_user1 > 0) //if data exist\n\t\t{\n\t\t\t$i = 0;\n\t\t\twhile( $row1 = $user_results1->fetch_assoc() )\n\t\t\t{\n\t\t\t\t$user_id = $row1['user_id'];\n\t\t\t\t$message_results1 = $this->conn->query(\"SELECT message_id FROM messages WHERE sent_time > '\".$sent_time.\"' AND receiver_id = $app_user_id AND (sender_id <> $app_user_id AND sender_id = $user_id)\");\n\t\t\t\t$no_of_msg1 = $message_results1->num_rows;\n\t\t\t\t$rows[] = array(\n\t\t\t\t\t'user_id'=> $row1['user_id'],\n\t\t\t\t\t'user_role'=> $row1['user_role'],\n\t\t\t\t\t'first_name' => $row1['first_name'],\n\t\t\t\t\t'last_name' => $row1['last_name'], \n\t\t\t\t\t'organisation_name' => $row1['organisation_name'], \n\t\t\t\t\t'image_url' => ROOT_PATH.\"images/profile/\".$row1['image_url'],\n\t\t\t\t\t'email' => $row1['email'],\n\t\t\t\t\t'sender_id' => $app_user_id, \n\t\t\t\t\t'receiver_id' => $row1['user_id'], \t\t\t\t\t\n\t\t\t\t\t'active' => 1,\n\t\t\t\t\t'no_of_msg' => $no_of_msg1 \n\t\t\t\t);\n\t\t\t\t$i++;\n\t\t\t}\n//\t\t\t$return = array(\n//\t\t\t\t'message'=>\"Ok\",\n//\t\t\t\t'categories' => $rows \n//\t\t\t);\n\t\t}\n\t\t\n\t\t$user_results2 = $this->conn->query(\"SELECT user_id, user_role, first_name, last_name, organisation_name,image_url,email FROM users WHERE user_id IN ( SELECT second_user_id FROM appusersappusers WHERE first_user_id = $app_user_id AND active = 0 )\");\n\t\t$no_of_rows_user2 = $user_results2->num_rows;\n\t\tif ($no_of_rows_user2 > 0) //if data exist\n\t\t{\n\t\t\t$i = 0;\n\t\t\twhile( $row2 = $user_results2->fetch_assoc() )\n\t\t\t{\n\t\t\t\t$user_id = $row2['user_id'];\n\t\t\t\t//$message_results2 = $this->conn->query(\"SELECT message_id FROM messages WHERE receiver_id = $app_user_id AND (sender_id <> $app_user_id AND sender_id = $user_id)\");\n\t\t\t\t//$no_of_msg2 = $message_results2->num_rows;\n\t\t\t\t$rows[] = array(\n\t\t\t\t\t'user_id'=> $row2['user_id'],\n\t\t\t\t\t'user_role'=> $row2['user_role'],\n\t\t\t\t\t'first_name' => $row2['first_name'],\n\t\t\t\t\t'last_name' => $row2['last_name'], \n\t\t\t\t\t'organisation_name' => $row2['organisation_name'], \n\t\t\t\t\t'image_url' => ROOT_PATH.\"images/profile/\".$row2['image_url'],\n\t\t\t\t\t'email' => $row2['email'],\n\t\t\t\t\t'sender_id' => $app_user_id, \n\t\t\t\t\t'receiver_id' => $row2['user_id'], \t\t\t\t\t\n\t\t\t\t\t'active' => 0,\n\t\t\t\t\t'no_of_msg' => 0 \n\t\t\t\t);\n\t\t\t\t$i++;\n\t\t\t}\n//\t\t\t$return = array(\n//\t\t\t\t'message'=>\"Ok\",\n//\t\t\t\t'categories' => $rows \n//\t\t\t);\n\t\t}\n\t\t\n\t\t$user_results3 = $this->conn->query(\"SELECT user_id, user_role, first_name, last_name, organisation_name,image_url,email FROM users WHERE user_id IN ( SELECT first_user_id FROM appusersappusers WHERE second_user_id = $app_user_id AND active = 0 )\");\n\t\t$no_of_rows_user3 = $user_results3->num_rows;\n\t\tif ($no_of_rows_user3 > 0) //if data exist\n\t\t{\n\t\t\t$i = 0;\n\t\t\twhile( $row3 = $user_results3->fetch_assoc() )\n\t\t\t{\n\t\t\t\t$user_id = $row3['user_id'];\n\t\t\t\t//$message_results = $this->conn->query(\"SELECT message_id FROM messages WHERE receiver_id = $app_user_id AND (sender_id <> $app_user_id AND sender_id = $user_id)\");\n\t\t\t\t//$no_of_msg = $message_results->num_rows;\n\t\t\t\t$rows[] = array(\n\t\t\t\t\t'user_id'=> $row3['user_id'],\n\t\t\t\t\t'user_role'=> $row3['user_role'],\n\t\t\t\t\t'first_name' => $row3['first_name'],\n\t\t\t\t\t'last_name' => $row3['last_name'], \n\t\t\t\t\t'organisation_name' => $row3['organisation_name'], \n\t\t\t\t\t'image_url' => ROOT_PATH.\"images/profile/\".$row3['image_url'],\n\t\t\t\t\t'email' => $row3['email'],\n\t\t\t\t\t'sender_id' => $row3['user_id'], \n\t\t\t\t\t'receiver_id' => $app_user_id, \n\t\t\t\t\t'active' => 0,\n\t\t\t\t\t'no_of_msg' => 0 \n\t\t\t\t);\n\t\t\t\t$i++;\n\t\t\t}\n//\t\t\t$return = array(\n//\t\t\t\t'message'=>\"Ok\",\n//\t\t\t\t'categories' => $rows \n//\t\t\t);\n\t\t}\n\t\t\n\t\t$return = array(\n\t\t\t'message'=>\"Ok\",\n\t\t\t'categories' => $rows \n\t\t);\n\t\t\n//\t\telse\n//\t\t{\n//\t\t\t$return = array(\n//\t\t\t\t'message'=>\"No Result Found.\" \n//\t\t\t); \n//\t\t}\n\t\treturn $return;\n\t\t\n\t}", "function chat_messages_get()\n{\n $user_guid = elgg_get_logged_in_user_guid();\n\n $list = elgg_get_entities_from_relationship(array(\n 'type' => 'object',\n 'subtype' => 'chat_message',\n 'count' => false,\n 'relationship' => 'unread',\n 'relationship_guid' => $user_guid,\n 'inverse_relationship' => true,\n ));\n\n if ($list) {\n foreach ($list as $message) {\n //Get an array of fields which can be exported.\n $object_entries = $message->getExportableValues();\n\n //save standard object_entries into array\n foreach ($object_entries as $value) {\n $m[$value] = $message->$value;\n }\n\n //save object url\n $m[\"url\"] = $message->getURL() . \"chat/view/\" . $message->container_guid . \"/\";\n\n $return[] = $m;\n }\n\n return $return;\n\n }\n}", "public function getReceivedMessages ($userId)\n\t{\n\t\t$qb = $this->createQueryBuilder('m');\n\t\t$qb->where($qb->expr()->andX(\n\t\t\t$qb->expr()->eq('m.recipient', $userId),\n\t\t\t$qb->expr()->eq('m.deletedByRecipient', '?1')\n\t\t));\n\t\t$qb->orderBy('m.sentTime', 'DESC');\n\t\t$qb->setParameter(1, false);\n\n\t\t$messages = $qb->getQuery()->getResult();\n\t\treturn $messages;\n\n\t}", "public function privateMessages(User $user)\n {\n $tempUser = \\Illuminate\\Support\\Facades\\Auth::user();\n\n $pvCommunication = Chat::with('user')\n ->where(['user_id' => $tempUser->id,\n 'receiver_id' => $user->id])->orWhere(function ($query) use ($user) {\n $query->where(['user_id' => $user->id, 'receiver_id' => \\Illuminate\\Support\\Facades\\Auth::user()->id]);\n })->get();\n return response()->json($pvCommunication);\n }", "public function index()\n {\n return auth()->user()->unreadNotifications;\n }", "public function action_getNotification()\n\t{\n\t\treturn Response::json(Larachat\\Models\\User::getUnreadUsers());\n\t}", "public function listOutboxMessage($userid, $from, $to){\n\t\tglobal $dblink;\n\t\t$v = $dblink->prepare(\"SELECT * FROM message WHERE msg_from=? ORDER BY time DESC LIMIT ?,?\");\n\t\t$v->bind_param(\"iii\", $userid, $from, $to);\n\t\t$v->execute();\n\t\t$v->store_result();\n\n\t\t$data = get_result($v);\n\t\treturn $data;\n\t}", "public function getUnseenMessages($criteria = 'UNSEEN', $fetch_options = null, $fetch_body = true, $fetch_attachment = true) {\n return $this->getMessages($criteria, $fetch_options, $fetch_body, $fetch_attachment);\n }", "public function getmessages()\n {\n $alluser1 = DB::table('users as u')->join('conversions as c','u.id','c.user_one')\n ->where('c.user_two',Auth::user()->id)\n ->get();\n\n $alluser2 = DB::table('users as u')->join('conversions as c','u.id','c.user_two')\n ->where('c.user_one',Auth::user()->id)\n ->get(); \n return array_merge($alluser1->toArray(),$alluser2->toArray()); \n }", "public function getUnreadNotification(User $user)\n {\n $qb = $this->createQueryBuilder('n');\n $qb\n ->innerJoin('n.userNotifications', 'un')\n ->where('un.isRead = 0')\n ->andWhere('un.user = :user')\n ->setParameter(':user', $user)\n ->orderBy('n.createdAt', 'DESC')\n ;\n\n return $qb->getQuery()->getResult();\n }", "public function getMessages()\n {\n $res = $this->Messages->getMessages();\n echo json_encode($res);\n wp_die();\n }", "public function getMessages(): array;", "public function getMessages(){ }", "public function getMessagesAction()\n {\n $this->get('logger')->info('get message for user');\n $messages = $this->get('alert.manager')->getUserMessages();\n $results = array();\n foreach($messages as $message){\n $results[] = array(\n 'content' => $message->getContent(), \n 'type' => $message->getMessageType()->getId()\n ); \n }\n \n $response = array(\"code\" => 100 ,\"count\" => sizeof($results) , \"messages\" => $results);\n //you can return result as JSON\n return new Response(json_encode($response));\n }", "function getMessages($user,$reverse,$last){\n // get messages\n $time = date (\"F d Y H:i:s.\", filemtime(\"msg/\".$user));\n $time = prettyDate($time).\".\";\n if($time == \"46 years ago.\"){$time = \"Never ago.\";}\n $curtime = date (\"F d Y H:i:s.\", time());\nif(!isset($last)){\n echo \"Message last receieved: \".$time.\" Current time: \".$curtime.\"<br>\\n\";\n}\n echo \"Messages, sorted by recent:<br>\\n\";\n if(!$reverse){\n $messages = file(\"msg/\".$user);\n } else {\n $messages = array_reverse( file(\"msg/\".$user) );\n }\necho \"<div class='scrolls'>\";\n foreach($messages as $message){\n highlight_string($message).\"<br>\";\n }\necho \"</div>\";\nif(isset($_POST[\"api\"])){\ndie();\n}\n}", "public static function loadAllReceivedMessages($userId){\n $sql = \"SELECT * FROM Messages WHERE user_id = $userId\";\n $result = Message::$conn->query($sql);\n if ($result->num_rows > 0) {\n $allMsg = array();\n foreach ($result as $row){\n $newMsg = new Message($row['id'], $row['text'], $row['user_id'], $row['admin_id']);\n $allMsg[] = $newMsg;\n }\n return $allMsg;\n }\n return []; \n }", "function getmessages($type=0) {\r\n // Specify what type of messages you want to fetch\r\n switch($type) {\r\n case \"0\": $sql = \"SELECT * FROM messages WHERE `to` = '\".$this->userid.\"' && `to_viewed` = '0' && `to_deleted` = '0' ORDER BY `created` DESC\"; break; // New messages\r\n case \"1\": $sql = \"SELECT * FROM messages WHERE `to` = '\".$this->userid.\"' && `to_viewed` = '1' && `to_deleted` = '0' ORDER BY `to_vdate` DESC\"; break; // Read messages\r\n case \"2\": $sql = \"SELECT * FROM messages WHERE `from` = '\".$this->userid.\"' ORDER BY `created` DESC\"; break; // Send messages\r\n case \"3\": $sql = \"SELECT * FROM messages WHERE `to` = '\".$this->userid.\"' && `to_deleted` = '1' ORDER BY `to_ddate` DESC\"; break; // Deleted messages\r\n default: $sql = \"SELECT * FROM messages WHERE `to` = '\".$this->userid.\"' && `to_viewed` = '0' ORDER BY `created` DESC\"; break; // New messages\r\n }\r\n $result = mysql_query($sql) or die (mysql_error());\r\n \r\n // Check if there are any results\r\n if(mysql_num_rows($result)) {\r\n $i=0;\r\n // reset the array\r\n $this->messages = array();\r\n // if yes, fetch them!\r\n while($row = mysql_fetch_assoc($result)) {\r\n $this->messages[$i]['id'] = $row['id'];\r\n $this->messages[$i]['title'] = $row['title'];\r\n $this->messages[$i]['message'] = $row['message'];\r\n $this->messages[$i]['fromid'] = $row['from'];\r\n $this->messages[$i]['toid'] = $row['to'];\r\n $this->messages[$i]['from'] = $this->getusername($row['from']);\r\n $this->messages[$i]['to'] = $this->getusername($row['to']);\r\n $this->messages[$i]['from_viewed'] = $row['from_viewed'];\r\n $this->messages[$i]['to_viewed'] = $row['to_viewed'];\r\n $this->messages[$i]['from_deleted'] = $row['from_deleted'];\r\n $this->messages[$i]['to_deleted'] = $row['to_deleted'];\r\n $this->messages[$i]['from_vdate'] = date($this->dateformat, strtotime($row['from_vdate']));\r\n $this->messages[$i]['to_vdate'] = date($this->dateformat, strtotime($row['to_vdate']));\r\n $this->messages[$i]['from_ddate'] = date($this->dateformat, strtotime($row['from_ddate']));\r\n $this->messages[$i]['to_ddate'] = date($this->dateformat, strtotime($row['to_ddate']));\r\n $this->messages[$i]['created'] = date($this->dateformat, strtotime($row['created']));\r\n $i++;\r\n }\r\n } else {\r\n // If not return false\r\n return false;\r\n }\r\n }", "public function getFreshMessage()\n {\n $time = time() - 3600;\n $sql = \"SELECT message, time, user FROM messages WHERE time > $time\";\n return $this->db->query($sql)->fetchAll(PDO::FETCH_ASSOC);\n }", "function getMessages($prof_id)\n {\n $query = \"SELECT * FROM messages WHERE friend_id = $prof_id ORDER BY ID DESC\";\n $results = $this->selectQuery($query);\n return $results;\n }", "function show_messages($userid){\r\n include(\"mysql_connection.php\");\r\n $messages = array();\r\n\r\n $sql = \"SELECT sender_id, receiver_id, body, send_time FROM message\r\n WHERE receiver_id = '$userid' order by send_time desc\";\r\n $result = mysqli_query($connect, $sql);\r\n\r\n while($data = mysqli_fetch_object($result)){\r\n $messages[] = array( 'send_time' => $data->send_time,\r\n 'sender_id' => $data-> sender_id,\r\n 'uid' => $userid,\r\n 'body' => $data->body);\r\n }\r\n return $messages;\r\n\r\n }", "function getInbox($username) {\r\n\t\t\t$data = $this->fetch(\"SELECT * FROM `\" . $this->prefix . \"inbox_messages` WHERE recipient = '$username'\r\n\t\t\t\t\t\t\t\t \");\r\r\n\t\t\t return $data;\r\n\t\t}", "public function getMessageList($page, $userId);", "function get_messages() {\n $response = array('error' => '', 'result' => 'failed');\n $response['language_version'] = $this->config->item('language_version');\n\n if ($this->valid_token) {\n $user_id = $this->input->get('user_id');\n $temp_visitor_id = $this->input->get('visitor_id');\n\n // get all message of visitor\n $messages = $this->temp_visitor->get_messages(array('temp_visitor_id' => $temp_visitor_id));\n\n $notifications = $this->user->get_notifications($user_id);\n $response['notifications_counter'] = count($notifications);\n $response['unread_session'] = $this->chat_session->get_running_session($user_id);\n \n $response['result'] = 'success';\n $response['messages_list'] = $messages;\n } else {\n $response['error'] = $this->lang->line('invalid_token');\n }\n\n return $this->output->set_content_type('application/json')->set_output($this->return_json($response));\n }", "public function messages()\n\t{\n\t\t$msgs = array();\n\n\t\tif(count($this->messages) > 0)\n\t\t{\n\t\t\tforeach($this->messages as $msg)\n\t\t\t{\n\t\t\t\t$type = ($msg->sender_id == Fusion::$user->id) ? 'sender' : 'receiver';\n\n\t\t\t\t$format = array(\n\t\t\t\t\t'title' => $msg->{$type}->username,\n\t\t\t\t\t'link' => Route::url('message', array('id' => $msg->id), true),\n\t\t\t\t\t'unread' => ($msg->get('unread_'.$type) > 0) ? array('total' => $msg->get('unread_'.$type)) : false,\n\t\t\t\t\t'active' => false\n\t\t\t\t);\n\n\t\t\t\t//check if the last sent post was sent by the logged in user and read by the receiver\n\t\t\t\tif($format['unread'] == false)\n\t\t\t\t{\n\t\t\t\t\t$last_post = $msg->posts->order_by('created_at', 'DESC')->find();\n\t\t\t\t\t$format['read'] = ($last_post->sender_id == Fusion::$user->id && !in_array($last_post->read_at, array('', '0')));\n\t\t\t\t}\n\n\t\t\t\t$msgs[] = $format;\n\t\t\t}\n\t\t}\n\t\treturn $msgs;\n\t}", "function getMessages(): array;", "public function getLevelOneWithUnreadMsg($app_user_id, $timestamp) {\n\t\t$sent_time = date(\"Y-m-d H:i:s\", $timestamp);\n\t\t$category_results = $this->conn->query(\"SELECT DISTINCT category_id, category_name,second_level FROM view_sp_res WHERE user_id IN ( SELECT sp_id FROM appuserssps WHERE app_user_id = $app_user_id AND active = 1 ) OR user_id IN ( SELECT residence_id FROM residencesindividuals WHERE individual_id = $app_user_id AND active = 1 ) OR user_id IN ( SELECT first_user_id FROM appusersappusers WHERE second_user_id = $app_user_id AND (active = 1 OR active = 0) ) OR user_id IN ( SELECT second_user_id FROM appusersappusers WHERE first_user_id = $app_user_id AND (active = 1 OR active = 0) )\");\n\t\t$no_of_rows_category = $category_results->num_rows;\n\t\tif ($no_of_rows_category > 0) //if data exist\n\t\t{\n\t\t\t$i = 0;\n\t\t\twhile( $row = $category_results->fetch_assoc() )\n\t\t\t{\n\t\t\t\t$category_id = $row['category_id'];\n\t\t\t\t//$user_id = $row['user_id'];\n\t\t\t\t$message_results = $this->conn->query(\"SELECT message_id FROM messages WHERE sent_time > '\".$sent_time.\"' AND (receiver_id =0 OR receiver_id = $app_user_id) AND sender_id IN (SELECT DISTINCT user_id FROM view_sp_res WHERE category_id = $category_id AND user_id IN ( SELECT sp_id FROM appuserssps WHERE app_user_id = $app_user_id ) OR user_id IN ( SELECT residence_id FROM residencesindividuals WHERE individual_id = $app_user_id ) OR user_id IN ( SELECT first_user_id FROM appusersappusers WHERE second_user_id = $app_user_id ) OR user_id IN ( SELECT second_user_id FROM appusersappusers WHERE first_user_id = $app_user_id ) )\");\n\t\t\t\t$no_of_msg = $message_results->num_rows;\n\t\t\t\t$rows[] = array(\n\t\t\t\t\t'category_id'=> $row['category_id'],\n\t\t\t\t\t'category_name' => $row['category_name'],\n\t\t\t\t\t'second_level' => $row['second_level'], \n\t\t\t\t\t'no_of_msg' => $no_of_msg \n\t\t\t\t);\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$return = array(\n\t\t\t\t'message'=>\"Ok\",\n\t\t\t\t'categories' => $rows \n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$return = array(\n\t\t\t\t'message'=>\"No Result Found.\" \n\t\t\t); \n\t\t}\n\t\treturn $return;\n\t\t\n\t}", "function getAllUnreadMessage($fromId, $type = '') {\n\t\tglobal $ownerCd;\n\t\t$this->db->select('count(1) as total');\n\t\t$this->db->from('message m');\n\t\t$this->db->join('message_contact c', \"((c.user_id = '$fromId' AND c.performer_id = m.from_id) OR (c.performer_id = '$fromId' AND c.user_id = m.from_id))\", 'LEFT');\n\t\t$this->db->where(\"m.to_id = '$fromId' AND m.is_read = 0\");\n\t\t//if ($type != '') {\n\t\t\t$this->db->where(\"m.id NOT IN (Select message_id from message_delete where del_by_type = $type)\");\n\t\t\t$this->db->where(\"(m.from_type = 3 OR c.id NOT IN (Select contact_id from message_contact_block WHERE block_by_type = $type))\");\n\t\t//}\n\t\t$this->db->limit(1);\n\t\treturn $this->db->get_row();\n\t}", "function getPrivateInvites($username) {\n\t$interval = time() - PHPSC_PRIVATE_INVITE_EXPIRE;\n\t$resultArray = array();\n\t$sql = \"SELECT * FROM chat_invites WHERE targetuser = '$username' AND requesttime > $interval AND joined = 0\";\n\tif ($result = dbQuery($sql)) {\n\t\twhile ($row = dbFetchArray($result)) {\n\t\t\t$user = $row[\"usr\"];\n\t\t\t$roomID = $row[\"roomid\"];\n\t\t\t$ID = $row[\"id\"];\n\t\t\t$resultArray[] = array('user'=>$user, 'roomID'=>$roomID, 'ID'=>$ID);\n\t\t}\n\t\treturn $resultArray;\n\t}\n\treturn false;\n}", "function getMessages()\n {\n $message = new Message();\n\n $message->from_user = $this->cur_user->id;\n $message->orderBy('created DESC, id DESC');\n $message->is_deleted_from = 0;\n $message->limit((($this->cur_page - 1) * MESSAGES_PER_PAGE),\n MESSAGES_PER_PAGE + 1);\n\n if ($message->find()) {\n return $message;\n } else {\n return null;\n }\n }", "public function fetchMessages()\n\t{\n\t\t$data_result=[];\n\t\t$message = $this->ws_messages->find()->where('post_id ='.$this->post_id. ' AND post_type = '.$this->chat_type)->orderBy(['created_at'=> SORT_ASC])->with('user','user.profile')->all();\n\t\tforeach ($message as $key => $value) {\n\t\t\t# code...\n\t\t\tif($value->first_msg == 0){\n\t\t\t\tif($value->user->id == $this->current_user){\n\t\t\t\t\t$pchat = ChatPrivate::find()->where(['user_id'=>$value->user->id, 'post_id'=>$this->post_id])->one();\n\t\t\t\t\t$profile = Profile::find()->where(['user_id'=>$pchat->user_id_guest])->one();\n \t\t$current_date = date('Y-m-d H:i:s');\n\t\t\t\t\t$time1 = date_create($profile->dob);\n\t\t\t\t\t$time2 = date_create($current_date);\n\t\t\t\t\t$year_old = $time1->diff($time2)->y;\n\n\t\t\t\t\t$smg = nl2br($profile->first_name . \" \" . $profile->last_name . \", \" . $year_old . \"\\n\" . $value->msg);\n\t\t\t\t\t$time = UtilitiesFunc::FormatTimeChat($value->created_at);\n\t\t\t\t\tif ($profile->photo == null){\n\t\t\t\t\t\t$image = '/img/icon/no_avatar.jpg';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$image = '/uploads/'.$pchat->user_id_guest.'/'.$profile->photo;\n\t\t\t\t\t}\n\n\t\t\t\t\t$item = array(\n\t\t\t\t\t\t'id'=>$pchat->user_id_guest,\n\t\t\t\t\t\t'name'=>$profile->first_name .\" \".$profile->last_name,\n\t\t\t\t\t\t'avatar'=> $image,\n\t\t\t\t\t\t'msg'=> $smg,\n\t\t\t\t\t\t'msg_type' => 1,\n\t\t\t\t\t\t'created_at'=> $time,\n\t\t\t\t\t\t'post_id'=> $value->post_id,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t$profile = Profile::find()->where(['user_id'=>$value->user->id])->one();\n\t\t\t\t\t$current_date = date('Y-m-d H:i:s');\n\t\t\t\t\t$time1 = date_create($profile->dob);\n\t\t\t\t\t$time2 = date_create($current_date);\n\t\t\t\t\t$year_old = $time1->diff($time2)->y;\n\n\t\t\t\t\t$smg = nl2br($profile->first_name . \" \" . $profile->last_name . \", \" . $year_old . \"\\n\" . $value->msg);\n\t\t\t\t\t$time = UtilitiesFunc::FormatTimeChat($value->created_at);\n\t\t\t\t\tif ($profile->photo == null){\n\t\t\t\t\t\t$image = '/img/icon/no_avatar.jpg';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$image = '/uploads/'.$value->user->id.'/'.$value->user->profile->photo;\n\t\t\t\t\t}\n\n\t\t\t\t\t$item = array(\n\t\t\t\t\t\t'id'=>$value->user->id,\n\t\t\t\t\t\t'name'=>$value->user->profile->first_name .\" \".$value->user->profile->last_name,\n\t\t\t\t\t\t'avatar'=> $image,\n\t\t\t\t\t\t'msg'=> $smg,\n\t\t\t\t\t\t'msg_type' => 1,\n\t\t\t\t\t\t'created_at'=> $time,\n\t\t\t\t\t\t'post_id'=> $value->post_id,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$smg = nl2br($value->msg);\n\t\t\t\t$time = UtilitiesFunc::FormatTimeChat($value->created_at);\n\t\t\t\tif ($value->user->profile->photo == null){\n\t\t\t\t\t$image = '/img/icon/no_avatar.jpg';\n\t\t\t\t}else{\n\t\t\t\t\t$image = '/uploads/'.$value->user->id.'/'.$value->user->profile->photo;\n\t\t\t\t}\n\t\t\t\t$item = array(\n\t\t\t\t\t'id'=>$value->user->id,\n\t\t\t\t\t'name'=>$value->user->profile->first_name .\" \".$value->user->profile->last_name,\n\t\t\t\t\t'avatar'=> $image,\n\t\t\t\t\t'msg'=> $smg,\n\t\t\t\t\t'msg_type' => $value->msg_type,\n\t\t\t\t\t'created_at'=> $time,\n\t\t\t\t\t'post_id'=> $value->post_id,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tarray_push($data_result,$item);\n\t\t}\n\t\treturn $data_result;\n\t}", "public function recieverchatUsers($userid){\r\n $sqlQuery = \"\r\n SELECT * FROM \".$this->chatUsersTable.\" WHERE userid IN\r\n (SELECT DISTINCT reciever_userid FROM \".$this->chatTable.\" WHERE sender_userid = '$userid')\";\r\n return $this->getData($sqlQuery);\r\n }", "public function getAllMessages()\n {\n return $this->get('messages') ?: [];\n }" ]
[ "0.7306152", "0.6908733", "0.6628025", "0.65874237", "0.6568397", "0.65538496", "0.652186", "0.65070957", "0.6500318", "0.6448334", "0.64132744", "0.64126164", "0.6392788", "0.639088", "0.638896", "0.638456", "0.6383", "0.63727784", "0.637039", "0.63689536", "0.63560504", "0.63385403", "0.6321216", "0.6319559", "0.6315412", "0.6309722", "0.63091373", "0.62910855", "0.62910855", "0.62910855", "0.62910855", "0.62861687", "0.6258055", "0.62228566", "0.6220857", "0.620313", "0.6177194", "0.6174701", "0.6174252", "0.61665314", "0.61584973", "0.6137125", "0.61278725", "0.6126336", "0.6103003", "0.61014986", "0.6097114", "0.6090812", "0.6090135", "0.60859686", "0.6083798", "0.60796905", "0.60661197", "0.60516626", "0.60403997", "0.6035058", "0.6028253", "0.60206807", "0.60195345", "0.60179675", "0.6017868", "0.6016175", "0.6002135", "0.60019624", "0.5999201", "0.59883714", "0.59872544", "0.59833866", "0.5976068", "0.5972829", "0.5966824", "0.5961922", "0.59611267", "0.5956469", "0.5947828", "0.5945152", "0.59365666", "0.5932499", "0.5930638", "0.5927647", "0.5925046", "0.5923302", "0.5922609", "0.5906743", "0.5905944", "0.58967716", "0.58964264", "0.5893239", "0.5886941", "0.588183", "0.58665544", "0.58531195", "0.5848627", "0.58409655", "0.58395875", "0.5838213", "0.58238345", "0.58195126", "0.58083755", "0.5803784" ]
0.7170043
1
Get user permissions in a channel
Получить разрешения пользователя в канале
public function getUserChannelPermissions($userid, $channel) { $stmt = $this->prepare('SELECT `permissions` FROM `user_channels` WHERE `user` = ? AND `channel` = ?'); $stmt->execute(array($userid, $channel)); $result = $stmt->fetch(); $stmt->closeCursor(); return $result != null ? $result['permissions'] : 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserPermissions();", "public function getPermissions();", "public function getPermissions();", "public function getPermissions();", "public function getPermissions();", "public function getPermissions();", "public static function getPermissions(): array;", "public function getPermissions(): array;", "public function getAvailablePermissions();", "public function getAvailablePermissions();", "public function getCurrentPermissions()\n {\n $permissions = self::getPermissions(['guild', 'city', 'global']);\n $userPermissions = [];\n\n foreach ($this->getGuilds() as $guild) {\n switch ($guild->permissions) {\n case 30:\n $userPermissions[$guild->id] = array_keys($permissions);\n break;\n case 20:\n $userPermissions[$guild->id] = array_keys($permissions);\n break;\n case 10:\n $userPermissions[$guild->id] = $guild->settings->access_moderation_permissions;\n $userPermissions[$guild->id][] = 'guild_access';\n $userPermissions[$guild->id][] = 'city_access';\n break;\n case 0:\n $userPermissions[$guild->id] = ['city_access', 'guild_access'];\n break;\n }\n $specificPermissions = \\App\\Models\\UserPermission::where('user_id', $this->id)\n ->get()\n ->pluck('permission')->toArray();\n $userPermissions[$guild->id] = array_merge($userPermissions[$guild->id], $specificPermissions);\n }\n\n return $userPermissions;\n }", "protected function getUserPermissions()\n {\n return $this->getToken()->getUser()->getPermissions();\n }", "public function getPermission();", "protected function getPermissions()\n {\n return Permission::with('roles')->get();\n }", "public function getChannelUsers($channel)\n {\n $users = array();\n $stmt = $this->prepare('SELECT `users`.`name`, `user_channels`.`permissions` FROM `user_channels` INNER JOIN `users` ON `user_channels`.`user` = `users`.`id` WHERE `channel` = ?;');\n $stmt->execute(array($channel));\n while ($res = $stmt->fetch()) {\n $users[$res['name']] = array('permissions' => $res['permissions'], 'active' => false);\n }\n $stmt->closeCursor();\n return $users;\n }", "static function getPermissionsLevel($channel, $userId) {\n $level = 0;\n if (!$userId)\n return 0; // niezalogowanie nie mają dostępu\n if ($channel == 255)\n return 1;\n $query = \"SELECT SQL_CACHE * FROM `chat_access`\n WHERE\n `userid` = ?\n AND `channel` = ?\n LIMIT 1\";\n $result = DB::select($query, array($userId, $channel));\n\t // var_dump(DB::getQueryLog(), $result);\n if (count($result) === 1) {\n $status = head($result);\n if ($status->banned > time()) {\n $level = -1;\n }\n else {\n $level = $status->access;\n }\n }\n return $level;\n }", "public function userPermissionableGetPermissions()\n {\n $ret = array(\n 'user profile view any' => $this->_(\"View other user's profile\"),\n 'user profile edit own' => $this->_('Edit own user profile'),\n 'user profile edit any' => $this->_(\"Edit other user's profile\"),\n 'user image edit own' => $this->_('Edit own user image'),\n 'user image edit any' => $this->_(\"Edit other user's image\"),\n 'user status edit any' => $this->_(\"Edit other user's status message\"),\n 'user account edit any' => $this->_(\"Edit other user's account settings\"),\n 'user account email edit own' => $this->_('Edit own user account email'),\n 'user account email edit any' => $this->_(\"Edit other user's account email\"),\n 'user account password edit own' => $this->_('Edit own user account password'),\n 'user account password edit any' => $this->_(\"Edit other user's account password\"),\n 'user account delete own' => $this->_('Delete own user account'),\n 'user account delete any' => $this->_(\"Delete other user's account\"),\n 'user widget edit own' => $this->_('Edit layout and settings of own user widgets'),\n 'user widget edit any' => $this->_(\"Edit layout and settings of other user's user widgets\"),\n 'user widget view any private' => $this->_(\"View other user's private widget contents\"),\n );\n if ($this->getConfig('allowViewAnyUser')) unset($ret['user profile view any']);\n \n return $ret;\n }", "protected function getUserPermissions(): Collection\n {\n return Permission::where('name', 'LIKE', 'view_%')->get();\n }", "public function getPermissions(): Collection;", "public function permissions(): array;", "public function getUserChannels($userid)\n {\n $chans = array();\n $stmt = $this->prepare('SELECT `channel`, `permissions` FROM `user_channels` WHERE `user` = ?;');\n $stmt->execute(array($userid));\n while ($res = $stmt->fetch()) {\n $chans[$res['channel']] = $res['permissions'];\n }\n $stmt->closeCursor();\n return $chans;\n }", "public static function getPermissions() {\n \t$table = Control::getTable('permissions');\n $perms = array();\n $rows = $table->getRows();\n foreach($rows as $row) {\n \t$perms[$row->name] = self::hasPermission($row->name);\n }\n $perms['is_user'] = self::isUser();\n return $perms;\n }", "public function get()\n {\n return Chatkit::permissions()->get($this->url);\n }", "public abstract function getAllPermissions();", "public function permissions()\n {\n $user = Auth::user();\n return response()->json($user->allPermissions());\n }", "public function getRolePermissions();", "public function get_permissions()\n\t{\n\t\t// --------------------------------------------\n\t\t// Prep Cache, Return if Set\n\t\t// --------------------------------------------\n\n\t\t$cache_name = __FUNCTION__;\n\t\t$cache_hash = $this->_imploder(func_get_args());\n\n\t\tif (isset($this->cached[$cache_name][$cache_hash])) {\n\t\t\treturn $this->cached[$cache_name][$cache_hash];\n\t\t}\n\n\t\t$this->cached[$cache_name][$cache_hash] = array();\n\n\t\t// --------------------------------------------\n\t\t//\tGet user id\n\t\t// --------------------------------------------\n\n\t\tif (($uid = $this->get_user_id()) === false) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t//\tTry and get Facebook user id\n\t\t// --------------------------------------------\n\n\t\ttry {\n\t\t\t$info = $this->FB->api(\"/$uid/permissions\");\n\n\t\t\tif (is_object($info) === true) {\n\t\t\t\t$info = (array)$info;\n\t\t\t}\n\n\t\t\tif (isset($info['data'])) {\n\t\t\t\t$info = (array)$info['data'];\n\n\t\t\t\t$out = array();\n\n\t\t\t\tforeach ($info as $val) {\n\t\t\t\t\tif ($val['status'] != 'granted') {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$out[] = $val['permission'];\n\t\t\t\t}\n\n\t\t\t\treturn $this->cached[$cache_name][$cache_hash] = $out;\n\t\t\t}\n\n\t\t\treturn array();\n\t\t} catch (Exception $e) {\n\t\t\t$this->error[] = $e->getMessage();\n\n\t\t\t//$this->dd($this->error);\n\n\t\t\treturn array();\n\t\t}\n\t}", "public function getPermissions() {\n\t\t$listEntries = Temboo_Results::getSubItemByKey($this->base, \"items\");\n\t\t$resultArray = array();\n\t\tif(!is_null($listEntries)) {\n\t\t\tforeach ($listEntries as $entry) {\n\t\t \tarray_push($resultArray, new Google_Drive_Permission_output($entry));\n\t\t\t}\n\t\t}\n\t\treturn $resultArray;\n\t}", "abstract public static function getPermissions(): array;", "public function getUserPermissions($id) {\r\n return $this->roleService->getUserPermissions($id);\r\n }", "public function getPermissions()\n {\n $tmp = new QdPermission();\n $tmp->SETRANGE('usergroupid', $this->id);\n $tmp->SETRANGE('active', true);\n return $tmp->GETLIST();\n }", "public function getPermissions()\r\n {\r\n return $this->perms;\r\n }", "function userPermissions() {\n // do not show inactive zombie users\n $users = $this->db->select('users', 'id, long, role', \"role NOT IN ('inactive')\", 'name ASC, surname ASC');\n $permissions = $this->db->select('user_permissions JOIN rooms ON user_permissions.room=rooms.id', 'room, user, rooms.name');\n foreach ($users as &$user) {\n switch($user['role']) {\n case 'admin':\n $user['perm'] = 'Owner';\n break;\n case 'guest':\n $user['perm'] = 'Guest';\n break;\n default:\n foreach ($permissions as $room) {\n if ($room['user'] == $user['id']) {\n $user['perm'] .= '<strong>' . $room['name'] . '</strong>, ';\n }\n }\n $user['perm'] = (empty($user['perm'])) ? '' : substr($user['perm'], 0, -2);\n\n }\n }\n\n return $users;\n }", "public function allPermissions();", "public function allPermissions();", "public function userPermissions()\n\t{\n\t\treturn array_map(function ($item) {\n\t\t\treturn $item[\"permission_name\"];\n\t\t}, $this->CI->db\n\t\t->select(\"permissions.*\")\n\t\t->from(\"permissions\")\n\t\t->join(\"role_permission\", \"permissions.permission_p_id = role_permission.permission_ID\", \"inner\")\n\t\t->where_in(\"role_permission.role_ID\", $this->roleID())\n\t\t->where(array(\"permissions.is_active\" => '1'))\n\t\t->group_by(\"role_permission.permission_ID\")\n\t\t->get()->result_array());\n\t}", "function getUserPermissions(){\n\tif (isset($_SESSION['permission'])){\n\t\treturn $_SESSION['permission'];\n\t} else {\n\t\treturn 0;\n\t}\n}", "public function getPermissions()\n {\n return $this->perms;\n }", "public function getPermissions()\n\t{\n\t\t\n\t\treturn $this->permissions = array_fetch($this->profile->permissions->toArray(), 'id');\n\t\t//return $this->permissions = $this->profile->permissions->get()->all_to_single_array('id');\t\t\n\t}", "public function getPermissions()\n {\n return $this->permissions;\n }", "public function getPermissions()\n {\n return $this->permissions;\n }", "function &getChannels() {\n\t\tif($this->_channels === null) {\n\t\t\t$this->_channels = array();\n\t\t\t\n\t\t\t$customUsers = $this->getCustomUsers();\n\t\t\t// Get the channels, the user has access to:\n\t\t\tif($this->getUserRole() == AJAX_CHAT_GUEST) {\n\t\t\t\t$validChannels = $customUsers[0]['channels'];\n\t\t\t} else {\n\t\t\t\t$userData = $this->getValidLoginUserData();\n\t\t\t\t$validChannels = $userData['channels'];\n\t\t\t}\n\t\t\t\n\t\t\t// Add the valid channels to the channel list (the defaultChannelID is always valid):\n\t\t\tforeach($this->getAllChannels() as $key=>$value) {\n\t\t\t\t// Check if we have to limit the available channels:\n\t\t\t\tif($this->getConfig('limitChannelList') && !in_array($value, $this->getConfig('limitChannelList'))) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(in_array($value, $validChannels) || $value == $this->getConfig('defaultChannelID')) {\n\t\t\t\t\t$this->_channels[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->_channels;\n\t}", "public function effectivePermissions($session, $channelid)\n {\n }", "public function permissions()\n {\n return response(array(\n 'error' => false,\n 'msg' => 'User permissions',\n 'data' => array(\n 'Role' => 'Admin',\n 'Read' => 'You can see all users and your own',\n 'Update' => 'You can only update your own information and content',\n 'Delete' => 'You can delete any user',\n 'Create' => 'You can create users and content'\n )\n ), 200);\n }", "public function getPermissions(){ \r\n return $this->role->permissions->calculatedPermissions();\r\n }", "public function permissions()\n {\n return $this->hasMany('Cuatromedios\\Kusikusi\\Models\\Permission', 'user_id');\n }", "function get_user_channel($user,$page = Null, $per = Null){ \n $call_url = $this->arena_api_url.'channels?user='.$user;\n if(isset($per)){\n $call_url = $call_url . '&per=' . $per;\n }\n if(isset($page)){\n $call_url = $call_url . '&page=' . $page; \n }\n return $this->make_request($call_url);\n }", "function permissions($id)\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->where('u_id', $id);\n\t\t$query = $this->db->get('permission_assign');\n\t\treturn $query->result();\n\t}", "public function permissions(){\n\t\treturn $this->permissions;\n\t}", "public function getPermissions ()\n {\n return $this->permissions;\n }", "public function get_channels()\n {\n $this->token_checker();\n\n $call = \"channels\";\n $key = ($call.$this->_hash);\n $result = $this->_get_cache($key);\n\n if(!$result)\n {\n $this->_api_headers();\n $url = $this->_apiUrl .$call;\n $this->_call_api($url, 'GET');\n $result = $this->result;\n\n $this->_set_cache($key,$result);\n }\n return $result;\n }", "public function get_permissions() {\n\t\treturn $this->permissions;\n }", "public function getUserPermissions($name = \"\") {\n\t\treturn $name!=\"\" ? $this->user_permissions[$name] : $this->user_permissions;\n\t}", "function getUserPermissions($u)\n{\n $db = new UserPermissionsModel();\n $permissions = $db->findUserPermissions($u);\n\n foreach($permissions as $permission)\n {\n setPermission($permission->permissionName);\n }\n return($permissions);\n}", "public function updateGrantedFacebookPermissions() {\n\t\t// Check user is logged in\n\t\t$user = FacebookAPI::get()->getUser();\n\t\tif (empty($user))\n\t\t\treturn array();\n\n\t\t// Check permissions are retrieveable\n\t\t$permissions = FacebookAPI::get()->api(\"/$user/permissions\");\n\t\tif (empty($permissions['data'])) return array();\n\n\t\t// $permissions should look something like the below\n\t\t// $permissions = array('data' => array(array('installed' => 1, 'email' => 1)), 'paging' => array())\n\t\t// Merge each array element in data\n\t\t$permissionItems = call_user_func_array('array_merge', $permissions['data']);\n\t\treturn array_keys($permissionItems);\n\t}", "public function permissions();", "public function permissions();", "public function permissions();", "public function permissions();", "public function permissions();", "function get_my_channels(){\n if (!$sername){\n throw new Exception('Please provide a username slug in settings.php.');\n } \n return $this->make_request($this->arena_api_url.'channels?user='.$this->username);\n }", "public function forumClientPermissions()\n {\n $sql=\"SELECT name FROM edxapp.django_comment_client_permission WHERE 1\";\n $q = $this->db->query($sql) or die(print_r($this->db->errorInfo(), true));\n \n $dat=[];\n while ($r=$q->fetch()) {\n $dat[]=$r['name'];\n }\n return $dat;\n }", "function upstream_get_client_user_permissions($client_user_id)\n{\n $clientUser = new \\WP_User((int)$client_user_id);\n if ($clientUser->ID === 0) {\n return false;\n }\n\n $permissions = upstream_get_client_users_permissions();\n foreach ($permissions as $permissionIndex => $permission) {\n if (isset($clientUser->caps[$permission['key']])) {\n $permission['value'] = $clientUser->caps[$permission['key']];\n } elseif (isset($clientUser->allcaps[$permission['key']])) {\n $permission['value'] = $clientUser->allcaps[$permission['key']];\n }\n\n $permissions[$permissionIndex] = $permission;\n }\n\n return $permissions;\n}", "public function getAllPermissions()\n\t{\n\t\t// General\n\t\t// ---------------------------------------------------------------------\n\n\t\t$general = array(\n\t\t\t'accessSiteWhenSystemIsOff' => array(\n\t\t\t\t'label' => Craft::t('Access the site when the system is off')\n\t\t\t),\n\t\t\t'accessCp' => array(\n\t\t\t\t'label' => Craft::t('Access the CP'),\n\t\t\t\t'nested' => array(\n\t\t\t\t\t'accessCpWhenSystemIsOff' => array(\n\t\t\t\t\t\t'label' => Craft::t('Access the CP when the system is off')\n\t\t\t\t\t),\n\t\t\t\t\t'performUpdates' => array(\n\t\t\t\t\t\t'label' => Craft::t('Perform Craft CMS and plugin updates')\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t),\n\t\t);\n\n\t\tforeach (craft()->plugins->getPlugins() as $plugin)\n\t\t{\n\t\t\tif ($plugin->hasCpSection())\n\t\t\t{\n\t\t\t\t$general['accessCp']['nested']['accessPlugin-'.$plugin->getClassHandle()] = array(\n\t\t\t\t\t'label' => Craft::t('Access {plugin}', array('plugin' => $plugin->getName()))\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$permissions[Craft::t('General')] = $general;\n\n\t\t// Users\n\t\t// ---------------------------------------------------------------------\n\n\t\tif (craft()->getEdition() == Craft::Pro)\n\t\t{\n\t\t\t$permissions[Craft::t('Users')] = array(\n\t\t\t\t'editUsers' => array(\n\t\t\t\t\t'label' => Craft::t('Edit users'),\n\t\t\t\t\t'nested' => array(\n\t\t\t\t\t\t'registerUsers' => array(\n\t\t\t\t\t\t\t'label' => Craft::t('Register users')\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'assignUserPermissions' => array(\n\t\t\t\t\t\t\t'label' => Craft::t('Assign user groups and permissions')\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'administrateUsers' => array(\n\t\t\t\t\t\t\t'label' => Craft::t('Administrate users'),\n\t\t\t\t\t\t\t'nested' => array(\n\t\t\t\t\t\t\t\t'changeUserEmails' => array(\n\t\t\t\t\t\t\t\t\t'label' => Craft::t('Change users’ emails')\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'deleteUsers' => array(\n\t\t\t\t\t'label' => Craft::t('Delete users')\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\t// Locales\n\t\t// ---------------------------------------------------------------------\n\n\t\tif (craft()->isLocalized())\n\t\t{\n\t\t\t$label = Craft::t('Locales');\n\t\t\t$locales = craft()->i18n->getSiteLocales();\n\n\t\t\tforeach ($locales as $locale)\n\t\t\t{\n\t\t\t\t$permissions[$label]['editLocale:'.$locale->getId()] = array(\n\t\t\t\t\t'label' => $locale->getName()\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Entries\n\t\t// ---------------------------------------------------------------------\n\n\t\t$sections = craft()->sections->getAllSections();\n\n\t\tforeach ($sections as $section)\n\t\t{\n\t\t\t$label = Craft::t('Section - {section}', array('section' => Craft::t($section->name)));\n\n\t\t\tif ($section->type == SectionType::Single)\n\t\t\t{\n\t\t\t\t$permissions[$label] = $this->_getSingleEntryPermissions($section);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$permissions[$label] = $this->_getEntryPermissions($section);\n\t\t\t}\n\t\t}\n\n\t\t// Global sets\n\t\t// ---------------------------------------------------------------------\n\n\t\t$globalSets = craft()->globals->getAllSets();\n\n\t\tif ($globalSets)\n\t\t{\n\t\t\t$permissions[Craft::t('Global Sets')] = $this->_getGlobalSetPermissions($globalSets);\n\t\t}\n\n\t\t// Categories\n\t\t// ---------------------------------------------------------------------\n\n\t\t$categoryGroups = craft()->categories->getAllGroups();\n\n\t\tif ($categoryGroups)\n\t\t{\n\t\t\t$permissions[Craft::t('Categories')] = $this->_getCategoryGroupPermissions($categoryGroups);\n\t\t}\n\n\t\t// Asset sources\n\t\t// ---------------------------------------------------------------------\n\n\t\t$assetSources = craft()->assetSources->getAllSources();\n\n\t\tforeach ($assetSources as $source)\n\t\t{\n\t\t\t$label = Craft::t('Asset Source - {source}', array('source' => Craft::t($source->name)));\n\t\t\t$permissions[$label] = $this->_getAssetSourcePermissions($source->id);\n\t\t}\n\n\t\t// Plugins\n\t\t// ---------------------------------------------------------------------\n\n\t\tforeach (craft()->plugins->call('registerUserPermissions') as $pluginHandle => $pluginPermissions)\n\t\t{\n\t\t\t$plugin = craft()->plugins->getPlugin($pluginHandle);\n\t\t\t$permissions[$plugin->getName()] = $pluginPermissions;\n\t\t}\n\n\t\treturn $permissions;\n\t}", "public function getPermissions()\n {\n return $this->permissions;\n }", "public function getPermissions()\n {\n return $this->permissions;\n }", "public function getPermissions()\n {\n return $this->permissions;\n }", "public function getPermissions()\n {\n return $this->permissions;\n }", "public function getPermissions()\n {\n return $this->permissions;\n }", "public function getPermissions()\n {\n return $this->permissions;\n }", "public function getPermissions()\n {\n return $this->permissions;\n }", "function readUserRights($permUserId)\n {\n }", "public function get_user_permissions($user_id = 0)\n {\n if ($user_id == 0)\n $user_id = $this->user_id;\n \n $u = new User($user_id);\n \n $assigned_permissions = array();\n \n if ( $u->exists() )\n { \n $permissions = $u->permission->get()->all;\n \n foreach ($permissions AS $p)\n {\n $assigned_permissions[$p->id] = $p->name;\n }\n }\n \n return $assigned_permissions;\n \n /* TODO: why not using the same group function syntax?\n * return ( $u->exists() ) ? $u->permission->get()->all : FALSE;\n */\n }", "function getOtherChannels($conn,$user_id,$role_id){\n\t$channels=null;\n\t$org_unit=getOU_Byuser_Id($conn,$user_id);\n\t\n\t$query = \"select Channels.Id as Channel_ID, Channels.DisplayName as Channel_name,count(*) as members_count \n\t\t\t\t\t\t\tfrom Channels,ChannelMembers\n\t\t\t\t\t\t\twhere Channels.DisplayName in (SELECT Tab.Name\n\t\t\t\t\t\t\t\tFROM Tab,TabTemplate,RoleTabAsson\n\t\t\t\t\t\t\t\twhere Tab.TabTemplate=TabTemplate.Id\n\t\t\t\t\t\t\t\tand TabTemplate.Name='Chat Template'\n\t\t\t\t\t\t\t\tand Tab.Id=RoleTabAsson.TabId\n\t\t\t\t\t\t\t\tand Tab.DeleteAt=0\n\t\t\t\t\t\t\t\tand Tab.RoleId is null\n\t\t\t\t\t\t\t\tand RoleTabAsson.RoleId = '$role_id')\n\t\t\t\t\t\t\tand Channels.DeleteAt=0\n\t\t\t\t\t\t\tand Channels.Id=ChannelId\n\t\t\t\t\t\t\tgroup by Channels.Id\";\t\n\t$res = $conn->query($query);\n\tif($res){\n\t\twhile($row=$res->fetch(PDO::FETCH_ASSOC)){\n\t\t\tif($row['Channel_name']!=\"\"){\n\t\t\t\t$channels[]=array(\"Channel_ID\"=>$row['Channel_ID'],\"Channel_name\"=>$row['Channel_name'],\n\t\t\t\t\"members_count\"=>getMembersCount($conn,$row['Channel_ID']));\n\t\t\t}else{\n\t\t\t\t//getting the other user in the private message channel\n\t\t\t\t$username=getUserInPrivateMessageChannel($conn,$row['Channel_ID'],$user_id);\n\t\t\t\t$channels[]=array(\"Channel_ID\"=>$row['Channel_ID'],\"Channel_name\"=>$username,\n\t\t\t\t\"members_count\"=>getMembersCount($conn,$row['Channel_ID']));\n\t\t\t}\n\t\t}\n\t\t$output[]=array(\"Others\"=>$channels);\n\t}\t\t\n\treturn $output;\n}", "public function getPermissions($user)\n {\n return [];\n }", "public function permissions()\n {\n return [];\n }", "public function get_user_permissions($user_id)\n\t{\n $user = get_user_by_id($user_id);\n\n if ($user)\n {\n $this->db->select(''.$this->db->dbprefix.'permissions.permission_string AS permission');\n $this->db->where(''.$this->db->dbprefix.'permissions_roles.role_id', $user->row('role_id'));\n $this->db->join(''.$this->db->dbprefix.'permissions_roles', ''.$this->db->dbprefix.'permissions_roles.permission_id = '.$this->db->dbprefix.'permissions.permission_id');\n\n $permissions = $this->db->get('permissions');\n\n return ($permissions->num_rows() >= 1) ? $permissions->result_array() : array();\n }\n\n return FALSE;\n\t}", "public function getUserChannels($userID){\n $channels = DB::table('channels')\n ->join('rights','rights.pagepath','=','channels.channel_id')\n ->join('user_rights', 'user_rights.rights_id','=','rights.rights_id')\n ->select('channels.*')\n ->where('rights.label', '=', 'channel')\n ->where('user_rights.user_id', '=', $userID)\n ->orderBy('channel') \n ->get();\n\n return $channels;\n }", "public function getPermissions(): array\n {\n return $this->permissions;\n }", "public function getPermissions ($user_id = null) {\n\t\tif (!isset($user_id)) {\n\t\t\t$user_id = $this->user_id;\n\t\t}\n\n\t\t$return = array();\n\t\tforeach ($this->modes as $mode) {\n\t\t\t$return[$mode] = $this->controller->Acl->check(array('model' => 'User', 'foreign_key' => $user_id),\n\t\t\t\t\t\t\t\t\t'controllers/' . $this->controller->name,\n\t\t\t\t\t\t\t\t\t$mode);\n\t\t}\n\n\t\treturn $return;\n\t}", "public function permissions() {\n return $this->permissions;\n }", "public abstract function getUserPermissions($userId);", "public function getAccessPermisions();", "public function getPermissions(): Permissions\n {\n return $this->permissions;\n }", "public function getPermissionsAttribute()\n {\n return $this->rbacManager()->getUserPermissions($this->getKey());\n }", "public function getPermissions() {\n return $this->permissions;\n }", "public function get_permissions() {\n\t\treturn $this->area->get_permissions ( $this->path );\n\t}", "public function getChannel();", "public function getChannel();", "public function getChannel();", "public function getChannel();", "protected function getPermissions()\n {\n return array();\n }", "public static function getAvailablePermission()\n {\n return [\n 'users-listUser'\n ];\n }", "public function getEvaluatePermissions() {}", "function getPermissions(&$record){\n $auth =& Dataface_AuthenticationTool::getInstance();\n $user =& $auth->getLoggedInUser();\n if ( !isset($user) ) return Dataface_PermissionsTool::NO_ACCESS();\n // if the user is null then nobody is logged in... no access.\n // This will force a login prompt.\n $role = $user->val('use_role');\n return Dataface_PermissionsTool::getRolePermissions($role);\n }", "public function listPermissions($package = null);", "public function getChannelMembers($appId, string $channel): PromiseInterface;", "public function getUserPermissionList()\n {\n try {\n $userPermissionList = collect($this->UserspermissionRepositories->getUserPermissionList())->toArray();\n return $userPermissionList;\n } catch (Exception $e) {\n return $this->doErrorFormat($e);\n }\n }", "public function getPermissions($role);", "public static function getCurrentUserPermissions()\n {\n $user = \\Auth::user();\n\n $assignedPermissions = [];\n foreach ($user->permissions as $permission) {\n $assignedPermissions[] = $permission->name;\n }\n foreach ($user->roles as $role) {\n foreach ($role->permissions as $permission) {\n if (!in_array($permission->name, $assignedPermissions)) {\n $assignedPermissions[] = $permission->name;\n }\n }\n }\n return $assignedPermissions;\n }" ]
[ "0.73796403", "0.6919773", "0.6919773", "0.6919773", "0.6919773", "0.6919773", "0.6630737", "0.6611222", "0.6548014", "0.6548014", "0.6534926", "0.6513412", "0.65025085", "0.64989847", "0.64959127", "0.6448332", "0.6438304", "0.6417366", "0.64079523", "0.6369564", "0.63382983", "0.632661", "0.62829053", "0.62819505", "0.62772757", "0.6263067", "0.6255945", "0.6234669", "0.62217146", "0.621907", "0.61895776", "0.6187841", "0.61834973", "0.6164263", "0.6164263", "0.61603063", "0.6142074", "0.61388", "0.613566", "0.6115874", "0.6115874", "0.6115493", "0.61148566", "0.61130327", "0.610724", "0.6105749", "0.60881966", "0.60819435", "0.6081604", "0.60698336", "0.6047538", "0.60397214", "0.60381883", "0.60353446", "0.60342544", "0.6031362", "0.6031362", "0.6031362", "0.6031362", "0.6031362", "0.6027049", "0.6023732", "0.6021566", "0.6013834", "0.6006697", "0.6006697", "0.6006697", "0.6006697", "0.6006697", "0.6006697", "0.6006697", "0.5999817", "0.5998544", "0.59933573", "0.59788847", "0.5970754", "0.5969981", "0.596039", "0.5948807", "0.59371036", "0.5933374", "0.59250873", "0.5921193", "0.59147304", "0.59047216", "0.59031105", "0.58988106", "0.5898077", "0.5898077", "0.5898077", "0.5898077", "0.5891736", "0.5890065", "0.5886549", "0.58848184", "0.58784574", "0.58780956", "0.5868334", "0.5864367", "0.58571535" ]
0.7279114
1
=============================================================================================== SECTION: Player.permissions DataHandler definitions
=============================================================================================== ОТДЕЛ: Player.permissions DataHandler определения
function handle_player_build_permissions_handler( $name, $player, $ds ) { $details = array ( "key" => "permission" , "post_processor" => Callback::for_method($this, "fix_permission_type") , "load_filter" => Callback::for_method($this, "filter_out_stale_permissions") ); return $player->build_handler_from_table($name, "UserPermissionData", $details, $this->get_ds($ds)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function definePermissions();", "public function permissions();", "public function permissions();", "public function permissions();", "public function permissions();", "public function permissions();", "public function permission();", "protected function initPermissions() {}", "protected function initPermissions() {}", "public function definePermissions(): array;", "public function setPermissions()\n\t{\n\n\t}", "abstract protected function updatePermission();", "public function getPermissions();", "public function getPermissions();", "public function getPermissions();", "public function getPermissions();", "public function getPermissions();", "public function field_permissions()\n {\n $this->field_can_comment();\n $this->field_can_delete();\n $this->field_can_dislike();\n $this->field_can_edit();\n $this->field_can_like();\n $this->field_can_share();\n $this->field_can_view();\n $this->field_can_view_user_disliked();\n }", "public function setPermissions($permissions);", "abstract public static function getPermissions(): array;", "public static function get_permissions() {\n\t\treturn self::$permissions;\n\t}", "public function get_permissions() {\n\t\treturn $this->permissions;\n }", "public function getPermission();", "public function getUserPermissions();", "public function setPermissions (\n\t)\t\t\t\t\t// RETURNS <void>\n\t\n\t// $social->setPermissions();\n\t{\n\t\t$clearance = 0;\n\t\t\n\t\t// If you own the page, all access is granted\n\t\tif(Me::$id == $this->uniID)\n\t\t{\n\t\t\t$clearance = 10;\n\t\t}\n\t\t\n\t\t// Pull your clearance with this user\n\t\telse\n\t\t{\n\t\t\t$clearance = AppFriends::getClearance(Me::$id, $this->uniID);\n\t\t}\n\t\t\n\t\t// Check if you're a moderator or staff member\n\t\tif(Me::$clearance >= 6)\n\t\t{\n\t\t\t$clearance = max(Me::$clearance, $clearance);\n\t\t}\n\t\t\n\t\t// Set the access levels\n\t\t$this->clearance = $clearance;\n\t\t$this->canAccess = $this->data['perm_access'] <= $clearance ? true : false;\n\t\t$this->canPost = $this->data['perm_post'] <= $clearance && $this->uniID > 0 ? true : false;\n\t\t$this->canComment = $this->data['perm_comment'] <= $clearance && $this->uniID > 0 ? true : false;\n\t}", "public abstract function getAllPermissions();", "public function allPermissions();", "public function allPermissions();", "public function permissions(): array;", "public function getPermissions()\n {\n return $this->permissions;\n }", "public function getPermissions()\n {\n return $this->permissions;\n }", "protected function getPermissions()\n {\n return array();\n }", "public static function getPermissions(): array;", "public function permissions ()\n {\n $users = $this->usersTable->find('id',$_GET['id']);\n $reflected = new \\ReflectionClass('\\Rental\\Entities\\Admin');\n $constants = $reflected->getConstants();\n\n return [\n 'template' => 'admin/permissions.php',\n 'title' => 'Edit Permissions',\n 'class' => 'admin',\n 'variables' => [\n 'users' => $users,\n 'permissions' => $constants,\n ]\n ];\n }", "private function __setPermissions() {\n\n\t\t// permissao para adicionar\n\t\tif ( !$this->permissoes_lib->hasPermission( 'criar', $this->_routine ) ) {\n\t\t\t$this->_crud->unset_add();\n\t\t}\n\n\t\t// permissao para adicionar\n\t\tif ( !$this->permissoes_lib->hasPermission( 'ver', $this->_routine ) ) {\n\t\t\t$this->_crud->unset_read();\n\t\t}\n\n\t\t// permissao para adicionar\n\t\tif ( !$this->permissoes_lib->hasPermission( 'editar', $this->_routine ) ) {\n\t\t\t$this->_crud->unset_edit();\n\t\t}\n\n\t\t// permissao para adicionar\n\t\tif ( !$this->permissoes_lib->hasPermission( 'excluir', $this->_routine ) ) {\n\t\t\t$this->_crud->unset_delete();\n\t\t}\n\t}", "private function loadPermissions()\n {\n if (!$this->loaded) {\n return false;\n }\n\n $permissions = [\n '^restfull\\|endpoint\\|([0-9])*$',\n '^restfull\\|another-endpoint\\|([0-9]*|theAction)?$',\n '^\\|the\\-page\\|$',\n ];\n\n $this->permissions = $permissions;\n }", "public function getPermissions(): array;", "public function getPermissions ()\n {\n return $this->permissions;\n }", "function apply_permissions()\n {\n \n $id = cleanID($_POST[\"id\"]);\n \n $json = new StdClass;\n $json->error = 0;\n\n try {\n\n // TODO: Make this check the owner\n // - currently the dropdown will be hidden from non-owners but\n // that won't stop people posting directly to this script to\n // unlock a page\n // - the ajax call apparently doesn't have access to $_SESSION\n // from which to determine the user... no access to $INFO\n // global either... wtf...?\n // Don't let anyone else set permissions\n // if ( !$this->_user_is_owner() )\n // throw new Exception(\"You don't own this page\");\n\n // Check if the simpleperm value was given in the request\n if ( !isset( $_POST['level'] ) )\n throw new Exception(\"Permission data not set\");\n \n $json->id = $id;\n\n // get the metadata and make it output with the json\n $meta = p_get_metadata( $id, self::META_NAME);\n $json->old_level = $meta[\"level\"];\n $json->old_owner = $meta[\"owner\"];\n \n // Set the meta key\n $meta[\"level\"] = $_POST[\"level\"];\n\n // Save the metadata\n if ( !p_set_metadata( $id, array(self::META_NAME => $meta) ) )\n throw new Exception(\"Saving metadata failed\");\n // switch ( $_POST['level'] )\n // {\n // case self::LEVEL_PRIVATE:\n // $this->_make_page_private();\n // break;\n // case self::LEVEL_PUBLIC_R:\n // $this->_make_page_public_r();\n // break;\n // case self::LEVEL_PUBLIC_RW:\n // $this->_make_page_public_rw();\n // break;\n // default:\n // throw new Exception(\"Could not determine the permission required\");\n // break;\n // }\n\n // Get the metadata to check it saved\n $new_meta = p_get_metadata( $id, self::META_NAME );\n $json->level = $new_meta[\"level\"];\n $json->owner = $new_meta[\"owner\"];\n\n // did it save?\n if ( $_POST[\"level\"] != $new_meta[\"level\"] )\n throw new Exception(\"The level was not set for $id... {$_POST[\"level\"]} was given but the level is at {$data[\"level\"]}\");\n\n } catch ( Exception $e ) {\n\n // ...no :(\n $json->error = 1;\n $json->message = \"There was a problem setting the permissions: \".$e->getMessage();\n }\n \n echo json_encode($json);\n }", "public function addPermissions($permissions);", "public function checkPermissions()\n {\n }", "public function permissions(){\n\t\treturn $this->permissions;\n\t}", "public function getAvailablePermissions();", "public function getAvailablePermissions();", "public function permissions() {\n $storage = $this->entityTypeManager->getStorage('graphql_server');\n /** @var \\Drupal\\graphql\\Entity\\ServerInterface[] $servers */\n $servers = $storage->loadMultiple();\n $permissions = [];\n\n foreach ($servers as $id => $server) {\n $params = ['%name' => $server->label()];\n\n $permissions[\"execute $id arbitrary graphql requests\"] = [\n 'title' => $this->t('%name: Execute arbitrary requests', $params),\n 'description' => $this->t('Allows users to execute arbitrary requests on the %name endpoint.', $params),\n ];\n\n $permissions[\"execute $id persisted graphql requests\"] = [\n 'title' => $this->t('%name: Execute persisted requests', $params),\n 'description' => $this->t('Allows users to execute persisted requests on the %name endpoint.', $params),\n ];\n\n $permissions[\"use $id graphql explorer\"] = [\n 'title' => $this->t('%name: Use explorer', $params),\n 'description' => $this->t('Allows users use the explorer interface.', $params),\n ];\n\n $permissions[\"use $id graphql voyager\"] = [\n 'title' => $this->t('%name: Use voyager', $params),\n 'description' => $this->t('Allows users to use the voyager interface.', $params),\n ];\n }\n\n return $permissions;\n }", "public function allows($permission, array $context = []);", "function eZObjectPermission( )\r\n {\r\n }", "function check_permissions($permissions, $id1 = 0, $id2 = 0, $id3 = 0)\n{\n\tif (!is_permitted($permissions, $id1, $id2, $id3))\n\t{\n\t\tno_permission();\n\t}\n}", "public function getPermissions() {\r\n\t\treturn $this->permissionsArray;\r\n\t}", "public function getAllPermissions()\n\t{\n\t\t// General\n\t\t// ---------------------------------------------------------------------\n\n\t\t$general = array(\n\t\t\t'accessSiteWhenSystemIsOff' => array(\n\t\t\t\t'label' => Craft::t('Access the site when the system is off')\n\t\t\t),\n\t\t\t'accessCp' => array(\n\t\t\t\t'label' => Craft::t('Access the CP'),\n\t\t\t\t'nested' => array(\n\t\t\t\t\t'accessCpWhenSystemIsOff' => array(\n\t\t\t\t\t\t'label' => Craft::t('Access the CP when the system is off')\n\t\t\t\t\t),\n\t\t\t\t\t'performUpdates' => array(\n\t\t\t\t\t\t'label' => Craft::t('Perform Craft CMS and plugin updates')\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t),\n\t\t);\n\n\t\tforeach (craft()->plugins->getPlugins() as $plugin)\n\t\t{\n\t\t\tif ($plugin->hasCpSection())\n\t\t\t{\n\t\t\t\t$general['accessCp']['nested']['accessPlugin-'.$plugin->getClassHandle()] = array(\n\t\t\t\t\t'label' => Craft::t('Access {plugin}', array('plugin' => $plugin->getName()))\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$permissions[Craft::t('General')] = $general;\n\n\t\t// Users\n\t\t// ---------------------------------------------------------------------\n\n\t\tif (craft()->getEdition() == Craft::Pro)\n\t\t{\n\t\t\t$permissions[Craft::t('Users')] = array(\n\t\t\t\t'editUsers' => array(\n\t\t\t\t\t'label' => Craft::t('Edit users'),\n\t\t\t\t\t'nested' => array(\n\t\t\t\t\t\t'registerUsers' => array(\n\t\t\t\t\t\t\t'label' => Craft::t('Register users')\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'assignUserPermissions' => array(\n\t\t\t\t\t\t\t'label' => Craft::t('Assign user groups and permissions')\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'administrateUsers' => array(\n\t\t\t\t\t\t\t'label' => Craft::t('Administrate users'),\n\t\t\t\t\t\t\t'nested' => array(\n\t\t\t\t\t\t\t\t'changeUserEmails' => array(\n\t\t\t\t\t\t\t\t\t'label' => Craft::t('Change users’ emails')\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'deleteUsers' => array(\n\t\t\t\t\t'label' => Craft::t('Delete users')\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\t// Locales\n\t\t// ---------------------------------------------------------------------\n\n\t\tif (craft()->isLocalized())\n\t\t{\n\t\t\t$label = Craft::t('Locales');\n\t\t\t$locales = craft()->i18n->getSiteLocales();\n\n\t\t\tforeach ($locales as $locale)\n\t\t\t{\n\t\t\t\t$permissions[$label]['editLocale:'.$locale->getId()] = array(\n\t\t\t\t\t'label' => $locale->getName()\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Entries\n\t\t// ---------------------------------------------------------------------\n\n\t\t$sections = craft()->sections->getAllSections();\n\n\t\tforeach ($sections as $section)\n\t\t{\n\t\t\t$label = Craft::t('Section - {section}', array('section' => Craft::t($section->name)));\n\n\t\t\tif ($section->type == SectionType::Single)\n\t\t\t{\n\t\t\t\t$permissions[$label] = $this->_getSingleEntryPermissions($section);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$permissions[$label] = $this->_getEntryPermissions($section);\n\t\t\t}\n\t\t}\n\n\t\t// Global sets\n\t\t// ---------------------------------------------------------------------\n\n\t\t$globalSets = craft()->globals->getAllSets();\n\n\t\tif ($globalSets)\n\t\t{\n\t\t\t$permissions[Craft::t('Global Sets')] = $this->_getGlobalSetPermissions($globalSets);\n\t\t}\n\n\t\t// Categories\n\t\t// ---------------------------------------------------------------------\n\n\t\t$categoryGroups = craft()->categories->getAllGroups();\n\n\t\tif ($categoryGroups)\n\t\t{\n\t\t\t$permissions[Craft::t('Categories')] = $this->_getCategoryGroupPermissions($categoryGroups);\n\t\t}\n\n\t\t// Asset sources\n\t\t// ---------------------------------------------------------------------\n\n\t\t$assetSources = craft()->assetSources->getAllSources();\n\n\t\tforeach ($assetSources as $source)\n\t\t{\n\t\t\t$label = Craft::t('Asset Source - {source}', array('source' => Craft::t($source->name)));\n\t\t\t$permissions[$label] = $this->_getAssetSourcePermissions($source->id);\n\t\t}\n\n\t\t// Plugins\n\t\t// ---------------------------------------------------------------------\n\n\t\tforeach (craft()->plugins->call('registerUserPermissions') as $pluginHandle => $pluginPermissions)\n\t\t{\n\t\t\t$plugin = craft()->plugins->getPlugin($pluginHandle);\n\t\t\t$permissions[$plugin->getName()] = $pluginPermissions;\n\t\t}\n\n\t\treturn $permissions;\n\t}", "public function registerPermissions()\n {\n return [\n\n ];\n }", "function add_permissions()\n {\n\n // set groupID\n $groupID = 1;\n\n // example of how you would add permissions \n $this->permission->add_permissions($groupID);\n\n }", "public function getPermissions()\n {\n return $this->permissions;\n }", "public function getPermissions()\n {\n return $this->permissions;\n }", "public function getPermissions()\n {\n return $this->permissions;\n }", "public function getPermissions()\n {\n return $this->permissions;\n }", "public function getPermissions()\n {\n return $this->permissions;\n }", "public function getPermissions()\n {\n return $this->permissions;\n }", "public function getPermissions()\n {\n return $this->permissions;\n }", "function permissions_adminapi_inc($args)\n{\n // Get arguments from argument array\n extract($args);\n\n // Security check (if not ADMIN, we wouldn't be here.)\n\t// security check moved until we have the required variables\n if (!pnSecAuthAction(0, 'Permissions::', \"$type::$pid\", ACCESS_ADMIN)) {\n pnSessionSetVar('errormsg', _MODULENOAUTH);\n return false;\n }\n\n // Argument check\n if ((!isset($type)) ||\n (!isset($pid))) {\n pnSessionSetVar('errormsg', _MODARGSERROR);\n return false;\n }\n\n // Work out which tables to operate against, and\n // various other bits and pieces\n $dbconn =& pnDBGetConn(true);\n $pntable =& pnDBGetTables();\n if ($type == 'user') {\n $permtable = $pntable['user_perms'];\n $permcolumn = &$pntable['user_perms_column'];\n $permwhere = '';\n } else {\n $permtable = $pntable['group_perms'];\n $permcolumn = &$pntable['group_perms_column'];\n \t// MMaes, 2003-06-23; Filter-view\n if (!is_null($permgrp) && ($permgrp != _PNPERMS_ALL)) {\n \t$permwhere = \" AND ($permcolumn[gid]=\"._PNPERMS_ALL.\" OR $permcolumn[gid]='\".pnVarPrepForStore($permgrp).\"')\";\n \t$showpartly = true;\n } else {\n \t$permwhere = '';\n \t$showpartly = false;\n }\n }\n\n // Get info on current perm\n $query = \"SELECT $permcolumn[sequence]\n FROM $permtable\n WHERE $permcolumn[pid] = '\" . (int)pnVarPrepForStore($pid) . \"'\";\n $result =& $dbconn->Execute($query);\n if ($result->EOF) {\n pnSessionSetVar('errormsg', _PERM_DECINCERR_NOID.$pid);\n return false;\n }\n list($seq) = $result->fields;\n $result->Close();\n\n if ($seq != 1) {\n $altseq = $seq-1;\n // Get info on displaced perm\n // MMaes, 2003-06-23; Filter-view: added extra check to select\n $query = \"SELECT $permcolumn[pid]\n FROM $permtable\n WHERE $permcolumn[sequence] = '\" . (int)pnVarPrepForStore($altseq) . \"' $permwhere\";\n if (isset($dbg)) $dbg->msg($query);\n $result =& $dbconn->Execute($query);\n if ($result->EOF) {\n \tif ($showpartly) {\n\t \t// MMaes, 2003-06-23; Filter-view\n \t\t// Changing the sequence by moving while in partial view may only be done if there\n \t\t// are no invisible permissions inbetween that might be affected by the move.\n\t pnSessionSetVar('errormsg', _PERM_DECINCERR_NOSWAPPART);\n \t} else {\n\t pnSessionSetVar('errormsg', _PERM_INCERR_NOSWAP);\n\t }\n return false;\n }\n list($altpid) = $result->fields;\n $result->Close();\n\n // Swap sequence numbers\n $query = \"UPDATE $permtable\n SET $permcolumn[sequence] = '\" . (int)pnVarPrepForStore($seq) . \"'\n WHERE $permcolumn[pid] = '\" . (int)pnVarPrepForStore($altpid) . \"'\";\n $dbconn->Execute($query);\n $query = \"UPDATE $permtable\n SET $permcolumn[sequence] = '\" . (int)pnVarPrepForStore($altseq) . \"'\n WHERE $permcolumn[pid] = '\" . (int)pnVarPrepForStore($pid) . \"'\";\n $dbconn->Execute($query);\n }\n\n return true;\n}", "public function setPermissions($var)\n {\n GPBUtil::checkString($var, True);\n $this->permissions = $var;\n\n return $this;\n }", "function build_permissions()\n\t{\n\t\t//-----------------------------------------\n\t\t// Polls\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->can_vote = intval( $this->ipsclass->member['g_vote_polls'] );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Topic rating: Rating\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $this->ipsclass->member['id'] )\n\t\t{\n\t\t\t$this->can_rate = intval( $this->ipsclass->member['g_topic_rate_setting'] );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->can_rate = 0;\n\t\t}\n\t}", "public function permissions()\n {\n return [];\n }", "public function & GetPermissions() {\n\t\treturn $this->permissions;\n\t}", "abstract protected function createPermission();", "public function registerPermissions()\n {\n return [];\n }", "public function registerPermissions()\n {\n return [];\n }", "public function getPermissions() {\n return $this->permissions;\n }", "public function getAccountDataModificationPermission();", "abstract static protected function requestAllowed($permissionData = null);", "public function getPermissions()\r\n {\r\n return $this->perms;\r\n }", "function own_user_role_grant_permissions($rid, $permissions){\n foreach($permissions as $permission){\n db_insert('role_permission')->fields(array(\n 'rid' => $rid, \n 'permission' => $permission,\n 'module' => 'filter'\n ))->execute();\n }\n}", "public function getPermissions() {\n return @$this->attributes['permissions'];\n }", "protected function editLockPermissions() {}", "function save_permissions() {\n\t\t\t$sMsg = -1; \n\t\t\t\n\t\t\tif(isset($_SESSION[\"admin_user\"]))\n\t\t\t{\n\t\t\t\tif(isset($_REQUEST))\n\t\t\t\t{\t\t\t\n\t\t\t\t\t$userID \t\t= $_REQUEST['usertype'];\n\t\t\t\t\t$contentID \t\t= $_REQUEST['contenttype'];\n\t\t\t\t\t$capabilityID \t= $_REQUEST['capabilitytype'];\n\t\t\t\t\t$permission \t= $_REQUEST['permission'];\n\t\t\t\t\n\t\t\t\t\tif($permission=='Y'||$permission=='N' || $permission=='N/A')\n\t\t\t\t\t{\n\t\t\t\t\t\tif($this->oModel->saveUserInfo($userID,$contentID, $capabilityID,$permission))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$sMsg = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\t\t\t\t\t\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$sMsg = 0;\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\telse\n\t\t\t\t{\t\t\t\n\t\t\t\t\t$userID = 2; // Administrator\t\t\t\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\techo $sMsg;\n\t\t\texit();\n\t\t\t\n\t\t\t/*\n\t\t\t$userType \t\t= $this->oModel->getUserTypeInfo();\t\t\t\n\t\t\t$capabilityType = $this->oModel->getCapabilityInfo();\n\t\t\t$contentData \t= $this->oModel->getContentData();\n\t\t\t\n\t\t\t\n\t\t\t$this->oView->sErrorMsg \t\t= $sMsg;\t\t\t\n\t\t\t$this->oView->userType \t\t\t= $userType;\n\t\t\t$this->oView->capabilityType \t= $capabilityType;\t\t\t\n\t\t\t$this->oView->contentData \t\t= $contentData;\n\t\t\t$this->oView->userID \t\t\t= $userID;\n\t\t\t\n\t\t\t## fetching user type\t\t\t\n\t\t\t$this->oView->edit_permissions();\n\t\t\t*/\n\t\t}", "function permissions()\n {\n return shield()->permissions();\n }", "public function setPermissions($permissions) {\n $this->permissions = $permissions;\n }", "public function getPermissions(): array\n {\n return $this->permissions;\n }", "function permissions_adminapi_create($args)\n{\n // Get arguments from argument array\n extract($args);\n\n // Security check (if not ADMIN, we wouldn't be here.)\n\t// security check moved until we have the required variables\n // $pid changes to $id as this is the form item name\n if (!pnSecAuthAction(0, 'Permissions::', \"$type::$id\", ACCESS_ADMIN)) {\n pnSessionSetVar('errormsg', _MODULENOAUTH);\n return false;\n }\n\n // Argument check\n\t// MMaes, 2003-06-20: Insert Capability: added $insseq\n if ((!isset($type)) ||\n (!isset($realm)) ||\n (!isset($id)) ||\n (!isset($component)) ||\n (!isset($instance)) ||\n (!isset($level)) ||\n (!isset($insseq))) {\n pnSessionSetVar('errormsg', _MODARGSERROR);\n return false;\n }\n\n // Work out which tables to operate against\n $dbconn =& pnDBGetConn(true);\n $pntable =& pnDBGetTables();\n if ($type == \"user\") {\n $permtable = $pntable['user_perms'];\n $permcolumn = &$pntable['user_perms_column'];\n $idfield = $permcolumn['uid'];\n $view = \"secviewuserperms\";\n } else {\n $permtable = $pntable['group_perms'];\n $permcolumn = &$pntable['group_perms_column'];\n $idfield = $permcolumn['gid'];\n $view = \"secviewgroupperms\";\n }\n\n\t// MMaes, 2003-06-20: Insert Capability\n\tif ($insseq == -1) {\n\t $maxseq = permissions_adminapi_maxsequence(array('table' => $permtable,\n\t 'column' => $permcolumn['sequence']));\n\t $newseq = $maxseq + 1;\n\t} else {\n\t // Increase sequence numbers\n\t $query = \"UPDATE $permtable\n\t SET $permcolumn[sequence] = $permcolumn[sequence] + 1\n\t WHERE $permcolumn[sequence] >= '\" . (int)pnVarPrepForStore($insseq) . \"'\";\n\t $dbconn->Execute($query);\n\t if ($dbconn->ErrorNo() != 0) {\n\t pnSessionSetVar('errormsg', _PERM_INSERR);\n\t return false;\n\t }\n\t\t$newseq = $insseq;\n\t}\n\n $nextId = $dbconn->GenId($permtable);\n\n $query = \"INSERT INTO $permtable\n ($permcolumn[pid],\n $permcolumn[realm],\n $idfield,\n $permcolumn[sequence],\n $permcolumn[component],\n $permcolumn[instance],\n $permcolumn[level],\n $permcolumn[bond])\n VALUES\n ('\" . (int)pnVarPrepForStore($nextId) . \"',\n '\" . (int)pnVarPrepForStore($realm) . \"',\n '\" . (int)pnVarPrepForStore($id) . \"',\n '\" . (int)pnVarPrepForStore($newseq) . \"',\n '\" . pnVarPrepForStore($component) . \"',\n '\" . pnVarPrepForStore($instance) . \"',\n '\" . (int)pnVarPrepForStore($level) . \"',\n 0)\";\n $dbconn->Execute($query);\n\n if ($dbconn->ErrorNo() != 0) {\n pnSessionSetVar('errormsg', \"Error adding $type permission\");\n return false;\n }\n\n\t// MMaes, 2003-06-20: Clean-up\n permissions_adminapi_resequence(array('type' => $type));\n\n return true;\n}", "public function loadPermissions()\n {\n if (count($this->getRoles()) < 1)\n {\n $this->permissions = array();\n return;\n }\n\n $db = Codeli::getInstance()->getDB();\n\n $rids = implode(\", \", array_keys($this->getRoles()));\n $rs = $db->query(\"SELECT permission FROM \" . SystemTables::ROLE_PERMISSION . \" WHERE rid IN ($rids)\");\n\n while ($perm = $db->fetchObject($rs))\n {\n $this->permissions[$perm->permission] = $perm->permission;\n }\n }", "public function generatePermissionList() {}", "protected function fixPermission() {}", "static private function check_permissions() {\n\t\t\tif ( isset( $_REQUEST['page'] ) && in_array( $_REQUEST['page'], array( 'fl-builder-settings', 'fl-builder-multisite-settings' ) ) ) {\n\n\t\t\t\t$wp_upload_dir = wp_upload_dir( null, false );\n\t\t\t\t$bb_upload_dir = FLBuilderModel::get_upload_dir();\n\n\t\t\t\tif ( ! fl_builder_filesystem()->is_writable( $wp_upload_dir['basedir'] ) || ! fl_builder_filesystem()->is_writable( $bb_upload_dir['path'] ) ) {\n\t\t\t\t\tadd_action( 'admin_notices', __CLASS__ . '::permissions_admin_notice' );\n\t\t\t\t\tadd_action( 'network_admin_notices', __CLASS__ . '::permissions_admin_notice' );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function get_permissions() {\n\t\treturn $this->area->get_permissions ( $this->path );\n\t}", "public function listPermissions()\n {\n if ($this->permissionCache !== false) {\n return $this->permissionCache;\n }\n\n /*\n * Load module items\n */\n foreach ($this->callbacks as $callback) {\n $callback($this);\n }\n\n /*\n * Sort permission items\n */\n usort(\n $this->permissions,\n function ($a, $b) {\n if ($a->order == $b->order) {\n return 0;\n }\n\n return $a->order > $b->order ? 1 : -1;\n }\n );\n\n return $this->permissionCache = $this->permissions;\n }", "public function permissions() {\n\t\treturn array(\n\t\t\t'system' => array(\n\t\t\t\t'view',\n\t\t\t\t'add',\n\t\t\t\t'edit',\n\t\t\t\t'delete'\n\t\t\t)\n\t\t);\n\t}", "function set_specific_permissions()\n\t{\n\t\trequire_all_lang();\n\n\t\t$GLOBALS['HELPER_PANEL_PIC']='pagepics/privileges';\n\t\t$GLOBALS['HELPER_PANEL_TUTORIAL']='tut_permissions';\n\n\t\tif ((count($_POST)==0) && (strtolower(ocp_srv('REQUEST_METHOD'))!='post')) warn_exit(do_lang_tempcode('PERMISSION_TRAGEDY_PREVENTED'));\n\n\t\t$title=get_page_title('SPECIFIC_PERMISSIONS');\n\n\t\t$p_section=get_param('id');\n\t\t$_sections=$this->_get_ordered_sections();\n\t\t$array_keys=array_keys($_sections);\n\t\t$next_section=$array_keys[0];\n\t\t$counter=0;\n\t\tforeach ($_sections as $s)\n\t\t{\n\t\t\tif (is_null($s)) continue;\n\n\t\t\tif ($counter>array_search($p_section,$array_keys))\n\t\t\t{\n\t\t\t\t$next_section=$s['p_section'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$counter++;\n\t\t}\n\n\t\t$groups=$GLOBALS['FORUM_DRIVER']->get_usergroup_list(false,true);\n\t\t$permissions=collapse_1d_complexity('the_name',$GLOBALS['SITE_DB']->query_select('sp_list',array('the_name'),array('p_section'=>$p_section)));\n\t\t$admin_groups=$GLOBALS['FORUM_DRIVER']->get_super_admin_groups();\n\t\tforeach ($permissions as $permission)\n\t\t{\n\t\t\tforeach (array_keys($groups) as $id)\n\t\t\t{\n\t\t\t\tif (in_array($id,$admin_groups)) continue;\n\n\t\t\t\t$val=post_param_integer($permission.'__'.strval($id),0);\n\n\t\t\t\t// Delete to cleanup\n\t\t\t\t$GLOBALS['SITE_DB']->query_delete('gsp',array('specific_permission'=>$permission,'group_id'=>$id,'the_page'=>'','module_the_name'=>'','category_name'=>''),'',1);\n\n\t\t\t\tif ($val==1)\n\t\t\t\t{\n\t\t\t\t\t$GLOBALS['SITE_DB']->query_insert('gsp',array('specific_permission'=>$permission,'group_id'=>$id,'the_page'=>'','module_the_name'=>'','category_name'=>'','the_value'=>1));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbreadcrumb_set_parents(array(array('_SELF:_SELF:specific',do_lang_tempcode('CHOOSE'))));\n\n\t\tdecache('main_sitemap');\n\t\t$GLOBALS['SITE_DB']->query_delete('cache');\n\t\tif (function_exists('persistant_cache_empty')) persistant_cache_empty();\n\n\t\t// Show it worked / Refresh\n\t\t$url=build_url(array('page'=>'_SELF','type'=>'specific','id'=>$next_section),'_SELF');\n\t\treturn redirect_screen($title,$url,do_lang_tempcode('SUCCESS_NOW_NEXT_SCREEN'));\n\t}", "public function permissions()\n {\n return response(array(\n 'error' => false,\n 'msg' => 'User permissions',\n 'data' => array(\n 'Role' => 'Admin',\n 'Read' => 'You can see all users and your own',\n 'Update' => 'You can only update your own information and content',\n 'Delete' => 'You can delete any user',\n 'Create' => 'You can create users and content'\n )\n ), 200);\n }", "function verify_permissions(&$permissions)\n\t{\n\t\trequire_once(DIR . '/includes/functions_misc.php');\n\t\treturn $permissions = convert_array_to_bits($permissions, $this->registry->bf_misc_moderatorpermissions);\n\t}", "public function setPermissions($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->permissions = $arr;\n\n return $this;\n }", "public function setPermissions($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->permissions = $arr;\n\n return $this;\n }", "function interface_specific_permissions()\n\t{\n\t\trequire_all_lang();\n\t\trequire_code('zones2');\n\n\t\t$title=get_page_title('SPECIFIC_PERMISSIONS');\n\n\t\t$p_section=get_param('id',NULL);\n\t\tif ((is_null($p_section)) || ($p_section==''))\n\t\t{\n\t\t\t$GLOBALS['HELPER_PANEL_PIC']='pagepics/privileges';\n\t\t\t$GLOBALS['HELPER_PANEL_TUTORIAL']='tut_permissions';\n\n\t\t\t$GLOBALS['HELPER_PANEL_PIC']='pagepics/privileges';\n\n\t\t\t$fields=new ocp_tempcode();\n\t\t\trequire_code('form_templates');\n\n\t\t\t$_sections=$this->_get_ordered_sections();\n\t\t\t$sections=new ocp_tempcode();\n\t\t\tforeach ($_sections as $s)\n\t\t\t{\n\t\t\t\tif (is_null($s))\n\t\t\t\t{\n\t\t\t\t\t$sections->attach(form_input_list_entry('',false,'',false,true));\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tif (!is_null($s['trans']))\n\t\t\t\t\t\t$sections->attach(form_input_list_entry($s['p_section'],false,$s['trans']));\n\t\t\t\t}\n\t\t\t}\n\t\t\t$fields->attach(form_input_list(do_lang_tempcode('SECTION'),'','id',$sections,NULL,true));\n\n\t\t\t$post_url=get_self_url(false,false,NULL,false,true);\n\n\t\t\treturn do_template('FORM_SCREEN',array('_GUID'=>'e5d457a49a76706afebc92da3d846e74','GET'=>true,'SKIP_VALIDATION'=>true,'HIDDEN'=>'','SUBMIT_NAME'=>do_lang_tempcode('CHOOSE'),'TITLE'=>$title,'FIELDS'=>$fields,'URL'=>$post_url,'TEXT'=>''));\n\t\t}\n\n\t\t$title=get_page_title('_SPECIFIC_PERMISSIONS',true,array(do_lang_tempcode($p_section)));\n\n\t\t$url=build_url(array('page'=>'_SELF','type'=>'_specific','id'=>$p_section),'_SELF');\n\n\t\t$admin_groups=$GLOBALS['FORUM_DRIVER']->get_super_admin_groups();\n\t\t$moderator_groups=$GLOBALS['FORUM_DRIVER']->get_moderator_groups();\n\t\t$groups=$GLOBALS['FORUM_DRIVER']->get_usergroup_list(false,true);\n\n\t\t$header_cells=$this->_access_header($admin_groups,$groups);\n\n\t\t$cols=new ocp_tempcode();\n\t\tforeach ($groups as $id=>$g_name)\n\t\t{\n\t\t\tif (in_array($id,$admin_groups)) continue;\n\t\t\t$cols->attach(do_template('PERMISSION_COLUMN_SIZER'));\n\t\t}\n\n\t\t// Find all module permission overrides\n\t\t$all_module_overrides=array();\n\t\tforeach (find_all_zones() as $zone)\n\t\t{\n\t\t\t$all_modules=array();\n\t\t\t$all_modules+=find_all_pages($zone,'modules_custom','php',false);\n\t\t\t$all_modules+=find_all_pages($zone,'modules','php',false);\n\n\t\t\tforeach ($all_modules as $module=>$module_type)\n\t\t\t{\n\t\t\t\t$functions=extract_module_functions(zone_black_magic_filterer(get_file_base().'/'.$zone.(($zone=='')?'':'/').'pages/'.$module_type.'/'.$module.'.php'),array('get_sp_overrides'));\n\t\t\t\tif (!is_null($functions[0]))\n\t\t\t\t{\n\t\t\t\t\t$overrides=is_array($functions[0])?call_user_func_array($functions[0][0],$functions[0][1]):eval($functions[0]);\n\t\t\t\t\tforeach (array_keys($overrides) as $override)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!array_key_exists($override,$all_module_overrides)) $all_module_overrides[$override]=array();\n\t\t\t\t\t\t$all_module_overrides[$override][]=$module;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$all_page_permission_overridding=$GLOBALS['SITE_DB']->query_select('gsp',array('the_page','specific_permission'),array('category_name'=>''));\n\n\t\t// Rows (pages)\n\t\t$rows=new ocp_tempcode();\n\t\t$where=array('p_section'=>$p_section); // Added in because it was eating up too much memory\n\t\t$_permissions=collapse_2d_complexity('the_name','p_section',$GLOBALS['SITE_DB']->query_select('sp_list',array('p_section','the_name'),$where,'ORDER BY p_section,the_name'));\n\t\t$access_rows=$GLOBALS['SITE_DB']->query_select('gsp',array('specific_permission','group_id'),array('the_page'=>'','module_the_name'=>'','category_name'=>''));\n\t\t$current_section='';\n\t\t$sections=new ocp_tempcode();\n\t\t$_false=do_template('PERMISSION_CELL',array('_GUID'=>'61aa7fa739e19caa1efb3695a5e2ab5d','CHECKED'=>false,'HUMAN'=>'__human__','NAME'=>'__name__'));\n\t\t$_true=do_template('PERMISSION_CELL',array('_GUID'=>'44a888b40d7a34aed6ed2bf8ff47f1de','CHECKED'=>true,'HUMAN'=>'__human__','NAME'=>'__name__'));\n\t\t$true=$_true->evaluate();\n\t\t$false=$_false->evaluate();\n\n\t\t// Ad-hoc sorting?\n\t\t$orderings=array(\n\t\t\t'submit_low','edit_own_low','edit_low','delete_own_low','delete_low','bypass_validation_low',\n\t\t\t'submit_mid','edit_own_mid','edit_mid','delete_own_mid','delete_mid','bypass_validation_mid',\n\t\t\t'submit_high','edit_own_high','edit_high','delete_own_high','delete_high','bypass_validation_high',\n\t\t\t'submit_cat_low','edit_own_cat_low','edit_cat_low','delete_own_cat_low','delete_cat_low','bypass_cat_validation_low',\n\t\t\t'submit_cat_mid','edit_own_cat_mid','edit_cat_mid','delete_own_cat_mid','delete_cat_mid','bypass_cat_validation_mid',\n\t\t\t'submit_cat_high','edit_own_cat_high','edit_cat_high','delete_own_cat_high','delete_cat_high','bypass_cat_validation_high',\n\t\t);\n\t\t$permissions_first=array();\n\t\tforeach ($orderings as $stub)\n\t\t{\n\t\t\tforeach ($_permissions as $permission=>$section)\n\t\t\t{\n\t\t\t\tif (substr($permission,0,strlen($stub))==$stub)\n\t\t\t\t{\n\t\t\t\t\t$permissions_first[$permission]=$section;\n\t\t\t\t\tunset($_permissions[$permission]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$_permissions=array_merge($permissions_first,$_permissions);\n\n\t\t// Display\n\t\tforeach ($_permissions as $permission=>$section)\n\t\t{\n\t\t\t$permission_text=do_lang('PT_'.$permission,NULL,NULL,NULL,NULL,false);\n\t\t\tif (is_null($permission_text)) continue;\n\n\t\t\tif (($section!=$current_section) && ($current_section!=''))\n\t\t\t{\n\t\t\t\t$sections->attach(do_template('PERMISSION_S_CONFIG_SECTION',array('_GUID'=>'36bc9dfbeb7ee3d91f2a18057cd30551','HEADER_CELLS'=>$header_cells,'SECTION'=>$rows,'CURRENT_SECTION'=>do_lang_tempcode($current_section))));\n\t\t\t\t$rows=new ocp_tempcode();\n\t\t\t}\n\n\t\t\t$cells='';\n\t\t\t$code='';\n\t\t\t$has=true;\n\n\t\t\tforeach ($groups as $id=>$g_name)\n\t\t\t{\n\t\t\t\tif (in_array($id,$admin_groups)) continue;\n\n\t\t\t\t$has_permission=false;\n\t\t\t\tforeach ($access_rows as $access_row)\n\t\t\t\t{\n\t\t\t\t\tif (($access_row['specific_permission']==$permission) && ($access_row['group_id']==$id))\n\t\t\t\t\t{\n\t\t\t\t\t\t$has_permission=true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!$has_permission) $has=false;\n\n\t\t\t\t$cells.=str_replace('__human__',escape_html(addslashes(do_lang('PERMISSION_CELL',$permission_text,$g_name))),str_replace('__name__',$permission.'__'.strval($id),$has_permission?$true:$false));\n\t\t\t\tif (in_array($id,$moderator_groups)) $code.='form.elements[\\''.$permission.'__'.strval($id).'\\'].checked=true;'; else $code.='form.elements[\\''.$permission.'__'.strval($id).'\\'].checked=this.value==\\'+\\';';\n\t\t\t}\n\n\t\t\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($cells);\n\n\t\t\t$tpl_map=array('_GUID'=>'075f8855f0fed36b0d0f9c61108dd3de','HAS'=>$has,'ABBR'=>$permission,'PERMISSION'=>$permission_text,'CELLS'=>$cells,'CODE'=>$code);\n\n\t\t\t// See if any modules can override this\n\t\t\tif (array_key_exists($permission,$all_module_overrides))\n\t\t\t{\n\t\t\t\t$m_list='';\n\t\t\t\t$has_actual_overriding=false;\n\t\t\t\tforeach ($all_module_overrides[$permission] as $module)\n\t\t\t\t{\n\t\t\t\t\t$this_overrides=false;\n\t\t\t\t\tforeach ($all_page_permission_overridding as $po_row)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (($po_row['the_page']==$module) && ($po_row['specific_permission']==$permission))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this_overrides=true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($m_list!='') $m_list.=escape_html(', ');\n\t\t\t\t\tif ($this_overrides)\n\t\t\t\t\t{\n\t\t\t\t\t\t$has_actual_overriding=true;\n\t\t\t\t\t\t$m_list.='<s>'.escape_html($module).'</s>';\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\t$m_list.='<strong>'.escape_html($module).'</strong>';\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($module=='topics')\n\t\t\t\t\t{\n\t\t\t\t\t\t$m_list.=' ('.strtolower(do_lang((strpos($permission,'lowrange')!==false)?'FORUM_POSTS':'FORUM_TOPICS')).')';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (function_exists('ocp_mark_as_escaped')) ocp_mark_as_escaped($m_list);\n\t\t\t\t$tpl_map['DESCRIPTION']=do_lang_tempcode($has_actual_overriding?'SP_USED_IN_SLASHED':'SP_USED_IN',$m_list);\n\t\t\t}\n\n\t\t\t// Render row\n\t\t\t$rows->attach(do_template('PERMISSION_ROW',$tpl_map));\n\n\t\t\t$current_section=$section;\n\t\t}\n\t\t$sections->attach(do_template('PERMISSION_S_CONFIG_SECTION',array('_GUID'=>'c75a07373f54c0fa31d18e360fcf26f6','COLS'=>$cols,'HEADER_CELLS'=>$header_cells,'SECTION'=>$rows,'CURRENT_SECTION'=>do_lang_tempcode($current_section))));\n\n\t\tbreadcrumb_set_parents(array(array('_SELF:_SELF:specific',do_lang_tempcode('CHOOSE'))));\n\n\t\treturn do_template('PERMISSION_S_PERMISSIONS_SCREEN',array('_GUID'=>'11974f0a137266a625991d3611b8e587','TITLE'=>$title,'URL'=>$url,'SECTIONS'=>$sections));\n\t}", "public function getPermissions()\n {\n return $this->perms;\n }", "function request_permission() {\r\n $data= array(\r\n \t_VIEW_RCQ,\r\n _INSERT_RCQ,\r\n _MODIFY_RCQ,\r\n _MANGE_RCQ,\r\n _FULL_MANGE_RCQ\r\n );\r\n return $data;\r\n}", "abstract protected function viewPermission();", "function is_permitted($permissions, $id1 = 0, $id2 = 0, $id3 = 0)\n{\n\tglobal $_profile;\n\t\n\tif (($permissions & PERMISSION_EVERYONE) != 0)\n\t{\n\t\treturn true;\n\t}\n\t\n\tif ($_profile == NULL)\n\t{\n\t\treturn false;\n\t}\n\t\n\tif ($_profile->is_admin())\n\t{\n\t\treturn true;\n\t}\n\t\n\t$club_id = 0;\n\t$league_id = 0;\n\t$owner_id = 0;\n\tif ($permissions & PERMISSION_MASK_CLUB)\n\t{\n\t\t$club_id = $id1;\n\t\tif ($permissions & PERMISSION_MASK_LEAGUE)\n\t\t{\n\t\t\t$league_id = $id2;\n\t\t\tif ($permissions & PERMISSION_MASK_OWNER)\n\t\t\t{\n\t\t\t\t$owner_id = $id3;\n\t\t\t}\n\t\t}\n\t\telse if ($permissions & PERMISSION_MASK_OWNER)\n\t\t{\n\t\t\t$owner_id = $id2;\n\t\t}\n\t}\n\telse if ($permissions & PERMISSION_MASK_LEAGUE)\n\t{\n\t\t$league_id = $id1;\n\t\tif ($permissions & PERMISSION_MASK_OWNER)\n\t\t{\n\t\t\t$owner_id = $id2;\n\t\t}\n\t}\n\telse if ($permissions & PERMISSION_MASK_OWNER)\n\t{\n\t\t$owner_id = $id1;\n\t}\n\t\n\twhile ($permissions)\n\t{\n\t\t$next_perm = ($permissions & ($permissions - 1));\n\t\tswitch ($permissions - $next_perm)\n\t\t{\n\t\t\tcase PERMISSION_USER:\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\tcase PERMISSION_OWNER:\n\t\t\t\tif ($owner_id == $_profile->user_id)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase PERMISSION_CLUB_MEMBER:\n\t\t\t\tif (isset($_profile->clubs[$club_id]))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase PERMISSION_CLUB_REPRESENTATIVE:\n\t\t\t\tif ($_profile->user_club_id == $club_id)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase PERMISSION_CLUB_PLAYER:\n\t\t\t\tif ($_profile->is_club_player($club_id))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase PERMISSION_CLUB_MODERATOR:\n\t\t\t\tif ($_profile->is_club_moder($club_id))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase PERMISSION_CLUB_MANAGER:\n\t\t\t\tif ($_profile->is_club_manager($club_id))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase PERMISSION_LEAGUE_MANAGER:\n\t\t\t\tif ($_profile->is_league_manager($league_id))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\t$permissions = $next_perm;\n\t}\n\treturn false;\n}", "protected function isPermissionCorrect() {}", "public function permissions() {\n return $this->permissions;\n }", "public static function NO_PERMISSIONS() { return 'no-permissions'; }", "function getPermissions($params=array()){\n\t\n\t\t// First let's try to load permissions from the cache\n\t\t$pt =& Dataface_PermissionsTool::getInstance();\n\t\t$params['table'] = $this->tablename;\n\t\tif ( isset($params['record']) ) $record =& $params['record'];\n\t\telse $record = null;\n\t\t$cachedPermissions = $pt->getCachedPermissions($record, $params);\n\t\tif ( isset($cachedPermissions) ) return $cachedPermissions;\n\t\t\n\t\t\n\t\t$delegate =& $this->getDelegate();\n\t\t$app =& Dataface_Application::getInstance();\n\t\t$appDelegate =& $app->getDelegate();\n\t\t$parent =& $this->getParent();\n\t\t\n\t\t$methods = array();\n\t\tif ( isset($params['field']) ){\n\t\t\t$methods[] = array('object'=>&$delegate, 'name'=>$params['field'].'__permissions', 'type'=>'permissions');\n\t\t\t$methods[] = array('object'=>&$delegate, 'name'=>$params['field'].'__roles', 'type'=>'roles');\n\t\t\t$methods[] = array('object'=>&$delegate, 'name'=>'__field__permissions', 'type'=>'permissions');\n\t\t\t$methods[] = array('object'=>&$delegate, 'name'=>'__field__roles', 'type'=>'roles');\n\t\t\tif ( isset($parent) ) $methods[] = array('object'=>&$parent, 'name'=>'getPermissions', 'type'=>'Dataface_Table');\n\t\t\tif ( @$params['nobubble'] ) $methods[] = 'break';\n\n\t\t} else if ( isset($params['relationship']) ){\n\t\t\tif ( isset($params['relationshipmask']) ) $rmask =& $params['relationshipmask'];\n\t\t\telse $rmask = array();\n\t\t\t$methods[] = array('object'=>&$delegate, 'name'=>'rel_'.$params['relationship'].'__permissions', 'type'=>'permissions', 'mask'=>&$rmask);\n\t\t\t$methods[] = array('object'=>&$delegate, 'name'=>'rel_'.$params['relationship'].'__roles', 'type'=>'roles', 'mask'=>&$rmask);\n\t\t\tif ( isset($parent) ) $methods[] = array('object'=>&$parent, 'name'=>'getPermissions', 'type'=>'Dataface_Table');\n\t\t\tif ( @$params['nobubble'] ) $methods[] = 'break';\n\t\t}\n\t\tif ( isset($params['recordmask']) ) $mask =& $params['recordmask'];\n\t\telse $mask = array();\n\t\t$methods[] = array('object'=>&$delegate, 'name'=>'getPermissions', 'type'=>'permissions','mask'=>&$mask);\n\t\t$methods[] = array('object'=>&$delegate, 'name'=>'getRoles', 'type'=>'roles');\n\t\t$methods[] = array('object'=>&$appDelegate, 'name'=>'getPermissions', 'type'=>'permissions', 'mask'=>&$mask);\n\t\t$methods[] = array('object'=>&$appDelegate, 'name'=>'getRoles', 'type'=>'roles', 'mask'=>&$mask);\n\t\tif ( isset($parent) ) $methods[] = array('object'=>&$parent, 'name'=>'getPermissions', 'type'=>'Dataface_Table');\n\t\n\t\t\n\t\tforeach ($methods as $method){\n\t\t\tif ( $method == 'break' ) return null;\n\t\t\t\n\t\t\tif ( isset($method['object']) and method_exists($method['object'], $method['name']) ){\n\t\t\t\t$name = $method['name'];\n\t\t\t\tif ( $method['type'] == 'Dataface_Table'){\n\t\t\t\t\t$res = $method['object']->$name(array_merge($params, array('nobubble'=>1)));\n\t\t\t\t} else {\n\t\t\t\t\t$res = $method['object']->$name($record, $params);\n\t\t\t\t}\n\t\t\t\tif ( $method['type'] == 'roles' ){\n\t\t\t\t\t$res = $this->convertRolesToPermissions($res);\n\t\t\t\t}\n\t\t\t\tif ( is_array($res) ){\n\t\t\t\t\tif ( @$method['mask'] and is_array(@$method['mask']) ) $res = array_merge($method['mask'], $res);\n\t\t\t\t\t$pt->cachePermissions($record, $params, $res);\n\t\t\t\t\treturn $res;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$res = Dataface_PermissionsTool::ALL();\n\t\t$pt->cachePermissions($record,$params,$res);\n\t\treturn $res;\n\t}" ]
[ "0.7308772", "0.70952165", "0.70952165", "0.70952165", "0.70952165", "0.70952165", "0.6750863", "0.67433923", "0.6742012", "0.66267955", "0.65808254", "0.6464779", "0.64644283", "0.64644283", "0.64644283", "0.64644283", "0.64644283", "0.6453384", "0.6450726", "0.6354449", "0.63299567", "0.6299021", "0.6294266", "0.62872094", "0.62571734", "0.6243155", "0.6215384", "0.6215384", "0.62083995", "0.6171273", "0.6171273", "0.6169604", "0.61491877", "0.6138706", "0.61299586", "0.6126717", "0.61215144", "0.6099983", "0.6096792", "0.6081424", "0.60715795", "0.60715455", "0.6051151", "0.6051151", "0.6037413", "0.6029357", "0.60191053", "0.6018114", "0.60172474", "0.6001225", "0.59990096", "0.59982425", "0.5992506", "0.5992506", "0.5992506", "0.5992506", "0.5992506", "0.5992506", "0.5992506", "0.59900516", "0.5982462", "0.59688145", "0.5960844", "0.5960326", "0.5932767", "0.5930267", "0.5930267", "0.59233916", "0.59113204", "0.59087265", "0.58987", "0.58965623", "0.5892965", "0.5878405", "0.5873704", "0.58715904", "0.58696544", "0.5865283", "0.5861395", "0.5859383", "0.5857028", "0.58556056", "0.5847436", "0.58249444", "0.5824183", "0.5823839", "0.5823668", "0.5822115", "0.58124024", "0.5800239", "0.5800239", "0.5795616", "0.57954484", "0.57938755", "0.57907104", "0.5789337", "0.57853043", "0.5777958", "0.57716835", "0.57713723" ]
0.74404025
0
Save state into the session
Сохранить состояние в сессию
public function saveState() { $this->session->set('itkg_consumer.oauth', $this); $this->session->set('itkg_consumer.oauth_values', array( 'secret' => $this->secret, 'state' => $this->state, 'token' => $this->token )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function persistState() {\n\t\t$session = Environment::getSession(\"insertingBook\");\n\t\t$session->setExpiration(1800); // 30 minutes\n\t\t$session[\"state\"] = $this->state;\n\t}", "public function storeState($state){\n\t\t\\Session::set('state',$state);\n\t}", "public function storeGameState()\n {\n $this->session->set('freePositions', $this->freePositions);\n $this->session->set('gameState', $this->gameState);\n }", "private function saveGameState()\n {\n session(['game' => $this->game]);\n }", "protected function _saveToSession()\n {\n }", "protected function storeState($state)\n {\n Session::put($this->getSessionKey(), $state);\n }", "public function saveState()\n {\n $this->getStateService()->setByKey(\n $this->getIdentifier()->getFull(),\n $this->getData()\n );\n }", "public function saveState()\n {\n $this->stateService->setByKey(\n self::IDENTIFIER,\n [\n $this->total,\n $this->status,\n $this->updateRequested\n ]\n );\n }", "protected function _saveState()\n {\n Rx_AppState::set($this->_getStateKey(), $this->_struct, $this->getConfig('private'));\n }", "static function save() {\n\t\t\tsession_start();\n\n\t\t\t$_SESSION['session::user'] = serialize(self::$user);\n\t\t\t$_SESSION['session::storedVars'] = serialize(self::$storedVars);\n\n\t\t\tsession_write_close();\n\t\t}", "public function saveState()\n {\n $this->provider->set('state', $this->state);\n }", "public function StoreInSession(){\n\t\t$_SESSION[$this->key] = $this->data;\n\t}", "public function saveSessionData();", "public function saveToSession() {\r\n\t\t$_SESSION[\"openid\"] = $this->openid;\r\n\t}", "public function save()\n {\n if ($this->enabled) {\n session_write_close();\n }\n }", "private function saveToSession() {\n\t\t\n\t\t\t$mySession =& DMSession::getSession();\n\t\t\t$mySession->set('user', self::$user);\n\t\t\t\n\t\t}", "public function save() {\n\t\t$data = serialize($this->props);\n\t\t$encryptedData = Crypto::encrypt($data, $this->key);\n\t\t$_SESSION[$this->inputName] = base64_encode($encryptedData);\n\t}", "private function saveState()\n\t{\n\t\tif (!$this->saved_super_globals) {\n\t\t\t$this->saved_super_globals = array(\n\t\t\t\t'GLOBALS' => $GLOBALS, \n\t\t\t\t'_ENV' => $_ENV, \n\t\t\t\t'_POST' => $_POST, \n\t\t\t\t'_GET' => $_GET, \n\t\t\t\t'_COOKIE' => $_COOKIE, \n\t\t\t\t'_SERVER' => $_SERVER, \n\t\t\t\t'_FILES' => $_FILES, \n\t\t\t\t'_REQUEST' => $_REQUEST\n\t\t\t);\n\t\t}\n\t\t\n\t\tif (!$this->saved_p) {\n\t\t\t$this->saved_p = $this->p;\n\t\t}\n\t}", "protected function storeState($state)\n {\n Session::put($this->sessionPrefix . 'state', $state);\n }", "private function persistInSession()\n {\n $this->session->set($this->sessionKeyId, $this->encrypt($this->id));\n $this->session->set($this->sessionKeyAuth, $this->isAuthenticated);\n }", "public function save()\n {\n session_write_close();\n }", "public function save()\n {\n session_write_close();\n }", "public function store() { \n \n trace($this, 0, 'STORING COMPLETE SESSION ORDER (AS SERIALIZED OBJECT) TO BROWSER SESSION KEY '.self::SESSION_KEY_NAME);\n tx_pttools_sessionStorageAdapter::getInstance()->store(self::SESSION_KEY_NAME, $this);\n \n }", "public function saveSession()\n {\n }", "public function storeSessionData() {}", "public function storeSessionData() {}", "private function Set() {\n $_SESSION[''.$this->name] = serialize($this->session);\n }", "private function saveState()\n {\n if (!file_exists($this->stateFolder)) {\n mkdir($this->stateFolder, 0700, true);\n }\n file_put_contents($this->stateFolder . '/localstate', $this->currentLocalState);\n file_put_contents($this->stateFolder . '/remotestate', $this->currentRemoteState);\n }", "private function write()\n {\n $_SESSION[self::SESSKEY] = $this->_data;\n session_write_close();\n $this->_dirty = false;\n }", "protected function save(): void {\n session()->put(\"invoice\", $this->invoice);\n session()->save();\n }", "public function save()\n {\n $_SESSION['reservation'] = serialize($this);\n }", "public function saveDataToSession()\n {\n $data = $this->getData();\n $data = Sanitizer::remove_from_data_array($data);\n $this->setSessionData($data);\n }", "public function saveDataToSession(){\n\t\t$data = $this->getData();\n\t\tSession::set(\"FormInfo.{$this->FormName()}.data\", $data);\n\t}", "public function save(array $session_data);", "public function save()\n {\n $array = $this->getState();\n if (empty($array['id'])) {\n unset($array['id']);\n Db::getInstance()->insert($this->getTableName(), $array);\n } else {\n Db::getInstance()->update($this->getTableName(), $array, ['id' => $array['id']]);\n }\n }", "public function writeToSession(): void\n {\n $_SESSION['current_user']=serialize($this);\n }", "public function loadState()\n\t{\n\t\tif (isset($_SESSION[$this->_getSessionKey()]))\n\t\t{\n\t\t\t$this->_data = unserialize($_SESSION[$this->_getSessionKey()]);\n\t\t}\n\t}", "public function saveDataToSession()\n {\n $data = $this->getData();\n $session = $this->currentController->getRequest()->getSession();\n $session->set(\"FormInfo.{$this->FormName()}.data\", $data);\n }", "protected function storeSettingsInSession() {\n\t\t$values = array (\n\t\t\t'formValuesPrefix' => $this->formValuesPrefix,\n\t\t\t'settings' => $this->settings,\n\t\t\t'debug' => $this->debugMode,\n\t\t\t'currentStep' => $this->currentStep,\n\t\t\t'totalSteps' => $this->totalSteps,\n\t\t\t'lastStep' => $this->lastStep,\n\t\t\t'templateSuffix' => $this->settings['templateSuffix']\n\t\t);\n\t\t$this->globals->getSession()->setMultiple($values);\n\t\t$this->globals->setFormValuesPrefix($this->formValuesPrefix);\n\t\t$this->globals->setTemplateSuffix($this->settings['templateSuffix']);\n\t}", "public function save($state);", "public function save()\n\t{\n\t\tif (!$this->started || $this->closed) {\n\t\t\tthrow new \\RuntimeException(\"Trying to save a session that was not started yet or was already closed\");\n\t\t}\n\t\t// nothing to do since we don't persist the session data\n\t\t$this->closed = false;\n\t\t$this->started = false;\n\t}", "public function save()\n {\n $_SESSION[SESSION_USER_PROFILE] = $this->profileToString();\n }", "public function storeToSession() {\n\n $dataArray = array();\n\n foreach (get_class_vars(get_class($this)) as $propertyName => $propertyValue) {\n $getter = 'get_'.$propertyName;\n $dataArray[$propertyName] = $this->$getter();\n }\n\n tx_pttools_sessionStorageAdapter::getInstance()->store(self::SESSION_KEY_NAME_PAYMENT_REQUEST, $dataArray);\n if (TYPO3_DLOG) t3lib_div::devLog('Stored standardized payment request information into FE browser session key \"'.self::SESSION_KEY_NAME_PAYMENT_REQUEST.'\"', 'pt_tools', 0, $dataArray);\n\n }", "public function save( $data )\n {\n $_SESSION[$this->options->idKey] = $data;\n $_SESSION[$this->options->timestampKey] = time();\n }", "protected function writeSession()\n {\n /**\n * @var \\snb\\http\\SessionStorageInterface $session\n */\n\n // get the session and write the value into it\n $session = $this->container->get('session');\n if ($session) {\n $session->set($this->context->name, $this->identity->getTokenString());\n }\n }", "public function save()\n {\n if ($this->id !== null) {\n $this->storage->set($this->id, $this->data, $this->ttl);\n $this->sendCookie();\n }\n }", "public function save()\n {\n if (\n ! $this->isStarted()\n ) {\n $this->start();\n }\n\n $this->setWrite(\n false\n );\n\n return session_write_close();\n }", "public function save() {\n Session::clear(\"Commerce.PostageID\");\n\n // Save cart items\n Session::set(\n \"Commerce.ShoppingCart.Items\",\n serialize($this->items)\n );\n\n // Save cart discounts\n Session::set(\n \"Commerce.ShoppingCart.Discount\",\n serialize($this->discount)\n );\n\n // Update available postage\n if($data = Session::get(\"Form.Form_PostageForm.data\")) {\n $country = $data[\"Country\"];\n $code = $data[\"ZipCode\"];\n $this->setAvailablePostage($country, $code);\n }\n }", "private function saveSession() {\n $_SESSION[$this->getIdentifier()][self::SESSION_FILE_NAME] = parent::getFileName();\n $_SESSION[$this->getIdentifier()][self::SESSION_ORIGINAL_FILE_NAME] = $this->_originalFile;\n }", "public function saveInSession() \n {\n $_SESSION['cart'] = $this->products;\n }", "public function save() {\n $dbh = Database::handle();\n \n $sth = $dbh->prepare('UPDATE sessions SET step = :step, repetition = :repetition, data = :data, expires = :expires, status = :status WHERE session_id = :session');\n $sth->bindValue(':step', $this->current_step->__toString());\n $sth->bindValue(':repetition', $this->repetition);\n $sth->bindValue(':data', serialize($this->data));\n $sth->bindParam(':expires', $expiration_datetime);\n $sth->bindValue(':session', $this->id);\n $sth->bindValue(':status', $this->status);\n \n $expiration_datetime = Util::unix2sqltime($this->expires); // convert unix time to SQL datetime\n // NULL is treated as zero (=> datetime = 1970:...) and will be decoded as such\n \n $sth->execute();\n }", "function set_state( $state ) {\n\t\t$_SESSION['customer']['state'] = $state;\n\t}", "function storeSession()\n {\n $sessionFileHandle = fopen(CAKE_COMPONENT_PAYPAL_SESSION_SAVE_PATH . DS . session_id() . '.ser.tmp', 'w');\n \n if ($sessionFileHandle !== false)\n {\n fwrite($sessionFileHandle, serialize($_SESSION));\n fclose($sessionFileHandle);\n \n return true;\n }\n \n return false;\n }", "private function storeCartInstance()\n {\n session()->put($this->instance, $this);\n }", "public function write()\n {\n if ($this->doWrite) {\n $this->doWrite = false;\n $session = $this->getSession();\n $session->userData = $this->data;\n }\n }", "public function change_state($session_data);", "public function preserveValues() {\n $request = Request::createFromGlobals();\n $data = $request->request->get($this->name);\n $session = new Session();\n $session->set($this->name, $data);\n }", "public function save_session()\n\t{\n\t\tif ($this->loaded())\n\t\t{\n\t\t\t$this->save();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->check_insist();\n\t\t\tstatic::session($this);\n\t\t}\n\n\t\treturn $this;\n\t}", "public function restoreState()\n {\n if (!$this->session->has('itkg_consumer.oauth_values')) {\n return;\n }\n\n $values = $this->session->get('itkg_consumer.oauth_values');\n $this->state = $values['state'];\n $this->secret = $values['secret'];\n $this->token = $values['token'];\n }", "protected function saveMenusSession() {\n\n \\Session::put('menu', $this->getMenusByUserRol());\n }", "public function save()\n {\n return Session::save();\n }", "protected function storeGPinSession() {\n\t\tif ($this->currentStep > $this->lastStep) {\n\t\t\t$this->loadSettingsForStep($this->lastStep);\n\t\t}\n\t\t$newGP = $this->handleCheckBoxFields();\n\t\tif ($this->currentStep > $this->lastStep) {\n\t\t\t$this->loadSettingsForStep($this->currentStep);\n\t\t}\n\t\t$data = $this->globals->getSession()->get('values');\n\t\t\n\t\t$checkBoxFields = $this->utilityFuncs->getSingle($this->settings, 'checkBoxFields');\n\t\t$checkBoxFields = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::trimExplode(',', $checkBoxFields);\n\n\t\t//set the variables in session\n\t\tif ($this->lastStep !== $this->currentStep) {\n\t\t\tforeach ($newGP as $key => $value) {\n\t\t\t\tif (!strstr($key, 'step-') && $key !== 'submitted' && $key !== 'randomID' && \n\t\t\t\t\t$key !== 'removeFile' && $key !== 'removeFileField' && $key !== 'submitField') {\n\n\t\t\t\t\t$data[$this->lastStep][$key] = $newGP[$key];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Search for checkboxes which were unchecked in this step.\n\t\tforeach($checkBoxFields as $field) {\n\t\t\tif(!isset($newGP[$field])) {\n\t\t\t\tunset($data[$this->lastStep][$field]);\n\t\t\t}\n\t\t}\n\t\t$this->globals->getSession()->set('values', $data);\n\t}", "private function _update_session() {\r\n\t\t$_SESSION['espresso_breakout_session'] = $this->_session;\r\n\t}", "public function save() {\n\t\tif ( ! $this->started ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->age_flash_data();\n\n\t\t/* @noinspection PhpParamsInspection */\n\t\t$this->handler->write( $this->get_id(), $this->attributes );\n\n\t\t$this->started = false;\n\t}", "public function saveState()\n\t{\n\t\tif(($this->_stateTracker!==null)\n\t\t\t&& $this->getControl()->getActiveControl()->canUpdateClientSide(true))\n\t\t{\n\t\t\t$this->_stateTracker->respondToChanges();\n\t\t}\n\t\tparent::saveState();\n\t}", "public function serialize() {\n $_SESSION[$this->get_instance()] = serialize($this);\n }", "public function write() {\n\n\t\t\tif( $this->sessionId )\n\t\t\t{\n\t\t\t\t$_SESSION = array();\n\n\t\t\t\t// save data to session object\n\t\t\t\tforeach( $this->data as $key => $var )\n\t\t\t\t{\n\t\t\t\t\t$_SESSION[$key] = $var;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new \\System\\Base\\InvalidOperationException(\"session has not been started\");\n\t\t\t}\n\t\t}", "public function write() {\n\t\textract($this->driver->config);\n\n\t\t// if the session is set to never expire\n\t\t// we will set it to 1 year\n\t\tif($lifetime == 0) {\n\t\t\t$lifetime = (3600 * 24 * 365);\n\t\t}\n\n\t\t// save session ID\n\t\tCookie::write($cookie, $this->id, ($expire_on_close ? 0 : $lifetime));\n\n\t\t// rotate flash data\n\t\t$this->put('_out', $this->get('_in', array()));\n\t\t$this->put('_in', array());\n\n\t\t// write payload to storage driver\n\t\t$this->driver->write($this->id, $this->data);\n\t}", "public function storePrefs() {\r\n\r\n\t\t// Database shizms! :)\r\n\t\tglobal $DB;\r\n\r\n\t\t// Serialize the object, so MySQL wont choke.\r\n\t\t$serializedPrefs = serialize($this->preferences);\r\n\r\n\t\t// And store the string.\r\n\t\t$DB->query(\"UPDATE users SET preferences = '\" . $serializedPrefs . \"' where ID='\" . $this->UserID . \"'\");\r\n\r\n\t\t// Update the session, too.\r\n\t\t$_SESSION[PREFS] = serialize($this->preferences);\r\n\t}", "public static function save(){\n\t\t$_SESSION['saved_url'] = $_SERVER['REQUEST_URI'];\n\t}", "public function commit(): void\n {\n \\session_write_close();\n\n //update status\n $this->status = \\session_status();\n }", "public function saveFormState(Form $form, $data)\n {\n $sessionContainer = new \\Laminas\\Session\\Container('form_state');\n $sessionContainer->offsetSet($form->getName(), $data);\n }", "public function save_current_etl_state() {\n // Save the current state.\n $this->user_activity_task_save();\n\n // Clear blocking.\n $this->set_etl_task_blocked(0);\n\n exit(0);\n }", "protected function store()\r\n {\r\n // Memorize current action in $_SESSION\r\n if (!isset($_SESSION['wcmAction']))\r\n $_SESSION['wcmAction'] = array();\r\n\r\n $_SESSION['wcmAction']['todo'] = $this->todo;\r\n $_SESSION['wcmAction']['treeId'] = $this->treeId;\r\n $_SESSION['wcmAction']['context'] = $this->context;\r\n }", "public function saveState(): void {\n if (!$this->mysqli->query(\"update viruses set name = '\" . $this->mysqli->escape_string($this->name) . \"' where virus_id = '\" . $this->mysqli->escape_string($this->virus_id) . \"'\")) Logs::mysql($this->mysqli);\n file_put_contents(DATA_DIR . \"/viruses/$this->virus_id/profile.txt\", $this->profile);\n }", "private function setSessionData() {\n $_SESSION[\"loginBool\"] = 1;\n $_SESSION[\"gebruikersNaam\"] = $this->gebruikersNaam;\n $_SESSION[\"gebruikersRol\"] = $this->gebruikersRol;\n $_SESSION[\"permissions\"] = $this->permissions;\n }", "public function save(SessionInterface $session): void;", "private function storeInSession(){\n\t\tif (self::$useSession)\n\t\t\t$_SESSION[self::$sessionPath] = self::$deviceCategory;\n\t}", "protected function _write() {\n if($this->_update_id === null) {\n $this->_db->insert($this->_collection,\n array(\n $this->_columns['session_id'] => $this->_session_id,\n $this->_columns['last_active'] => $this->_data['last_active'],\n $this->_columns['contents'] => $this->__toString()\n )\n );\n } else {\n $this->_db->update($this->_collection,\n array(\n $this->_columns['session_id'] => $this->_session_id,\n ),\n array(\n '$set' => array(\n $this->_columns['last_active'] => $this->_data['last_active'],\n $this->_columns['contents'] => $this->__toString(),\n $this->_columns['session_id'] => $this->_session_id\n )\n ),\n array(\n 'multiple' => false\n )\n );\n }\n\n $this->_update_id = $this->_session_id;\n\n Cookie::set($this->_name, $this->_session_id, $this->_lifetime);\n\n return true;\n }", "public function save_data($old_session_key = 0)\n {\n }", "public function store_state($state, $nonce, $stateparams) {\n $_SESSION[get_class($this)][$state] = [\n 'nonce' => $nonce,\n 'additional' => $stateparams,\n ];\n\n return true;\n }", "public function saveState() {\n $rsm = new RoleStateMemento();\n $rsm->vit = $this->vit;\n $rsm->atk = $this->vit;\n $rsm->def = $this->vit;\n $rsm->def3 = $this->vit;\n return $rsm;\n }", "protected function _sessionData()\n {\n if ($this->session->value) {\n $this->session->value += 1;\n } else {\n $this->session->value = 1;\n }\n\n $this->setSession(\n 'session_display_test',\n $this->session->value,\n 'display'\n );\n }", "function save()\n {\n $dirty_props = $this->_dirty;\n\n if ($this->_vars)\n {\n $dirty_vars = $this->_vars->getDirtyVariables();\n if ($dirty_vars)\n {\n $dirty_props['vars'] = $dirty_vars;\n }\n }\n\n $this->_api->doRequest('POST', $this->getBaseApiPath(), $dirty_props);\n $this->_dirty = array();\n\n if ($this->_vars)\n {\n $this->_vars->clearDirtyVariables();\n }\n }", "private function populateSession() {\r\n\t\t$value = Crypto::encodeSession( $this->user->getUsername(), $this->user->getId(), $this->user->getEmail() );\r\n\t\t$this->request->getSession()->set( self::$SESSION_NAME, $value );\r\n\t\tLogger::getInstance()->debug( 'populate session for ' . var_export( $this->user, true ) );\r\n\t}", "private function store() {\n\n // Check to make sure we have everything we need\n if (!($this->id) || !($this->user->id > 0)) {\n return false;\n }\n\n // See if we have a session that we can just renew before we start a new one\n if (!$this->renew()) {\n\n // Insert the session data we have into the DB\n return $this->database->insert(\n $this->table,\n array(\n 'session_id' => $this->id,\n 'user_id' => $this->user->id,\n 'created_at' => date(\"Y-m-d H:i:s\")\n )\n );\n\n }\n\n }", "public function commit() :void\n {\n $this->cookie->set('session', $this->session);\n }", "function storeSession()\n {\n\t$file = CAKE_COMPONENT_PAYPAL_SESSION_SAVE_PATH . DS . session_id() . '.ser.tmp';\n\t#error_log(\"STORING SESSION=$file\");\n $sessionFileHandle = fopen($file, 'w');\n \n if ($sessionFileHandle !== false)\n {\n fwrite($sessionFileHandle, serialize($_SESSION));\n fclose($sessionFileHandle);\n\n\t #error_log(\"SAVED SES?=\".file_exists($file));\n \n return true;\n }\n \n return false;\n }", "function set_session() {\n // stores data in CodeIgniter's session storage. Some of the values are built in\n // to CodeIgniter, others are added. See CodeIgniter's documentation for details.\n $this->session->set_userdata( array(\n 'dni' =>$this->details->dni,\n 'nombre' => $this->details->nombre . ' ' . $this->details->apellido1 . ' ' . $this->details->apellido2,\n 'grado' =>$this->details->grado,\n 'seccion' =>$this->details->seccion,\n 'avatar' =>$this->details->avatar,\n 'sexo' =>$this->details->sexo,\n 'isAdmin' =>$this->details->isAdmin,\n 'isLoggedIn' =>true\n )\n );\n }", "public function update_session(){\n\n // Update any internal counters\n $this->update_variables();\n\n // Request parent robot object to update as well\n //$this->robot->update_session();\n\n // Update the session with the export array\n $this_data = $this->export_array();\n $_SESSION['ABILITIES'][$this->ability_id] = $this_data;\n $this->battle->values['abilities'][$this->ability_id] = $this_data;\n //$this->player->values['abilities'][$this->ability_id] = $this_data;\n //$this->robot->values['abilities'][$this->ability_id] = $this_data;\n\n // Return true on success\n return true;\n\n }", "function set_session() {\n // stores data in CodeIgniter's session storage. Some of the values are built in\n // to CodeIgniter, others are added. See CodeIgniter's documentation for details.\n $this->session->set_userdata( array(\n 'id'=>$this->details->id,\n 'nombre'=> $this->details->nombre,\n 'rol'=>$this->details->rol,\n 'isLoggedIn'=>true\n )\n );\n }", "public function updateSession()\n {\n if (!isset($_SESSION)) {\n session_start();\n }\n $_SESSION['user'] = $this;\n }", "public function user_activity_task_save() {\n mtrace('* over time limit -- saving state and pausing');\n set_config('state', serialize($this->state), 'eliscoreplugins_user_activity');\n }", "public function store ()\n {\n $core = \\Lum\\Core::getInstance();\n $core->sess->SimpleAuth = $this;\n }", "protected function storeCouponData()\n {\n session(['couponData' => $this->couponData]);\n }", "public function __destruct(){\r\n\t\t\tif ( $this->isPesistance ){\r\n\t\t\t\t$this->oLogger->debug (\"persistiendo \".$this->oSystem->getOrderActionClass()->getClassSession());\r\n\t\t\t\t$_SESSION[$this->oSystem->getOrderActionClass()->getClassSession()] = serialize( $this );\r\n\t\t\t}\t\r\n\t\t}", "public function __destruct(){\r\n\t\t\tif ( $this->isPesistance ){\r\n\t\t\t\t$this->oLogger->debug (\"persistiendo \".$this->oSystem->getOrderActionClass()->getClassSession());\r\n\t\t\t\t$_SESSION[$this->oSystem->getOrderActionClass()->getClassSession()] = serialize( $this );\r\n\t\t\t}\t\r\n\t\t}", "public function __destruct(){\r\n\t\t\tif ( $this->isPesistance ){\r\n\t\t\t\t$this->oLogger->debug (\"persistiendo \".$this->oSystem->getOrderActionClass()->getClassSession());\r\n\t\t\t\t$_SESSION[$this->oSystem->getOrderActionClass()->getClassSession()] = serialize( $this );\r\n\t\t\t}\t\r\n\t\t}", "public function saveSession(SimpleSAML_Session $session) {\n\n\t\t$_SESSION['SimpleSAMLphp_SESSION'] = serialize($session);\n\t}", "function save()\n {\n array_push($_SESSION['list_of_tamagotchis'], $this);\n }" ]
[ "0.8314679", "0.79927653", "0.78138167", "0.78062326", "0.7737698", "0.7646623", "0.76410806", "0.7639285", "0.76018673", "0.75480235", "0.7542274", "0.7430561", "0.74198437", "0.73874307", "0.73511964", "0.7334063", "0.7302646", "0.7290327", "0.7289837", "0.72430694", "0.7210052", "0.7210052", "0.7206035", "0.7183667", "0.7171253", "0.7170693", "0.7158097", "0.7051148", "0.70459217", "0.69830143", "0.6930524", "0.6926102", "0.692488", "0.6907181", "0.6894703", "0.6853938", "0.6846427", "0.683859", "0.682381", "0.6793443", "0.6761223", "0.6747303", "0.67136335", "0.67011654", "0.6625732", "0.66149193", "0.65900254", "0.6568726", "0.6556777", "0.65549743", "0.65428334", "0.6502634", "0.649853", "0.64982045", "0.64732105", "0.6460421", "0.6454075", "0.64421767", "0.6426093", "0.6410416", "0.64103895", "0.6406881", "0.6405518", "0.6399591", "0.6394787", "0.6384064", "0.6370846", "0.63704157", "0.63689446", "0.63501275", "0.6337584", "0.6333426", "0.63330173", "0.63224465", "0.6319397", "0.630589", "0.63058645", "0.6298565", "0.62779415", "0.6261885", "0.6258977", "0.62545973", "0.62448746", "0.6243421", "0.62415695", "0.622166", "0.6218791", "0.6200945", "0.61859167", "0.6162149", "0.615252", "0.61489767", "0.61368", "0.6132782", "0.61220914", "0.60954726", "0.60954726", "0.60954726", "0.6087203", "0.6087126" ]
0.81786364
1
Converts keyVal dictionary instance variable into string containing xmlwrapped key=>value pairs
Преобразует переменную keyVal объекта dictionary в строку, содержащую xmlwrapped пары ключ=>значение
public function getXML() { $xml = ""; foreach ($this->keyVal as $key => $val) { if (isset($val)) { $xml .= "<key>" . $key . "</key>\n"; if ($key == "PayloadContent") { $xml .= "<array>\n" . implode($val) . "</array>\n"; } else { $xml .= $this->wrapVal($val) . "\n"; } } } return $xml; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function wrapKey($key)\n {\n return '<' . $key . '>';\n }", "static public function PrepareInfoItemXML($key, $value)\n{\n\n\treturn str_replace( array(\"#Key\", \"#Value\"), array(htmlentities($key), htmlentities($value)), self::$XiPayInfoItemTemplate);\n}", "public function __toString()\n {\n $string = '';\n\n foreach ($this->attributes as $key => $value) {\n if ($value === false || is_null($value)) {\n continue;\n }\n\n if ($value === true) {\n $value = $key;\n }\n\n $string .= ' '.$key.'=\"'.str_replace('\"', '\\\\\"', trim($value)).'\"';\n }\n\n return trim($string);\n }", "function serializeHeaderVal($k, $v, $nsPrefix){\n if(is_array($v)){\n $xml = \"<$nsPrefix:$k>\";\n foreach($v as $k1 => $v1){\n $xml .= $this->serializeHeaderVal($k1, $v1, $nsPrefix); \n }\n $xml .= \"</$nsPrefix:$k>\";\n return $xml;\n }\n return \"<$nsPrefix:$k>$v</$nsPrefix:$k>\";\n }", "public final function toXml()\n {\n $class = $this->my_class;\n \n $xml = \"<$class>\\n\";\n \n foreach($this->fields as $key => $value)\n {\n $xml .= \" <$key>\";\n $xml .= $value;\n $xml .= \"</$key>\\n\";\n }\n \n $xml .= \"</$class>\\n\";\n \n return $xml;\n }", "public function __toString() : string\n {\n $key = $this->getKey();\n if ($key === 'url') {\n $key = 'URL';\n }\n\n $value = $this->getValue();\n if ($this->isValueContainingSpecials()) {\n $value = '\"' . $this->encodeSpecials() . '\"';\n } elseif (!$this->isValueInHtml()) {\n $value = '\"' . addslashes($value) . '\"';\n }\n\n return $key . '=' . $value;\n }", "function apiXMLOutput($val, $lastk = \"\") {\n \tforeach ($val as $k => $v) {\n \n \t\tif (is_array( $v )) {\n \t\t\tif (is_numeric( $k )) {\n \t\t\t\techo \"<{$lastk}>\\n\";\n \t\t\t}\n \t\t\telse {\n \t\t\t\tif (( !is_numeric( key( $v ) ) && count( $v ) )) {\n \t\t\t\t\techo \"<{$k}>\\n\";\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tapiXMLOutput( $v, $k );\n \n \t\t\tif (is_numeric( $k )) {\n \t\t\t\techo \"</{$lastk}>\\n\";\n \t\t\t\tcontinue;\n \t\t\t}\n \n \n \t\t\tif (( !is_numeric( key( $v ) ) && count( $v ) )) {\n \t\t\t\techo \"</{$k}>\\n\";\n \t\t\t\tcontinue;\n \t\t\t}\n \n \t\t\tcontinue;\n \t\t}\n \n \t\t$v = html_entity_decode( $v );\n \n \t\tif (( strpos( $v, \"<![CDATA[\" ) === false && htmlspecialchars( $v ) != $v )) {\n \t\t\t$v = ( \"<![CDATA[\" . $v . \"]\" ) . \"]>\";\n \t\t}\n \n \t\techo \"<{$k}>{$v}</{$k}>\\n\";\n \t}\n \n }", "function toXML( $mapKeysToText=false ) {\n $xml = '<record table=\"' . $this->_tbl . '\"';\n\n if ($mapKeysToText) {\n $xml .= ' mapkeystotext=\"true\"';\n }\n $xml .= '>';\n foreach (get_object_vars( $this ) as $k => $v) {\n if (is_array($v) or is_object($v) or $v === NULL) {\n continue;\n }\n if ($k[0] == '_') { // internal field\n continue;\n }\n $xml .= '<' . $k . '><![CDATA[' . $v . ']]></' . $k . '>';\n }\n $xml .= '</record>';\n\n return $xml;\n }", "public function __toString(): string\n {\n return sprintf('%s => %s', $this->getKey(), $this->getValue());\n }", "private function getStringOfkeys() {\n\t\t$str[\"keys\"] = $this->implodearraywithcomma(', ');\n\t\t$str[\":keys\"] = \":\" . $this->implodearraywithcomma(', :');\n\t\treturn $str; \n\t}", "protected function debug_key_wrapper( $key ) {\n\t\treturn '<font color=\"chucknorris\">' . \\esc_attr( $key ) . '</font>';\n\t}", "public function getKeyInfo()\n {\n return '<ds:KeyInfo Id=\"' . $this->KeyInfoId . '\">' .\n '<ds:X509Data>' .\n '<ds:X509Certificate>' . $this->getCertificate() . '</ds:X509Certificate>' .\n '</ds:X509Data>' .\n '</ds:KeyInfo>';\n }", "public function __toString()\n {\n $template = $this->template;\n\n foreach ($this->params as $key => $value) {\n if (!is_scalar($value) && !method_exists($value, '__toString') ) {\n $value = '[' . gettype($value) . ']';\n }\n $keys[] = \"{{$key}}\";\n $values[] = $value;\n }\n\n return isset($keys) ? str_replace($keys, $values, $template) : $template;\n }", "function toXML( $mapKeysToText=false )\r\r\n\t{\r\r\n\t\t$xml = '<record table=\"' . $this->_tbl . '\"';\r\r\n\r\r\n\t\tif ($mapKeysToText)\r\r\n\t\t{\r\r\n\t\t\t$xml .= ' mapkeystotext=\"true\"';\r\r\n\t\t}\r\r\n\t\t$xml .= '>';\r\r\n\t\tforeach (get_object_vars( $this ) as $k => $v)\r\r\n\t\t{\r\r\n\t\t\tif (is_array($v) or is_object($v) or $v === NULL)\r\r\n\t\t\t{\r\r\n\t\t\t\tcontinue;\r\r\n\t\t\t}\r\r\n\t\t\tif ($k[0] == '_')\r\r\n\t\t\t{ // internal field\r\r\n\t\t\t\tcontinue;\r\r\n\t\t\t}\r\r\n\t\t\t$xml .= '<' . $k . '><![CDATA[' . $v . ']]></' . $k . '>';\r\r\n\t\t}\r\r\n\t\t$xml .= '</record>';\r\r\n\r\r\n\t\treturn $xml;\r\r\n\t}", "public function __toString()\n {\n $control = '';\n foreach ($this->_keys as $key => $value) {\n if ($value) {\n $control .= \"{$key}: {$value}\" . PHP_EOL;\n }\n }\n\n return $control;\n }", "public function Serialize()\n\t\t{\n\t\t\t$sString = \"\";\n\t\t\tforeach($this->_SearchParameters as $key => $value)\n\t\t\t{\n\t\t\t\t$sString .= $key . ';' . $value . '|';\n\t\t\t}\n\t\t\treturn $sString;\n\t\t}", "private function asXML($args, $key='') {\n global $_LW;\n if (empty($args)) return '';\n $xml = '';\n foreach ($args as $id => $value) {\n if (!empty($key)) $id = $key;\n if (array_key_exists($id, $this->javascript_only_args) || in_array($id, $this->skip_args) || $value === '') continue;\n if (is_array($value) && !empty($value)) {\n $xml .= $this->asXML($value, $id);\n } else {\n $xml .= '<arg id=\"' . $_LW->setFormatClean($id) . '\">' . $_LW->setFormatClean(urldecode($value)) . '</arg>';\n }\n }\n return $xml;\n }", "public static function encodeKeyValuePair($key, $val)\n {\n return urlencode($key) . '=' . urlencode($val);\n }", "public function serialize()\n\t{\n\t\t$xml = array();\n\t\t\n\t\t$entityName = static::$entityName;\n\t\t\n\t\t$xml[] = \"<{$entityName}>\";\n\t\tforeach ($this->properties as $key => $value)\n\t\t{\n\t\t\t$key = static::translatePropertyKey($key);\n\t\t\t$xml[] = \"<{$key}><![CDATA[{$value}]]></{$key}>\";\n\t\t}\n\t\t$xml[] = \"</{$entityName}>\";\n\t\t\n\t\treturn implode('', $xml);\n\t}", "function obj2xml($v, $indent = '') {\n $attr = '';\n foreach ($v AS $key => $val) {\n if (is_string($key) && ($key == '__attr')) {\n continue;\n }\n\n // Check for __attr\n if (is_object($val->__attr)) {\n foreach ($val->__attr AS $key2 => $val2) {\n $attr .= \" $key2=\\\"$val2\\\"\";\n }\n } else {\n $attr = '';\n }\n\n // Preserve data type information\n $attr .= ' type=\"' . gettype($val) . '\"';\n\n if (is_array($val) || is_object($val)) {\n echo \"$indent<$key$attr>\\n\";\n obj2xml($val, $indent . ' ');\n echo \"$indent</$key>\\n\";\n } else {\n if (is_string($val) && ($val == '')) {\n echo \"$indent<$key$attr />\\n\";\n } else {\n echo \"$indent<$key$attr>$val</$key>\\n\";\n }\n }\n } // end while\n}", "public function asXML()\n {\n $ret = \"<\" . $this->_name;\n\n //print Attributes\n if (sizeof($this->_attributes)>0) {\n foreach ($this->_attributes as $_name => $_value) {\n $ret .= \" \" . $_name . '=\"' . $this->asUTF8(htmlspecialchars($_value)) . '\"';\n }\n }\n\n //if there is nothing more todo, close empty tag and exit\n if (is_null($this->_value) && !sizeof($this->_childNodes)) {\n $ret .= \" />\";\n return $ret;\n }\n\n //close opening tag\n $ret .= \">\";\n\n //print value\n if (!is_null($this->_value)) {\n $ret .= $this->asUTF8(htmlspecialchars($this->_value));\n }\n\n //print child nodes\n if (sizeof($this->_childNodes)>0) {\n foreach ($this->_childNodes as $_node) {\n $ret .= $_node->asXml();\n }\n }\n\n $ret .= \"</\" . $this->_name . \">\";\n\n return $ret;\n }", "public function get_field_xml( $field_key, $field_value ) {\n\n\t\t// Define known field keys requiring a character data wrapper.\n\t\t$known_cdata_keys = array( 'Subject', 'Description' );\n\n\t\t// If the field key is in the known list or is not alphanumeric, wrap the field value in a character data wrapper.\n\t\tif ( in_array( $field_key, $known_cdata_keys ) || ! ctype_alnum( $field_value ) ) {\n\t\t\t$field_value = '<![CDATA[ ' . $field_value . ' ]]>';\n\t\t}\n\n\t\treturn '<FL val=\"' . $this->escape_xml( $field_key ) . '\">' . $field_value . '</FL>' . \"\\r\\n\";\n\t}", "function exportValueAsXML($cfMap)\r\n {\r\n $cfRootElem = \"<custom_fields>\\n{{XMLCODE}}\\n</custom_fields>\";\r\n $cfElemTemplate = \"\\t\" . \"<custom_field>\\n\\t\\t<name><![CDATA[||NAME||]]></name>\\n\\t\\t\" .\r\n\t \"<value><![CDATA[||VALUE||]]></value>\\n\" .\r\n\t \"\\t\" . \"</custom_field>\";\r\n $cfDecode = array (\"||NAME||\" => \"name\",\"||VALUE||\" => \"value\");\r\n\t$cfXML = exportDataToXML($cfMap,$cfRootElem,$cfElemTemplate,$cfDecode,true);\r\n \treturn $cfXML; \r\n }", "public function encode($value, $key = '');", "protected function &get_attribute_string($key, $value, $value_is_key_array = false)\n\t{\n\t\t$ret = '';\n\t\t$k = trim((string)$key);\n\t\tif(strlen($k) == 0)\n\t\t\treturn $ret;\n\n\t\t\t//\treturn ' key=\"value\"'\n\t\tif(!is_array($value))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$v = trim((string)$value);\n\n\t\t\t\tif((strlen($v) == 0))\n\t\t\t\t{\n\t\t\t\t\treturn $ret;\n\t\t\t\t}\n\t\t\t\t$ret = ' '.$k.'=\"'.$v.'\"';\n\t\t\t}\n\t\t\tcatch(Exception $e)\n\t\t\t{\n\t\t\t}\n\t\t\treturn $ret;\n\t\t}\n\t\t\t//\tconcatinate values to string\n\t\tif(!$value_is_key_array)\n\t\t{\n\t\t\t$v = implode(' ', $value);\n\t\t\tif((strlen($v) == 0))\n\t\t\t{\n\t\t\t\treturn $ret;\n\t\t\t}\n\t\t\t$ret = ' '.$k.'=\"'.$v.'\"';\n\t\t\treturn $ret;\n\t\t}\n\n\t\tforeach ($value as $k => &$v)\n\t\t{\n\t\t\t$r = $this->get_attribute_string($k, $v);\n\t\t\t$ret .= $r;\n\t\t}\n\t\tunset ($v);\n\t\treturn $ret;\n\t}", "function arrayToXml($arr) {\n $xml = \"<xml>\";\n foreach ($arr as $key=>$val) {\n $xml.=\"<\".$key.\">\".$val.\"</\".$key.\">\";\n }\n $xml.=\"</xml>\";\n return $xml;\n}", "public function __toString()\n {\n $s = '';\n foreach ($this as $key => $attr) {\n $s .= $key . ': ' . $attr . PHP_EOL;\n }\n return $s;\n }", "public function toString() {\n\t\t$output = \"\";\t\t\n\t\tforeach($this->contents as $key=>$value) {\n\t\t\t$output .= $key.\" = \".$value.\", \";\n\t\t}\n\t\treturn substr($output,0,-2);\n\t}", "protected function attr_to_string()\n {\n $tmp = array();\n\n foreach ($this->attributes as $key => $value) {\n $s = $key;\n if ($value) $s .= \"=\\\"\" . $value .\"\\\"\";\n array_push($tmp, $s);\n }\n\n return sizeof($tmp) ? ' ' . implode(' ', $tmp) : '';\n }", "function toXml(){\n\t\t$class_name = new String4(get_class($this));\n\t\t$root = $class_name->underscore(); // \"LittleKitty\" turns into \"little_kitty\"\n\t\t$out = array();\n\t\t$out[] = \"<$root>\";\n\t\tforeach($this->toExportArray() as $k => $v){\n\t\t\t$out[] = \"<$k>\".XMole::ToXml($v).\"</$k>\"; // escaping $v to be placed inside XML\n\t\t}\n\t\t$out[] = \"</$root>\";\n\t\treturn join(\"\\n\",$out);\n\t}", "public function toXML(\\DOMDocument $doc,$nodeName=\"\") {\n $node = $doc->createElement('dict');\n\n foreach($this->value as $key => $value) {\n $node->appendChild($doc->createElement('key', $key));\n $node->appendChild($value->toXML($doc));\n }\n\n return $node;\n }", "function & XML_serialize(&$data, $level = 0, $prior_key = NULL){\n\tif($level == 0){ ob_start(); echo '<?xml version=\"1.0\" ?>',\"\\n\"; }\n\twhile(list($key, $value) = each($data))\n\t\tif(!strpos($key, ' attr')) #if it's not an attribute\n\t\t\t#we don't treat attributes by themselves, so for an empty element\n\t\t\t# that has attributes you still need to set the element to NULL\n\n\t\t\tif(is_array($value) and array_key_exists(0, $value)){\n\t\t\t\tXML_serialize($value, $level, $key);\n\t\t\t}else{\n\t\t\t\t$tag = $prior_key ? $prior_key : $key;\n\t\t\t\techo str_repeat(\"\\t\", $level),'<',$tag;\n\t\t\t\tif(array_key_exists(\"$key attr\", $data)){ #if there's an attribute for this element\n\t\t\t\t\twhile(list($attr_name, $attr_value) = each($data[\"$key attr\"]))\n\t\t\t\t\t\techo ' ',$attr_name,'=\"',htmlspecialchars($attr_value),'\"';\n\t\t\t\t\treset($data[\"$key attr\"]);\n\t\t\t\t}\n\n\t\t\t\tif(is_null($value)) echo \" />\\n\";\n\t\t\t\telseif(!is_array($value)) echo '>',htmlspecialchars($value),\"</$tag>\\n\";\n\t\t\t\telse echo \">\\n\",XML_serialize($value, $level+1),str_repeat(\"\\t\", $level),\"</$tag>\\n\";\n\t\t\t}\n\treset($data);\n\tif($level == 0){ $str = &ob_get_contents(); ob_end_clean(); return $str; }\n}", "public function __toString() {\n $output = $this->name . '=';\n\n if ($this->value !== null) {\n $output .= urlencode($this->value);\n } else {\n $output .= 'DELETED';\n }\n\n if ($this->domain && !$this->path) {\n $this->path = '/';\n }\n\n if ($this->domain && $this->path) {\n $output .= '; Domain=' . $this->domain;\n }\n\n if ($this->path) {\n $output .= '; Path=' . $this->path;\n }\n\n if ($this->expires != 0) {\n $output .= '; Expires=' . gmdate('D, d-M-Y H:i:s T', $this->expires);\n }\n\n if ($this->isSecure) {\n $output .= '; Secure';\n }\n\n if ($this->isHttpOnly) {\n $output .= '; HttpOnly';\n }\n\n return $output;\n }", "public function serialize() {\n\n $str = $this->name;\n if ($this->group) $str = $this->group . '.' . $this->name;\n\n foreach($this->parameters as $param) {\n\n $str.=';' . $param->serialize();\n\n }\n\n $src = array(\n '\\\\',\n \"\\n\",\n \"\\r\",\n );\n $out = array(\n '\\\\\\\\',\n '\\n',\n '',\n );\n $str.=':' . str_replace($src, $out, $this->value);\n\n $out = '';\n while(strlen($str)>0) {\n if (strlen($str)>75) {\n $out.= mb_strcut($str,0,75,'utf-8') . \"\\r\\n\";\n $str = ' ' . mb_strcut($str,75,strlen($str),'utf-8');\n } else {\n $out.=$str . \"\\r\\n\";\n $str='';\n break;\n }\n }\n\n return $out;\n\n }", "public function attr_to_string()\r\n {\r\n return implode(' ', array_map(function ($key, $value) {\r\n return !is_array($value) ? \"${key}=\\\"${value}\\\"\"\r\n : implode(' ', array_map(function ($css, $val) {\r\n return \"${css}: ${val};\";\r\n }, array_keys($value), $value));\r\n }, array_keys($this->attributes), $this->attributes));\r\n }", "function array_to_xml(array $data, &$xml_data) \n{\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 array_to_xml($value, $subnode);\n } else {\n $xml_data->addChild(\"$key\",htmlspecialchars(\"$value\"));\n }\n }\n return str_replace('><', \">\\n<\", $xml_data->asXml());\n}", "public function __toString()\n {\n $attributes = $this->attributes;\n $keyValues = array_map(\n function ($k) use ($attributes) {\n return sprintf('%s=%s', $k, $attributes[$k]);\n },\n array_keys($attributes)\n );\n\n return sprintf('%s[%s]', get_class($this), $keyValues[0]);\n }", "public function __toString(): string\n {\n $result = [];\n\n foreach ($this->entries as $key => $value) {\n $result[] = rawurlencode(self::SENTRY_ENTRY_PREFIX . $key) . '=' . rawurlencode($value);\n }\n\n return implode(',', $result);\n }", "function evcc_attr($key, $value = '')\n {\n if(empty($key)) {\n return '';\n }\n\n if(empty($value)) {\n if($key != 'id') {\n return sprintf(' %s', $key);\n }\n } else {\n return sprintf(' %s=\"%s\"', $key, $value);\n }\n\n return '';\n }", "function to_xml($array, $lastNodeKey = null)\n {\n $xml = '';\n\n foreach ($array as $element => $value) {\n if (is_array($value)) {\n $arrayKey = (is_numeric($element) && $lastNodeKey) ? $lastNodeKey : $element;\n\n if (!is_numeric($element) || $element > 0) {\n $xml .= \"<$arrayKey>\";\n }\n\n $xml .= to_xml($value, $element);\n\n if (!is_numeric($element) || $element < count($array) - 1) {\n $xml .= \"</$arrayKey>\";\n }\n } elseif ($value == '') {\n $xml .= \"<$element></$element>\";\n } else {\n $xml .= \"<$element>\" . htmlentities($value) . \"</$element>\";\n }\n }\n\n return $xml;\n }", "protected function wrapVal($val) {\n\t\t$valType = gettype($val);\n\t\tswitch ($valType) {\n\t\t case \"boolean\":\n\t\t\t\treturn ($val) ? \"<true/>\" : \"<false/>\";\n\t\t default:\n\t\t\t\treturn \"<\" . $valType . \">\" . (string) $val . \"</\" . $valType . \">\";\n\t\t}\n\t}", "public function serialize() {\n\n $value = $this->getValue();\n if (is_null($this->value)) {\n return $this->name;\n }\n $src = array(\n '\\\\',\n \"\\n\",\n ';',\n ',',\n );\n $out = array(\n '\\\\\\\\',\n '\\n',\n '\\;',\n '\\,',\n );\n\n return $this->name . '=' . str_replace($src, $out, $this->getValue());\n\n }", "function webform_civicrm_array2str($arr) {\n $str = '';\n foreach ($arr as $k => $v) {\n $str .= ($str ? \"\\n\" : '') . $k . '|' . $v;\n }\n return $str;\n}", "public function __toString()\n {\n $str = ($this->IsRaw() ? $this->GetName() : urlencode($this->GetName())).'=';\n if ('' === (string) $this->GetValue()) {\n $str .= 'deleted; expires='.gmdate('D, d-M-Y H:i:s T', time() - 31536001).'; max-age=-31536001';\n } else {\n $str .= $this->IsRaw() ? $this->GetValue() : rawurlencode($this->GetValue());\n if (0 !== $this->GetExpireTime()) {\n $str .= '; expires='.gmdate('D, d-M-Y H:i:s T', $this->GetExpireTime()).'; max-age='.$this->GetMaxAge();\n }\n }\n if ($this->GetPath()) {\n $str .= '; path='.$this->GetPath();\n }\n if ($this->GetDomain()) {\n $str .= '; domain='.$this->GetDomain();\n }\n if (true === $this->IsSecure()) {\n $str .= '; secure';\n }\n if (true === $this->iSHttpOnly()) {\n $str .= '; httponly';\n }\n if (null !== $this->SameSite()) {\n $str .= '; samesite='.$this->SameSite();\n }\n\n return $str;\n }", "public function toXML()\n {\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 stringifyNodeKey(array $nodeKey): string;", "public function __toString() {\n $context = array();\n foreach ($this->solution as $key => $value) {\n $context[] = \"$key=$value\";\n }\n return '[Twilio.FlexApi.V1.ConfigurationInstance ' . implode(' ', $context) . ']';\n }", "public function __toString(): string\n {\n return $this->key;\n }", "function array_to_xml($array, &$xml_user_info) {\n foreach($array as $key => $value) {\n if(is_array($value)) {\n if(!is_numeric($key)){\n $subnode = $xml_user_info->addChild(\"$key\");\n array_to_xml($value, $subnode);\n }else{\n $subnode = $xml_user_info->addChild(\"item$key\");\n array_to_xml($value, $subnode);\n }\n }else {\n $xml_user_info->addChild(\"$key\",htmlspecialchars(\"$value\"));\n }\n }\n}", "public function __toString()\n\t{\n\t\treturn $this->key;\n\t}", "function toXML($mapKeysToText = false)\r\n\t{\r\n\t\tif (class_exists('JPlatform') && version_compare(JPlatform::RELEASE, '12', 'ge'))\r\n\t\t\t$this->_aliases['tag']='SELECT t.path FROM #__tags t, #__contentitem_tag_map m WHERE type_alias = \"com_buttons.button\" AND t.id = m.tag_id AND m.content_item_id = '. (int)$this->id;\r\n\t\t\r\n\t\treturn parent::_serialize();\r\n\t}", "public function __toString()\n {\n return $this->key;\n }", "public static function formatXmlElements(array $array) {\n $output = '';\n foreach ($array as $key => $value) {\n if (is_numeric($key)) {\n if ($value['key']) {\n $output .= '<' . $value['key'];\n if (isset($value['attributes'])) {\n if (is_array($value['attributes'])) {\n $value['attributes'] = new Attribute($value['attributes']);\n }\n $output .= static::toString($value['attributes']);\n }\n if (isset($value['value']) && $value['value'] != '') {\n $output .= '>' . (is_array($value['value']) ? static::formatXmlElements($value['value']) : Html::escape(static::toString($value['value']))) . '</' . $value['key'] . '>';\n }\n else {\n $output .= ' />';\n }\n }\n }\n else {\n $output .= '<' . $key . '>' . (is_array($value) ? static::formatXmlElements($value) : Html::escape(static::toString($value))) . \"</{$key}>\";\n }\n }\n return $output;\n }", "public function getXML()\n\t{\n\t\t$xml = \"<$this->table>\";\n\n\t\tforeach($this->changes as $key => $value){\n\t\t\t$xml .= \"<$key>{$this->get($key)}</$key>\";\n\t\t}\n\n\t\t$xml .= \"</$this->table>\";\n\n\t\treturn $xml;\n\t}", "function get_string() {\n\t\t$str = '';\n\t\t$attribs = $this->__attribs();\n\t\t$text = '';\n\t\tif(isset($this->__elements)) {\n\t\t\t$text = $this->__elements;\n\t\t}\n\t\tif(!is_array($text)) {\n\t\t\t$text = array($text);\n\t\t}\n\n \t$k = array_keys($text);\n \t$s = sizeOf($k);\n\t\treset($text);\n\n\t\tfor($i = 0; $i < $s; ++$i) {\n\t\t\t$value = $text[$k[$i]];\n\t\t\tif(is_object($value)) {\n\t\t\t\t$str .= $value->get_string();\n\t\t\t} else {\n\t\t\t\tif($value === '') { $value = '&#160;'; }\n\t\t\t\t$str .= $value;\n\t\t\t}\n\t\t}\n\t\t$_str = \"\\n<$this->type$attribs>\";\n\t\t$_str .= $str;\n\t\t$_str .= \"</$this->type>\";\n\treturn $_str;\n\t}", "protected function arrayToString($arr) {\n foreach ($arr as $key) {\n $translatedKey = $this->translate($key);\n $stringArr[] = \"{$translatedKey}={$this->getEncoded($key)}\";\n }\n return implode('&', $stringArr);\n }", "private static function _encodeDe048KvpForHash($key, $value) {\n return $key . urlencode('=') . base64_encode($value);\n }", "static public function encode($key, $cast_to=NULL, $default_value=NULL)\n\t{\n\t\treturn fHTML::encode(self::get($key, $cast_to, $default_value));\n\t}", "private function convertParams(): string\n {\n $keyValue = collect($this->getCommandParams())->map(function ($value, $key) {\n $escaped = escapeshellarg($value);\n\n return \"{$key}=${escaped}\";\n })->toArray();\n\n return implode(' ', $keyValue);\n }", "public function serialize() {\n\t\treturn serialize($this->_value);\n\t}", "protected function drawKeyValue($key, $value)\n {\n if(is_bool($value)) {\n $value = $value ? 'true' : 'false';\n }\n else if (is_array($value)) {\n $value = '{}';\n }\n\n printf(\"%s : %s\\n\", $key, $value);\n }", "public function to_s()\n {\n $collection = array();\n foreach ($this->_object as $key => $value)\n {\n if (is_object($value) && $value instanceof ObjectClass)\n {\n if ($value->is_a('ArrayClass') || $value->is_a('HashClass'))\n {\n $collection[] = sprintf(\":%s => %s\", $key, $value->to_s());\n } elseif ($value->is_a('StringClass')) {\n $collection[] = sprintf(\":%s => \\\"%s\\\"\", $key, addslashes($value->to_s()));\n }\n } else {\n $collection[] = sprintf(\":%s => %s\", $key, $value);\n }\n }\n return sprintf(\"{ %s }\", implode(', ', $collection));\n }", "public function __toString() {\n $name = $this->name . \"{\";\n foreach ($this->attributes as $attr) {\n $name .= $attr->getKey() . \"='\" . $attr->getValue() . \"',\";\n }\n return substr($name, 0, strlen($name) - 1) . \"}\";\n }", "public static function htmlOut($val, $key = false) {\r\n\t\tif (is_array($val)) {\r\n\t\t\tif ($key) {\r\n\t\t\t\t$tmp = $val;\r\n\t\t\t\t$val = array();\r\n\t\t\t\tforeach($tmp as $k=>$t)\r\n\t\t\t\t\t$val[self::htmlOut($k)] = self::htmlOut($t);\r\n\t\t\t} else\r\n\t\t\t\tarray_walk_recursive($val, create_function('&$v', '$v = utils::htmlOut($v);'));\r\n\t\t} else {\r\n\t\t\t$tmp = self::htmlChars();\r\n\t\t\t$val = str_replace(array_keys($tmp), $tmp, $val);\r\n\t\t}\r\n\t\treturn $val;\r\n\t}", "function attributes_to_string(array $attributes) {\n $str = ' ';\n //we check that the array passed as an argument is not empty.\n if (!empty($attributes)) {\n foreach ($attributes as $key => $value) {\n $key = trim(htmlspecialchars($key));\n $value = trim(htmlspecialchars($value));\n /*\n\t\t\t\t* To predict the case where the string to convert contains the character \"\n\t\t\t\t* we check if this is the case we add a slash to solve this problem.\n\t\t\t\t* For example:\n\t\t\t\t* \t$attr = array('placeholder' => 'I am a \"puple\"')\n\t\t\t\t* \t$str = attributes_to_string($attr); => placeholder = \"I am a \\\"puple\\\"\"\n\t\t\t\t */\n if ($value && strpos('\"', $value) !== false) {\n $value = addslashes($value);\n }\n $str .= $key . ' = \"' . $value . '\" ';\n }\n }\n //remove the space after using rtrim()\n return rtrim($str);\n }", "function array_to_xml($arr, $first=true) {\r\n $output = ($first) ? \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<data>\\n\" : \"\";\r\n foreach ($arr as $key => $val) {\r\n $key = (is_numeric($key)) ? \"arr_\" . $key : $key; // <0 is not allowed\r\n switch (gettype($val)) {\r\n case \"array\":\r\n $output .= \"<\" . htmlspecialchars($key) . \" type='array' size='\" . count($val) . \"'>\" . array_to_xml($val, false) . \"</\" . htmlspecialchars($key) . \">\\n\";\r\n break;\r\n case \"boolean\":\r\n $output .= \"<\" . htmlspecialchars($key) . \" type='bool'>\" . ($val ? \"true\" : \"false\") . \"</\" . htmlspecialchars($key) . \">\\n\";\r\n break;\r\n case \"integer\":\r\n $output .= \"<\" . htmlspecialchars($key) . \" type='integer'>\" . htmlspecialchars($val) . \"</\" . htmlspecialchars($key) . \">\\n\";\r\n break;\r\n case \"double\":\r\n $output .= \"<\" . htmlspecialchars($key) . \" type='double'>\" . htmlspecialchars($val) . \"</\" . htmlspecialchars($key) . \">\\n\";\r\n break;\r\n case \"string\":\r\n $output .= \"<\" . htmlspecialchars($key) . \" type='string' size='\" . strlen($val) . \"'>\" . htmlspecialchars($val) . \"</\" . htmlspecialchars($key) . \">\\n\";\r\n break;\r\n default:\r\n $output .= \"<\" . htmlspecialchars($key) . \" type='unknown'>\" . gettype($val) . \"</\" . htmlspecialchars($key) . \">\\n\";\r\n break;\r\n }\r\n }\r\n $output .= ( $first) ? \"</data>\\n\" : \"\";\r\n return $output;\r\n}", "public function __toString()\n {\n $data = [];\n $key = $this->getKey();\n $value = $this->getValue();\n\n // Prevent double encoding\n if ($value[0] == '{' || $value[0] == '[') {\n $value = json_decode($value);\n }\n\n $data[$key] = $value;\n\n return json_encode($data);\n }", "public function toString(): string\n {\n $options = $this->toArray();\n\n return implode(' ', array_map(function ($value, string $key): string {\n if (is_array($value)) {\n $value = implode(' ', $value);\n } elseif (is_bool($value)) {\n $value = $value ? 'true' : 'false';\n } elseif (is_null($value)) {\n $value = 'null';\n }\n\n return $key . '=\"' . $value . '\"';\n }, $options, array_keys($options)));\n }", "final public function __toString():string\n {\n return static::class . '\\\\' . $this->key;\n }", "public function encode($key);", "public function __toString () {\n\t\t\n\t\t\treturn htmlspecialchars($this->Value);\n\t\t\n\t\t}", "function array_to_xml($tweet_info, &$xml_tweet_info) {\n foreach($tweet_info as $key => $value) {\n if(is_array($value)) {\n if(!is_numeric($key)){\n $subnode = $xml_tweet_info->addChild(\"$key\");\n array_to_xml($value, $subnode);\n }\n else{\n $subnode = $xml_tweet_info->addChild(\"item$key\");\n array_to_xml($value, $subnode);\n }\n }\n else {\n $xml_tweet_info->addChild(\"$key\",htmlspecialchars(\"$value\"));\n }\n }\n}", "function __toString()\n\t{\n\t\treturn \"oauth_token=\" .\n\t\tUtility::rfc3986UrlEncode( $this->key ) .\n\t\t\"&oauth_token_secret=\" .\n\t\tUtility::rfc3986UrlEncode( $this->secret );\n\t}", "function array2XML_node($key, $value, $level=0) {\n\t\tif (is_int($key)) $key = 'node';\n\n\t\t$tag_name \t= $key;\n\t\t$attribs\t= '';\n\t\t$node_value\t= '';\n\t\t$level ++;\n\t\t\n\t\t// Get Node Value\n\t\tif (is_array($value)) {\n\t\t\n\t\t\tforeach ($value as $sub_key => $sub_value) {\n\t\t\t\n\t\t\t\tif (substr($sub_key, 0, 1) == '@') {\n\t\t\t\t\t// Node Attribute\n\t\t\t\t\t$attribs .= ' '.substr($sub_key, 1).'=\"'.$sub_value.'\"';\n\t\t\t\t} else {\n\t\t\t\t\t$node_value .= array2XML_node($sub_key, $sub_value, $level);\n\t\t\t\t}\n\t\t\t\n\t\t\t}\t\n\t\t\t\n\t\t\t$node_value .= \"\\n\" . str_repeat(\"\\t\", $level);\n\t\t\n\t\t} else {\n\n\t\t\t$make_cdata = true;\n\n\t\t\tif (stripos($key, 'XML')\n\t\t\t\t|| is_numeric($value)\n\t\t\t\t|| preg_match(\"/^(\\\\t|\\\\r|\\\\n)*\\\\<data.*/\", $value) \n\t\t\t\t|| substr($value, 0, 6) == '<data>'){ $make_cdata = false; }\n\n\t\t\tif ($make_cdata)\t$value = '<![CDATA['.$value.']]>';\n\t\t\t\n\t\t\t$node_value = $value;\n\t\t\n\t\t}\n\n\t\treturn \"\\n\" . str_repeat(\"\\t\",$level).'<'.$tag_name.$attribs.'>'.$node_value.'</'.$tag_name.'>';\n\n\n}", "function attributesToString(){\n\t\t$out = \"\";\n\t\tif(!empty($this->attributes)){\n\t\t\tforeach($this->attributes as $a=>$v){\n\t\t\t\t$out.=\" $a=\\\"$v\\\"\";\n\t\t\t}\n\t\t}\n\t\treturn $out;\n\t}", "public function s3_key_render() {\n\t\t$options = get_option( 's3_media_sync_settings' );\n\t\t$value = ! empty( $options['key'] ) ? $options['key'] : '';\n\t\t?>\n\t\t<input type=\"text\" name=\"s3_media_sync_settings[key]\" value=\"<?php echo esc_attr( $value ); ?>\">\n\t\t<?php\n\t}", "public function toXMLFragment()\r\n {\r\n $xml = '';\r\n\r\n foreach ($this->fields as $fieldName => $field) {\r\n $fieldValue = $field['value'];\r\n\r\n if (!is_null($fieldValue)) {\r\n $fieldType = $field['type'];\r\n\r\n if ($this->isNumericArray($fieldType)) {\r\n if ($this->isComplexType($fieldType[0])) {\r\n foreach ($fieldValue as $item) {\r\n $xml .= sprintf('<%1$s>%2$s</%1$s>', $fieldName, $item->toXMLFragment());\r\n }\r\n } else {\r\n foreach ($fieldValue as $item) {\r\n $xml .= sprintf('<%1$s>%2$s</%1$s>', $fieldName, $this->escapeXML(\r\n $this->formatXMLFragmentValue($item, $fieldType[0])\r\n ));\r\n }\r\n }\r\n } else {\r\n if ($this->isComplexType($fieldType)) {\r\n $xml .= sprintf('<%1$s>%2$s</%1$s>', $fieldName, $fieldValue->toXMLFragment());\r\n } else {\r\n $xml .= sprintf('<%1$s>%2$s</%1$s>', $fieldName, $this->escapeXML(\r\n $this->formatXMLFragmentValue($fieldValue, $fieldType)\r\n ));\r\n }\r\n }\r\n }\r\n }\r\n\r\n return $xml;\r\n }", "function array_to_xml($parentkey, $info, &$xml_info) {\n foreach($info as $key => $value) {\n if(is_array($value)) {\n if(!is_numeric($key)){\n\t$subnode = $xml_info->addChild(\"$key\");\n\tarray_to_xml($key, $value, $subnode);\n } else {\n\t$subnode = $xml_info->addChild(substr ($parentkey, 0, -1));\n\tarray_to_xml(substr ($parentkey, 0, -1), $value, $subnode);\n }\n }\n else {\n $xml_info->addChild(\"$key\",\"$value\");\n }\n }\n}", "function arrayToXml($array, &$xml = '', $wrap='DATA', $upper=true) {\n\n // wrap XML with $wrap TAG //\n if ($wrap != null) {\n $xml .= \"<$wrap>\\n\";\n }\n // main loop //\n foreach ($array as $key=>$value) {\n \n \tif(is_array($value)) {\n \t\t// recursive call //\n \t\tarrayToXml($value, $xml,'ITEM');\n \t} else {\n \t\t// set tags in uppercase if needed //\n \tif ($upper == true) {\n \t$key = strtoupper($key);\n \t}\n \t// append to XML string //\n \t$xml .= \"<$key>\" . htmlspecialchars(trim($value)) . \"</$key>\";\n \t}\n }\n // close tag if needed //\n if ($wrap != null) {\n $xml .= \"</$wrap>\\n\";\n }\n}", "protected function attributesToHtmlCallback($k, $v)\n {\n return false === $v || is_null($v) || ('' === $v && 'value' != $k) ? '' : sprintf(' %s=\"%s\"', $k, $v); //no escaping?\n }", "protected function formatEnRow($key, $value)\n {\n return \" '\" . $this->formatKey($key) . \"' => '\" . $this->formatValue($value) . \"',\";\n }", "protected function contextToString($context)\r\n {\r\n $export = '';\r\n foreach ($context as $key => $value) {\r\n $export .= \"{$key}: \";\r\n $export .= preg_replace(array(\r\n '/=>\\s+([a-zA-Z])/im',\r\n '/array\\(\\s+\\)/im',\r\n '/^ |\\G /m'\r\n ), array(\r\n '=> $1',\r\n 'array()',\r\n ' '\r\n ), str_replace('array (', 'array(', var_export($value, true)));\r\n $export .= PHP_EOL;\r\n }\r\n return str_replace(array('\\\\\\\\', '\\\\\\''), array('\\\\', '\\''), rtrim($export));\r\n }", "public function serialize()\n {\n return serialize(\n array(\n \"key\" => $this->key,\n \"timeOver\" => $this->timeOver->getTimestamp(),\n \"content\" => $this->content\n )\n );\n }", "public function get_option_attribute_html($key)\n\t{\n\t\t$attributes = $this->get_option_attribute($key);\n\t\t$html = '';\n\t\t\n\t\tif ( iterable($attributes) ) {\n\t\t\tforeach ( $attributes as $name => $value ) {\n\t\t\t\t$html .= $name . '=\"' . htmlentities($value) . '\" ';\n\t\t\t}\n\t\t\t\n\t\t\t$html = ' ' . trim($html);\n\t\t}\n\t\t\n\t\treturn $html;\n\t}", "public function serialize()\n {\n return serialize(\n array('values' => $this->values, 'groups' => $this->groups)\n );\n }", "public static function TypemapLongToXml($value) {\n if (is_float($value)) {\n $value = sprintf('%.0f', $value);\n }\n // Any outer XML tag can be used here, as it is later removed by SoapClient.\n return sprintf('<value>%s</value>', $value);\n }", "function array_to_xml( $data, &$xml_data ) {\n foreach( $data as $key => $value ) {\n if( is_numeric($key) ){\n $key = 'application'; //dealing with <0/>..<n/> issues\n }\n if( is_array($value) ) {\n $subnode = $xml_data->addChild($key);\n $this->array_to_xml($value, $subnode);\n } else {\n $xml_data->addChild(\"$key\",htmlspecialchars(\"$value\"));\n }\n }\n }", "public function __toString(): string {\n $context = [];\n foreach ($this->solution as $key => $value) {\n $context[] = \"$key=$value\";\n }\n return '[Twilio.Events.V1.SubscribedEventContext ' . \\implode(' ', $context) . ']';\n }", "private static function _encodeDe048KvpForPost($key, $value) {\n return $key . '=' . base64_encode($value);\n }", "protected function buildKeyForData($sKey)\n\t{\n\t\tif (null === ($aTags = $this->getTaglist($sKey))) {\n\t\t\t// If the tags dont exist, neither will the value\n\t\t\treturn null;\n\t\t}\n\n\t\t$sTags= '';\n\t\tforeach ($aTags as $sTag) {\n\t\t\t$sTags .= \";$sTag=\" . $this->getVersionForTag($sTag);\n\t\t}\n\n\t\treturn $this->sKeyPrefix . ';v:' . $sKey . ';' . md5($sTags);\n\t}", "public function getParametersHTML()\n\t{\n\t\t// start html\n\t\t$HTML = '';\n\n\t\t// build & return html\n\t\tforeach($this->parameters as $key => $value) $HTML .= ' '. $key .'=\"'. $value .'\"';\n\t\treturn $HTML;\n\t}", "function array_to_xml($info, &$xml) {\n foreach($info as $key => $value) {\n if(is_array($value)) {\n $key = is_numeric($key) ? \"item\" : $key;\n $subnode = $xml->addChild(\"$key\");\n array_to_xml($value, $subnode);\n }\n else {\n \t$key = is_numeric($key) ? \"item\" : $key;\n $xml->addChild(\"$key\",htmlspecialchars(\"$value\"));\n }\n }\n }", "function toXML($mapKeysToText = false) {\r\n\t\t$database = database::getInstance();\r\n\t\tif ($mapKeysToText) {\r\n\t\t\t$query = \"SELECT name FROM #__sections WHERE id = \" . (int) $this->sectionid;\r\n\t\t\t$database->setQuery($query);\r\n\t\t\t$this->sectionid = $database->loadResult();\r\n\r\n\t\t\t$query = \"SELECT name FROM #__categories WHERE id = \" . (int) $this->catid;\r\n\t\t\t$database->setQuery($query);\r\n\t\t\t$this->catid = $database->loadResult();\r\n\r\n\t\t\t$query = \"SELECT name FROM #__users WHERE id = \" . (int) $this->created_by;\r\n\t\t\t$database->setQuery($query);\r\n\t\t\t$this->created_by = $database->loadResult();\r\n\t\t}\r\n\r\n\t\treturn parent::toXML($mapKeysToText);\r\n\t}", "function x_attr_json( $params = array() ) {\n\n $result = '';\n\n if ( ! empty( $params ) ) {\n $result = htmlspecialchars( wp_json_encode( array_filter( $params, 'strlen' ) ), ENT_QUOTES, 'UTF-8' );\n }\n\n return $result;\n\n}", "public function renderXML($data)\n {\n $content = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n <getautomb_key>\n <ep_status>'.$data['ep_status'].'</ep_status>\n <ep_message>'.$data['ep_message'].'</ep_message>\n <ep_cin>'.$data['ep_cin'].'</ep_cin>\n <ep_user>'.$data['ep_user'].'</ep_user>\n <ep_doc>'.$data['ep_doc'].'</ep_doc>\n </getautomb_key>';\n \n return $content;\n }", "public function getKey()\n {\n return (string)$this->_xml->key;\n }", "public function __toString() {\n\t\treturn $this->name.'='.$this->value;\n\t}", "Function TxtGenOutput( $sVal )\n {\n $sVal = str_replace ( \"<\" , \"&lt;\" , $sVal );\n $sVal = str_replace ( \">\" , \"&gt;\" , $sVal );\n $sVal = str_replace ( \"\\\"\" , \"&quot;\" , $sVal );\n return $sVal;\n }", "protected function escape_data_for_html() {\n\t\tforeach ($this->data as $key => $value) {\n\t\t\tif (is_array($value)) {\n\t\t\t\tforeach ($value as $sub_key => $sub_value) {\n\t\t\t\t\t$this->data[$key][$sub_key] = htmlspecialchars($sub_value);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->data[$key] = htmlspecialchars($value);\n\t\t\t}\n\t\t}\n\t}", "function v6_xtag($tag_name, $tag_value)\n{\n return '<' . $tag_name . '>' . htmlspecialchars(stripslashes($tag_value)) . '</' . $tag_name . '>' . \"\\r\\n\";\n}" ]
[ "0.6070489", "0.606479", "0.59306276", "0.591122", "0.58757174", "0.58082664", "0.5777976", "0.57665664", "0.5717718", "0.5711691", "0.56745964", "0.5668611", "0.56606054", "0.56580335", "0.5634288", "0.55571556", "0.55403763", "0.54979724", "0.54695326", "0.5459727", "0.5448152", "0.5440951", "0.54244643", "0.5423233", "0.5408581", "0.5399699", "0.538578", "0.53681123", "0.53672564", "0.53634393", "0.5342084", "0.533108", "0.5324632", "0.5297399", "0.5296184", "0.5251028", "0.5239315", "0.52341634", "0.52257085", "0.52193075", "0.5215745", "0.5202796", "0.5200228", "0.5200153", "0.518705", "0.51807755", "0.51644117", "0.51631504", "0.5152646", "0.51441896", "0.5140848", "0.5134558", "0.5122138", "0.51119465", "0.51115763", "0.5111141", "0.51101696", "0.510644", "0.5104293", "0.51018864", "0.5072857", "0.50682783", "0.506459", "0.5064094", "0.5063526", "0.50609434", "0.5055088", "0.5048432", "0.5048119", "0.50470567", "0.5037584", "0.5035948", "0.50318736", "0.50302607", "0.5003969", "0.5002348", "0.50020593", "0.49988425", "0.49745739", "0.4958825", "0.49525288", "0.49476746", "0.49353093", "0.49260837", "0.49226215", "0.49204075", "0.49191213", "0.49147102", "0.49111477", "0.4909084", "0.49034882", "0.4902795", "0.49011537", "0.49010158", "0.48931733", "0.48919508", "0.48906162", "0.4885898", "0.48779774", "0.4877185" ]
0.7188442
0
Uses bash command uuidgen to generate a Universally Unique IDentifier (UUID), a 128bit value guaranteed to be unique over both space and time, for use as the value of PayloadUUID
Использует команду bash uuidgen для генерации универсального уникального идентификатора (UUID), 128-битного значения, гарантирующего уникальность в пространстве и времени, для использования в качестве значения PayloadUUID
protected function gen_uuid() { return rtrim(shell_exec("uuidgen")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gen_uuid() {\n return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),\n mt_rand( 0, 0xffff ),\n mt_rand( 0, 0x0fff ) | 0x4000,\n mt_rand( 0, 0x3fff ) | 0x8000,\n mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )\n );\n}", "function generate_uuid() {\n \treturn sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n \t\tmt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),\n\t\t\tmt_rand( 0, 0xffff ),\n\t\t\tmt_rand( 0, 0x0fff ) | 0x4000,\n\t\t\tmt_rand( 0, 0x3fff ) | 0x8000,\n\t\t\tmt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )\n \t);\n }", "function gen_uuid() {\n\t return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n\t // 32 bits for \"time_low\"\n\t mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),\n\n\t // 16 bits for \"time_mid\"\n\t mt_rand( 0, 0xffff ),\n\n\t // 16 bits for \"time_hi_and_version\",\n\t // four most significant bits holds version number 4\n\t mt_rand( 0, 0x0fff ) | 0x4000,\n\n\t // 16 bits, 8 bits for \"clk_seq_hi_res\",\n\t // 8 bits for \"clk_seq_low\",\n\t // two most significant bits holds zero and one for variant DCE1.1\n\t mt_rand( 0, 0x3fff ) | 0x8000,\n\n\t // 48 bits for \"node\"\n\t mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )\n\t );\n\t}", "public static function get_uuid() {\n\t\t$data = openssl_random_pseudo_bytes( 16 );\n\t\t$data[6] = chr( ord( $data[6] ) & 0x0f | 0x40 ); // set version to 0100.\n\t\t$data[8] = chr( ord( $data[8] ) & 0x3f | 0x80 ); // set bits 6-7 to 10.\n\n\t\treturn vsprintf( '%s%s-%s-%s-%s-%s%s%s', str_split( bin2hex( $data ), 4 ) );\n\t}", "public function generateUUID()\n {\n $data = \\openssl_random_pseudo_bytes(16);\n $data[6] = \\chr(\\ord($data[6]) & 0x0f | 0x40); // set version to 0100\n $data[8] = \\chr(\\ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10\n return \\vsprintf('%s%s-%s-%s-%s-%s%s%s', \\str_split(\\bin2hex($data), 4));\n }", "function getUUID(){\n $data = random_bytes(16);\n $data[6] = chr(ord($data[6]) & 0x0f | 0x40);\n $data[8] = chr(ord($data[8]) & 0x3f | 0x80);\n return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));\n}", "private function generate_uuid() {\n return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n // 32 bits for \"time_low\"\n mt_rand(0, 0xffff), mt_rand(0, 0xffff),\n // 16 bits for \"time_mid\"\n mt_rand(0, 0xffff),\n // 16 bits for \"time_hi_and_version\",\n // four most significant bits holds version number 4\n mt_rand(0, 0x0fff) | 0x4000,\n // 16 bits, 8 bits for \"clk_seq_hi_res\",\n // 8 bits for \"clk_seq_low\",\n // two most significant bits holds zero and one for variant DCE1.1\n mt_rand(0, 0x3fff) | 0x8000,\n // 48 bits for \"node\"\n mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)\n );\n }", "function uuid() \n{\n return sprintf('%04x%04x%04x%03x4%04x%04x%04x%04x',\n mt_rand(0, 65535), \n mt_rand(0, 65535),\n mt_rand(0, 65535),\n mt_rand(0, 4095),\n bindec(substr_replace(sprintf('%016b', mt_rand(0, 65535)), '01', 6, 2)),\n mt_rand(0, 65535), \n mt_rand(0, 65535), \n mt_rand(0, 65535) \n ); \n}", "static private function getUUID() {\n\n\t\t$data = random_bytes(16);\n\t $data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0100\n\t $data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10\n\t return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));\n }", "function uuid() {\n $data = openssl_random_pseudo_bytes(16);\n assert(strlen($data) == 16);\n\n // Set version to 0100\n $data[6] = chr(ord($data[6]) & 0x0f | 0x40);\n // Set bits 6-7 to 10\n $data[8] = chr(ord($data[8]) & 0x3f | 0x80);\n\n // Output the 36 character UUID.\n return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));\n}", "function uuid() {\n if (function_exists(\"random_bytes\")) {\n $bytes = random_bytes(16);\n } elseif (function_exists(\"openssl_random_pseudo_bytes\")) {\n $bytes = openssl_random_pseudo_bytes(16);\n } elseif (function_exists(\"mcrypt_create_iv\")) {\n $bytes = mcrypt_create_iv(16);\n } else {\n throw new \\RuntimeException(\"No cryptographically secure random function available\");\n }\n\t// set version to 0100\n\t$bytes[6] = chr(ord($bytes[6]) & 0x0f | 0x40);\n\t// set bits 6-7 to 10\n\t$bytes[8] = chr(ord($bytes[8]) & 0x3f | 0x80);\n\treturn vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($bytes), 4));\n}", "function make_uuid()\n{\n\t\n/*\n2D015183- (8)\nFC70-\n4BBC-\n8471-\n09242E2AABBF (12)\n*/\n\n\t$uuid1arr = str_split(uniqid('', true));\n\t$uuid2arr = str_split(uniqid('', true));\n\t\n\t$uuid = \"\";\n\t\n\tfor ($i = 0; $i < 8; $i++)\n\t{\n\t\t$uuid = $uuid.$uuid1arr[$i];\n\t}\n\t\n\t$uuid = $uuid.\"-\";\n\t\n\tfor ($i = 7; $i < 11; $i++)\n\t{\n\t\t$uuid = $uuid.$uuid1arr[$i];\n\t}\n\t\n\t$uuid = $uuid.\"-\";\n\t\n\tfor ($i = 11; $i < 14; $i++)\n\t{\n\t\t$uuid = $uuid.$uuid1arr[$i];\n\t}\n\t\n\t$uuid = $uuid . $uuid1arr[15] . \"-\";\n\t\n\tfor ($i = 16; $i < 20; $i++)\n\t{\n\t\t$uuid = $uuid. $uuid1arr[$i];\n\t}\n\t\n\t$uuid = $uuid.\"-\";\n\t\n\tfor ($i = 15; $i < 23; $i++)\n\t{\n\t\t$uuid = $uuid.$uuid2arr[$i];\n\t}\n\t\n\tfor ($i = 10; $i < 14; $i++)\n\t{\n\t\t$uuid = $uuid.$uuid2arr[$i];\n\t}\n\t\n\treturn strtoupper($uuid);\n}", "public function uuid()\n {\n $arr = \\array_values(\\unpack('N1a/n4b/N1c', \\openssl_random_pseudo_bytes(16)));\n $arr[2] = ($arr[2] & 0x0FFF) | 0x4000;\n $arr[3] = ($arr[3] & 0x3FFF) | 0x8000;\n\n return \\vsprintf('%08x-%04x-%04x-%04x-%04x%08x', $arr);\n }", "public static function createUUID()\n {\n return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n mt_rand(0, 0xffff), mt_rand(0, 0xffff),\n mt_rand(0, 0xffff),\n mt_rand(0, 0x0fff) | 0x4000,\n mt_rand(0, 0x3fff) | 0x8000,\n mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)\n );\n }", "public static function generateUuid()\n {\n return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n mt_rand(0, 0xffff), mt_rand(0, 0xffff),\n mt_rand(0, 0xffff),\n mt_rand(0, 0x0fff) | 0x4000,\n mt_rand(0, 0x3fff) | 0x8000,\n mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)\n );\n }", "function gen_uuid_v1() {\n\treturn gen_uuid_timebased();\n}", "function gen_uuid_v4() {\n\treturn gen_uuid_random();\n}", "public static function createUuid() {\n\t\t$data = openssl_random_pseudo_bytes(16);\n\n\t\t// set the version to 0100\n\t\t$data[6] = chr(ord($data[6]) & 0x0f | 0x40);\n\t\t// set bits 6-7 to 10\n\t\t$data[8] = chr(ord($data[8]) & 0x3f | 0x80);\n\n\t\treturn vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));\n\t}", "static public function generateUUID() {\n\t\treturn sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n\t\t\tmt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),\n\t\t\tmt_rand( 0, 0x0fff ) | 0x4000,\n\t\t\tmt_rand( 0, 0x3fff ) | 0x8000,\n\t\t\tmt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ) );\n\t}", "function uuid()\n {\n \n return sprintf('%04x%04x%04x%03x4%04x%04x%04x%04x',\n mt_rand(0, 65535), mt_rand(0, 65535), // 32 bits for \"time_low\"\n mt_rand(0, 65535), // 16 bits for \"time_mid\"\n mt_rand(0, 4095), // 12 bits before the 0100 of (version) 4 for \"time_hi_and_version\"\n bindec(substr_replace(sprintf('%016b', mt_rand(0, 65535)), '01', 6, 2)),\n // 8 bits, the last two of which (positions 6 and 7) are 01, for \"clk_seq_hi_res\"\n // (hence, the 2nd hex digit after the 3rd hyphen can only be 1, 5, 9 or d)\n // 8 bits for \"clk_seq_low\"\n mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535) // 48 bits for \"node\"\n );\n }", "function createUuid4(){\n return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n mt_rand(0, 0xffff), mt_rand(0, 0xffff),\n mt_rand(0, 0xffff),\n mt_rand(0, 0x0fff) | 0x4000,\n mt_rand(0, 0x3fff) | 0x8000,\n mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)\n );\n}", "function generateUuid($specs = [8, 4, 4, 4, 12]) {\n $uuid = \"\";\n foreach ($specs as $nb) {\n $uuid .= substr(uniqid(), -$nb).\"-\";\n }\n\n return trim($uuid, '-');\n }", "function gaGenerateUUID() {\n\treturn sprintf(\"%04x%04x-%04x-%04x-%04x-%04x%04x%04x\",\n\t\tmt_rand(0, 0xffff), mt_rand(0, 0xffff),\n\t\tmt_rand(0, 0xffff),\n\t\tmt_rand(0, 0x0fff) | 0x4000,\n\t\tmt_rand(0, 0x3fff) | 0x8000,\n\t\tmt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)\n\t);\n}", "public function createUuid();", "static function uuid();", "public static function generateUUID()\n {\n return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n // 32 bits for \"time_low\"\n mt_rand(0, 0xffff), mt_rand(0, 0xffff),\n // 16 bits for \"time_mid\"\n mt_rand(0, 0xffff),\n // 16 bits for \"time_hi_and_version\",\n // four most significant bits holds version number 4\n mt_rand(0, 0x0fff) | 0x4000,\n // 16 bits, 8 bits for \"clk_seq_hi_res\",\n // 8 bits for \"clk_seq_low\",\n // two most significant bits holds zero and one for variant DCE1.1\n mt_rand(0, 0x3fff) | 0x8000,\n // 48 bits for \"node\"\n mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)\n );\n }", "protected function generateUUID() {\n\t\t/*\n\t\t*/\n\t \treturn sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n\t\t // 32 bits for \"time_low\"\n\t\t mt_rand(0, 0xffff), mt_rand(0, 0xffff),\n\t\t // 16 bits for \"time_mid\"\n\t\t mt_rand(0, 0xffff),\n\t\t // 16 bits for \"time_hi_and_version\",\n\t\t // four most significant bits holds version number 4\n\t\t mt_rand(0, 0x0fff) | 0x4000,\n\t\t // 16 bits, 8 bits for \"clk_seq_hi_res\",\n\t\t // 8 bits for \"clk_seq_low\",\n\t\t // two most significant bits holds zero and one for variant DCE1.1\n\t\t mt_rand(0, 0x3fff) | 0x8000,\n\t\t // 48 bits for \"node\"\n\t\t mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)\n\t\t );\n\t}", "function generateUUID()\n{\n return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n // 32 bits for \"time_low\"\n mt_rand(0, 0xffff), mt_rand(0, 0xffff),\n\n // 16 bits for \"time_mid\"\n mt_rand(0, 0xffff),\n\n // 16 bits for \"time_hi_and_version\",\n // four most significant bits holds version number 4\n mt_rand(0, 0x0fff) | 0x4000,\n\n // 16 bits, 8 bits for \"clk_seq_hi_res\",\n // 8 bits for \"clk_seq_low\",\n // two most significant bits holds zero and one for variant DCE1.1\n mt_rand(0, 0x3fff) | 0x8000,\n\n // 48 bits for \"node\"\n mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)\n );\n}", "static public function generateUUID() \n\t{\n return sprintf(\n\n '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n\n // 32 bits for \"time_low\"\n mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),\n\n // 16 bits for \"time_mid\"\n mt_rand( 0, 0xffff ),\n\n // 16 bits for \"time_hi_and_version\",\n // four most significant bits holds version number 4\n mt_rand( 0, 0x0fff ) | 0x4000,\n\n // 16 bits, 8 bits for \"clk_seq_hi_res\",\n // 8 bits for \"clk_seq_low\",\n // two most significant bits holds zero and one for variant DCE1.1\n mt_rand( 0, 0x3fff ) | 0x8000,\n\n // 48 bits for \"node\"\n mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff )\n );\n }", "function generateNewUuid() {\n return uniqid(\"CSC490\");\n}", "function genId( int $bytes = 16 ) : string {\n\treturn \\bin2hex( \\random_bytes( intRange( $bytes, 1, 16 ) ) );\n}", "function uuid() {\n\n // The field names refer to RFC 4122 section 4.1.2\n\n return sprintf('%04x%04x-%04x-%03x4-%04x-%04x%04x%04x',\n mt_rand(0, 65535), mt_rand(0, 65535), // 32 bits for \"time_low\"\n mt_rand(0, 65535), // 16 bits for \"time_mid\"\n mt_rand(0, 4095), // 12 bits before the 0100 of (version) 4 for \"time_hi_and_version\"\n bindec(substr_replace(sprintf('%016b', mt_rand(0, 65535)), '01', 6, 2)),\n // 8 bits, the last two of which (positions 6 and 7) are 01, for \"clk_seq_hi_res\"\n // (hence, the 2nd hex digit after the 3rd hyphen can only be 1, 5, 9 or d)\n // 8 bits for \"clk_seq_low\"\n mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535) // 48 bits for \"node\"\n );\n }", "private function uuid() {\n\n // The field names refer to RFC 4122 section 4.1.2\n\n return sprintf('%04x%04x-%04x-%03x4-%04x-%04x%04x%04x',\n mt_rand(0, 65535), mt_rand(0, 65535), // 32 bits for \"time_low\"\n mt_rand(0, 65535), // 16 bits for \"time_mid\"\n mt_rand(0, 4095), // 12 bits before the 0100 of (version) 4 for \"time_hi_and_version\"\n bindec(substr_replace(sprintf('%016b', mt_rand(0, 65535)), '01', 6, 2)),\n // 8 bits, the last two of which (positions 6 and 7) are 01, for \"clk_seq_hi_res\"\n // (hence, the 2nd hex digit after the 3rd hyphen can only be 1, 5, 9 or d)\n // 8 bits for \"clk_seq_low\"\n mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535) // 48 bits for \"node\"\n );\n }", "function gen_uuid() {\r\n\tif (function_exists ( 'com_create_guid' )) {\r\n\t\treturn com_create_guid ();\r\n\t} else {\r\n\t\tmt_srand ( ( double ) microtime () * 10000 ); //optional for php 4.2.0 and up.随便数播种,4.2.0以后不需要了。\r\n\t\t$charid = strtoupper ( md5 ( uniqid ( rand (), true ) ) ); //根据当前时间(微秒计)生成唯一id.\r\n\t\t$hyphen = chr ( 45 ); // \"-\"\r\n\t\t$uuid = '' . //chr(123)// \"{\"\r\n\t\t\t\tsubstr ( $charid, 0, 8 ) . $hyphen . substr ( $charid, 8, 4 ) . $hyphen . substr ( $charid, 12, 4 ) . $hyphen . substr ( $charid, 16, 4 ) . $hyphen . substr ( $charid, 20, 12 );\r\n\t\t//.chr(125);// \"}\"\r\n\t\treturn $uuid;\r\n\t}\r\n}", "function newUID () {\n\t$chars = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');\n\n\t$m_str = $chars; \n\t$rnd=0;\n\t$r = '';\n\t$uid = array();\n\tfor ($i=0; $i<36; $i++) {\n\t\tif ($i==8 || $i==13 || $i==18 || $i==23) {\n\t\t\t$uid[$i] = '-';\n\t\t} elseif ($i==14) {\n\t\t\t$uid[$i] = '4';\n\t\t} else {\n\t\t\tif ($rnd <= 0x02) {\n\t\t\t\t$rnd = 0x2000000 + ((mt_rand(100000,9999999)*.0000001*0x1000000)|0);\n\t\t\t}\n\t\t\t$r = $rnd & 0xf;\n\t\t\t$rnd = $rnd >> 4;\n\t\t\t$uid[$i] = $m_str[($i == 19) ? ($r & 0x3) | 0x8 : $r];\n\t\t}\n\t}\n\treturn implode(\"\",$uid);\n}", "public function uuid() {\n $nhex = str_replace(array('-','{','}'), '', rand(50000));\n\n // Binary Value\n $nstr = '';\n\n // Convert Namespace UUID to bits\n for($i = 0; $i < strlen($nhex); $i+=2) {\n $nstr .= chr(hexdec($nhex[$i].$nhex[$i+1]));\n }\n\n // Calculate hash value\n $hash = md5($nstr . microtime());\n\n return sprintf('%08s-%04s-%04x-%04x-%12s',\n\n // 32 bits for \"time_low\"\n substr($hash, 0, 8),\n\n // 16 bits for \"time_mid\"\n substr($hash, 8, 4),\n\n // 16 bits for \"time_hi_and_version\",\n // four most significant bits holds version number 3\n (hexdec(substr($hash, 12, 4)) & 0x0fff) | 0x3000,\n\n // 16 bits, 8 bits for \"clk_seq_hi_res\",\n // 8 bits for \"clk_seq_low\",\n // two most significant bits holds zero and one for variant DCE1.1\n (hexdec(substr($hash, 16, 4)) & 0x3fff) | 0x8000,\n\n // 48 bits for \"node\"\n substr($hash, 20, 12)\n );\n }", "function gen_uuid_v7() {\n\treturn gen_uuid_unix_epoch();\n}", "function uuid() \n\t{\n\t\t\n\t\treturn sprintf('%04x%04x-%04x-%03x4-%04x-%04x%04x%04x',\n\t\t\tmt_rand(0, 65535), mt_rand(0, 65535), // 32 bits for \"time_low\"\n\t\t\tmt_rand(0, 65535), // 16 bits for \"time_mid\"\n\t\t\tmt_rand(0, 4095), // 12 bits before the 0100 of (version) 4 for \"time_hi_and_version\"\n\t\t\tbindec(substr_replace(sprintf('%016b', mt_rand(0, 65535)), '01', 6, 2)),\n\t\t\t\t// 8 bits, the last two of which (positions 6 and 7) are 01, for \"clk_seq_hi_res\"\n\t\t\t\t// (hence, the 2nd hex digit after the 3rd hyphen can only be 1, 5, 9 or d)\n\t\t\t\t// 8 bits for \"clk_seq_low\"\n\t\t\tmt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535) // 48 bits for \"node\" \n\t\t\t); \n\t}", "public static function generateUUID()\n {\n return \\Uuid::generate(4)->string;\n }", "function generateUID(){\n\t\treturn rand(pow(10, 3), pow(10, 4)-1); //random 4 digit number\n\t}", "function gen_uuid_v6() {\n\treturn gen_uuid_reordered();\n}", "function opendata_content_uuid_create() {\n return strtolower(sprintf('%04X%04X-%04X-%04X-%04X-%04X%04X%04X', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(16384, 20479), mt_rand(32768, 49151), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535)));\n}", "function uuidv4()\r\n{\r\n\t//When the openssl extension is not available in *nix systems try using urandom\r\n\tif(function_exists('openssl_random_pseudo_bytes')){\r\n\t\t$data = openssl_random_pseudo_bytes(16);\r\n\t} else {\r\n\t\t$data = file_get_contents('/dev/urandom', NULL, NULL, 0, 16);\r\n\t}\r\n\r\n\t$data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0100\r\n\t$data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10\r\n\r\n\treturn vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));\r\n}", "public function generateUniqueIdentifier(): string;", "public static function uuid()\n {\n return sprintf(\n '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',\n // 32 bits for \"time_low\"\n mt_rand(0, 65535),\n mt_rand(0, 65535),\n // 16 bits for \"time_mid\"\n mt_rand(0, 65535),\n // 12 bits before the 0100 of (version) 4 for \"time_hi_and_version\"\n mt_rand(0, 4095) | 0x4000,\n // 16 bits, 8 bits for \"clk_seq_hi_res\",\n // 8 bits for \"clk_seq_low\",\n // two most significant bits holds zero and one for variant DCE1.1\n mt_rand(0, 0x3fff) | 0x8000,\n // 48 bits for \"node\"\n mt_rand(0, 65535),\n mt_rand(0, 65535),\n mt_rand(0, 65535)\n );\n }", "public function generateUuid()\n {\n $this->uuid = $this->uuid ?: Uuid::uuid();\n }", "function uuid()\n{\n\t$chars = md5(uniqid(mt_rand(), true));\n\t$uuid = substr($chars,0,8) . '-';\n\t$uuid .= substr($chars,8,4) . '-';\n\t$uuid .= substr($chars,12,4) . '-';\n\t$uuid .= substr($chars,16,4) . '-';\n\t$uuid .= substr($chars,20,12);\n\treturn $uuid;\n}", "public function createId() : string\n {\n $uuid = $this->create();\n return $uuid->bytes;\n }", "abstract protected function get_uuid();", "public function generateId()\n {\n return sprintf(\n '%08X-%04X-%04X-%02X%02X-%012X',\n mt_rand(),\n mt_rand(0, 65535),\n bindec(substr_replace(\n sprintf('%016b', mt_rand(0, 65535)), '0100', 11, 4)\n ),\n bindec(substr_replace(sprintf('%08b', mt_rand(0, 255)), '01', 5, 2)),\n mt_rand(0, 255),\n mt_rand()\n );\n }", "public static function getUuid()\n\t{\n\t\t\n\t\treturn sprintf('A%04x%04x-%04x-%03x4-%04x-%04x%04x%04x', mt_rand(0, 65535), mt_rand(0, 65535), // 32 bits for \"time_low\"\n\t\tmt_rand(0, 65535), // 16 bits for \"time_mid\"\n\t\tmt_rand(0, 4095), // 12 bits before the 0100 of (version) 4 for \"time_hi_and_version\"\n\t\tbindec(substr_replace(sprintf('%016b', mt_rand(0, 65535)), '01', 6, 2)), // 8 bits, the last two of which (positions 6 and 7) are 01, for \"clk_seq_hi_res\"\n\t\t// (hence, the 2nd hex digit after the 3rd hyphen can only be 1, 5, 9 or d)\n\t\t// 8 bits for \"clk_seq_low\"\n\t\tmt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535));// 48 bits for \"node\");\n\t}", "function gen_uuid_unix_epoch() {\n\t$uuid = gen_uuid_random();\n\n\t// Add the timestamp\n\tusleep(1000); // Wait 1ms, to make sure that the time part changes if multiple UUIDs are generated\n\tif (function_exists('gmp_init')) {\n\t\tlist($ms,$sec) = explode(' ', microtime(false));\n\t\t$sec = gmp_init($sec, 10);\n\t\t$ms = gmp_init(substr($ms,2,3), 10);\n\t\t$unix_ts = gmp_strval(gmp_add(gmp_mul($sec, '1000'), $ms),16);\n\t} else {\n\t\t$unix_ts = dechex((int)round(microtime(true)*1000));\n\t}\n\t$unix_ts = str_pad($unix_ts, 12, '0', STR_PAD_LEFT);\n\tfor ($i=0;$i<8;$i++) $uuid[$i] = substr($unix_ts, $i, 1);\n\tfor ($i=0;$i<4;$i++) $uuid[9+$i] = substr($unix_ts, 8+$i, 1);\n\n\t// set version\n\t$uuid[14] = '7';\n\n\treturn $uuid;\n}", "function generate_guid() {\r\n\t$charid = strtoupper(md5(uniqid(mt_rand(), true)));\r\n\t$hyphen = chr(45);\r\n\t$uuid = chr(123)\r\n\t.substr($charid, 0, 8).$hyphen\r\n\t.substr($charid, 8, 4).$hyphen\r\n\t.substr($charid,12, 4).$hyphen\r\n\t.substr($charid,16, 4).$hyphen\r\n\t.substr($charid,20,12)\r\n\t.chr(125);\r\n\treturn $uuid;\r\n}", "function kis_uuid($hyphen='',$prefix = '') {\n\t//Using without prefix.\n\t//echo uuid(); //Returns like ‘1225c695-cfb8-4ebb-aaaa-80da344e8352′ \n\t//Using with prefix\n\t//echo uuid('-','urn:uuid:');//Returns like ‘urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344e8352′\n\n\t// base on function uuid() ,mod for sorted\n\t//53d1be2f7b9392.93290838#53d1be2f-7b93-92$fe-7022-6a0493521f1c\n\t//53d1bdd7b0b6b#53d1bdd7-b0b6-b$db-bc4c-69b2cf0334ce\n\t$kk = uniqid('',true); //53d1bc74439ba0.80927708\n\t$kk = explode('.', $kk);\n\t$kk= $kk[0];\n\t// $kk = uniqid(); //53d1bdd7b0b6b\n\t$jj=1;\n\tif(strlen($kk)>13){\n\t$jj=strlen($kk)-12; //-13+1\n\t}\n\t$chars = md5(uniqid(mt_rand(), true));\n\t$uuid = substr($kk, 0, 8).$hyphen\n\t.substr($kk, 8, 4).$hyphen;\n\t$uuid .= substr($kk, 12, $jj).substr($chars, 12,(4-$jj)).$hyphen\n\t.substr($chars, 16, 4).$hyphen\n\t.substr($chars, 20, 12);\n\treturn $prefix.$uuid;\n}", "function getUniId(){\n $str=time();\n return $str.str_pad(rand(0,10000),4,0);\n}", "function gen_uuid_reordered() {\n\t$uuid = gen_uuid_timebased();\n\n\t// Convert to UUIDv6\n\treturn uuid1_to_uuid6($uuid);\n}", "public function createPaymentUniqueId()\n {\n return Random::getAlphanumericString(32);\n }", "function uuidv4(){\n\n\t\t return implode('-', [\n\t bin2hex(random_bytes(4)),\n\t bin2hex(random_bytes(2)),\n\t bin2hex(chr((ord(random_bytes(1)) & 0x0F) | 0x40)) . bin2hex(random_bytes(1)),\n\t bin2hex(chr((ord(random_bytes(1)) & 0x3F) | 0x80)) . bin2hex(random_bytes(1)),\n\t bin2hex(random_bytes(6))\n\t\t ]);\n\t\t}", "private function generateMessageId(): string\n {\n $data = random_bytes(16);\n assert(strlen($data) == 16);\n $data[6] = chr(ord($data[6]) & 0x0f | 0x40);\n $data[8] = chr(ord($data[8]) & 0x3f | 0x80);\n\n // Output the 36 character UUID.\n return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));\n }", "public function generateNewUniqueIdentifier(): string\n {\n $identifier = null;\n do {\n try {\n $identifier = bin2hex(random_bytes(7));\n } catch (\\Exception $e) {\n }\n } while ($this->findByIdentifier($identifier));\n\n return $identifier;\n }", "function uuid()\n {\n $currentTime = (string)microtime(true);\n\n $randNumber = (string)rand(10000, 1000000);\n\n $shuffledString = str_shuffle(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\");\n\n return md5($currentTime . $randNumber . $shuffledString);\n }", "private function _generateUniqueID(){\n\t\t//This will produce something like: 14d9bd2fec55ff\n\t\treturn uniqid(true);\n\t}", "function generateGUID() {\n $data = openssl_random_pseudo_bytes(16);\n $data[6] = chr(ord($data[6]) & 0x0f | 0x40); // set version to 0100\n $data[8] = chr(ord($data[8]) & 0x3f | 0x80); // set bits 6-7 to 10\n return vsprintf('%s%s%s%s%s%s%s%s', str_split(bin2hex($data), 4));\n}", "public function genUuid()\n {\n return Uuid::uuid4();\n }", "public function uuid();", "public function uuid();", "function uuidv4()\n{\n return implode('-', [\n bin2hex(random_bytes(4)),\n bin2hex(random_bytes(2)),\n bin2hex(chr((ord(random_bytes(1)) & 0x0F) | 0x40)) . bin2hex(random_bytes(1)),\n bin2hex(chr((ord(random_bytes(1)) & 0x3F) | 0x80)) . bin2hex(random_bytes(1)),\n bin2hex(random_bytes(6))\n ]);\n}", "protected static function generateId(): string\n {\n return bin2hex(random_bytes(10));\n }", "function uuid($prefix = '')\n{\n $chars = md5(uniqid(mt_rand(), true));\n $uuid = substr($chars,0,8) . '-';\n $uuid .= substr($chars,8,4) . '-';\n $uuid .= substr($chars,12,4) . '-';\n $uuid .= substr($chars,16,4) . '-';\n $uuid .= substr($chars,20,12);\n return $prefix . $uuid;\n}", "public static function generateId()\n {\n return dechex(time()) . bin2hex(random_bytes(8));\n }", "protected static function generateToken() {\n return Uuid::generate();\n }", "function generate_guid() {\r\n \r\n // These two octets get special treatment\r\n $time_hi_and_version = sprintf('%02x', (1 << 6) + mt_rand(0, 15)); // 0100 plus 4 random bits\r\n $clock_seq_hi_and_reserved = sprintf('%02x', (1 << 7) + mt_rand(0, 63)); // 10 plus 6 random bits\r\n \r\n // Need another 14 random octects\r\n $pool = '';\r\n for($i = 0; $i < 7; ++$i) {\r\n $pool .= sprintf('%04x', mt_rand(0, 65535));\r\n }\r\n \r\n // time_low = 4 octets\r\n $random = substr($pool, 0, 8).'-';\r\n \r\n // time_mid = 2 octets\r\n $random .= substr($pool, 8, 4).'-';\r\n \r\n // time_high_and_version = 2 octets\r\n $random .= $time_hi_and_version.substr($pool, 12, 2).'-';\r\n \r\n // clock_seq_high_and_reserved = 1 octet\r\n $random .= $clock_seq_hi_and_reserved;\r\n \r\n // clock_seq_low = 1 octet\r\n $random .= substr($pool, 13, 2).'-';\r\n \r\n // node = 6 octets\r\n $random .= substr($pool, 14, 12);\r\n \r\n return $random;\r\n }", "function wp_generate_uuid4()\n{\n}", "static function timeuuid();", "protected function generateId()\n {\n return '_' . bin2hex(openssl_random_pseudo_bytes(8));\n }", "function gen_uuid_v3($namespace_uuid, $name) {\n\treturn gen_uuid_md5_namebased($namespace_uuid, $name);\n}", "protected function generateUUID()\n {\n return uniqid();\n }", "function upnp_uuid() {\n\t\t$uuid = md5(get_interface_mac(get_real_interface(\"wan\")));\n\t\t/* put uuid in correct format 8-4-4-4-12 */\n\t\treturn substr($uuid, 0, 8) . '-' . substr($uuid, 9, 4) . '-' . substr($uuid, 13, 4) . '-' . substr($uuid, 17, 4) . '-' . substr($uuid, 21, 12);\n\t}", "public static function create()\n {\n if (function_exists('com_create_guid')) {\n return com_create_guid();\n } else {\n mt_srand((double)microtime() * 10000);//optional for php 4.2.0 and up.\n $charid = strtoupper(md5(uniqid(rand(), true)));\n $hyphen = chr(45);// \"-\"\n $uuid = chr(123)// \"{\"\n . substr($charid, 0, 8) . $hyphen\n . substr($charid, 8, 4) . $hyphen\n . substr($charid, 12, 4) . $hyphen\n . substr($charid, 16, 4) . $hyphen\n . substr($charid, 20, 12)\n . chr(125);// \"}\"\n return $uuid;\n }\n }", "function gen_uuid_v5($namespace_uuid, $name) {\n\treturn gen_uuid_sha1_namebased($namespace_uuid, $name);\n}", "protected function genUUID($data)\n {\n /*\n * 1, create a guid\n * check and append the node name to\n * guarantee the basic server unique\n */\n $prefix = NULL;\n if ( defined('SR_NODE_NAME') ) {\n $prefix = substr(md5(SR_NODE_NAME), 0, 4);\n } else {\n $prefix = sprintf(\"%04x\", mt_rand(0, 0xffff));\n }\n\n $tArr = explode(' ', microtime());\n $tsec = $tArr[1];\n $msec = $tArr[0];\n if ( ($sIdx = strpos($msec, '.')) !== false ) {\n $msec = substr($msec, $sIdx + 1);\n }\n\n return sprintf(\n \"%08x%08x%0s%04x\",\n $tsec,\n $msec,\n $prefix,\n mt_rand(0, 0xffff)\n );\n }", "function UUIDv4(): string\n {\n // Generate the UUID\n try {\n $bytes = random_bytes(16);\n $bytes[6] = chr((ord($bytes[6]) & 0x0f) | 0x40);\n $bytes[8] = chr((ord($bytes[8]) & 0x3f) | 0x80);\n $uuid = \\vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($bytes), 4));\n } catch (Exception $e) {\n throw new RuntimeException('Cannot generate UUID()');\n }\n\n // Return the UUID\n return $uuid;\n }", "public static function generate()\n {\n return new Uuid(BaseUuid::uuid4());\n }", "private static function getUuid()\n\t{\n\t\t$uuid = Uuid::generate(4);\n\t\treturn $uuid->string;\n\t}", "private function generateUniqueId(): string\n {\n return Uuid::uuid4()->toString();\n }", "function create_guid() {\n $charid = strtoupper(md5(uniqid(mt_rand(), true)));\n $hyphen = chr(45); // \"-\"\n $uuid = substr($charid, 0, 8) . $hyphen\n . substr($charid, 8, 4) . $hyphen\n . substr($charid, 12, 4) . $hyphen\n . substr($charid, 16, 4) . $hyphen\n . substr($charid, 20, 12);\n return $uuid;\n}", "function gen_uuid_v8($block1_32bit, $block2_16bit, $block3_12bit, $block4_14bit, $block5_48bit) {\n\treturn gen_uuid_custom($block1_32bit, $block2_16bit, $block3_12bit, $block4_14bit, $block5_48bit);\n}", "protected function _generateId()\n {\n return strval(new Horde_Support_Randomid());\n }", "public function generateUID()\n\t{\n\t\t$this->uid = $this->genUuid();\n\t\t$this->uid = strtoupper($this->uid);\n\t}", "function create_GUID()\r\n{\r\n\treturn sprintf('%04X%04X-%04X-%04X-%04X-%04X%04X%04X', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(16384, 20479), mt_rand(32768, 49151), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535));\r\n}", "protected function generateUId()\n {\n return md5(uniqid('', true) . '|' . microtime());\n }", "function getGUID(){\n mt_srand((double)microtime()*10000);//optional for php 4.2.0 and up.\n $charid = strtoupper(md5(uniqid(rand(), true)));\n $hyphen = chr(45);\n $uuid = substr($charid, 0, 8).$hyphen\n .substr($charid, 8, 4).$hyphen\n .substr($charid,12, 4).$hyphen\n .substr($charid,16, 4).$hyphen\n .substr($charid,20,12);\n return $uuid;\n }", "public function generateNewUuid()\n {\n return Uuid::uuid4();\n }", "public function NewUid()\n {\n $uuid = (string) Str::uuid();\n $uuid = str_replace(\"-\", \"\", $uuid);\n return $uuid;\n }", "public static function generateUUID(){\n $idSql = \"SELECT uuid_generate_v4()\";\n $id = \\Phalcon\\DI::getDefault()->getDb()->fetchOne($idSql);\n $id = $id[0];\n\n return $id;\n }", "public function generateUid()\n {\n return crc32(uniqid());\n }", "protected function generateId()\n {\n // @todo: evaluate the usage of ramsey/uuid\n return uniqid();\n }", "private function genId()\n\t{\n\t\treturn oxUtilsObject::getInstance()->generateUId();\n\t}", "public function uuid(): string;", "public function uuid() {}" ]
[ "0.7640805", "0.75381434", "0.75273776", "0.7523869", "0.750293", "0.7479167", "0.73948497", "0.7383016", "0.7360744", "0.7313029", "0.7268972", "0.7261097", "0.72363424", "0.72335154", "0.72330666", "0.7221745", "0.72120714", "0.7198289", "0.7196583", "0.71770084", "0.7171828", "0.7165669", "0.71459144", "0.71324015", "0.712654", "0.7126337", "0.7126217", "0.71189904", "0.71039367", "0.7103021", "0.70586926", "0.7056717", "0.7056024", "0.70496213", "0.7038639", "0.70329845", "0.70264435", "0.7001292", "0.7000054", "0.69904315", "0.69841886", "0.6983403", "0.69731504", "0.69516057", "0.69256115", "0.6922227", "0.6921416", "0.6913713", "0.6904008", "0.6889324", "0.6872311", "0.6864268", "0.68581456", "0.6846688", "0.68341404", "0.6827393", "0.6822616", "0.6820899", "0.6815837", "0.6810847", "0.6809569", "0.68091434", "0.68008107", "0.6796494", "0.6795175", "0.6795175", "0.6790567", "0.67803776", "0.67736363", "0.6773069", "0.67728287", "0.6763181", "0.6758514", "0.6756955", "0.6755226", "0.6751814", "0.67378193", "0.67344475", "0.6731429", "0.67277724", "0.67259824", "0.6693522", "0.6691232", "0.6686454", "0.6684366", "0.668393", "0.6683618", "0.66724586", "0.6670451", "0.66441566", "0.6641414", "0.66395557", "0.66307324", "0.6626821", "0.6625952", "0.66257274", "0.6621813", "0.661195", "0.66106814", "0.6609713" ]
0.79633933
0
Get mail head file.
Получить файл заголовка почты.
public function getHeadMailFile() { return realpath(__DIR__ . '/../../etc/header.html'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getHead(){\n\t\t$ct = new EmailHeaderContentType($this->contentType);\n\t\tif (count($this->childParts) !== 0){\n\t\t\t$ct->setParameter(\"boundary\", $this->boundary);\n\t\t}\n\t\tif ($this->charset != ''){\n\t\t\t$ct->setParameter(\"charset\", $this->charset);\n\t\t}\n\t\tif ($this->name != ''){\n\t\t\t$ct->setParameter(\"name\", $this->name);\n\t\t}\n\t\tif ($this->method != ''){\n\t\t\t$ct->setParameter(\"method\", $this->method);\n\t\t}\n\t\t$str = $ct->__toString();\n\t\tforeach ($this->headers as $header){\n\t\t\t$str .= $header;\n\t\t}\n\n\t\treturn $str;\n\t}", "public function getMimeHead()\n {\n return $this->_Header;\n }", "function getHead() {\n\t\t$document=& JFactory::getDocument();\n\t\treturn $document->get('head');\n\t }", "public function getHead() : string\n {\n return $this->head;\n }", "public function getHeadersFile()\n {\n return $this->headersFile;\n }", "function getHtmlHead() {\n\n\t\treturn \"\";\n\t}", "public function getCustomHeader() {\n if ($this->_exists) { //if exists...\n return $this->_realpath . '/header.php';\n }\n return '';\n }", "public function getFooterMailFile()\n {\n return realpath(__DIR__ . '/../../etc/footer.html');\n }", "public function getHead() {\r\n\t\t\r\n\t\t//Empty sting to concatenate the HTML output\r\n\t\t$content = \"\";\r\n\t\t\r\n\t\t//Head\r\n\t\t$content .= '<head>';\r\n\t\t\r\n\t\t\t//Meta contents\r\n\t\t\t$content .= '<meta charset=\"utf-8\">';\r\n\t\t\t$content .= '<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, shrink-to-fit=no\">';\r\n\t\t\t\r\n\t\t\t//Webpage title\r\n\t\t\t$content .= '<title>'. $this->websiteTitle .' - '. $this->pageTitle .'</title>';\r\n\t\t\t\r\n\t\t\t/* CSS Files */\r\n\t\t\t//Bootstrap core CSS\r\n\t\t\t$content .= '<link href=\"vendor/bootstrap/css/bootstrap.min.css\" rel=\"stylesheet\">';\r\n\t\t\t\r\n\t\t\t//Custom CSS\r\n\t\t\t$content .= '<link href=\"css/safetyFirst.css\" rel=\"stylesheet\">';\r\n\t\t\t\r\n\t\t$content .= '</head>';\r\n\t\t\r\n\t\t//Return the head contents to the caller function\r\n\t\treturn $content;\r\n\t}", "public function getHead()\n\t{\n\t\t$outputP = $this->pageDocType;\n\t\t$outputP .= $this->getIncludes();\n\t\t$outputP .= $this->getBodyTag();\t\t\t\t\n\n\t\treturn $outputP;\n\t\t\n\t}", "function PrintHead()\n{\n $head = file_get_contents(\"templates/head.html\");\n print $head;\n}", "private function getHeader()\n {\n $return = <<<HED\n<!DOCTYPE html>\n<html xmlns=\"https://www.w3.org/1999/xhtml\">\n<head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n <title>$this->subject</title>\n</head>\n<body>\n <table>\nHED;\n\n if ($this->layout == 'horizontal') {\n $return .= '\n <tr>\n <th>Timestamp</th>\n <th>Level</th>\n <th>Code</th>\n <th>Message</th>\n <th>File</th>\n <th>Line</th>\n </tr>';\n }\n\n return $return;\n }", "public function getFileHeader()\n {\n if (is_null($this->fileHeader)) {\n $this->setFileHeader();\n }\n\n return $this->fileHeader;\n }", "function getHeader()\n\t\t{\t\t\t\n\t\t\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n\t\t\t$headers.= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\t\n\t\t\t$headers.= 'To: '.$this->toAddress.'' . \"\\r\\n\";\n\t\t\t$headers.= 'From: '.$this->fromName.' <'.$this->fromAddress.'>' . \"\\r\\n\";\t\t\n\t\t\treturn $headers;\n\t\t\t\n\t\t}", "public function getHeadPic()\n {\n return $this->head_pic;\n }", "public function getEmailTemplateFile() {}", "public function getMailMIME()\n {\n }", "public function head()\n {\n $output = [\n 'meta' => $this->getView()->fetch('meta'),\n 'assets' => $this->assets('css'),\n 'fetch_css' => $this->getView()->fetch('css'),\n 'fetch_css_bottom' => $this->getView()->fetch('css_bottom'),\n ];\n\n return implode('', $output);\n }", "public function getHead()\n {\n return $this->head;\n }", "public function getHead()\n {\n return $this->head;\n }", "public function getHead()\n {\n return $this->head;\n }", "public function getHead()\n {\n return $this->head;\n }", "final private function getHeadContent() {\n\t\t$str = '';\n\t\t\n\t\t// Include jquery.\n\t\t$this->includeJquery();\n\t\t\n\t\t// Get the css includes.\n\t\t$str .= $this->getCssIncludes();\n\t\t\n\t\t// Get the javascript includes.\n\t\t$str .= $this->getJavascriptIncludes();\n\t\t\n\t\treturn $str;\n\t}", "private function getHead()\n {\n $repository = $this->getRepository();\n\n try {\n //@NOTE: As `getHead` may return Reference|Commit|null we just use (string) HEAD\n /*$head = */$repository->getHead();\n $head = 'HEAD';\n } catch (ReferenceNotFoundException $exception) {\n if ($this->isInitialCommit($exception->getMessage())) {\n //@NOTE: Initial commit, diff against an empty tree object\n $head = '4b825dc642cb6eb9a060e54bf8d69288fbee4904';\n } else {\n throw $exception;\n }\n }\n\n return $head;\n }", "protected function getLiferaftFile()\n\t{\n\t\tif ( ! file_exists($path = getcwd().'/liferaft.md'))\n\t\t{\n\t\t\t$this->failAndKill('Liferaft file not found.');\n\t\t}\n\n\t\t$contents = file_get_contents($path);\n\n\t\tif (trim(strtok($contents, \"\\n\")) == 'Issue Report Title')\n\t\t{\n\t\t\t$this->failAndKill('Issue title has not been set.');\n\t\t}\n\n\t\treturn $contents;\n\t}", "public function head() : string\n {\n return $this -> head;\n }", "public function getHead() {}", "private function getHead($gitDir) {\n\t\treturn trim(@file_get_contents(\"$gitDir/refs/heads/master\")); // @ - file may not exist?\n\t}", "public function getFilename() : ?string\n {\n return $this->getHeaderContainer()->getFilename();\n }", "static function getHeader()\n\t{\n\t\techo file_get_contents(\"templates/header.php\");\n\t}", "public function getHead() {\r\n\t\treturn $this->head;\r\n\t}", "public function getReturnHead()\n {\n return $this->get(self::RETURN_HEAD);\n }", "public function getHeaders()\n {\n $res = 'Content-Type: '.$this->type;\n\n if ($this->charset) {\n $res.= '; charset=\"'.$this->charset.'\"';\n }\n\n $res .= Zend_Mime::LINEEND\n . 'Content-Transfer-Encoding: ' . $this->encoding\n . Zend_Mime::LINEEND;\n\n if ($this->id) {\n $res.= 'Content-ID: <' .$this->id. '>' . Zend_Mime::LINEEND;\n }\n\n if ($this->disposition) {\n $res.= 'Content-Disposition: ' . $this->disposition;\n if ($this->filename) {\n $res .= '; filename=\"' .$this->filename. '\"';\n }\n $res .= Zend_Mime::LINEEND;\n }\n\n if ($this->description) {\n $res .= 'Content-Description: ' . $this->description . Zend_Mime::LINEEND;\n }\n\n return $res;\n }", "private function getHead() {\n return $this->getInnerContainer()->offsetGet(\"heading\");\n }", "public function head(string $path);", "function MAIL_getHeader($from)\n{\n\treturn(\"From: $from\\n\".\n\t\"Bcc: \".CONF_MAIL_adminMail.\"\\n\".\n\t\"Reply-To: $from\\n\" .\n\t'X-Mailer: '.CONF_MAIL_mailer.\"\\n\");\n}", "abstract protected function getCommitMessageHead();", "function ToHeader() \n\t{ \n\t\t$attachmentData = $this->GetContent(); //** get content for the header.\n\t\tif($attachmentData == null) //** no valid attachment content.\n \t\treturn null; //** no header can be generted. \n\n\t\t//** add the content type and file name of the attachment. \n\t\t$header = \"Content-Type: $this->ContentType;\"; \n\n\t\t//** if an attachment then add the appropriate disposition and file name(s).\n\t\tif(!$this->HasLiteralContent())\n \t{\n \t\t$header .= \" name=\\\"\" . basename($this->FilePath) . \"\\\"\" . EmailNewLine .\n \"Content-Disposition: attachment; filename=\\\"\" . \n basename($this->FilePath) . \"\\\"\"; \n\t\t}\n \n\t\t$header .= EmailNewLine;\n\n\t\t//** add the key for the content encoding of the attachment body to follow. \n\t\t$header .= \"Content-Transfer-Encoding: base64\" . EmailNewLine . \n EmailNewLine; \n\n\t\t//** add the attachment data to the header. encode the binary data in BASE64 \n\t\t//** and break the encoded data into the appropriate chunks. \n\n \t$header .= chunk_split(base64_encode($attachmentData), 76, EmailNewLine) .\n EmailNewLine; \n\n \treturn $header; //** return the headers generated by file. \n \t}", "public static function get_pdf_header()\n {\n require APPPATH . '/config/custom/config1.php';\n\n $logo = get_local_dir($config['path_logo']);\n $prrm = get_local_dir($config['path_prrm_logo']);\n\n $logo = get_data_URI($logo,'png');\n $prrm = get_data_URI($prrm,'png');\n \n $header =\n '\n <table style=\"width:100%; line-height: 1px;\">\n <tbody>\n <tr>\n <td style=\"width:15%; text-align: center;\">\n <img alt=\"logo\" src=\"' . $logo . '\" style=\"display: inline-block; width: 100px; height: auto;\">\n </td><td style=\"width:70%; text-align: center;\">\n <h5>Philippine Rural Reconstruction Movement</h5>\n <h5>Benitez Institute for Sustainable Development</h5>\n </td><td style=\"width:15%; text-align: center;\">\n <img alt=\"logo\" src=\"' . $prrm . '\" style=\"display: inline-block; width: 100px; height: auto;\">\n </td>\n </tr>\n </tbody>\n </table>\n ';\n return $header;\n }", "public function head()\n {\n return $this->head;\n }", "public function getTemplateFile(){\n $file = ''; \n $template = new TemplateTYPE();\n $template->getByID( $this->getTemplateID() );\n if ( $template->getID() )\n $file = $template->label->getRef();\n return $file;\n }", "public function getHeaderString() {\n static $priorities = array(\n MAIL_PRIORITY_LOW => 'Low',\n MAIL_PRIORITY_NORMAL => 'Normal',\n MAIL_PRIORITY_HIGH => 'High'\n );\n \n // Default headers\n $h= (\n $this->_astr(HEADER_FROM, $a= array($this->from)).\n $this->_astr(HEADER_TO, $this->to).\n $this->_astr(HEADER_CC, $this->cc).\n $this->_astr(HEADER_BCC, $this->bcc)\n );\n \n // Additional headers\n foreach (array_merge($this->headers, array(\n HEADER_SUBJECT => $this->_qstr(@$this->subject),\n HEADER_CONTENTTYPE => $this->_getContenttypeHeaderString(),\n HEADER_MIMEVER => $this->mimever,\n HEADER_ENCODING => $this->encoding,\n HEADER_PRIORITY => $this->priority.' ('.$priorities[$this->priority].')',\n HEADER_DATE => $this->date->toString('r'),\n HEADER_MESSAGEID => $this->message_id,\n HEADER_RETURNPATH => $this->returnpath\n )) as $key => $val) {\n if (!empty($val)) $h.= $key.': '.$val.\"\\n\";\n }\n return $h;\n }", "protected function emailHeader()\n {\n return td_view('partials/emails/_header');\n }", "public function getHeaderTemplate()\n {\n return $this->path.$this->fixed[\"header\"];\n }", "public function getFullHeader()\n {\n }", "public function getHeadImgUrl()\n {\n return $this->response['headimgurl'] ?: null;\n }", "function get () {\r\n $this->_buildMail();\r\n\r\n $mail = 'To: '.$this->xheaders['To'].\"\\n\";\r\n $mail .= 'Subject: '.$this->xheaders['Subject'].\"\\n\";\r\n $mail .= $this->headers . \"\\n\";\r\n $mail .= $this->fullBody;\r\n return $mail;\r\n }", "function get_notifier_headers($from_email) {\n \n $headers = \"Reply-To: $from_email\\r\\n\";\n $headers .= \"Return-Path: $from_email\\r\\n\";\n $headers .= \"From: $from_email\\r\\n\";\n $headers .= 'Organization: '.get_config('appname').\"\\r\\n\";\n \n $headers .= 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n \n return $headers;\n \n}", "public static function get_headers(){\r\n\t\ttry{\r\n\t\t\t$db = Db::getInstance();\r\n\t\t\t$result = $db->query(\"SELECT * FROM gk_headers;\");\r\n\t\t\t$row = $result->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t\treturn $row[0];\r\n\t\t}\r\n\t\tcatch(Exception $e){\r\n\t\t\thandle_error(\"Sorry... the request was not successful.\", $e->getMessage());\r\n\t\t}\r\n\t}", "function get_email_header_from() {\n\tglobal $config;\n\n\tarray_make_branch($config,'system','email');\n\t$cfg_hostname = $config['system']['hostname'] ?? '';\n\t$flt_hostname = filter_var($cfg_hostname,FILTER_VALIDATE_REGEXP,['flags' => FILTER_REQUIRE_SCALAR,'options' => ['default' => NULL,'regexp' => '/\\S/']]);\n\tif(is_null($flt_hostname)):\n\t\t$flt_hostname = get_product_name();\n\tendif;\n\t$cfg_from = $config['system']['email']['from'] ?? '';\n\t$flt_from = filter_var($cfg_from,FILTER_VALIDATE_REGEXP,['flags' => FILTER_REQUIRE_SCALAR,'options' => ['default' => NULL,'regexp' => '/\\S/']]);\n\tif(is_null($flt_from)):\n\t\t$cfg_domain = $config['system']['domain'] ?? '';\n\t\t$flt_domain = filter_var($cfg_domain,FILTER_VALIDATE_REGEXP,['flags' => FILTER_REQUIRE_SCALAR,'options' => ['default' => NULL,'regexp' => '/\\S/']]);\n\t\tif(is_null($flt_domain)):\n\t\t\t$flt_domain = get_product_name() . '.local';\n\t\tendif;\n\t\t$flt_from = sprintf('%s@%s',$flt_hostname,$flt_domain);\n\tendif;\n\treturn sprintf('\"%s\" <%s>',$flt_hostname,$flt_from);\n}", "private function getFilePath()\n {\n\n return Settings::getSetting('mailer_template_location');\n }", "public function getHeader()\n {\n return Mage::getResourceHelper('backup')->getHeader();\n }", "public function get_header() {\n\t\treturn $this->header;\n\t}", "function head ($headTpl = \"head.tpl\"){\n if(!empty($headTpl)){\n $this->head = file_get_contents($this->tplDir . $headTpl);\n echo $this->head;\n return true;\n }else return false;\n }", "public function get_header()\n {\n return $this->header;\n }", "public function head()\n\t{\n\t\treturn $this->render();\n\t}", "function get_header() {\n $retval = \"\";\n foreach($this->headers as $key => $value)\n $retval .= \"$key: $value\\n\";\n return $retval;\n }", "function get_template_header()\n{\n global $version;\n global $grp_name;\n global $layout_path;\n \n\t$template[0] = \"<HTML>\\n\";\n\t$template[1] = \"<!-- PHP \".phpversion().\" / Drachenhorst Framework $version / 2013-->\\n\";\n $template[2] = \"<!-- PHP Template Pages Header -->\\n\";\n\t$template[3] = \"<HEAD>\\n\";\n\t$template[5] = \"<META NAME=\\\"Description\\\" CONTENT=\\\"$grp_name \\\">\\n\";\n\t$template[6] = \"<META NAME=\\\"Keywords\\\" CONTENT=\\\"Pages Template\\\">\\n\";\n\t$template[7] = \"<META NAME=\\\"Author\\\" CONTENT=\\\"Dipl. Ing. Olaf Duda\\\">\\n\";\n\t$template[9] = \"<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"$layout_path/konzept1.css\\\"> \\n\";\n\t$template[10] = \"</HEAD>\\n\";\n\t$template[11] = \"\\n\";\n\treturn $template;\n}", "public function getHeader_path()\n\t{\n\t\treturn $this->header_path;\n\t}", "public function getHead() {\n $this->head = \"<!DOCTYPE html>\\r\\n\";\n $this->head .= \"<html>\\r\\n\";\n $this->head .= \"<head>\\r\\n\";\n $this->head .= \"<title>Admin Panel - HostMe</title>\\r\\n\";\n $this->head .= \"<meta charset='utf-8' />\\r\\n\";\n $this->head .= \"<meta name='viewport' content='width=device-width, initialscale=1.0' >\\r\\n\";\n $this->head .= \"<script type='text/javascript' src='../../Template/include/js/jquery.min.js'></script>\\r\\n\";\n $this->head .= \"<link rel='stylesheet' type='text/css' href='../../Template/include/bootstrap-3.3.6-dist/css/bootstrap.min.css'>\\r\\n\";\n $this->head .= \"<link rel='stylesheet' type='text/css' href='../../Template/include/font-awesome-4.5.0/css/font-awesome.min.css'>\\r\\n\";\n $this->head .= \"<link rel='stylesheet' type='text/css' href='../../Template/include/_css/style.css'>\\r\\n\";\n $this->head .= \"<link rel='stylesheet' type='text/css' href='../../Template/include/font-awesome-4.5.0/css/font-awesome.min.css'>\\r\\n\";\n $this->head .= \"<script type='text/javascript' src='../../Template/include/js/test.js'></script>\\r\\n\";\n $this->head .= \"</head>\\r\\n\";\n return $this->head;\n }", "public function getMetaFile()\n {\n return $this->fileMeta;\n }", "public function head(){\n return $this->html()->head();\n }", "public function getHeadline() {\n\t\t$headline = $this->wire('processHeadline');\n\t\tif(!$headline) $headline = $this->wire('page')->get('title|name');\n\t\t$headline = $this->wire('sanitizer')->entities1($this->_($headline));\n\t\treturn $headline;\n\t}", "protected function message_head($message, $unset = array())\n {\n // requires Mail_mime >= 1.9.0\n $headers = array();\n foreach ((array) $unset as $header) {\n $headers[$header] = null;\n }\n\n return $message->txtHeaders($headers, true);\n }", "private function getHeaderComment(){\n\t\t\t$source= \"\";\n\t\t\t\n\t\t\t$source .= FileManager::getTab() . FileManager::getComment(58, true) . FileManager::getBackSpace();\n\t\t\t$source .= FileManager::getTab() . \" **** File generated by fitzlucassen\\DALGenerator tool ****\" . FileManager::getBackSpace();\n\t\t\t$source .= FileManager::getTab() . \" * All right reserved to fitzlucassen repository on github*\" . FileManager::getBackSpace();\n\t\t\t$source .= FileManager::getTab() . \" ************* https://github.com/fitzlucassen ************\" . FileManager::getBackSpace();\n\t\t\t$source .= FileManager::getTab() . FileManager::getComment(58, false) . FileManager::getBackSpace();\n\t\t\t\n\t\t\treturn $source;\n\t\t}", "protected function getCommitMessageHead() {\n return $this->getChangeDescription();\n }", "public function source(): ?string\n {\n return $this->header('topic', $this->queue);\n }", "public function getHeadLinks() {\n if (!$this->_headLinks)\n $this->_headLinks = array();\n\n return join('', $this->_headLinks);\n }", "public function getSubject(): string\n {\n return $this->mimeDecode($this->header->subject);\n }", "public function getHeadScripts() {\n if (!$this->_headScripts)\n $this->_headScripts = array();\n\n return join('', $this->_headScripts);\n }", "function get_Header()\n\t{ \n\t\thtml_llamada(\"header.php\");\n\t}", "public function get_file():string\n {\n return $this->file;\n }", "function get_file_header() {\n $output = \"<?php\\n\";\n // Use a gratuitous string concatenation to fool CVS into leaving this keyword alone.\n $output .= '// $Id$'.\"\\n\\n\";\n $output .= '// Generated with: '. basename(__FILE__) .\"\\n\";\n $output .= '// Generated on: '. date('r') .\"\\n\\n\";\n $file_phpdoc = <<<EOF\n/**\n * @file\n *\n * This file defines two arrays of information about project release nodes\n * that should be created.\n *\n * This file is separate from the rest of the drupalorg_testing profile so\n * that it can be easily regenerated by a script that uses the XML feed from\n * updates.drupal.org to get actual data about project releases from\n * drupal.org.\n */\n\nEOF;\n $output .= $file_phpdoc;\n return $output;\n}", "function get_email_header(){\n return '<html>\n <head>\n </head>\n <body>\n <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n <tr>\n <td>\n <table width=\"800\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" style=\"font: 14px/20px Arial,Helvetica,sans-serif; color:#000; background:#c7cddf; \">\n <tr>\n <td width=\"275\" style=\"padding:20px; border-right:dashed 1px #FFFFFF; border-bottom:solid 2px #f1f6fa;\">\n <img src=\"'.base_url().'images/logo.png\" width=\"234\" height=\"58\" alt=\"M Pulse International\" /></td>\n <td width=\"525\" style=\"padding:0 5px 0 30px; border-bottom:solid 2px #f1f6fa;\">\n <span style=\"color:#4f5f8c; font-size:18px; text-align:justify;\">\n Lorem Ipsum is simply dummy text of the printing and typesetting industry. \n </span></td>\n </tr>\n <tr>\n <td colspan=\"2\"><div style=\"padding:20px\">';\n}", "public function getMime()\n {\n if ($this->exists()) {\n $finfo = new \\finfo(FILEINFO_MIME | FILEINFO_PRESERVE_ATIME);\n $mime = $finfo->file($this->getRealPath());\n return $mime;\n }\n return null;\n }", "function get_email_body_str($file) {\n\tob_start();\n\tG\\Render\\include_theme_file($file);\n\t$mail_body = ob_get_contents();\n\tob_end_clean();\n\treturn $mail_body;\n}", "public function siteHead()\n {\n\t\t\t$PathPlugins = $this->htmlPath().'libs/';\t \n\t\t\t$html = '<link rel=\"stylesheet\" href=\"'.$PathPlugins.'css/rrssb.css\" />'.PHP_EOL; \n\t\t\treturn $html; \n\t}", "public function getMime(): string;", "protected function renderHeadHtml()\n\t{\n\t\t$lines = array();\n\t\tif (!empty($this->metaTags)) {\n\t\t\t$lines[] = implode(\"\\n\", $this->metaTags);\n\t\t}\n\t\tif (!empty($this->linkTags)) {\n\t\t\t$lines[] = implode(\"\\n\", $this->linkTags);\n\t\t}\n\t\tif (!empty($this->cssFiles)) {\n\t\t\t$lines[] = implode(\"\", $this->cssFiles);\n\t\t}\n\t\tif (!empty($this->css)) {\n\t\t\t$lines[] = implode(\"\\n\", $this->css);\n\t\t}\n\t\tif (!empty($this->jsFiles[self::HEAD])) {\n\t\t\t$lines[] = implode(\"\", $this->jsFiles[self::HEAD]);\n\t\t}\n\t\tif (!empty($this->js[self::HEAD])) {\n\t\t\t$lines[] = Html::js(implode(\"\\n\", $this->js[self::HEAD]));\n\t\t}\n\t\treturn empty($lines) ? '' : implode(\"\\n\", $lines) . \"\\n\";\n\t}", "private function _htmlHead ()\n {\n $htmlOut = \"<head>\\n\";\n $htmlOut .= \"<meta http-equiv=\\\"content-type\\\" content=\\\"text/html; \"\n . \"charset=\" . $this->getOption('charset') . \"\\\" />\\n\";\n if ($this->getBase()) {\n $htmlOut .= \"<base href=\\\"\" . $this->getBase() . \"\\\" />\\n\";\n }\n $htmlOut .= \"<title>\" . $this->getTitle() . \"</title>\\n\";\n $htmlOut .= $this->_renderMetaElements();\n $htmlOut .= $this->_renderCss();\n $htmlOut .= $this->_renderList($this->_links);\n $htmlOut .= $this->_renderList($this->_js[self::HTML_HEAD]);\n\n if ($this->_js[self::HTML_DEFERRED]) {\n $htmlOut .= $this->_renderJsDeferred(\n $this->_js[self::HTML_DEFERRED]\n );\n }\n\n $htmlOut .= $this->_headExtra;\n $htmlOut .= \"</head>\\n\";\n\n return $htmlOut;\n }", "private function getSourceMime() { return $this->sourceMime; }", "function getFeedFile()\n {\n \treturn $this->getFirstFile()->getId();\n }", "public function getMIME()\n {\n return static::$mime;\n }", "public function getTemplateFile()\n {\n if (!isset($this->__template) || empty(self::$options['tpl_location'])) {\n return '';\n }\n\n return file_get_contents(self::$options['tpl_location'].$this->__template);\n }", "public function printHead()\n\t\t{\n\t\t\t$output = \"\";\n\t\t\t$output .= $this->generateHTMLHead();\n\t\t\t$output .= $this->generateHTMLBody();\n\t\t\treturn $output;\n\t\t}", "public static function getEmailTemplatePath();", "function iah_get_email_header() {\n $iah_email_header = '<!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n <meta name=\"x-apple-disable-message-reformatting\">\n <title></title>\n\n <!-- Web Font / @font-face : BEGIN -->\n <!-- NOTE: If web fonts are not required, lines 10 - 27 can be safely removed. -->\n\n <!-- Desktop Outlook chokes on web font references and defaults to Times New Roman, so we force a safe fallback font. -->\n <!--[if mso]>\n <style>\n * {\n font-family: sans-serif !important;\n }\n </style>\n <![endif]-->\n\n <!-- All other clients get the webfont reference; some will render the font and others will silently fail to the fallbacks. More on that here: http://stylecampaign.com/blog/2015/02/webfont-support-in-email/ -->\n <!--[if !mso]><!-->\n <!-- insert web font reference, eg: <link href=\"https://fonts.googleapis.com/css?family=Roboto:400,700 rel=\"stylesheet\" type=\"text/css\"> -->\n <!--<![endif]-->\n\n <!-- Web Font / @font-face : END -->\n\n <!-- CSS Reset -->\n <style>\n\n /* What it does: Remove spaces around the email design added by some email clients. */\n /* Beware: It can remove the padding / margin and add a background color to the compose a reply window. */\n html,\n body {\n margin: 0 auto !important;\n padding: 0 !important;\n height: 100% !important;\n width: 100% !important;\n }\n\n /* What it does: Stops email clients resizing small text. */\n * {\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n }\n\n /* What it does: Centers email on Android 4.4 */\n div[style*=\"margin: 16px 0\"] {\n margin:0 !important;\n }\n\n /* What it does: Stops Outlook from adding extra spacing to tables. */\n table,\n td {\n mso-table-lspace: 0pt !important;\n mso-table-rspace: 0pt !important;\n }\n\n /* What it does: Fixes webkit padding issue. Fix for Yahoo mail table alignment bug. Applies table-layout to the first 2 tables then removes for anything nested deeper. */\n table {\n border-spacing: 0 !important;\n border-collapse: collapse !important;\n table-layout: fixed !important;\n margin: 0 auto !important;\n }\n table table table {\n table-layout: auto;\n }\n\n /* What it does: Uses a better rendering method when resizing images in IE. */\n img {\n -ms-interpolation-mode:bicubic;\n }\n\n /* What it does: A work-around for iOS meddling in triggered links. */\n *[x-apple-data-detectors] {\n color: inherit !important;\n text-decoration: none !important;\n }\n\n /* What it does: A work-around for Gmail meddling in triggered links. */\n .x-gmail-data-detectors,\n .x-gmail-data-detectors *,\n .aBn {\n border-bottom: 0 !important;\n cursor: default !important;\n }\n\n /* What it does: Prevents Gmail from displaying an download button on large, non-linked images. */\n .a6S {\n \t display: none !important;\n \t opacity: 0.01 !important;\n }\n /* If the above doesnt work, add a .g-img class to any image in question. */\n img.g-img + div {\n \t display:none !important;\n \t \t}\n\n /* What it does: Prevents underlining the button text in Windows 10 */\n .button-link {\n text-decoration: none !important;\n }\n\n /* What it does: Removes right gutter in Gmail iOS app: https://github.com/TedGoas/Cerberus/issues/89 */\n /* Create one of these media queries for each additional viewport size youd like to fix */\n /* Thanks to Eric Lepetit @ericlepetitsf) for help troubleshooting */\n @media only screen and (min-device-width: 375px) and (max-device-width: 413px) { /* iPhone 6 and 6+ */\n .email-container {\n min-width: 375px !important;\n }\n }\n\n </style>\n\n <!-- Progressive Enhancements -->\n <style>\n\n /* What it does: Hover styles for buttons */\n .button-td,\n .button-a {\n transition: all 100ms ease-in;\n }\n .button-td:hover,\n .button-a:hover {\n background: #555555 !important;\n border-color: #555555 !important;\n }\n\n /* Media Queries */\n @media screen and (max-width: 480px) {\n\n /* What it does: Forces elements to resize to the full width of their container. Useful for resizing images beyond their max-width. */\n .fluid {\n width: 100% !important;\n max-width: 100% !important;\n height: auto !important;\n margin-left: auto !important;\n margin-right: auto !important;\n }\n\n /* What it does: Forces table cells into full-width rows. */\n .stack-column,\n .stack-column-center {\n display: block !important;\n width: 100% !important;\n max-width: 100% !important;\n direction: ltr !important;\n }\n /* And center justify these ones. */\n .stack-column-center {\n text-align: center !important;\n }\n\n /* What it does: Generic utility class for centering. Useful for images, buttons, and nested tables. */\n .center-on-narrow {\n text-align: center !important;\n display: block !important;\n margin-left: auto !important;\n margin-right: auto !important;\n float: none !important;\n }\n table.center-on-narrow {\n display: inline-block !important;\n }\n }\n\n </style>\n\n </head>\n <body width=\"100%\" bgcolor=\"#e6f7fe\" style=\"margin: 0; mso-line-height-rule: exactly;\">\n <center style=\"width: 100%; background: #e6f7fe; text-align: left;\">\n\n <!-- Visually Hidden Preheader Text : BEGIN -->\n <div style=\"display:none;font-size:1px;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;mso-hide:all;font-family: sans-serif;\">\n Your requested offer from Ireland At Home\n </div>\n <!-- Visually Hidden Preheader Text : END -->\n\n <!--\n Set the email width. Defined in two places:\n 1. max-width for all clients except Desktop Windows Outlook, allowing the email to squish on narrow but never go wider than 680px.\n 2. MSO tags for Desktop Windows Outlook enforce a 680px width.\n Note: The Fluid and Responsive templates have a different width (600px). The hybrid grid is more \"fragile\", and Ive found that 680px is a good width. Change with caution.\n -->\n <div style=\"max-width: 680px; margin: auto; padding-top: 40px;\" class=\"email-container\">\n <!--[if mso]>\n <table role=\"presentation\" aria-hidden=\"true\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"680\" align=\"center\">\n <tr>\n <td>\n <![endif]-->\n\n <!-- IAH Logo box -->\n <table role=\"presentation\" aria-hidden=\"true\" cellspacing=\"0\" cellpadding=\"20\" border=\"0\" align=\"center\" width=\"100%\" style=\"max-width: 680px; margin-bottom: 20px;\">\n <!-- 1 Column Text + Button : BEGIN -->\n <tr>\n <td bgcolor=\"#ffffff\" text-align=\"center\" style=\"text-align:center;\">\n <img src=\"https://irelandathome.com/images/email_logo.jpg\" aria-hidden=\"true\" width=\"263\" height=\"41\" alt=\"Ireland at Home booking attempt\" border=\"0\">\n </td>\n </tr>\n </table>\n <br>\n ';\n return $iah_email_header;\n }", "public static function post_head() {\n\t\tif (!is_singular()) {\n return;\n }\n\n\t\t// Current post\n\t\tglobal $post;\n\n\t\t// Get the source meta, if it exists, for this post\n\t\t$source = WPRSS_FTP_Meta::get_instance()->get_meta( $post->ID, 'feed_source' );\n\n\t\t// If no source, then not an imported post. Stop.\n\t\tif (empty($source)) {\n return;\n }\n\n // print the genrator tag\n ?><meta name=\"generator\" content=\"Feed to Post <?php echo WPRSS_FTP_VERSION; ?>\" /><?php\n echo \"\\n\";\n\t}", "public function getPageHeadline()\n {\n return $this->getContext()->getAttribute('pageHeadline');\n }", "function _interia_get_head(){\n $msg=\"<?xml version=\\\"1.0\\\" encoding=\\\"ISO-8859-2\\\"?>\n\t\t\t\t<SOAP-ENV:Envelope \n\t\t\t\txmlns:SOAP-ENC=\\\"http://schemas.xmlsoap.org/soap/encoding/\\\" \n\t\t\t\tSOAP-ENV:encodingStyle=\\\"http://schemas.xmlsoap.org/soap/encoding/\\\" \n\t\t\t\txmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\"\n\t\t\t\txmlns:SOAP-ENV=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\"\n\t\t\t\txmlns:xsd=\\\"http://www.w3.org/2001/XMLSchema\\\">\n\t\t\t<SOAP-ENV:Body>\";\n return $msg;\n }", "function file () {return $this->path . $this->extn;}", "protected function GetHeadTag() {\n\t\t$strOutput = \"<head>\\n\";\n\n\t\tif (!is_null($this->strPageTitle)) {\n\t\t\t$strOutput .= sprintf(\"\\t<title>!!!%s</title>\\n\", $this->strPageTitle);\n\t\t}\n\n\t\t$strOutput .= sprintf(\"\\t<meta http-equiv=\\\"content-type\\\" content=\\\"text/html; %s/\\\">\\n\", Application::$EncodingType);\n\n\t\tif (!Application::$SecurePage) {\n\t\t\t$strOutput .= sprintf(\"\\t<link rel=\\\"shortcut icon\\\" href=\\\"%s/favicon.ico\\\" />\\n\", __DOMAIN__);\n\t\t} else {\n\t\t\t$strOutput .= sprintf(\"\\t<link rel=\\\"shortcut icon\\\" href=\\\"%s/favicon.ico\\\" />\", __SECURE_DOMAIN__);\n\t\t}\n\n\t\t$strOutput .= $this->strCss;\n\t\t$strOutput .= $this->strJavaScript;\n\n\t\tif (!is_null($this->strInlineJavaScript)) {\n\t\t\t$strOutput .= sprintf(\"%s\\n\", $this->strInlineJavaScript);\n\t\t}\n\n\t\t$strOutput .= \"</head>\\n\\n\";\n\n\t\treturn $strOutput;\n\t}", "protected function renderHeadHtml()\n {\n// debug($this);\n $lines = [];\n if (!empty($this->metaTags)) {\n $lines[] = implode(\"\\n\", $this->metaTags);\n }\n\n if (!empty($this->linkTags)) {\n $lines[] = implode(\"\\n\", $this->linkTags);\n }\n if (!empty($this->cssFiles[self::POS_HEAD])) {\n $lines[] = implode(\"\\n\", $this->cssFiles[self::POS_HEAD]);\n }\n\n// if (!empty($this->cssFiles)) {\n// $lines[] = implode(\"\\n\", $this->cssFiles);\n// }\n if (!empty($this->css)) {\n $lines[] = implode(\"\\n\", $this->css);\n }\n if (!empty($this->jsFiles[self::POS_HEAD])) {\n $lines[] = implode(\"\\n\", $this->jsFiles[self::POS_HEAD]);\n }\n if (!empty($this->js[self::POS_HEAD])) {\n $lines[] = Html::script(implode(\"\\n\", $this->js[self::POS_HEAD]));\n }\n\n if (!empty($this->html[self::POS_HEAD])) {\n $lines[] = implode(\"\\n\", $this->html[self::POS_HEAD]);\n }\n\n return empty($lines) ? '' : implode(\"\\n\", $lines);\n }", "public static function view_filepath() {\r\n return \"mailers/\".static::view_basename().'.tpl';\r\n }", "function extraHead()\n {\n $user = User::staticGet($this->profile->id);\n\n if (!$user) {\n return;\n }\n\n if ($user->emailmicroid && $user->email && $this->notice->uri) {\n $id = new Microid('mailto:'. $user->email,\n $this->notice->uri);\n $this->element('meta', array('name' => 'microid',\n 'content' => $id->toString()));\n }\n\n $this->element('link',array('rel'=>'alternate',\n 'type'=>'application/json+oembed',\n 'href'=>common_local_url(\n 'oembed',\n array(),\n array('format'=>'json','url'=>$this->notice->uri)),\n 'title'=>'oEmbed'),null);\n $this->element('link',array('rel'=>'alternate',\n 'type'=>'text/xml+oembed',\n 'href'=>common_local_url(\n 'oembed',\n array(),\n array('format'=>'xml','url'=>$this->notice->uri)),\n 'title'=>'oEmbed'),null);\n\n // Extras to aid in sharing notices to Facebook\n $avatar = $this->profile->getAvatar(AVATAR_PROFILE_SIZE);\n $avatarUrl = ($avatar) ?\n $avatar->displayUrl() :\n Avatar::defaultImage(AVATAR_PROFILE_SIZE);\n $this->element('meta', array('property' => 'og:image',\n 'content' => $avatarUrl));\n $this->element('meta', array('property' => 'og:description',\n 'content' => $this->notice->content));\n }", "public function get_file() {\n\t\treturn HELPFUL_PATH . $this->filename . '.xml';\n\t}", "protected function _getFileName () {\n return $this->_file;\n }", "public function getMime(){ }", "protected function getDumpFileHeader()\n {\n $header = '';\n if (!$this->dumpSettings['skip-comments']) {\n // Some info about software, source and time\n $header = '-- mysqldump-php https://github.com/ifsnop/mysqldump-php' . PHP_EOL .\n '--' . PHP_EOL .\n '-- Host: ' . $this->host . '\tDatabase: ' . $this->dbName . PHP_EOL .\n '-- ------------------------------------------------------' . PHP_EOL;\n\n if (!empty($this->version)) {\n $header .= \"-- Server version \\t\" . $this->version . PHP_EOL;\n }\n\n if (!$this->dumpSettings['skip-dump-date']) {\n $header .= '-- Date: ' . date('r') . PHP_EOL . PHP_EOL;\n }\n }\n\n return $header;\n }", "function base_header()\n\t{\n\t\t$header = \"<!DOCTYPE $this->doctype>\"\n\t\t. \"\\n<html lang=\\\"$this->lang\\\" dir=\\\"$this->dir\\\">\"\n\t\t. \"\\n<head>\";\n\t\tif (trim($this->subtitle) != '' && $this->reverse_subtitle)\n\t\t{\n\t\t\t$header .= \"\\n\\t<title>$this->subtitle - $this->title</title>\";\n\t\t}\n\t\telseif (trim($this->subtitle) != '')\n\t\t{\n\t\t\t$header .= \"\\n\\t<title>$this->title - $this->subtitle</title>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$header .= \"\\n\\t<title>$this->title</title>\";\n\t\t}\n\t\t$header .= \"\\n\\t<meta http-equiv=\\\"content-type\\\" content=\\\"$this->content_type; charset=$this->charset\\\" />\";\n\t\tfor ($i = 0; $i < count($this->meta_tags); $i++)\n\t\t{\n\t\t\t$header .= \"\\n\\t<meta http-equiv=\\\"\" . $this->meta_tags[$i]['http_equiv'] . \"\\\" content=\\\"\" . $this->meta_tags[$i]['content'] . \"\\\" />\";\n\t\t}\n\t\tfor ($i = 0; $i < count($this->css_files); $i++)\n\t\t{\n\t\t\t$header .= \"\\n\\t<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"\" . $this->css_files[$i] . \"\\\" />\";\n\t\t}\n\t\tfor ($i = 0; $i < count($this->link_tags); $i++)\n\t\t{\n\t\t\tif ($this->link_tags[$i]['title'] == '')\n\t\t\t{\n\t\t\t\t$header .= \"\\n\\t<link rel=\\\"\" . $this->link_tags[$i]['rel'] . \"\\\" type=\\\"\" . $this->link_tags[$i]['type'] . \"\\\" href=\\\"\" . $this->link_tags[$i]['href'] . \"\\\" />\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$header .= \"\\n\\t<link rel=\\\"\" . $this->link_tags[$i]['rel'] . \"\\\" type=\\\"\" . $this->link_tags[$i]['type'] . \"\\\" title=\\\"\" . $this->link_tags[$i]['title'] . \"\\\" href=\\\"\" . $this->link_tags[$i]['href'] . \"\\\" />\";\n\t\t\t}\n\t\t}\n\t\tif (trim($this->inline_css) != '')\n\t\t{\n\t\t\t$header .= \"\\n\\t<style type=\\\"text/css\\\">\"\n\t\t\t. \"\\n\\t<!--\"\n\t\t\t. \"\\n\\t\" . str_replace(\"\\n\",\"\\n\\t\",$this->inline_css)\n\t\t\t. \"\\n\\t-->\"\n\t\t\t. \"\\n\\t</style>\";\n\t\t}\n\t\tfor ($i = 0; $i < count($this->js_files); $i++)\n\t\t{\n\t\t\t$header .= \"\\n\\t<script language=\\\"javascript\\\" type=\\\"text/javascript\\\" src=\\\"\" . $this->js_files[$i] . \"\\\"></script>\";\n\t\t}\n\t\tif (trim($this->inline_js) != '')\n\t\t{\n\t\t\t$header .= \"\\n\\t<script language=\\\"javascript\\\" type=\\\"text/javascript\\\">\"\n\t\t\t. \"\\n\\t<!--\"\n\t\t\t. \"\\n\\t\" . str_replace(\"\\n\",\"\\n\\t\",$this->inline_js)\n\t\t\t. \"\\n\\t-->\"\n\t\t\t. \"\\n\\t</script>\";\n\t\t}\n\t\t$header .= \"\\n</head>\"\n\t\t. \"\\n<body>\";\n\t\treturn $header;\n\t}" ]
[ "0.73384225", "0.7258412", "0.68330175", "0.6464462", "0.6419506", "0.63040584", "0.6300542", "0.62987334", "0.6286506", "0.62159187", "0.61717004", "0.6146718", "0.61323005", "0.611944", "0.60879636", "0.60718256", "0.606984", "0.60594714", "0.6048857", "0.6048857", "0.6048857", "0.6048857", "0.6041577", "0.6022199", "0.6015761", "0.5977059", "0.59769684", "0.59513956", "0.59357303", "0.5931109", "0.5925771", "0.5919984", "0.5900389", "0.5898582", "0.5890112", "0.58698434", "0.58290064", "0.58273864", "0.5824199", "0.5823631", "0.5814059", "0.5782036", "0.57815623", "0.5760176", "0.57398415", "0.57388914", "0.57362705", "0.5729593", "0.5727842", "0.5719361", "0.5713507", "0.56972444", "0.569575", "0.5689133", "0.5685884", "0.567896", "0.5674552", "0.5668035", "0.5651177", "0.5644311", "0.5641529", "0.56319934", "0.5631951", "0.5616838", "0.5588762", "0.5586985", "0.5584835", "0.5578425", "0.5576688", "0.5562145", "0.5555761", "0.55460685", "0.55442363", "0.55438644", "0.552482", "0.5521514", "0.5519876", "0.5519357", "0.5512296", "0.5506693", "0.55010545", "0.5498969", "0.54886484", "0.5487586", "0.5484989", "0.5470602", "0.5470147", "0.54692554", "0.54683036", "0.5460893", "0.5460865", "0.545179", "0.5450917", "0.5449618", "0.54451585", "0.5434013", "0.5430879", "0.54287857", "0.54281884", "0.54238856" ]
0.8484462
0
Get mail footer file.
Получить файл подвала электронной почты.
public function getFooterMailFile() { return realpath(__DIR__ . '/../../etc/footer.html'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function getFooter()\n\t{\n\t\techo file_get_contents(\"templates/footer.php\");\n\t}", "public function _getMailFooter() {\n\t\treturn $this->_mailFooter;\n\t}", "public function getCustomFooter() {\n if ($this->_exists) { //if exists...\n return $this->_realpath . '/footer.php';\n }\n return '';\n }", "private function generateFooter() {\r\n $footer = file_get_contents('views/footer.html');\r\n\r\n return $footer;\r\n }", "public function getFooter()\n {\n $path = app::getBaseDir() . 'view' . DS . 'footer.phtml';\n if (file_exists($path)) {\n include $path;\n }\n }", "public function getFooter()\n {\n return Mage::getResourceHelper('backup')->getFooter();\n }", "public function get_footer() {\n\t\treturn $this->get_settings_text( 'footer' );\n\t}", "protected function emailFooter()\n {\n return td_view('partials/emails/_footer');\n }", "private function getFooter() {\n\t\treturn $this->footer;\n\t}", "public function getMailFooter($mail_temp_id) {\n\t\t$columns = array ('mail_temp_id');\n\t\t$records = array ($mail_temp_id);\n\t\t$mail_footer_ = $this->query_from_mail_template ( $columns, $records );\n\t\treturn sizeof($mail_footer_)>0 ? $mail_footer_ [0] ['mail_footer'] : null;\n\t}", "public function getFooter();", "public static function footer(){\t?>\r\n\t\t\t<footer>\r\n\t\t\t\t<p>\r\n\t\t\t\t\t<a href=\"http://recursos.robertsallent.com/mvc/robs_micro_fw_1.0.zip\">\r\n\t\t\t\t\t\tRobS micro Framework</a> - solo para fines docentes\r\n\t\t\t\t</p>\r\n\t\t\t\t<p> \r\n\t\t\t\t\t<a rel=\"author\" href=\"http://www.robertsallent.com\">Robert Sallent</a>\r\n\t\t\t\t\t<a href=\"http://www.twitter.com/robertsallent\">\r\n \t\t\t\t<img class=\"logo\" alt=\"twitter logo\" src=\"images/logos/twitter.png\" />\r\n\t\t\t\t\t</a> - \r\n\t\t\t\t\t<a href=\"https://www.facebook.com/cifovalles\">CIFO del Vallès'16</a>. \r\n \t\t</p>\r\n\t\t\t</footer>\r\n\t\t<?php }", "public function getFooter()\r\n {\r\n return \"<footer>&copy;2020 Christian Hur. I own this!</footer>\";\r\n }", "public function getFooter()\n {\n $shop_address = $this->getShopAddress();\n\n $id_shop = (int) $this->shop->id;\n\n $this->smarty->assign(array(\n 'available_in_your_account' => $this->available_in_your_account,\n 'shop_address' => $shop_address,\n 'shop_fax' => Configuration::get('PS_SHOP_FAX', null, null, $id_shop),\n 'shop_phone' => Configuration::get('PS_SHOP_PHONE', null, null, $id_shop),\n 'shop_email' => Configuration::get('PS_SHOP_EMAIL', null, null, $id_shop),\n 'free_text' => Configuration::get('PS_INVOICE_FREE_TEXT', (int) Context::getContext()->language->id, null, $id_shop),\n ));\n\n return $this->smarty->fetch($this->getTemplate('footer'));\n }", "function mediz_footer() {\n\n\t\t$templates = new MEDIZ_Template_Loader;\n\n\t\tob_start();\n\t\t$templates->get_template_part( 'mediz_footer', 'mediz_footer' );\n\t\treturn ob_get_clean();\n\n\t}", "public function getFooter()\n {\n return $this->footer . '</body></html>';\n }", "protected function getDumpFileFooter()\n {\n $footer = '';\n if (!$this->dumpSettings['skip-comments']) {\n $footer .= '-- Dump completed';\n if (!$this->dumpSettings['skip-dump-date']) {\n $footer .= ' on: ' . date('r');\n }\n $footer .= PHP_EOL;\n }\n\n return $footer;\n }", "private function _makeFooter(): string\n {\n $backtrace = debug_backtrace();\n $fromFile = $backtrace[2]['file'];\n $fromLine = $backtrace[2]['line'];\n return '<div class=\"visualijoper__footer\">Called from <strong>' . $fromFile . '</strong>, line <strong>' . $fromLine . '</strong><a target=\"_blank\" href=\"https://github.com/desfpc/Visualijoper\">powered by Visualijoper</a></div></div>';\n }", "protected abstract function getFooter();", "public function getFooter()\n {\n return $this->footer;\n }", "private function getFooter() {\r\n return '<p>Para cualquier duda o aclaración comuníquese con su “Mesa de ayuda”.</p>\r\n\t<div style=\"border-bottom:1px solid #000; height:1px; width:100%; margin:25px 0;\"></div>\r\n\t<div style=\"font-size:10px;\"><p><b>AVISO DE CONFIDENCIALIDAD</b>:</p><p>Este correo electrónico, incluyendo en su caso, los archivos adjuntos al mismo, pueden contener información de carácter confidencial y/o privilegiada, y se envían a la atención única y exclusivamente de la persona y/o entidad a quien va dirigido. La copia, revisión, uso, revelación y/o distribución de dicha información confidencial sin la autorización por escrito de Teléfonos de México está prohibida. Si usted no es el destinatario a quien se dirige el presente correo, favor de contactar al remitente respondiendo al presente correo y eliminar el correo original incluyendo sus archivos, así como cualesquiera copia del mismo. Mediante la recepción del presente correo usted reconoce y acepta que en caso de incumplimiento de su parte y/o de sus representantes a los términos antes mencionados, Teléfonos de México tendrá derecho a los daños y perjuicios que esto le cause.</p><br /><p><b>CONFIDENTIALITY NOTICE</b>:</p><p>This e-mail message including attachments, if any, is intended only for the person or entity to which it is addressed and may contain confidential and /or privileged material. Any review, use, disclosure or distribution of such confidential information without the written authorization of Teléfonos de México is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. By receiving this e-mail you acknowledge that any breach by you and/or your representatives of the above provisions may entitle Teléfonos de México to seek for damages.</p></div>';\r\n }", "public function footer() {\n\t\t$footer = get_field('footer', 'option') ?: [];\n\n\t\treturn \\App\\arr_to_obj($footer);\n\t}", "public function getFooter()\n {\n $footer = <<<\"EOF\"\n </div>\n <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->\n <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js\"></script>\n <!-- Include all compiled plugins (below), or include individual files as needed -->\n <!-- Latest compiled and minified JavaScript -->\n <script src=\"//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js\"></script>\n </body>\n</html>\nEOF;\n return $footer;\n }", "function getFooter() {\n\n\treturn $this->footer;\n\n}", "private function getFooterComment()\n {\n return '# End ' . $this->baseComment;\n }", "function getFooter() {\n\treturn $this->footer;\n}", "public function email_footer()\n {\n }", "function displayFooter()\n{\n?>\n</table>\n</td></tr></table>\n<address>\nLast modified on <?php\n global $SCRIPT_FILENAME;\n echo date('r', filemtime($SCRIPT_FILENAME));\n?>.<br>\n<a href=\"mailto:snowball-discuss@lists.tartarus.org\">Write to our mailing list</a> if you have comments or questions about the project. Note that this mailing list will reject postings from non-subscribers (due to the immense amount of spam received otherwise). The list is fairly low-traffic, but if you don't wish to receive messages (but wish to be able to post), you can disable sending of messages in the mailing list options after subscribing.\n</address>\n</body>\n</html>\n<?php\n}", "function ft_make_footer() {\n\treturn \"<div id=\\\"footer\\\"><p><a href=\\\"http://www.solitude.dk/filethingie/\\\" target=\\\"_BLANK\\\">File Thingie &bull; PHP File Manager</a> &copy; <!-- Copyright --> 2003-\".date(\"Y\").\" <a href=\\\"http://www.solitude.dk\\\" target=\\\"_BLANK\\\">Andreas Haugstrup Pedersen</a>.</p><p><a href=\\\"http://www.solitude.dk/filethingie/documentation\\\" target=\\\"_BLANK\\\">\".t('Online documentation').\"</a></p></div>\";\n}", "public function getFooter() {\n return $this->getFacet(\"footer\");\n }", "protected function getFooterContent() {\n\t\treturn '';\n\t}", "function generateFooter() {\n\n $version = '';\n if (DAV\\Server::$exposeVersion) {\n $version = DAV\\Version::VERSION;\n }\n return <<<HTML\n<footer>Generated by SabreDAV $version (c)2007-2016 <a href=\"http://sabre.io/\">http://sabre.io/</a></footer>\n</body>\n</html>\nHTML;\n\n }", "function makeFooter() {\n\t$t = new Template();\n\t$t->setFile(\"tplfile\", $this->libjsdir . \"layersmenu-footer.ijs\");\n\t$t->setVar(array(\n\t\t\"packageName\"\t=> $this->_packageName,\n\t\t\"version\"\t=> $this->version,\n\t\t\"copyright\"\t=> $this->copyright,\n\t\t\"author\"\t=> $this->author,\n\t\t\"footer\"\t=> $this->footer\n\n\t));\n\t$this->footer = $t->parse(\"out\", \"tplfile\");\n\treturn $this->footer;\n}", "public function getFooterURL(): ?string\n {\n $url = null;\n if ($this->footer) {\n $path = preg_replace('/^public\\//i', '', $this->footer);\n $url = asset('storage/' . $path);\n }\n return $url;\n }", "public static function footerTpl()\n {\n $file = \"inc/footer.php\";\n if (file_exists($file)) {\n include $file;\n }\n }", "private function getFoot() {\n return $this->getInnerContainer()->offsetGet(\"footer\");\n }", "function get_footer($dir = \"admin\") {\n\tif ($dir != \"admin\") {\n\t\tinclude($dir . '/footer.php');\n\t} else {\n\t\tinclude('footer.php');\n\t}\n}", "private function getMessageFooter() {\n\t\treturn \"<p>Northbridge Technology Alliance creates software solutions for organizations who are engaged in social justice and community-building efforts. This message is produced and distributed by Northbridge Technology Alliance, a United States 501(c)(3) nonprofit corporation, Evanston, Illinois 60202.</p style='margin-top:10px;'>\\r\\n\\r\\n<p>Opt out: Your email address was obtained from Guidestar. This message is from a real person, and we do not intend to email you again. To ensure this, you may reply to this message with 'opt out' in the subject line. </p>\" ;\n\t}", "function displayFooter()\n{\n?>\n</table>\n</td></tr></table>\n<address>\n\n<!-- (what was this code for?)\nLast modified on <?php\n global $SCRIPT_FILENAME;\n echo date('r', filemtime($SCRIPT_FILENAME));\n?>.\n-->\n\n<br>\nThe site and project is no longer being actively maintained. We will keep the\nwebsite up for as long as possible (we expect this to be many years), but do\nnot have time or resources to support it further. The snowball mailing list\nwill be closed at the end of 2014, but archives are available on <a\nhref=\"http://news.gmane.org/gmane.comp.search.snowball\">GMane</a>. The code,\nand source code for the website, are also available on <a\nhref=\"https://github.com/snowballstem\">Github</a>.\n</address>\n</body>\n</html>\n<?php\n}", "function makeFooter() {\n\n\t$t = new Template();\n\n\t$t->setFile(\"tplfile\", $this->libjsdir . \"layersmenu-footer.ijs\");\n\n\t$t->setVar(array(\n\n\t\t\"packageName\"\t=> $this->_packageName,\n\n\t\t\"version\"\t=> $this->version,\n\n\t\t\"copyright\"\t=> $this->copyright,\n\n\t\t\"author\"\t=> $this->author,\n\n\t\t\"footer\"\t=> $this->footer\n\n\t\t\n\n\t));\n\n\t$this->footer = $t->parse(\"out\", \"tplfile\");\n\n\treturn $this->footer;\n\n}", "public function getFooter() {\r\n\t\t\r\n\t\t//Empty sting to concatenate the HTML output\r\n\t\t$content = \"\";\r\n\t\t\r\n\t\t//Footer\r\n\t\t$content .= '<footer class=\"py-5 bg-dark\">';\r\n\t\t\t$content .= '<div class=\"container\">';\r\n\t\t\t\t$content .= '<p class=\"m-0 text-center text-white\">Copyright &copy; '. $this->websiteTitle .' '. $this->copyrightYear .'</p>';\r\n\t\t\t\t$content .= '<p class=\"mt-3 text-center\"><a class=\"text-white\" href=\"contacts.php\">Emergency Contacts</a> &nbsp; <a class=\"text-white\" href=\"aboutUs.php\">About Us</a> &nbsp; <a class=\"text-white\" href=\"terms.php\">Terms of Use</a></p>';\r\n\t\t\t$content .= '</div>';\r\n\t\t$content .= '</footer>';\r\n\t\t\r\n\t\t/* JavaScript Files */\r\n\t\t//Bootstrap core JavaScript\r\n\t\t$content .= '<script type=\"text/javascript\" src=\"vendor/jquery/jquery.min.js\"></script>';\r\n\t\t$content .= '<script type=\"text/javascript\" src=\"vendor/bootstrap/js/bootstrap.bundle.min.js\"></script>';\r\n\t\t\r\n\t\t//Plugin JavaScript\r\n\t\t$content .= '<script type=\"text/javascript\" src=\"vendor/jquery-easing/jquery.easing.min.js\"></script>';\r\n\t\t\r\n\t\t//Custom JavaScript\r\n\t\t$content .= '<script type=\"text/javascript\" src=\"js/safetyFirst.js\"></script>';\r\n\t\t\r\n\t\t//Return the header contents to the caller function\r\n\t\treturn $content;\r\n\t}", "private function getFooter() {\n\t\t$this->data['oxfooter']\t= '<div style=\"text-align:center; color:#666666; margin-top:5px\">'\n\t\t. ucfirst( $this->_name ) . ' v.' .$this->_version. ' &copy; ' . date( 'Y' )\n\t\t. ' by <a href=\"http://osworx.net\" onclick=\"window.open(this);return false;\" title=\"OSWorX\">OSWorX</a>'\n\t\t. '</div>';\n\t}", "public function getFooter()\n {\n return self::getModel()\n ->where('show_in_footer', 1)\n ->active()\n ->get();\n }", "function voyage_mikado_get_footer_bottom() {\n\n\t\t$parameters = array();\n\n\t\t$parameters['footer_bottom_border'] = voyage_mikado_get_footer_bottom_border();\n\t\t$parameters['footer_bottom_border_in_grid'] = (voyage_mikado_options()->getOptionValue('footer_bottom_border_in_grid') == 'yes') ? 'mkdf-in-grid' : '';\n\t\t$parameters['footer_in_grid'] = (voyage_mikado_options()->getOptionValue('footer_in_grid') == 'yes') ? true : false;\n\t\t$parameters['footer_bottom_columns'] = voyage_mikado_options()->getOptionValue('footer_bottom_columns');\n\t\t$parameters['footer_bottom_border_bottom'] = voyage_mikado_get_footer_bottom_bottom_border();\n\n\t\tvoyage_mikado_get_module_template_part('templates/parts/footer-bottom', 'footer', '', $parameters);\n\n\t}", "function wct_talks_the_talk_footer() {\n\techo wct_talks_get_talk_footer();\n}", "private function getFooter()\n {\n return \"</table>\"\n . \"</body>\"\n . \"</html>\";\n }", "public function footerBottom(): string\n {\n return $this->get(__FUNCTION__);\n }", "public static function displayFooter() {\n echo \"<footer>\n <p>\n <a href=\\\"mailto:\" . MailHelper::KARA_EMAIL . \"\\\" target=\\\"_blank\\\">\" .\n MailHelper::KARA_EMAIL . \"</a>\n </p>\n </footer>\";\n }", "public function renderFooter(): string;", "public function footer() {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\nif (true)\n{\n$IPBHTML .= <<<HTML\n\t\t<br /><br />\n\t\t<div style='float:right; margin:10px;'>\n\t\t\t<tr style='text-align:center;'>\n\t\t\t\t<td style='padding:5px;'>ibEconomy {$this->caches['app_cache']['ibEconomy']['app_version']} &copy; 2011 &nbsp;\n\t\t\t\t<a style='text-decoration:none;' href='http://emoneycodes.com/forums/' title='emoneyCodes.com - (e$) Mods'><span class='ipsBadge badge_green' style='text-decoration:none;'>(e$) Mods</span></a></td>\n\t\t\t</tr>\n\t\t</div>\nHTML;\n}\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "public static function footer(){\t?>\r\n\t\t\t<footer>\r\n\t\t\t\t<p> \r\n\t\t\t\t\t<a href=\"index.php?controlador=Welcome&operacion=about\">Acerca de...</a> || <a href=\"index.php?controlador=Welcome&operacion=privacitat\">Privacitat</a>\r\n\t\t\t\t\t<a class=\"center\" href=\"index.php\">Pre-Inscripcions - CIFO del Vallès</a>\r\n\t\t\t\t\t<a class=\"right\" target=\"blank\" href=\"http://www.robertsallent.com/\">Robs Micro Framework</a> \r\n \t\t</p>\r\n\t\t\t</footer>\r\n\t\t<?php }", "public function footer()\n\t{\n\t\treturn $this->render('footer');\n\t}", "function goodwish_edge_get_footer_bottom() {\n\n\t\t$parameters = array();\n\n\t\t$parameters['footer_bottom_border'] = goodwish_edge_get_footer_bottom_border();\n\t\t$parameters['footer_bottom_border_in_grid'] = (goodwish_edge_options()->getOptionValue('footer_bottom_border_in_grid') == 'yes') ? 'edgtf-in-grid' : '';\n\t\t$parameters['footer_in_grid'] = (goodwish_edge_options()->getOptionValue('footer_in_grid') == 'yes') ? true : false;\n\t\t$parameters['footer_bottom_columns'] = goodwish_edge_options()->getOptionValue('footer_bottom_columns');\n\t\t$parameters['footer_bottom_border_bottom'] = goodwish_edge_get_footer_bottom_bottom_border();\n\n\t\tgoodwish_edge_get_module_template_part('templates/parts/footer-bottom', 'footer', '', $parameters);\n\n\t}", "function get_footer($name = \\null)\n{\n}", "public function footerSection(): string\n {\n return config('kontour.sections.footer', 'footer');\n }", "public function getFooterText()\n {\n return \"BloggsCal нижний колонтитул \\n\";\n }", "public function footer(){\n ?>\n </section>\n <footer>\n <ul>\n <li><a href=\"www.tryandkeep.fr\">© Droit réservé try&keep</a></li>\n <li><a href=\"href='mailto:truc@machin.com'\">Soo</a></li>\n </ul>\n </footer>\n </body>\n </html>\n\n <?php\n }", "function kloe_qodef_get_footer_bottom() {\n\n\t\t$parameters = array();\n\n\t\t$parameters['footer_bottom_border'] = kloe_qodef_get_footer_bottom_border();\n\t\t$parameters['footer_bottom_border_in_grid'] = (kloe_qodef_options()->getOptionValue('footer_bottom_border_in_grid') == 'yes') ? 'qodef-in-grid' : '';\n\t\t$parameters['footer_in_grid'] = (kloe_qodef_options()->getOptionValue('footer_in_grid') == 'yes') ? true : false;\n\t\t$parameters['footer_bottom_columns'] = kloe_qodef_options()->getOptionValue('footer_bottom_columns');\n\t\t$parameters['footer_bottom_border_bottom'] = kloe_qodef_get_footer_bottom_bottom_border();\n\n\t\tkloe_qodef_get_module_template_part('templates/parts/footer-bottom', 'footer', '', $parameters);\n\n\t}", "function footer($footerTpl = \"footer.tpl\"){\n if(!empty($footerTpl)){\n $this->footer = file_get_contents($this->tplDir . $footerTpl);\n echo $this->footer;\n return true;\n }else return false;\n }", "function make_footer() {\n\tglobal $footer, $themetemplates, $user_vars, $item_id;\n\t$tplext = TPL_EXT;\n\tgrab_title('footer');\n\t$footer = inject_variables($footer, $user_vars['footer']);\n\t$footer = inject_variables($footer, $user_vars['loops']);\n\t$footer = applyOzone('footer', $footer);\n\treturn sprintt($footer, safe_tpl(\"$themetemplates/@footer{$tplext}\"));\n}", "function base_footer()\n\t{\n\t\t$footer = \"\\n</body>\"\n\t\t. \"\\n</html>\";\n\t\treturn $footer;\n\t}", "public function footer_content( $footer ) {\n\n return $this->footer_html;\n }", "function et_get_mobile_footer( $name = null ) {\n\tglobal $et_mobile_path;\n\n\tdo_action( 'get_footer', $name );\n\n\t//$templates = array();\n\t$templates = $et_mobile_path . '/' . 'footer.php';\n\tif ( isset($name) )\n\t\t$templates = $et_mobile_path . '/' . \"footer-{$name}.php\";\n\t$templates = apply_filters( 'template_include', $templates );\n\t//$templates = apply_filters( 'template_include', $templates );\n\t// Backward compat code will be removed in a future release\n\tif ('' == locate_template($templates, true))\n\t\t//load_template( ABSPATH . WPINC . '/theme-compat/footer.php');\n\t\tload_template($templates);\n}", "function pageFooter() : string {\n\t// Footer with home link set\n\t\n\t$flinks\t= config( 'default_footer_links', \\DEFAULT_FOOTER_LINKS );\n\treturn \n\trender( template( 'tpl_page_footer' ), [ \n\t\t'footer_links'=> \n\t\t\trenderNavLinks( \n\t\t\t\ttemplate( 'tpl_footernav_wrap' ), \n\t\t\t\t$flinks\n\t\t\t),\n\t\t'home'\t\t=> homeLink(),\n\t\t'feedlink'\t=> feedLink()\n\t] );\n}", "function getTemplateDialogFooter()\r\n {\r\n return $this->template_dialog_footer;\r\n }", "static function docFooter($name) \n {\n return \"\";\n }", "function footer_content()\n {\n \tif (isset($GLOBALS['__TPL_DIR__']) && file_exists($GLOBALS['__TPL_DIR__'].'footer.php'))\n \t{\n \t\tinclude_once($GLOBALS['__TPL_DIR__'].'footer.php');\n \t}\n }", "private function getHTMLFooterDataAsString()\n {\n static $footerData = null;\n if (null === $footerData) {\n $footerData = $this->_GetCustomFooterData();\n }\n\n return $footerData;\n }", "public function modalfooter($footer = null)\n {\n\n // Declare return\n $return = null;\n\n // Check title is set\n if (!is_null($footer))\n {\n\n // Create element\n $return = $this->class('modal-footer')->adiv($this->getSetting('prehtml') . $footer . $this->getSetting('posthtml'));\n\n }\n\n // Save element\n $this->save('modalfooter', $return);\n\n return $return;\n\n }", "public static function buildFooter()\n\t{\n\t\t$footer = \"\";\n\n\t\t//lets get our footer\n\t\t$footer .= self::formatStrings(Core::ec('TICKER_LABEL_STYLES', 'footer'), GOPRE . FOPRE, HUD_FOOTER, FOSUF . GOSUF, ' ', null);\n\n\t\treturn $footer;\n\t}", "function renderFooter() {\n\t\t$textbuilder = '\n\t\t\t<img src=\"'.mainURL().'img/people.png\" class=\"img-responsive center-block\" />\n\n\t\t\t<footer>\n\t\t\t\t<p>Copyright © Paul Gotea - Evozon PHP Internship</p>\n\t\t\t</footer>\n\n\t\t\t</body>\n\t\t\t</html>\n\t\t';\n\t\treturn $textbuilder;\n\t}", "public function getFooterID()\n {\n return $this->footerID;\n }", "function GenerateFooter()\n {\n $footer = \n \"<div class=\\\"footer\\\"></div>\n <div id=\\\"copyrightFooter\\\">Copyright &copy; 2013 | Eric Hotinger\n <span class = \\\"fltrt\\\">\n <a href = \\\"http://www.facebook.com/lREMl\\\">facebook</a> | \n <a href = \\\"https://twitter.com/ehotinger\\\">twitter</a> |\n <a href = \\\"http://www.ehotinger.com/contact/\\\">contact</a>\n </span>\n </div>\n </div>\n </div>\n </body>\n </html>\";\n\n return $footer;\n }", "function footer()\n\t{\n\t\tstatic $footer_done=0;\n\t\tif ($footer_done++) return;\t// prevent multiple footers, not sure we still need this (RalfBecker)\n\n\t\tif (!isset($GLOBALS['egw_info']['flags']['nofooter']) || !$GLOBALS['egw_info']['flags']['nofooter'])\n\t\t{\n\t\t\t// get the (depricated) application footer\n\t\t\t$content = $this->_get_app_footer();\n\n\t\t\t// run the hook navbar_end\n\t\t\t// ToDo: change to return the content\n\t\t\tob_start();\n\t\t\t$GLOBALS['egw']->hooks->process('navbar_end');\n\t\t\t$content .= ob_get_contents();\n\t\t\tob_end_clean();\n\n\t\t\t// eg. javascript, which need to be at the end of the page\n\t\t\tif ($GLOBALS['egw_info']['flags']['need_footer'])\n\t\t\t{\n\t\t\t\t$content .= $GLOBALS['egw_info']['flags']['need_footer'];\n\t\t\t}\n\n\t\t\t// do the template sets footer, former parse_navbar_end function\n\t\t\t// this closes the application area AND renders the closing body- and html-tag\n\t\t\tif (self::$navbar_done)\n\t\t\t{\n\t\t\t\tif (!is_a($this->tpl,'Template')) $this->tpl = new Template(EGW_TEMPLATE_DIR);\n\t\t\t\t$this->tpl->set_file(array('footer' => 'footer.tpl'));\n\t\t\t\t$this->tpl->set_var($this->_get_footer());\n\t\t\t\t$content .= $this->tpl->fp('out','footer');\n\t\t\t}\n\t\t\telseif (!isset($GLOBALS['egw_info']['flags']['noheader']) || !$GLOBALS['egw_info']['flags']['noheader'] ||\n\t\t\t\tself::$header_done || !empty($_GET['nonavbar']) ||\n\t\t\t\t$GLOBALS['egw_info']['flags']['currentapp'] == 'admin' && empty($_GET['ajax']))\n\t\t\t{\n\t\t\t\t$content .= \"</body>\\n</html>\\n\";\t// close body and html tag, eg. for popups\n\t\t\t}\n\t\t\treturn $content;\n\t\t}\n\t}", "protected function renderFooter()\n\t{\n\t\tif ($this->footer !== null) {\n\t\t\treturn \\CHtml::tag('div', array('class' => 'modal-footer'), \"\\n\" . $this->footer . \"\\n\");\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public function getHeadMailFile()\n {\n return realpath(__DIR__ . '/../../etc/header.html');\n }", "protected function _GetCustomFooterData()\n {\n TPkgCmsEventManager::GetInstance()->NotifyObservers(\n TPkgCmsEvent::GetNewInstance($this, TPkgCmsEvent::CONTEXT_CORE, TPkgCmsEvent::NAME_GET_CUSTOM_FOOTER_DATA));\n\n $event = new HtmlIncludeEvent();\n\n /** @var HtmlIncludeEvent $event */\n $event = $this->eventDispatcher->dispatch($event, CoreEvents::GLOBAL_HTML_FOOTER_INCLUDE);\n\n $aModuleFooterData = $event->getData();\n\n return implode(\"\\n\", $aModuleFooterData);\n }", "public function footer() {\n global $CFG, $DB, $USER;\n\n $output = $this->container_end_all(true);\n\n $footer = $this->opencontainers->pop('header/footer');\n\n if (debugging() and $DB and $DB->is_transaction_started()) {\n // TODO: MDL-20625 print warning - transaction will be rolled back\n }\n\n // Provide some performance info if required\n $performanceinfo = '';\n if (defined('MDL_PERF') || (!empty($CFG->perfdebug) and $CFG->perfdebug > 7)) {\n $perf = get_performance_info();\n if (defined('MDL_PERFTOLOG') && !function_exists('register_shutdown_function')) {\n error_log(\"PERF: \" . $perf['txt']);\n }\n if (defined('MDL_PERFTOFOOT') || debugging() || $CFG->perfdebug > 7) {\n $performanceinfo = bootstrap3_brum1975_performance_output($perf);\n }\n }\n\n $footer = str_replace($this->unique_performance_info_token, $performanceinfo, $footer);\n\n $footer = str_replace($this->unique_end_html_token, $this->page->requires->get_end_code(), $footer);\n\n $this->page->set_state(moodle_page::STATE_DONE);\n\n if(!empty($this->page->theme->settings->persistentedit) && property_exists($USER, 'editing') && $USER->editing && !$this->really_editing) {\n $USER->editing = false;\n }\n\n return $output . $footer;\n }", "public static function html_footer(){\n\n return '<div style=\"border-top: 1px solid rgb(220,220,220);font-style:italic;font-size: 0.9em;margin-top: 40px;padding-top: 10px;\">' . sprintf( __('Email sent from <strong>%s</strong> at %s', PLUGIN_TEXTDOMAIN), get_option('blogname'), date('Y-M-d H:i:s') ) . '</div>';\n }", "public function footer() {\n global $CFG, $DB, $USER;\n\n $output = $this->container_end_all(true);\n\n $footer = $this->opencontainers->pop('header/footer');\n\n if (debugging() and $DB and $DB->is_transaction_started()) {\n // TODO: MDL-20625 print warning - transaction will be rolled back\n }\n\n // Provide some performance info if required\n $performanceinfo = '';\n if (defined('MDL_PERF') || (!empty($CFG->perfdebug) and $CFG->perfdebug > 7)) {\n $perf = get_performance_info();\n if (defined('MDL_PERFTOLOG') && !function_exists('register_shutdown_function')) {\n error_log(\"PERF: \" . $perf['txt']);\n }\n if (defined('MDL_PERFTOFOOT') || debugging() || $CFG->perfdebug > 7) {\n $performanceinfo = essential_performance_output($perf);\n }\n }\n\n $footer = str_replace($this->unique_performance_info_token, $performanceinfo, $footer);\n\n $footer = str_replace($this->unique_end_html_token, $this->page->requires->get_end_code(), $footer);\n\n $this->page->set_state(moodle_page::STATE_DONE);\n\n if(!empty($this->page->theme->settings->persistentedit) && property_exists($USER, 'editing') && $USER->editing && !$this->really_editing) {\n $USER->editing = false;\n }\n\n return $output . $footer;\n }", "public function getFooter()\n {\n return array('value'=>null,'format'=>null);\n }", "protected function _setFooter()\n {\n if(!$this->footer) return null;\n $this->_contents[] = $this->_stringTemplate->format('footer', ['footer'=>$this->footer]);\n }", "function Page_Exported() {\r\n\r\n\t\t//$this->ExportDoc->Text .= \"my footer\"; // Export footer\r\n\t\t//echo $this->ExportDoc->Text;\r\n\r\n\t}", "public function getFooterOrder()\n {\n return $this->footer_order;\n }", "public function footer()\n {\n $this->SetY(-19);\n $this->drawLine();\n $this->SetFontSize(10);\n $this->Cell(0, 10, $this->infoTextForFooter , 0, false, 'L', 0, '', 0, false, 'T', 'M');\n $this->Ln(4);\n $now = new FrozenTime();\n $textForFooterRight =\n __('Generated_on_{0}', [\n $now->i18nFormat(Configure::read('app.timeHelper')->getI18Format('DateNTimeLongWithSecs'))\n ])\n . ', ' .\n __('Page_{0}_of_{1}', [\n $this->getAliasNumPage(), $this->getAliasNbPages()\n ]);\n $this->Cell(0, 10, $textForFooterRight, 0, false, 'R', 0, '', 0, false, 'T', 'M');\n $this->SetFontSize(12);\n }", "function bodyFooterFilename()\r\n{\r\n\r\n/*\r\n global $gPHPscript;\r\n\r\n echo '<p><a href=\"', htmlspecialchars($_SERVER['REQUEST_URI']), '\">',$_SERVER['PHP_SELF'],'</a></p>';\r\n*/\r\n}", "public function footer(){\n\t\t\tif(\\View::include_header()) View::include_path(View::build_search_paths('footer.php', 'partial'));\n\t\t}", "public function generic_message_footer($isHtml)\n {\n if ($isHtml && ($file = $this->rcmail->config->get('generic_message_footer_html'))) {\n $html_footer = true;\n }\n else {\n $file = $this->rcmail->config->get('generic_message_footer');\n $html_footer = false;\n }\n\n if ($file && realpath($file)) {\n // sanity check\n if (!preg_match('/\\.(php|ini|conf)$/', $file) && strpos($file, '/etc/') === false) {\n $footer = file_get_contents($file);\n if ($isHtml && !$html_footer) {\n $t2h = new rcube_text2html($footer, false);\n $footer = $t2h->get_html();\n }\n\n if ($this->options['charset'] && $this->options['charset'] != RCUBE_CHARSET) {\n $footer = rcube_charset::convert($footer, RCUBE_CHARSET, $this->options['charset']);\n }\n\n return $footer;\n }\n }\n\n return false;\n }", "function getWebsiteFooter($greeting)\r\n{\r\n echo <<<FOOTER\r\n </div>\r\n <div id='footer'>\r\n <a href='http://validator.w3.org/check?uri=referer'><img class='valid'\r\n src='http://www.w3.org/Icons/valid-html401' alt='Valid HTML 4.01 Strict'>\r\n </a>\r\n $greeting <span class='small'> Copyright © SuperHero Center, 2014 </span>\r\n </div>\r\n </div>\r\n </body>\r\n </html>\r\nFOOTER;\r\n}", "static function footer() {\r\n ?>\r\n <!-- End page content -->\r\n </div>\r\n <!-- Footer -->\r\n <footer class=\"w3-center w3-light-grey w3-padding-32\">\r\n <p><a href=\"https://www.beautyathome.ca\" title=\"BeautyAtHome\" target=\"_blank\" class=\"w3-hover-text-green\">www.BeautyAtHome.ca</a></p>\r\n </footer>\r\n </body>\r\n </html>\r\n <?php\r\n }", "public static function getFooter()\n {\n $data = Doctrine_Query::create()\n ->select('f.id,f.topfooter,f.middleColumn1,f.middleColumn2, f.middleColumn3, f.middleColumn4, f.bottomFooter')\n ->from('Footer f')\n ->where('f.deleted=0' )\n ->limit(1)->fetchArray();\n return $data;\n }", "function Page_Exported() {\n\n\t\t//$this->ExportDoc->Text .= \"my footer\"; // Export footer\n\t\t//echo $this->ExportDoc->Text;\n\n\t}", "function Page_Exported() {\n\n\t\t//$this->ExportDoc->Text .= \"my footer\"; // Export footer\n\t\t//echo $this->ExportDoc->Text;\n\n\t}", "function Page_Exported() {\n\n\t\t//$this->ExportDoc->Text .= \"my footer\"; // Export footer\n\t\t//echo $this->ExportDoc->Text;\n\n\t}", "function Page_Exported() {\n\n\t\t//$this->ExportDoc->Text .= \"my footer\"; // Export footer\n\t\t//echo $this->ExportDoc->Text;\n\n\t}", "function Page_Exported() {\n\n\t\t//$this->ExportDoc->Text .= \"my footer\"; // Export footer\n\t\t//echo $this->ExportDoc->Text;\n\n\t}", "function Page_Exported() {\n\n\t\t//$this->ExportDoc->Text .= \"my footer\"; // Export footer\n\t\t//echo $this->ExportDoc->Text;\n\n\t}", "function Page_Exported() {\n\n\t\t//$this->ExportDoc->Text .= \"my footer\"; // Export footer\n\t\t//echo $this->ExportDoc->Text;\n\n\t}", "function Page_Exported() {\n\n\t\t//$this->ExportDoc->Text .= \"my footer\"; // Export footer\n\t\t//echo $this->ExportDoc->Text;\n\n\t}", "function Page_Exported() {\n\n\t\t//$this->ExportDoc->Text .= \"my footer\"; // Export footer\n\t\t//echo $this->ExportDoc->Text;\n\n\t}" ]
[ "0.7699289", "0.7611964", "0.75121003", "0.7278595", "0.72729504", "0.72483826", "0.7209986", "0.7101122", "0.7023874", "0.69468236", "0.6912918", "0.6865055", "0.6834331", "0.6818617", "0.681208", "0.68067056", "0.67950326", "0.6776779", "0.67693514", "0.6731225", "0.67108023", "0.66727585", "0.66675884", "0.66663617", "0.6663512", "0.6655268", "0.66357255", "0.661787", "0.6593968", "0.6489184", "0.644099", "0.643383", "0.6421602", "0.6387295", "0.63726777", "0.63702625", "0.6369032", "0.6363169", "0.6360527", "0.6336845", "0.6322562", "0.6317957", "0.6306146", "0.62994814", "0.62977254", "0.62920564", "0.62912136", "0.6290551", "0.6284427", "0.6264261", "0.6256681", "0.6255319", "0.6243303", "0.6235767", "0.62332577", "0.6225622", "0.62074924", "0.6176992", "0.61764514", "0.6160917", "0.61588836", "0.6156626", "0.6154565", "0.6133877", "0.61323965", "0.61319053", "0.61142427", "0.607708", "0.6076614", "0.60761863", "0.60690874", "0.6051603", "0.6047866", "0.60478175", "0.60359025", "0.6032738", "0.60188454", "0.60063255", "0.60016316", "0.5994926", "0.5986146", "0.5985336", "0.59849423", "0.59788966", "0.5976376", "0.5965973", "0.5947487", "0.5937345", "0.5918938", "0.5912221", "0.5900068", "0.58931285", "0.58931285", "0.58931285", "0.58931285", "0.58931285", "0.58931285", "0.58931285", "0.58931285", "0.58931285" ]
0.869189
0
Find Mage Path into $dir.
Найдите путь Mage в $dir.
private function _findMagePathInto($dir) { if ($this->_isRoot($dir)) { return false; } else if ($this->_isMageDir($dir)) { return $dir; } else { return $this->_findMagePathInto(dirname($dir)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function searchPath(): string;", "abstract protected function locateInSyncDir();", "private function findModule(){\n\n $dir_handle = opendir($this->moudleDir);\n\n while($filename = readdir($dir_handle)){\n if( ( $filename != \".\" ) && ( $filename != \"..\" ) ){\n $subFile = $this->moudleDir . DIRECTORY_SEPARATOR . $filename;\n //If the file is a dirction.\n if(is_dir($subFile)){ \n $this->moduleList[] = $filename;\n }\n }\n }\n }", "protected function getAlias($dir){\n $search = realpath( Yii::getAlias($dir)); //echo \"<br> <b>SEARCH: $search</b>\";\n\n if(! preg_match('/D:\\\\\\WEB\\\\\\YII2\\\\\\YII2-BASIC-TEST/', $search))\n return \"OUT OFF APPLICATION\";\n \n $aliases = Yii::$aliases; //echo \"<br>GET ROOT ALIAS : $dir real: \" . $search;\n $res = array_search($search, $aliases); //ECHO \"<br>1=> $res\";\n if($res)\n return $res;\n else{\n $res = $this->getAliasRecursive($search, $aliases); //ECHO \"<br> <b>2=> $res</b>\";\n if($res)\n return $res;\n else{\n $arr = explode('\\\\', $search); //print_r($arr);\n foreach($arr as $a){ //echo \"\\n\". $a;\n $pop[] = array_pop($arr); //echo \" pop : $pop\";\n $path = implode('\\\\', $arr); //echo \"<br> <b>new path : $path </b>\"; \n \n if(! preg_match('/D:\\\\\\WEB\\\\\\YII2\\\\\\YII2-BASIC-TEST/', $search))\n return \"OUT OFF APPLICATION\";\n elseif($res = $this->getAliasRecursive($path, $aliases)){ //ECHO \"<br> <b>4=> $res</b>\"; var_dump($res);\n return $res . '\\\\' . implode('\\\\', array_reverse($pop));\n }\n elseif($res = array_search($path, $aliases)){ // ECHO \"<br> <b>3=> $res - \". implode('\\\\', array_reverse($pop)) . \"</b>\";\n return $res . '\\\\' . implode('\\\\', array_reverse($pop));\n }\n }\n } \n }\n }", "protected function getPathToMagePhp() {\n $extra = $this->package->getExtra();\n\n if (!array_key_exists('magento-root-dir', $extra) || $extra['magento-root-dir'] === '') {\n throw new InvalidConfigException('The setting \"magento-root-dir\" is required.');\n }\n\n $pathToMagePhp = $extra['magento-root-dir'] . '/app/Mage.php';\n\n if (!$this->filesystem->exists($pathToMagePhp)) {\n throw new FileNotFoundException('File \"Mage.php\" not found.');\n }\n\n if (!is_readable($pathToMagePhp)) {\n throw new IOException('File \"Mage.php\" is not readable');\n }\n\n if (!is_writable($pathToMagePhp)) {\n throw new IOException('File \"Mage.php\" is not writable');\n }\n\n return $pathToMagePhp;\n }", "private function findModulePaths()\r\n {\r\n $dirsAsKeys = $this->appConf->getControllerDirs($this->moduleName);\r\n $dirs = array();\r\n foreach ($dirsAsKeys as $dir => $junk) {\r\n $dirs[] = dirname($dir);\r\n }\r\n $this->modulePaths = $dirs;\r\n }", "public function _scanmodules($dir) {\n\t\t$modules=array_diff( scandir( $dir ), Array( \".\", \"..\" ) );\n\t\tforeach($modules as $entrie) {\n\t\t\tif(is_dir($dir.$entrie))\n\t\t\t\t$result[]=$entrie;\n\t\t}\n\t\treturn($result);\t\t\n\t}", "public function find($path);", "function explore_directory($path) {\n\tglobal $excluded;\n\n\tforeach (glob($path . '/*') as $name) {\n\t\tif ($name == '.svn') continue;\n\t\t\n\t\tif (is_dir($name) && !in_array($name, $excluded)) {\n\t\t\texplore_directory($name);\n\t\t}\n\t\tif (is_file($name)) {\n\t\t\t$pi = pathinfo($name);\n\t\t\tif (strtolower($pi['extension']) == 'php') {\n\t\t\t\tparse_class_file($name);\n\t\t\t}\n\t\t}\n\t}\n}", "function find_path($dir, $file_to_find) {\r\n if ($handle = opendir($dir)) {\r\n while (false !== ($entry = readdir($handle))) {\r\n if (is_dir(\"content/\" . $entry) && $entry != \".\" && $entry != \"..\") {\r\n find_path(\"content/\" . $entry, $file_to_find);\r\n } else if ($entry == $file_to_find . \".php\") {\r\n $_SESSION['path'] = $dir . \"/\";\r\n }\r\n }\r\n closedir($handle);\r\n if (isset($_SESSION['path'])) {\r\n return $_SESSION['path'];\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n}", "function _store_root()\n{\n\tglobal $options;\n\t$look_for = 'Mage.php'; // charakterystyczna ścieżka bezpośrednio w katalogu głównym sklepu\n\n\tif (empty($options['store_root']))\n\t{\n\t\t$options['store_root'] = '.';\n\n\t\t// przeszukujemy 3 poziomy w górę i w dół względem lokalizacji pliku integracyjnego\n\t\tfor ($up = 0; $up < 4; $up++)\n\t\t{\n\t\t\tfor ($down = 0; $down < 3; $down++)\n\t\t\t{\n\t\t\t\t$path = getcwd() . '/' . str_repeat('../', $up) . str_repeat('*/', $down) . $look_for;\n\n\t\t\t\tif (glob($path)) \n\t\t\t\t{\n\t\t\t\t\t$path = (glob($path));\n\t\t\t\t\tbreak 2;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (is_array($path)) // znaleziono poszukiwany plik\n\t\t{\n\t\t\t$options['store_root'] = dirname($path[0]);\n\t\t}\n\t}\n\n\treturn $options['store_root'];\n}", "abstract protected function locateInVcsWorkdir();", "function findRootDir($dir) {\n global $imagepath;\n \n while (is_dir($dir)) {\n if (is_dir($dir . \"/source\")) {\n return realpath($dir);\n }\n $dir .= \"/..\";\n }\n echo \"Could not find HIG root directory.\";\n exit(1);\n}", "private function _findFiles($dir){\n\t\tif(substr($dir, 0, -1) != '/'){\n\t\t\t$dir = $dir.'/';\n\t\t}\n\t\tif(is_dir($dir) && is_readable($dir)){\n\t\t\t$d = dir($dir);\n\t\t\twhile (false !== ($entry = $d->read())) {\n\t\t\t\tif($entry{0} != '.' && is_file($dir.$entry)){\n\t\t\t\t\t$this->_addObject($dir.$entry);\n\t\t\t\t} else if ($entry{0} != '.' && is_dir($dir.$entry)){\n\t\t\t\t\t$this->_findFiles($dir.$entry);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private function scandir($dir) {\n $dir = trim($dir, '/') . '/';\n $absolute = $this->absolute($dir);\n $files = scandir($absolute);\n\n foreach ($files as $file) {\n // ignore relative references\n if ($file === \".\" || $file === \"..\") {\n continue;\n }\n\n if (is_dir($absolute . $file)) {\n $this->scandir($dir . $file);\n } else {\n // we want the relative path inside the input_dir so we can\n // put the file in the same place in the output_dir\n $path = preg_replace(\"#^\" . Config::get('input_dir') . \"#\", \"\", $dir . $file);\n $this->paths[] = array(\n 'path' => $path\n );\n }\n }\n }", "function search_in_dirs($dirs, $cmd, $show_dirs)\n{\n foreach($dirs as $dir){\n if ($show_dirs)\n echo \"$dir\\n\";\n\n if (check_exact($dir, $cmd))\n return $dir;\n }\n\n return null;\n}", "protected function _getRootPath($magentoRoot = '')\n {\n $n = PHP_EOL;\n $this->_rootPath;\n $pwd = realpath(dirname(__FILE__)).self::DS;\n $fileInclude = 'app'.self::DS.'Mage.php';\n \n if (empty($this->_rootPath)) {\n if (empty($magentoRoot)) {\n $magePath = $pwd.$fileInclude;\n } else {\n $magePath = $pwd.$magentoRoot.self::DS.$fileInclude;\n }\n\n if (!file_exists($magePath)) {\n //find first ocurrence of Mage.php exclude .svn directories to speed up the search\n //$results = shell_exec(\"find $pwd -name Mage.php -type f | sed 1q\");\n $results = shell_exec('find '.$pwd.' -name Mage.php -a ! -name *.svn* -type f | sed 1q');\n $results = str_replace($n, '', $results); //strip line ends\n $pathArray = explode(self::DS, $results);\n $pwdArray = explode(self::DS, $pwd);\n //we remove the last 2 elements because Mage.php it's always in app/Mage.php\n array_splice($pathArray, count($pathArray)-2);\n\n $magentoRoot = array_diff($pathArray, $pwdArray);\n if (count($magentoRoot) > 0) {\n $magentoRoot = implode(self::DS, $magentoRoot);\n } else {\n $magentoRoot = '';\n }\n\n //self modify the $magentoRoot declaration line at the begining of this script\n $data = file(__FILE__, FILE_IGNORE_NEW_LINES);\n $data[2] = \" \\$magentoRoot = '$magentoRoot'; //relative to this script location\";\n file_put_contents(__FILE__, implode($n, $data));\n \n }\n \n if (empty($magentoRoot)) {\n $this->_rootPath = $pwd;\n } else {\n $this->_rootPath = $pwd.$magentoRoot.self::DS;\n }\n \n if (!file_exists($this->_rootPath.'app'.self::DS.'Mage.php')) {\n die('ERROR!!!! The Magento root filepath provided is not correct ('.$magentoRoot.').'.$n.'Edit the file and provide a '.$magentoRoot.' relative to this file path'.$n.$n);\n }\n }\n \n return $this->_rootPath;\n }", "public function findPath($path) {\n $pwd = 'root';\n foreach (explode('/', $path) as $p) {\n $file = $this->findIn($p, $pwd);\n $pwd = $file->id;\n }\n return $file;\n }", "public function getAdditionalSearchPath() {}", "function dirPath() { return (\"../../\"); }", "protected function getSearchPaths() {}", "function scan_dir_file($path)\n{\n\t$dirr=scandir($path);\n\tunset($dirr[0]);\n\tunset($dirr[1]);\n\t$dirr=array_merge($dirr);\n\tfor($i=0;$i<sizeof($dirr);$i++)\n\t\t$dirr[$i]=$path.\"\\\\\".$dirr[$i];\n\treturn $dirr;\n}", "public static function locate()\n\t{\n\t}", "function\t\t\tgetRemainPath();", "function _paths() {\n\t\t$plugins = array_map('Inflector::underscore', Configure::listObjects('plugin'));\n\t\tforeach ($plugins as $plugin) {\n\t\t\tforeach (App::path('plugins') as $pluginPath) {\n\t\t\t\tif (is_dir($pluginPath . $plugin)) {\n\t\t\t\t\t$pluginVendorPaths[] = $pluginPath . $plugin . DS . 'vendors' . DS;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$paths = array_merge(\n\t\t\tApp::path('vendors'),\n\t\t\tarray(WWW_ROOT),\n\t\t\t$pluginVendorPaths\n\t\t);\n\n\t\tforeach ($paths as $key => $path) {\n\t\t\t$message = sprintf('Would you like to collect files from %s?', $this->shortPath($path));\n\n\t\t\tif ($this->in($message, 'y,n', 'y') == 'n') {\n\t\t\t\tunset($paths[$key]);\n\t\t\t}\n\t\t}\n\n\t\t$answer = 'y';\n\n\t\twhile ($answer == 'y') {\n\t\t\tif ($answer = $this->in('Would you like to add another path?', 'y,n', 'n') == 'y') {\n\t\t\t\t$path = $this->in('Path:');\n\n\t\t\t\tif (!is_dir($path)) {\n\t\t\t\t\t$this->out('Directory does not exist!');\n\t\t\t\t} else {\n\t\t\t\t\t$paths[] = $path;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $paths;\n\t}", "private function __scanDir($dir) {\n\t\tif (strstr($dir, '../')) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ($dir == '/') {\n\t\t\t$dir = $this->startDirectory;\n\t\t\t$this->__currentDirectory = $dir;\n\t\t}\n\n\t\t$strippedDir = str_replace('/', '', $dir);\n\n\t\t$dir = ltrim($dir, \"/\");\n\n\t\t// Prevent listing blacklisted directories\n\t\tif (in_array($strippedDir, $this->ignoredDirectories)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (! file_exists($dir) || !is_dir($dir)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn scandir($dir);\n\t}", "public function getFoundPath() {}", "function _xml_get_dir_contents( $dir )\n\t{\n\t\t$dir = preg_replace( \"#/$#\", \"\", $dir );\n\t\t\n\t\tif ( file_exists($dir) )\n\t\t{\n\t\t\tif ( is_dir($dir) )\n\t\t\t{\n\t\t\t\t$handle = opendir($dir);\n\t\t\t\t\n\t\t\t\twhile (($filename = readdir($handle)) !== false)\n\t\t\t\t{\n\t\t\t\t\tif (($filename != \".\") && ($filename != \"..\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( is_dir( $dir.\"/\".$filename ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//-----------------------------------\n\t\t\t\t\t\t\t// Recurse\n\t\t\t\t\t\t\t//-----------------------------------\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->_xml_get_dir_contents($dir.\"/\".$filename);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//-----------------------------------\n\t\t\t\t\t\t\t// Add file to list\n\t\t\t\t\t\t\t//-----------------------------------\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->workfiles[] = $dir.\"/\".$filename;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tclosedir($handle);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->error_number = '002';\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->error_number = '001';\n\t\t\treturn;\n\t\t}\n\t}", "private function metadir() {\n\t\treturn __DIR__ . '/../../' . $this->config['data']['metadir'] . \"/\";\n\t}", "static private function find_contents($dir){\n $result = array();\n $root = array_diff( scandir($dir,1), Array( \".\", \"..\",'.AppleDouble') ); // με εξαιρέσεις\n foreach($root as $value){\n\n if($value === '.' || $value === '..') {continue;}\n if(is_file($dir.DIRECTORY_SEPARATOR.$value)){\n\n if(!self::$ext_filter || in_array(strtolower(pathinfo($dir.DIRECTORY_SEPARATOR.$value, PATHINFO_EXTENSION)), self::$ext_filter)){\n self::$files[] = $result[] = $dir.DIRECTORY_SEPARATOR.$value;\n }\n continue;\n }\n if(self::$recursive){\n\n foreach(self::find_contents($dir.DIRECTORY_SEPARATOR.$value) as $item) {\n self::$files[] = $result[] = $item;\n }\n }\n }\n // Return required for recursive search\n return $result;\n }", "protected function locateModmanFile()\n {\n if (!$this->useModman) {\n return '';\n }\n\n $modmanFile = $this->extensionDir . DIRECTORY_SEPARATOR . 'modman';\n if (file_exists($modmanFile)) {\n return $modmanFile;\n }\n\n $pattern = $this->extensionDir . DIRECTORY_SEPARATOR . '*' . DIRECTORY_SEPARATOR . 'modman';\n foreach (glob($pattern) as $modmanFile) {\n return $modmanFile;\n }\n\n return '';\n }", "abstract public function dir($path);", "public function getBaseDir()\n {\n return Mage::getBaseDir('media') . DS . self::BRANDING_DIR;\n }", "protected function initializeMagentoRootDir() {\n if (!$this->magentoRootDir->isDir()) {\n $magentoRootPath = $this->magentoRootDir->getPathname();\n $pathParts = explode(DIRECTORY_SEPARATOR, $magentoRootPath);\n $baseDir = explode(DIRECTORY_SEPARATOR, $this->vendorDir);\n array_pop($baseDir);\n $pathParts = array_merge($baseDir, $pathParts);\n $directoryPath = '';\n foreach ($pathParts as $pathPart) {\n $directoryPath .= $pathPart . DIRECTORY_SEPARATOR;\n $this->filesystem->ensureDirectoryExists($directoryPath);\n }\n }\n\n // $this->getSourceDir($package);\n }", "public function getFileBaseDir(){\n\t\treturn Mage::getBaseDir('media').DS.'menuitem'.DS.'file';\n\t}", "private function path($dir) {\n $cwd= getcwd();\n $replace= [$cwd => '.', dirname($cwd) => '..'];\n $windows= 0 === strncasecmp('Win', PHP_OS, 3);\n\n if (!$windows) {\n $separator= '/';\n $replace+= [getenv('HOME') => '~'];\n } else if ($home= getenv('HOME')) {\n $separator= '/';\n $replace+= [getenv('HOME') => '~', getenv('APPDATA') => '$APPDATA', getenv('USERPROFILE') => '$USERPROFILE'];\n } else {\n $separator= '\\\\';\n $replace+= [getenv('APPDATA') => '%APPDATA%', getenv('USERPROFILE') => '%USERPROFILE%'];\n }\n\n // Short-circuit paths without directory\n if (strcspn($dir, '/\\\\') === strlen($dir)) return '.'.$separator.$dir;\n\n // Compare expanded paths against replace using case-insensitivity on Windows\n $prefix= $windows ? 'stripos' : 'strpos';\n $expand= function($path) {\n return realpath($path) ?: rtrim(strtr($path, '/\\\\', DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR);\n };\n\n $path= $expand($dir);\n foreach ($replace as $base => $with) {\n if (0 === $prefix($path, $expand($base))) {\n $path= $with.substr($path, strlen($base));\n break;\n }\n }\n return strtr($path, DIRECTORY_SEPARATOR, $separator);\n }", "private function __dirPath() {\n return APP.'Plugin'.DS.'Cloggy'.DS.'webroot'.DS;\n }", "function SearchConfigMod()\n\t\t{\n\t\t\t$rtn=false;\n\t\t\t$handle=dir($this->path);\n\t\t\twhile ($directorio = $handle->read())\n\t\t\t{\n\t\t\t\tif(is_dir($this->path.\"/\".$directorio) && $directorio!=\".\" && $directorio!=\"..\")\n\t\t\t\t{\n\t\t\t\t\tif(file_exists($this->path.\"/\".$directorio.\"/config.json\"))\n\t\t\t\t\t{\n\t\t\t\t\t\t$rtn[]=$directorio;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $rtn;\n\t\t}", "public function getGenerationDirectoryPath()\n {\n return Mage::getBaseDir('var') . DS . 'wallee';\n }", "public function find(string $glob = '*', string $dir = '.'): array\n {\n $list = self::rGlob($glob, $this->syspath($dir));\n return array_map([$this, 'sitepath'], $list);\n }", "public function find()\n {\n if ($this->packages === null) {\n $this->packages = array();\n }\n\n foreach ($this->dirs as $pack => $dir) {\n if ($dir['loaded'] === false) {\n $vendors = $this->findDirs($dir['path']);\n\n foreach ($vendors as $vendor_name => $vendor_path) {\n $packages = $this->findDirs($vendor_path);\n\n foreach ($packages as $package_name => $package_path) {\n if (!isset($this->packages[$vendor_name.'/'.$package_name])) {\n $package = new $this->type_class($package_path);\n $package->setLoader($this);\n\n $this->packages[$vendor_name.'/'.$package_name] = $package;\n }\n }\n }\n\n $this->dirs[$pack]['loaded'] = true;\n }\n }\n }", "function searchName($dir, $keyword){\n\n\t\t//Get parent name\n\t\t$parent = $dir;\n\n\t\t$dir = new DirectoryIterator($dir);\n\t\tforeach ($dir as $file) {\n\t\t\tif($file !='.' && $file != '..' &&$file !='assets')\n\t\t\t{\n\t\t\t\t//Check if path is folder or file\n\t\t\t\tif(is_file($file->getPathname())){\n\n\t\t\t\t\t//if file name is matched\n\t\t\t\t\tif (stripos($file, $keyword) !== false) {\n\t\t\t\t\t\techo \"\n\t\t\t\t\t\t\t<div class='searchResultList_file searchResultList'>\n\t\t\t\t\t\t\t\t<div class='searchResultParent_file'>$parent</div>\n\t\t\t\t\t\t\t\t<div class='searchResultChild_file'><a href='?development=$parent$file'>$file</a></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//Check file content\n\t\t\t\t\t\tsearchContent($file,$keyword, $parent);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//if folder name is matched\n\t\t\t\t\tif (stripos($file, $keyword) !== false) {\n\t\t\t\t\t\techo \"\n\t\t\t\t\t\t\t<div class='searchResultList_folder searchResultList'>\n\t\t\t\t\t\t\t\t<div class='searchResultParent_file'>$parent</div>\n\t\t\t\t\t\t\t\t<div class='searchResultChild_file'>$file</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\";\n\t\t\t\t\t}\n\t\t\t\t\t//Check next folder\n\t\t\t\t\tsearchName($file->getPathname(),$keyword);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function pestle_cli($argv)\n{ \n // $path = inputOrIndex('Which folder?','/path/to/magento/app/code/Pulsestorm',$argv, 0);\n $path = $argv['folder'];\n \n $files = \\Pulsestorm\\Phpdotnet\\glob_recursive($path . '/*');\n \n foreach($files as $file)\n {\n $file = realpath($file);\n if(strpos($file, '.php') === false)\n {\n \\Pulsestorm\\Pestle\\Library\\output(\"NOT .php: Skipping $file\");\n continue;\n }\n\n $contents = file_get_contents($file);\n $namespace = parseNamespace($contents);\n if(!$namespace)\n {\n \\Pulsestorm\\Pestle\\Library\\output(\"No Namespace: Skipping $file\");\n continue; \n }\n $class = parseClass($contents);\n if(!$class)\n {\n \\Pulsestorm\\Pestle\\Library\\output(\"No Class: Skipping $class\");\n continue; \n } \n $full_class = $namespace . '\\\\' . $class;\n $path = str_replace('\\\\','/', $full_class) . '.php';\n \n if(strpos($file, $path) === false)\n {\n \\Pulsestorm\\Pestle\\Library\\output(\"ERROR: Path `$path` not in\");\n \\Pulsestorm\\Pestle\\Library\\output($file);\n }\n else\n {\n \\Pulsestorm\\Pestle\\Library\\output('.');\n }\n }\n}", "public function getGenerationDirectoryPath()\n {\n return Mage::getBaseDir('var') . DS . 'postfinancecheckout';\n }", "function pluginFindFile($api, $baseDir, $relativePath);", "function annotationcommand_adapter_refine_searchpaths($searchpath) {\n $result = [];\n foreach ($searchpath as $path) {\n $max_depth = TRUE;\n $pattern = '/.*\\.info$/';\n if (drush_drupal_major_version() > 7) {\n $pattern = '/.*\\.info.yml$/';\n }\n $locations = drush_scan_directory($path, $pattern, ['.', '..'], false, $max_depth);\n\n // Search for any directory that might be a module or theme (contains\n // a *.info or a *.info.yml file)\n foreach ($locations as $key => $info) {\n $result[dirname($key)] = true;\n }\n }\n return array_keys($result);\n}", "public function getDirectory();", "public function getDirectory();", "static private function find_contents($dir){\n $result = array();\n $root = scandir($dir);\n foreach($root as $value){\n if($value === '.' || $value === '..') {continue;}\n if(is_file($dir.DIRECTORY_SEPARATOR.$value)){\n if(!self::$ext_filter || in_array(strtolower(pathinfo($dir.DIRECTORY_SEPARATOR.$value, PATHINFO_EXTENSION)), self::$ext_filter)){\n self::$files[] = $result[] = $dir.DIRECTORY_SEPARATOR.$value;\n }\n continue;\n }\n if(self::$recursive){\n foreach(self::find_contents($dir.DIRECTORY_SEPARATOR.$value) as $value) {\n self::$files[] = $result[] = $value;\n }\n }\n }\n // Return required for recursive search\n return $result;\n }", "function getPackagePath() ;", "function findSources()\n{\n\t$basedir = dirname(__FILE__); //Our location :)\n\t$dirs = array();\n\t$dir = dir($basedir);\n\n\t//All our folders\n\twhile ($line = $dir->read())\n\t{\n\t\tif (in_array($line, array('.', '..', 'blank.gif', 'index', '.htaccess')))\n\t\t\tcontinue;\n\t\tif (is_dir($line)) \n\t\t\t$dirs[] = $line;\n\t\telse\n\t\t\t$files[] = $line;\n\t}\n\t$dir->close();\n\n\tforeach ($dirs as $key => $value) //Let's find Load.php!!!\n\t{\n\t\t//Files in this folder\n\t\t$current_folder = $basedir . '/' . $value;\n\t\t$dir = dir($current_folder);\n\t\twhile ($line = $dir->read())\n\t\t{\n\t\t\tif (in_array($line, array('.', '..', 'blank.gif', 'index', '.htaccess')))\n\t\t\t\tcontinue;\n\t\t\t//We are looking for Load.php. As good as any other :)\n\t\t\tif (!is_dir($line) && ($line == 'Load.php'))\n\t\t\t\treturn $current_folder;\n\t\t}\n\t\t$dir->close();\n\t}\n\t//If we get to the end, well, we didn't find it...\n\treturn null;\n}", "function phpunit_find_drupal_root($dir = NULL)\n{\n if (!$dir) {\n $dir = getcwd();\n }\n\n $candidate = implode(DIRECTORY_SEPARATOR, [$dir, 'includes', 'bootstrap.inc']);\n\n if ($dir == DIRECTORY_SEPARATOR) {\n return FALSE;\n } elseif (is_file($candidate)) {\n return $dir;\n } else {\n $new_dir = realpath(implode(DIRECTORY_SEPARATOR, [$dir, '..']));\n return phpunit_find_drupal_root($new_dir);\n }\n}", "public function find($keyword, $dir = '.') {\n return $this->search($keyword, $dir);\n }", "public static function getProductRootDir() { }", "function scan_dirs($dir) {\n // echo \"dir=$dir<br/>\";\n $dh = opendir($dir);\n $files = array();\n $dirs = array();\n while (false != ($file = readdir($dh))) {\n if($file != '.' && $file != '..'){\n $file = $dir.DIRECTORY_SEPARATOR.$file;\n if(is_dir($file)) $dirs[] = $file; else $files[] = $file; \n }\n }\n closedir($dh);\n\n foreach($files as $f){\n $mt = filemtime($f); \n if($mt >= $this->after && $mt <= $this->before) {\n $d = substr($dir, $this->rootlen);\n $f = substr($f, strlen($dir)+1);\n $this->files[] = array('dir' => $d, 'name' => $f, 'time' => $mt);\n }\n }\n $files = '';\n foreach($dirs as $d) {\n $this->scan_dirs($d);\n }\n }", "function directoryScan($dir, $onlyfiles = false, $fullpath = false)\r\n{\r\n\r\n if (isset($dir) && is_readable($dir)) {\r\n $dlist = Array();\r\n $dir = realpath($dir);\r\n if ($onlyfiles) {\r\n $objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir));\r\n } else {\r\n $objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir), RecursiveIteratorIterator::SELF_FIRST);\r\n }\r\n \r\n foreach($objects as $entry => $object){ \r\n if (!$fullpath) {\r\n $entry = str_replace($dir, '', $entry);\r\n }\r\n \r\n $dlist[] = $entry;\r\n }\r\n return $dlist;\r\n }\r\n}", "static private function find_contents($dir){\n $result = array();\n $root = scandir($dir);\n foreach($root as $value){\n if($value === '.' || $value === '..') {continue;}\n if(is_file($dir.DIRECTORY_SEPARATOR.$value)){\n if(!self::$ext_filter || in_array(strtolower(pathinfo($dir.DIRECTORY_SEPARATOR.$value, PATHINFO_EXTENSION)), self::$ext_filter)){\n //self::$files[] = $result[] = $dir.DIRECTORY_SEPARATOR.$value;\n self::$files[] = $result[] = $value;\n }\n continue;\n }\n if(self::$recursive){\n foreach(self::find_contents($dir.DIRECTORY_SEPARATOR.$value) as $value) {\n self::$files[] = $result[] = $value;\n }\n }\n }\n // Return required for recursive search\n return $result;\n }", "private function setPath()\n {\n $this->path = $this->root . $this->dir . DIRECTORY_SEPARATOR;\n }", "public static function atomar_dir() {\n return __DIR__;\n }", "public function testScanComposerOnlyDir(): void\n {\n $this->assertEquals(\n 2,\n $this->oMap->scan(\n [self::$fixtureGroups['composer']['only-dir']]\n )\n );\n }", "public function scanDirectory($rootPath = POR_DEFECTO) {\n \n }", "public function checkTargetDir(){\n \n $_type = ucfirst(strtolower($this->Filetype));\n $_paths = $this->Paths;\n $_type_dir = isset($_paths[\"App\"][$_type]) ? dirname(__FILE__, 4).$_paths[\"App\"][$_type] : null;\n if( array_key_exists($_type, (array)$_paths[\"App\"]) ){\n if( is_dir( $_type_dir ) ){\n $this->Destination = dirname(__FILE__, 4).str_replace('//', '/',$_paths[\"App\"][$_type]);\n echo $this->Destination.\"\\n\";\n $this->getListOfFiles();\n }else{\n echo \"Nao existe um diretorio criado para arquivos do tipo {$_type}.\\n\";\n die;\n }\n }else{\n echo \"Nao existe um diretorio setado para arquivos do tipo {$_type}.\\n\";\n echo \"Para setar um diretorio, va no arquivo 'Paths.json' e crie:\\n\";\n echo \"\\\"{$_type}\\\": \\\"//(directorie?)//(directorie?)//\\\", \\n\";\n die;\n }\n }", "public function search($keyword, $dir = '.') {\n if( ! is_dir($dir))\n\t\t\treturn FALSE;\n \n $res \t= $this->_scan_dir($dir, $keyword);\n return (empty($res) ? FALSE : $res);\n }", "public static function getWorkingDir()\n {\n return Mage::getBaseDir('var') . DS . 'importexport' . DS;\n }", "private function scanDirPhp($dir) {\n if (substr($dir, -4) === '.php') {\n if (file_exists($this->path($dir, Addon::PATH_FULL))) {\n yield $dir;\n }\n return;\n }\n\n // Get the php files in the directory.\n foreach ($this->glob(\"$dir/*.php\") as $path) {\n yield $path;\n }\n\n // Don't recursively scan the root of an addon.\n if (empty($dir)) {\n return;\n }\n\n // Get all of the php files from subdirectories.\n foreach ($this->glob(\"$dir/*\", true) as $subdir) {\n foreach ($this->scanDirPhp($subdir) as $path) {\n yield $path;\n }\n }\n }", "protected function findVendorBase()\n {\n $dir = null;\n $next = __DIR__;\n while ($next && $next !== $dir) {\n // Success\n if (is_dir($next . '/vendor')) {\n return $next;\n }\n // Get next\n $dir = $next;\n $next = dirname($dir);\n }\n\n // Failed to find vendor folder anywhere\n throw new LogicException(\"silverstripe/upgrader not installed properly\");\n }", "private static function set_dir() {\n static::$dir = plugin_dir_path( __FILE__ );\n }", "public function setBehatWorkingDir(string $dir): void\n {\n $dirIterator = new RecursiveDirectoryIterator(__DIR__ . '/../../' . $dir, RecursiveDirectoryIterator::SKIP_DOTS);\n $iterator = new RecursiveIteratorIterator($dirIterator, RecursiveIteratorIterator::SELF_FIRST);\n foreach ($iterator as $item) {\n if (!$item->isDir()) {\n $this->testContext->thereIsFile($iterator->getSubPathName(), file_get_contents((string) $item));\n }\n }\n }", "function process_dir($dir)\r\n\t\t{\r\n\t\t\tif (is_dir($dir))\r\n\t\t\t{\r\n\t\t\t\tfor ($list = array(),$handle = opendir($dir); (FALSE !== ($file = readdir($handle)));)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (\t(\t$file != '.' && $file != '..')\r\n\t\t\t\t\t\t\t&& (file_exists($path = $dir.'/'.$file))\r\n\t\t\t\t\t\t\t&& (strtolower(end(explode(\".\",$file))) == 'url')\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (is_dir($path))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$list = array_merge($list, EdlUtils::process_dir($path));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$entry = array('filename' => $file, 'dirpath' => $dir);\r\n\t\t\t\t\t\t\t$entry['modtime'] = filemtime($path);\r\n\t\t\t\t\t\t\t$list[] = $entry;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tclosedir($handle);\r\n\t\t\t\treturn $list;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t}", "public function search($dir, $file, $depth = null, $depth_now = 0) {\n\t\t\n\t\tif (! isset($depth)) {\n\t\t\t$depth = $this->default_search_depth;\n\t\t}\n\t\t\n\t\tforeach( $this->glob($dir) as $item ) {\n\t\t\t\n\t\t\tif (false !== strpos($item, $file)) {\n\t\t\t\n\t\t\t\t// found file\n\t\t\t\treturn $item;\n\t\t\t\n\t\t\t} else if ($depth_now < $depth && $this->ds === substr($item, -1)) {\n\t\t\t\t\n\t\t\t\t// recurse some more\n\t\t\t\tif ($found = $this->search($item, $file, $depth, $depth_now+1)) {\n\t\t\t\t\t\n\t\t\t\t\t// found in subdir\n\t\t\t\t\treturn $found;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "function getVendorDir()\n{\n $dir = '';\n $single = DIRECTORY_SEPARATOR;\n $double = DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR;\n $breakdown = explode($single, __DIR__);\n foreach ($breakdown as $key => $value) {\n if ($value == 'vendor') break;\n $dir .= $single . $value;\n }\n $dir = str_replace($double, $single, $dir . $single . 'vendor');\n return $dir;\n}", "private function _findXMLFiles() {\n $this->_xml_files = $this->_extracted_inputs = array();\n if(!$this->_dump_file || !is_readable($this->_dump_file)) return;\n //Look for XML files. Search directories, expand archives, and examine files. We could make this more broad. For now we're just going to grab the \"data\" files.\n $recursive_xml_search = function($input) use (&$recursive_xml_search) {\n $skip_dirs = array('.', '..', 'addon', 'assets', 'gdc', 'Souls');\n if(is_dir($input)) {\n if($dir = opendir($input)) {\n while (false !== ($entry = readdir($dir))) {\n if(!in_array($entry, $skip_dirs)) $recursive_xml_search($input.DIRECTORY_SEPARATOR.$entry);\n }\n closedir($dir);\n }\n }\n elseif(substr($input, strlen($input) - 4) == '.zip') {\n if(in_array($input, $this->_extracted_inputs)) return;\n $this->_extracted_inputs[] = $input;\n $archive = new \\ZipArchive;\n if($input == $this->_dump_file) {\n $destination = $this->_extract_path;\n var_dump(mkdir($destination));\n }\n else $destination = dirname($input);\n $this->_logger->info(\"Trying to put $input at $destination\");\n if($archive->open($input) === TRUE && $archive->extractTo($destination) === TRUE) {\n $this->_logger->info(\"Put $input at $destination\");\n $recursive_xml_search($destination);\n $archive->close();\n }\n }\n elseif(substr($input, strlen($input) - 4) == '.xml') $this->_xml_files[] = $input;\n\n };\n $recursive_xml_search($this->_dump_file);\n }", "private static function scanEntityDir(string $entity_dir):void\n {\n\n // Check if dir exists\n if (!is_dir($entity_dir)) {\n return;\n }\n\n // Initialize\n $files = scandir($entity_dir);\n\n // Go through files\n foreach ($files as $file) { \n\n // Skip, if not .php file\n if (!str_ends_with($file, '.php')) { \n continue;\n }\n\n // Get namespace\n $filename = str_replace(SITE_PATH, \"\", \"$entity_dir/$file\");\n list ($namespace, $class_name) = self::pathToNamespace($filename);\n $fqdn = $namespace . \"\\\\\" . $class_name;\n\n // Check class exists\n if (!class_exists($fqdn)) {\n continue;\n }\n\n // Get reflection class\n $obj = new \\ReflectionClass($fqdn);\n $attributes = $obj->getAttributes();\n\n // Go through attributes, look for table name\n foreach ($attributes as $attr) {\n\n if ($attr->getName() != Table::class) {\n continue;\n }\n\n $args = $attr->getArguments();\n if (!isset($args['name'])) {\n continue;\n }\n self::$tables[$args['name']] = $class_name;\n }\n }\n\n }", "private function scanDir($dir)\n {\n return collect(scandir($dir))->map(function ($item) use ($dir) {\n return $dir . DIRECTORY_SEPARATOR . $item;\n });\n }", "protected function detectPath($path)\n\t{\n\t\t$paths = $this->parsePath($path);\n\t\t$this->logger->log(\"Path finding: \" . join(', ',$paths));\n\t\t$currentPaths = [];\n\t\tif($this->cache->get('/')===null) {\n\t\t\t$this->initializeCacheRoot();\n\t\t}\n\t\t$parent = $this->cache->get('/');\n\t\twhile (null !== ($name = array_shift($paths))) {\n\t\t\t$parentPaths = $currentPaths;\n\t\t\t$currentPaths[] = $name;\n\t\t\t$foundDir = $this->cache->get($currentPaths);\n\t\t\tif (!is_null($foundDir)) {\n\t\t\t\tif ($foundDir && $this->isDirectory($foundDir)) {\n\t\t\t\t\t$parent = $foundDir;\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\t//echo 'break at...'.implode($currentPaths);\n\t\t\t\t\tarray_pop($currentPaths);\n\t\t\t\t\tarray_unshift($paths, $name);\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist($files, $isFull) = $this->service->filesFindByName($name, $parent);\n\t\t\tif ($isFull) {\n\t\t\t\t$this->cache->complete($parentPaths);\n\t\t\t}\n\t\t\t$foundDir = false;\n\t\t\t//Set current path as not exists, it will be updated again when we got matched file\n\t\t\t$this->cache->put($currentPaths, false);\n\t\t\tif ($files->count()) {\n\t\t\t\tforeach ($files as $file) {\n\t\t\t\t\tif ($file instanceof Google_Service_Drive_DriveFile) {\n\t\t\t\t\t\t$fileFound = $parentPaths;\n\t\t\t\t\t\t$fileFound[]=$file->getName();\n\t\t\t\t\t\t$this->cache->put($fileFound, $file);\n\t\t\t\t\t\tif ($this->isDirectory($file) && $file->getName() === $name) {\n\t\t\t\t\t\t\t$foundDir = $file;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!$foundDir) {\n\t\t\t\tarray_pop($currentPaths);\n\t\t\t\tarray_unshift($paths, $name);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$parent = $foundDir;\n\t\t}\n\t\t$parent = $parent->getId();\n\t\t$this->logger->log(\"Found: \" . $parent . '(' . join('/',$currentPaths) . \") \" . join('/',$paths));\n\t\treturn [$parent, $paths, $currentPaths];\n\t}", "function set_path_absoluto($dir)\n\t{\n\t\t$this->_path_absoluto = realpath($dir) . '/';\n\t\tif (!isset($this->_dir_actual))\n\t\t\t$this->_dir_actual = $this->_path_absoluto;\n\t}", "protected function getModulePath() {\n $rc = new ReflectionClass(get_class($this));\n $dir = dirname($rc->getFileName());\n while($dir && !count(glob($dir.\"\\/*\\.module\"))){\n $dir = explode(\"/\",$dir);\n array_pop($dir);\n $dir = implode(\"/\",$dir);\n }\n return $dir;\n }", "function meager_find_index_for_dir( $dir ) {\n\tforeach ( meager_config( 'index_files' ) as $file ) {\n\t\tif ( file_exists( meager_config( 'doc_root' ).$dir.'/'.$file ) && !is_dir( meager_config( 'doc_root' ).$dir.'/'.$file ))\n\t\t\treturn $dir.'/'.$file;\n\t}\n\treturn false;\n}", "private function _scan_dir($dir, $filename) {\n \tstatic $fileArray = array();\n \t\n\t\t$dir \t= preg_replace('/\\/$/', '', $dir);\n\t\t\n \t// if is not dir or file just return\n \tif ( ! file_exists($dir) OR ! is_dir($dir)) {\n \t\treturn FALSE;\n\t\t\t\n \t} elseif (is_readable($dir)) {\n \t\t$files = scandir($dir);\n \t\t\n\t\t\tforeach ($files as $val) {\n \t\t\tif ($val != '.' && $val != '..') {\n \t\t\t\t// new path to scan\n\t\t\t\t\t$path = $dir.'/'.$val;\n\t\t\t\t\t\n \t\t\t\t// if path is readable\n \t\t\t\tif (is_readable($path)) {\n \t\t\t\t\t$subdir = explode('/', $path);\n\t\t\t\t\t\t\n \t\t\t\t\tif (is_dir($path)) {\n \t\t\t\t\t\t// scan new path\n \t\t\t\t\t\tset_time_limit(30); \n\t\t\t\t\t\t\t$this->_scan_dir($path, $filename);\n\t\t\t\t\t\t\t\n \t\t\t\t\t} elseif (is_file($path)) {\n \t\t\t\t\t\t$file = end($subdir);\n if (stripos($file,$filename) !== FALSE)\n\t\t\t\t\t\t\t\t$fileArray[] = $path;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n\t\t\t\n \t\t// return File(s)\n \t\treturn $fileArray;\n\t\t\t\n \t} else {\n // if the path is not readable\n \t\treturn FALSE;\n \t}\n }", "function get_path(){\n\t\treturn( __DIR__ );\n\t}", "private function _getExportDir()\n {\n return Mage::getBaseDir('tmp') . DS . 'cosmic_cart_export';\n }", "protected function find($dir, ILess_FileInfo $currentFileInfo)\n {\n // try import dirs first\n foreach ($this->importDirs as $importDir) {\n if (is_readable($importDir . '/' . $dir)) {\n return realpath($importDir . '/' . $dir);\n }\n }\n\n if (is_readable($dir)) {\n return realpath($dir);\n } elseif (is_readable($currentFileInfo->currentDirectory . '/' . $dir)) {\n return realpath($currentFileInfo->currentDirectory . '/' . $dir);\n }\n\n return false;\n }", "function bom_rec($path)\n{\n\tif (false === ($dir = dir($path)))\n\t{\n\t\treturn false;\n\t}\n\t\n\twhile (false !== ($entry = $dir->read()))\n\t{\n\t\tif ($entry[0] === '.')\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\t\n\t\t$fullpath = $path.'/'.$entry;\n\t\t\n\t\tif (is_dir($fullpath))\n\t\t{\n\t\t\tbom_rec($fullpath);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbom_fix($fullpath);\t\n\t\t}\n\t}\n\t\n\t$dir->close();\n}", "function scan_Dir1($dir) {\n $arrfiles = array();\n if (is_dir($dir)) {\n if ($handle = opendir($dir)) {\n chdir($dir);\n while (false !== ($file = readdir($handle))) {\n if ($file != \".\" && $file != \"..\") {\n if (is_dir($file)) {\n\n $arrfiles[] = $file;\n }\n }\n }\n chdir(\"../\");\n }\n closedir($handle);\n }\n return $arrfiles;\n}", "abstract public function getModuleDir();", "function recursiveScanDir($dir){\n\t$result = array();\n\t$nodes = scandir($dir);\n\tforeach ($nodes as $node){\n\t\tif ($node == \".\" || $node == \"..\")\n\t\t\tcontinue;\n\t\t$path = $dir . \"/\" . $node;\n\t\tif (is_dir($path)){\n//\t\t\tprint \"--- recursing on $node\\n\";\n\t\t\t$result = array_merge($result, recursiveScanDir($path));\t\t\t\n\t\t} else if (is_file($path)){\n//\t\t\t\"print +++ adding file $node\\n\";\n\t\t\t$result[] = $node;\n\t\t}\n\t}\n\treturn $result;\n}", "function change_to_sm_path($old_path) {\n if ( $old_path === '' || $old_path == \"''\" ) {\n return \"''\";\n } elseif ( preg_match(\"/^(\\/|http)/\", $old_path) ||\n substr($old_path,1,2) == ':/' ) {\n return \"'\" . $old_path . \"'\";\n } elseif ( preg_match(\"/^(\\$|SM_PATH)/\", $old_path) ) {\n return $old_path;\n }\n \n $new_path = '';\n $rel_path = explode(\"../\", $old_path);\n if ( count($rel_path) > 2 ) {\n // Since we're relative to the config dir, \n // more than 1 ../ puts us OUTSIDE the SM tree.\n // get full path to config.php, then pop the filename\n $abs_path = explode('/', realpath (SM_PATH . 'config/config.php'));\n array_pop ($abs_path); \n foreach ( $rel_path as $subdir ) {\n if ( $subdir === '' ) {\n array_pop ($abs_path);\n } else {\n array_push($abs_path, $subdir);\n }\n }\n foreach ($abs_path as $subdir) {\n $new_path .= $subdir . '/';\n }\n $new_path = \"'$new_path'\";\n } elseif ( count($rel_path) > 1 ) {\n // we're within the SM tree, prepend SM_PATH\n $new_path = str_replace('../',\"SM_PATH . '\", $old_path . \"'\");\n } else {\n // Last, if it's a relative path without a .. prefix, \n // we're somewhere within the config dir, so prepend\n // SM_PATH . 'config/ \n $new_path = \"SM_PATH . 'config/\" . $old_path . \"'\";\n }\n return $new_path;\n}", "function find_file(string $file, string $path = __DIR__):array {\n $dir_exceptions = [\".\", \"..\", \"vendor\"];\n $dirs = $result = [];\n\n $dirs = (@scandir($path)) ? @scandir($path) : [];\n\n foreach ($dirs as $k => $dir) {\n if (in_array($dir, $dir_exceptions)) continue; \n\n $file_path = realpath($path) . DS . $dir . DS . $file;\n\n if (file_exists($file_path)) {\n $result['files'][] = $file_path;\n } else if (file_exists(realpath($path) . DS . $file) && !is_dir(realpath($path) . DS . $file)) {\n if (!@in_array(realpath($path) . DS . $file, @$result['files'])) $result['files'][] = realpath($path) . DS . $file;\n } else {\n $return = find_file($file, $path . DS . $dir);\n if (@$return) $result['files'] = $return['files'];\n }\n }\n\n return $result;\n}", "public function find_folder($folder)\n {\n }", "public static function rscan($dir) {\n\t if(!file_exists($dir)) return false;\n\t $result = [];\n\t foreach(scandir($dir) as $filename) {\n\t if ($filename[0] === '.') continue;\n\t $filePath = $dir . '/' . $filename;\n\t if (is_dir($filePath)) {\n\t foreach (self::rscan($filePath) as $childFilename) {\n\t $result[] = $filename . '/' . $childFilename;\n\t }\n\t } else {\n\t $result[] = $filename;\n\t }\n\t }\n\t return $result;\n\t}", "protected function scanPackagePathsForExtensions() {}", "function fam_monitor_directory($fam, $dirname)\n{\n}", "function findFiles($path = '.', $pattern = '/./', $result = '') {\n if (!$recurse = is_array($result)) $result = array();\n/**/ if (!is_dir($path)) die(\"No features folder found for that module (path $path).\");\n $dir = dir($path);\n \n while ($filename = $dir->read()) {\n if ($filename == '.' or $filename == '..') continue;\n $filename = \"$path/$filename\";\n if (is_dir($filename) and $recurse) $result = findFiles($filename, $pattern, $result);\n if (preg_match($pattern, $filename)){\n $result[] = $filename;\n }\n }\n return $result;\n}", "public static function tree_locations() {\n\t \n\t // Read Tree\n\t $ret = \"\";\n\t\t$tree = Disk::read_directory(\"tree\");\n\t\t\n\t\t// Genrate XML Entries\n\t foreach(str_replace(\".html\",\"\",self::_get_files_from_tree($tree)) as $url) {\n\t if($url != \"sitemap.xml\") {\n\t $ret .= ('<url><loc>'.Url::_($url).'</loc></url>');\n\t }\n\t\t}\n\t\t\n\t\t// Return\n\t\treturn $ret;\n\t}", "static function get_root_path($dir) {\n // return '/';\n\n $a = getcwd();\n $bt = debug_backtrace();\n\n $bt_path = $bt[0]['args'][0];\n $root_path = explode($a,$bt_path)[1];\n if($root_path)\n return $root_path;\n if (self::is_cli())\n return '/';\n\n return null;\n\n }", "private function getVendorDirPath() {\n\t\treturn $this->fs->normalizePath(\n\t\t\trealpath($this->config->get('vendor-dir'))\n\t\t);\n\t}", "function load_package($dir) {\n\n\n\tif(is_dir($dir)){\n\n\t}\n\n\n}", "function retrievePermsFromFiles($dir = SGL_MOD_DIR)\n {\n SGL::logMessage(null, PEAR_LOG_DEBUG);\n\n // get a list of modules in db\n $query = \"SELECT module_id, name FROM {$this->conf['table']['module']}\";\n $modules = $this->dbh->getAssoc($query);\n\n if (PEAR::isError($modules)) {\n return SGL::raiseError('There was a problem retrieving modules',\n SGL_ERROR_NODATA);\n }\n\n // scan\n require_once 'System.php';\n if ($dir == SGL_MOD_DIR) {\n $aRegisteredModules = SGL_Util::getAllModuleDirs(true);\n } else {\n\n require_once 'File/Util.php';\n // match all folders except CVS\n $aRegisteredModules = SGL_Util::listDir($dir, FILE_LIST_DIRS, FILE_SORT_NAME,\n create_function('$a', 'return preg_match(\"/[^CVS]/\", $a);'));\n }\n $aFiles = array();\n\n //only scan in registered modules for *Mgr.php\n foreach ($aRegisteredModules as $module) {\n $aFindArgs = array(\n $dir . \"/$module/classes\",\n '-name', '*Mgr.php');\n $aFilesFound = System::find($aFindArgs);\n $aFiles = array_merge($aFiles, $aFilesFound);\n }\n\n $aPermsFound = array();\n foreach ($aFiles as $file) {\n // grab class name from path (platform independent)\n preg_match('/[\\\\\\\\\\/](\\\\w+)\\\\.php/', $file, $className);\n if (isset($className[1])) {\n $className = strtolower($className[1]);\n } else {\n continue;\n }\n\n // grab module name from path (platform independent)\n preg_match('/(\\\\w+)[\\\\\\\\\\/]classes[\\\\\\\\\\/]/', $file, $moduleName);\n if (isset($moduleName[1])) {\n $moduleName = strtolower($moduleName[1]);\n } else {\n continue;\n }\n\n // load file as string (note: just for curiosity, I tried reading\n // line by line and 1K and 4K chunks, so I wouldn't have to load the whole file\n // and file_get_contents was a little faster! ...and it's 1 line of code\n $t = file_get_contents($file);\n\n // find first actionsMapping statement, if any\n $pos1 = strpos($t, '$this->_aActionsMapping');\n if ($pos1 === false) {\n continue;\n }\n\n // search for closing semicolon\n $pos2 = strpos($t, ';', $pos1);\n if ($pos2 === false) {\n continue;\n }\n\n // narrow down to actionsMapping statement only, so preg\n // doesn't have to work so hard\n $actionStr = substr($t, $pos1, $pos2 - $pos1);\n\n // grab all allowed actions into an array\n preg_match_all(\"/[^']*'(\\w*)'[^']*/s\", $actionStr, $aMatchedActions);\n\n // remove duplicates\n $aMatchedActions = array_unique($aMatchedActions[1]);\n\n // find moduleId for moduleName\n $moduleId = array_search($moduleName, $modules);\n\n // add class perm\n $aPermsFound[] = array(\n 'perm' => $className,\n 'module_id' => $moduleId,\n 'module_name' => $moduleName);\n\n // add each method perm\n foreach ($aMatchedActions as $action) {\n $aPermsFound[] = array(\n 'perm' => \"{$className}_cmd_{$action}\",\n 'module_id' => $moduleId,\n 'module_name' => $moduleName);\n }\n }\n\n return $aPermsFound;\n }", "function checkFolder() {\n\t\tFolder::find_or_make('Galleries/');\n\t}", "function include_dir($dir, $regex = \"\")\n{\n global $device, $config, $valid;\n\n if ($regex == \"\")\n {\n $regex = \"/\\.inc\\.php$/\";\n }\n\n if ($handle = opendir($config['install_dir'] . '/' . $dir))\n {\n while (false !== ($file = readdir($handle)))\n {\n if (filetype($config['install_dir'] . '/' . $dir . '/' . $file) == 'file' && preg_match($regex, $file))\n {\n print_debug(\"Including: \" . $config['install_dir'] . '/' . $dir . '/' . $file);\n\n include($config['install_dir'] . '/' . $dir . '/' . $file);\n }\n }\n\n closedir($handle);\n }\n}" ]
[ "0.58197814", "0.57667226", "0.549967", "0.5471929", "0.54173934", "0.5369641", "0.5328975", "0.53190416", "0.52931845", "0.5282736", "0.52673167", "0.5258721", "0.5257853", "0.52567375", "0.52098835", "0.5200695", "0.51547647", "0.51398563", "0.51133764", "0.5103032", "0.5100941", "0.5091898", "0.50870526", "0.5078674", "0.50700164", "0.5055331", "0.50385666", "0.50303584", "0.50184655", "0.50053126", "0.49990702", "0.49988034", "0.4988477", "0.49837792", "0.49751183", "0.4965324", "0.49652076", "0.49516663", "0.4948145", "0.49406585", "0.49209866", "0.49204254", "0.48786142", "0.4870997", "0.48701423", "0.48569435", "0.48518857", "0.48518857", "0.48512098", "0.48253828", "0.48163873", "0.4800629", "0.47967094", "0.47940955", "0.47915024", "0.4791117", "0.47857925", "0.47815123", "0.47725564", "0.4761749", "0.47438586", "0.47436306", "0.474327", "0.4737734", "0.4731398", "0.47271788", "0.4718548", "0.47171408", "0.47043288", "0.4701086", "0.46972048", "0.46967596", "0.46887335", "0.4688663", "0.46883047", "0.46816105", "0.46786413", "0.46781743", "0.4676386", "0.46744224", "0.46719941", "0.46711144", "0.4665753", "0.4664516", "0.46610096", "0.46588865", "0.46573254", "0.46542212", "0.4650392", "0.464712", "0.4645835", "0.46450543", "0.46442568", "0.4637103", "0.46350053", "0.4634554", "0.46315685", "0.46236703", "0.4622639", "0.4618286" ]
0.7396375
0
Register the service providers.
Зарегистрируйте поставщиков служб.
public function registerServiceProviders() { $container = $this->router->getContainer(); $providers = config('app.providers'); array_walk($providers, function ($provider) use ($container) { $container->register(new $provider); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function registerServiceProviders()\n {\n $list = new ProviderList(Core::getFacadeRoot());\n\n foreach ($this->providers as $provider) {\n $list->registerProvider($provider);\n }\n }", "protected function registerProviders()\n {\n foreach ($this->get('providers', []) as $provider)\n {\n $this->app->register($provider);\n }\n }", "protected function registerProviders() : void\n {\n foreach ($this->providers as $provider) {\n $this->app->register($provider);\n }\n }", "public function registrarServicesProviders(string ... $services_providers): void;", "private function registerProviders(): void\n {\n // select auth service provider implementation\n $this->providers[] = config('twill.custom_auth_service_provider') ?: (\n config('twill.enabled.permissions-management') ?\n PermissionAuthServiceProvider::class : AuthServiceProvider::class\n );\n\n foreach ($this->providers as $provider) {\n $this->app->register($provider);\n }\n\n if (app()->environment('testing')) {\n $this->app->register(DuskServiceProvider::class);\n }\n\n if (config('twill.enabled.media-library')) {\n $this->app->singleton('imageService', function () {\n return $this->app->make(config('twill.media_library.image_service'));\n });\n }\n\n if (config('twill.enabled.file-library')) {\n $this->app->singleton('fileService', function () {\n return $this->app->make(config('twill.file_library.file_service'));\n });\n }\n }", "protected function addServiceProviders()\n {\n // Add the pokemon go api service provider\n $this->register(new PokemonGoApiServiceProvider($this));\n\n // Add the request handler service provider\n $this->register(new RequestHandlerServiceProvider($this));\n }", "public function registerProviders()\n\t{\n\t\t$providers = $this->def('provider');\n\n\t\tif ($providers)\n\t\t{\n\t\t\tif (is_array($providers))\n\t\t\t{\n\t\t\t\tforeach ($providers as $provider)\n\t\t\t\t{\n\t\t\t\t\t$this->app->register($instance = new $provider($this->app));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->app->register($instance = new $providers($this->app));\n\t\t\t}\n\t\t}\n\t}", "private function registerServices()\n {\n //register service providers\n $this->app->register(BackupServiceProvider::class);\n $this->app->register(HtmlServiceProvider::class);\n $this->app->register(JsValidationServiceProvider::class);\n $this->app->register(MediaManagerServiceProvider::class);\n $this->app->register(ScoutServiceProvider::class);\n $this->app->register(TNTSearchScoutServiceProvider::class);\n\n //load facades\n $loader = AliasLoader::getInstance();\n $loader->alias('JsValidator', JsValidatorFacade::class);\n $loader->alias('Form', FormFacade::class);\n $loader->alias('Html', HtmlFacade::class);\n }", "protected function registerServices()\n {\n foreach ($this->providers as $value) {\n $this->app->register($value);\n }\n\n foreach ($this->bindings as $key => $value) {\n is_numeric($key)\n ? $this->app->singleton($value)\n : $this->app->singleton($key, $value);\n }\n }", "protected function registerProviders()\n {\n $this\n ->register(new Provider\\ServiceControllerServiceProvider())\n ->register(new Provider\\TwigServiceProvider())\n ->register(new Provider\\UrlGeneratorServiceProvider())\n ->register(new Provider\\DoctrineServiceProvider(), array(\n 'db.options' => array(\n 'driver' => 'pdo_mysql',\n 'dbname' => 'siro',\n 'host' => 'localhost',\n 'user' => 'root',\n 'password' => null,\n 'charset' => 'utf-8',\n ),\n ))\n ->register(new Psr0ResourceLocatorServiceProvider())\n ->register(new ComposerResourceLocatorServiceProvider())\n ->register(new DoctrineOrmServiceProvider(), array(\n 'orm.proxies_dir' => $this['path.cache'] . '/proxy',\n 'orm.proxies_namespace' => 'Siro\\Proxy',\n 'orm.em.options' => array(\n 'mappings' => array(\n array(\n 'type' => 'annotation',\n 'namespace' => 'Siro\\Entity',\n 'resources_namespace' => 'Siro\\Entity',\n ),\n ),\n ),\n ))\n ->register(new Provider\\MonologServiceProvider(), array(\n 'monolog.logfile' => $this['path.log'] . '/' . $this['env'] . '.log',\n 'monolog.name' => 'Siro',\n 'monolog.level' => $this['debug'] ? Logger::DEBUG : Logger::INFO,\n ))\n ->register(new SilexGravatar\\GravatarExtension(), array(\n 'gravatar.cache_dir' => $this['path.cache'] . '/gravatar',\n 'gravatar.class_path' => $this['path.root'] . '/vendor/fate/gravatar-php/src',\n 'gravatar.options' => array(\n 'rating' => Gravatar\\Service::RATING_G,\n 'default' => Gravatar\\Service::DEFAULT_RETRO,\n ),\n ))\n ->register(new Provider\\TwigServiceProvider(), array(\n 'twig.path' => $this['path.views'],\n ))\n ->register(new Provider\\HttpCacheServiceProvider(), array(\n 'http_cache.cache_dir' => $this['path.cache'],\n // This is disabled because no ESI support has been implemented yet.\n 'http_cache.esi' => null,\n ));\n\n if ($this['debug']) {\n // Enable the Web Profiler only for the Debug environment\n $this->register(new Provider\\WebProfilerServiceProvider(), array(\n 'profiler.cache_dir' => $this['path.cache'] . '/profiler',\n 'profiler.mount_prefix' => '/_profiler',\n ));\n }\n }", "protected function registerProviders()\n\t{\n\t\t$providers = $this->providers;\n\t\tforeach ($providers as $key => $value) {\n\t\t\t$this->app[$key] = $this->app->share(function($app) use ($value)\n\t\t\t{\n\t\t\t\treturn new $value;\n\t\t\t});\n\t\t}\n\t}", "private function registerServiceProviders()\n {\n $app = $this;\n \n $app->register(new DoctrineServiceProvider(), array(\n 'db.options' => $this->config['database']\n ));\n \n $app->register(new SessionServiceProvider());\n $app->register(new UrlGeneratorServiceProvider());\n $app->register(new TwigServiceProvider(), array(\n 'twig.path' => dirname(dirname(__DIR__)) . '/web/views',\n 'twig.options' => array('debug' => (($this->config['environment'] === \"dev\") ? true : false))\n ));\n \n $app['twig']->addExtension(new AssetExtension($this));\n $app['twig']->addFunction(new TwigFunction('is_granted', function($role) use ($app) {\n return $app['security']->isGranted($role);\n }));\n }", "protected function registerProviders()\n {\n $this->app->register(Providers\\BauhausServiceProvider::class);\n $this->app->register(Providers\\RequestServiceProvider::class);\n $this->app->register(Providers\\RoutingServiceProvider::class);\n $this->app->register(Providers\\ConsoleServiceProvider::class);\n $this->app->register(Providers\\ModulesServiceProvider::class);\n $this->app->register(Providers\\PolicyServiceProvider::class);\n $this->app->register(Providers\\CookieServiceProvider::class);\n $this->app->register(Providers\\AlertServiceProvider::class);\n $this->app->register(Providers\\AssetServiceProvider::class);\n $this->app->register(Providers\\RouteServiceProvider::class);\n $this->app->register(Providers\\EventServiceProvider::class);\n $this->app->register(Providers\\CacheServiceProvider::class);\n $this->app->register(Providers\\MenuServiceProvider::class);\n $this->app->register(ImageServiceProvider::class);\n }", "public function registerServices()\n\t{\n\t\t$service_providers = $this->container->get('service-providers-config')->config;\n\n\t\tforeach ($service_providers as $key => $value) {\n\t\t\t$args = [];\n\n\t\t\tif (array_key_exists('dependencies', $value)) {\n\t\t\t\t$args = $this->filterDependencies($value['dependencies']);\n\t\t\t}\n\n\t\t\tif (array_key_exists('params', $value)) {\n\t\t\t\t$args = array_merge($args, $value['params']);\n\t\t\t}\n\n\t\t\tif (!empty($args)) {\n\t\t\t\t$this->container->set($key, new $value['class'](...$args));\n\t\t\t} else {\n\t\t\t\t$this->container->set($key, new $value['class']());\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}", "protected function registerBaseServiceProviders()\n {\n $this->register(new EventServiceProvider($this));\n $this->register(new LogServiceProvider($this));\n }", "protected function registerBaseServiceProviders()\n {\n $this->register(new EventServiceProvider($this));\n $this->register(new LogServiceProvider($this));\n }", "protected function registerBaseServiceProviders(): void\n {\n foreach ($this->registerCoreProviders as $provider) {\n $this->register(new $provider($this));\n }\n }", "protected function registerServices()\n\t{\n\t\tforeach($this->config->get('application.services') as $service)\n\t\t{\n\t\t\t(new $service($this->container))->register();\n\t\t}\n\t}", "protected function registerApplicationProviders(): void\n {\n foreach ($this->config['app']['providers'] as $provider) {\n $this->register(new $provider($this));\n }\n }", "private function registerServiceProviders()\n {\n $app = $this;\n \n $app->register(new DoctrineServiceProvider(), [\n 'db.options' => $this->config['database']\n ]);\n\n $app->register(new DoctrineOrmServiceProvider, [\n 'orm.proxies_dir' => dirname(dirname(__DIR__)) . '/cache/doctrine',\n 'orm.proxies_namespace' => 'cache\\doctrine',\n 'orm.cache' => !$app['debug'] && extension_loaded('apc') ? new ApcCache() : new ArrayCache(),\n 'orm.auto_generate_proxies' => true,\n 'orm.em.options' => [\n 'mappings' => [\n [\n 'type' => 'annotation',\n 'path' => __DIR__ .'/Model/Entity',\n 'namespace' => 'App\\Model\\Entity'\n ]\n ]\n ]\n ]);\n\n /** @var \\Doctrine\\DBAL\\Connection $orm */\n $orm = $app['orm.em'];\n\n /** @var \\Doctrine\\ORM\\Configuration $ormConfig */\n $ormConfig = $orm->getConfiguration();\n\n $ormConfig->setMetadataDriverImpl(new AnnotationDriver(new AnnotationReader(), [\n __DIR__ . '/Model/Entity'\n ]));\n \n $app->register(new SessionServiceProvider());\n $app->register(new UrlGeneratorServiceProvider());\n $app->register(new TwigServiceProvider(), [\n 'twig.path' => dirname(dirname(__DIR__)) . '/web/views',\n 'twig.options' => ['debug' => (($this->config['environment'] === \"dev\") ? true : false)]\n ]);\n\n /** @var \\Twig_Environment $twig */\n $twig = $app['twig'];\n\n $twig->addExtension(new AssetExtension($this));\n $twig->addFunction(new TwigFunction('is_granted', function($role) use ($app) {\n /** @var SecurityContext $security */\n $security = $app['security'];\n return $security->isGranted($role);\n }));\n }", "public function register()\n {\n $manager = new ServiceProviderManager($this);\n $manager->register();\n }", "public function register()\n {\n $this->registerProviders();\n }", "public function register()\n {\n $this->registerProviders();\n }", "private function registerCoreProviders(): void\n {\n $this->register(new LogServiceProvider($this));\n $this->register(new RoutingServiceProvider($this));\n $this->register(new YamlFileLoaderServiceProvider($this));\n $this->register(new TwigServiceProvider($this));\n }", "public function registerConfiguredProviders()\n {\n foreach ($this->providers as $provider)\n {\n $inst = new $provider($this);\n $this->instance($provider,$inst);\n if (method_exists($inst,\"register\"))\n {\n $inst->register();\n }\n }\n }", "protected function registerBaseServiceProviders()\n {\n $this->register(new EventServiceProvider($this->container));\n }", "public function register() : void\n {\n $this->registerProviders();\n }", "public function registerConfiguredProviders()\n {\n foreach ((array) $this->config('providers') as $provider) {\n $this->register($provider);\n }\n }", "public function register_services() {\n\t\t// Bail early so we don't instantiate services twice.\n\t\tif ( ! empty( $this->services ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->services[ Injector::class ] = $this->injector;\n\n\t\tforeach ( $this->get_service_classes() as $class ) {\n\t\t\t$this->services[ $class ] = $this->instantiate_service( $class );\n\t\t}\n\n\t\tforeach ( $this->services as $service ) {\n\t\t\tif ( $service instanceof Registerable ) {\n\t\t\t\t$service->register();\n\t\t\t}\n\t\t}\n\t}", "protected function registerAdditionalProviders()\n {\n foreach ($this->providers as $provider) {\n if (class_exists($provider)) {\n $this->app->register($provider);\n }\n }\n }", "protected function registerServices()\n {\n // Register IoC bind aliases and singletons\n #$this->app->alias(\\Mrcore\\Components\\Components::class, \\Mrcore\\Components::class)\n #$this->app->singleton(\\Mrcore\\Components\\Components::class, \\Mrcore\\Components::class)\n\n // Register other service providers\n #$this->app->register(\\Mrcore\\Components\\Providers\\OtherServiceProvider::class);\n }", "public function registerConfiguredProviders()\n {\n $manifestPath = $this->getCachedServicesPath();\n\n (new ProviderRepository($this, new Filesystem, $manifestPath))\n ->load($this->config['app.providers']);\n\n //(new ProviderRepository($this, $this->getCachedServicesPath()))->load($this->config['app.providers']);\n }", "public function register()\n {\n $this->instances = [];\n \n foreach ($this->providers as $provider) {\n $this->instances[] = $this->platform->register($provider);\n }\n }", "public function register()\n {\n foreach ($this->otherProviders as $key => $value) {\n $this->app->register($value);\n }\n }", "public function register()\n\t{\n\t\t// Load environment Specific Service Providers...\n\t\tswitch($this->app->environment())\n\t\t{\n\t\t\tdefault:\n\t\t\t\t$providers = [];\n\t\t\t\tbreak;\n\n\t\t\tcase 'local':\n\t\t\t\t$providers = [\n\t\t\t\t\t'Barryvdh\\Debugbar\\ServiceProvider',\n\t\t\t\t\t'Stolz\\HtmlTidy\\ServiceProvider',\n\t\t\t\t\t'Stolz\\SchemaSpy\\ServiceProvider',\n\t\t\t\t];\n\t\t\t\tbreak;\n\n\t\t\tcase 'testing':\n\t\t\t\t$providers = [\n\t\t\t\t\t'Stolz\\HtmlTidy\\ServiceProvider',\n\t\t\t\t];\n\t\t\t\tbreak;\n\t\t}\n\n\t\tforeach($providers as $provider)\n\t\t\t$this->app->register($provider);\n\t}", "public function loadServiceProviders()\n {\n foreach ($this->providers as $provider) {\n $this->loadProvider($provider);\n }\n }", "public function register()\n {\n //register the service providers for local environment\n\n if ($this->app->isLocal() && !empty($this->providers)) {\n foreach ($this->providers as $provider) {\n $this->app->register($provider);\n }\n //register the alias\n if (!empty($this->aliases)) {\n foreach ($this->aliases as $alias => $facade) {\n $this->app->alias($alias, $facade);\n }\n }\n }\n }", "public static function register_services() \n {\n foreach( self::get_services() as $class ) {\n $service = self::instantiate( $class );\n if( method_exists( $service, 'register' ) ) {\n $service->register();\n }\n }\n }", "public static function register_services() {\r\n\t\tforeach ( self::get_services() as $class) {\r\n\t\t\t$service = self::instantiate( $class );\r\n\t\t\tif ( method_exists( $service, 'register' ) ) {\r\n\t\t\t\t$service->register();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected function registerServices()\n {\n foreach (self::$diMap as $serviceKey => $serviceClass) {\n if (is_int($serviceKey)) {\n $this->registerServiceProvider($serviceClass);\n } else {\n $this->registerService($serviceKey, $serviceClass);\n }\n }\n }", "protected function registerServices()\n {\n // Register IoC bind aliases and singletons\n $this->app->alias(\\Mrcore\\Wiki\\Api\\Mrcore::class, \\Mrcore\\Wiki\\Api\\MrcoreInterface::class);\n $this->app->alias(\\Mrcore\\Wiki\\Api\\Config::class, \\Mrcore\\Wiki\\Api\\ConfigInterface::class);\n $this->app->alias(\\Mrcore\\Wiki\\Api\\Layout::class, \\Mrcore\\Wiki\\Api\\LayoutInterface::class);\n $this->app->alias(\\Mrcore\\Wiki\\Api\\Post::class, \\Mrcore\\Wiki\\Api\\PostInterface::class);\n $this->app->alias(\\Mrcore\\Wiki\\Api\\Router::class, \\Mrcore\\Wiki\\Api\\RouterInterface::class);\n $this->app->alias(\\Mrcore\\Wiki\\Api\\User::class, \\Mrcore\\Wiki\\Api\\UserInterface::class);\n }", "public static function register_services() {\n foreach ( self::get_services() as $class ) {\n $service = self::instantiate( $class );\n if ( method_exists( $service, 'register' ) ) {\n $service->register();\n }\n }\n }", "public static function register_services(){\r\n\t\tforeach(self::get_services() as $clases){\r\n\t\t\t$service=self::instantiate($clases);\r\n\t\t\tif(method_exists($service, 'register')){\r\n\t\t\t\t$service->register();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function registerConfiguredProviders(): void\n {\n $providers = Collection::make($this->config['app.providers'])\n ->partition(function ($provider) {\n return Str::startsWith($provider, 'Nur\\\\');\n });\n $providers->splice(1, 0, [$this->make(PackageManifest::class)->providers()]);\n (new ProviderRepository($this, new Filesystem, $this->getCachedServicesPath()))\n ->load($providers->collapse()->toArray());\n }", "protected function registerServices()\n {\n $this->app->singleton('plugins', function ($app) {\n $path = $app['config']->get('admin.plugins.path');\n\n return new PluginRepository($app, $path);\n });\n\n $this->app['plugins']->register();\n }", "private function registerProviders(array $providers)\n {\n foreach ($providers as $provider) {\n $this->app->register($provider);\n }\n }", "public function registerServices()\n {\n $di = new FactoryDefault();\n $loader = new Loader();\n\n $namespaces = [];\n $map = require_once(__DIR__. '/../autoload_namespaces.php');\n\n foreach ($map as $k => $values) {\n $k = trim($k, '\\\\');\n if (!isset($namespaces[$k])) {\n $dir = '/' . str_replace('\\\\', '/', $k) . '/';\n $namespaces[$k] = implode($dir . ';', $values) . $dir;\n }\n }\n\n $loader->registerNamespaces($namespaces);\n\n $loader->register();\n\n /**\n * Register a router\n */\n $di->set('router', function () {\n $router = new Router();\n\n $router->setDefaultModule('frontend');\n\n //set frontend routes\n $router->mount(new FrontendRoutes());\n//\n return $router;\n });\n\n $this->setDI($di);\n }", "public static function register_services(){\n foreach ( self::get_services() as $class ) {\n $service = self::instantiate($class);\n if( \\method_exists( $service, 'register' ) ) {\n $service->register();\n }\n }\n }", "public function registerConfiguredProviders()\n {\n $providers = Collection::make($this->config['plugin.providers']);\n\n // $providers->splice(1, 0, [$this->make(PackageManifest::class)->providers()]);\n\n (new ProviderRepository($this, new Filesystem, $this->getCachedServicesPath()))\n ->load($providers->toArray());\n }", "public function register(IProvider $provider);", "public function register()\n {\n $this->loadProviders($this->providers);\n }", "private function registerServices()\n {\n }", "public function registerConfiguredProviders();", "protected function registerServices()\n {\n $this->app->singleton('plugins', function ($app) {\n $path = $app['config']->get('plugins.paths.plugins');\n return new Repository($app, $path);\n });\n }", "private function registerServices()\n {\n $services = [\n 'array' => PhpArray::class,\n 'central_bank_of_czech_republic' => CentralBankOfCzechRepublic::class,\n 'central_bank_of_republic_turkey' => CentralBankOfRepublicTurkey::class,\n 'currency_converter' => CurrencyConverterApi::class,\n 'currency_layer' => CurrencyLayer::class,\n 'currency_data_feed' => CurrencyDataFeed::class,\n 'cryptonator' => Cryptonator::class,\n 'european_central_bank' => EuropeanCentralBank::class,\n 'fixer' => Fixer::class,\n 'forge' => Forge::class,\n 'google' => Google::class,\n 'national_bank_of_romania' => NationalBankOfRomania::class,\n 'open_exchange_rates' => OpenExchangeRates::class,\n 'russian_central_bank' => RussianCentralBank::class,\n 'webservicex' => WebserviceX::class,\n 'xignite' => Xignite::class,\n 'yahoo' => Yahoo::class,\n ];\n\n foreach ($services as $name => $class) {\n self::register($name, $class);\n }\n }", "private function configureServices()\n {\n $this['debug'] = true;\n\n $this->register(new TwigServiceProvider(), [\n 'twig.path' => __DIR__.'/../views',\n ]);\n\n // Database configuration\n $this->register(new DoctrineServiceProvider(), [\n 'db.options' => [\n 'driver' => 'pdo_sqlite',\n 'path' => __DIR__.'/../database/app.db',\n ],\n ]);\n\n $this->register(new FormServiceProvider());\n $this->register(new LocaleServiceProvider());\n $this->register(new TranslationServiceProvider(), [\n 'translator.domains' => [],\n ]);\n }", "protected function registerBaseServiceProviders()\n {\n $logger = new Logger('system');\n $logger->pushHandler(new StreamHandler($this->getSystemLogPath(), Logger::DEBUG));\n $this->instance(Logger::class,$logger);\n $this->instance('log',$logger);\n $router = new Router($this,new RouteCollection());\n $this->instance(Router::class,$router);\n $this->instance('router',$router);\n }", "public function register()\n {\n $packages = $this->repository->enabled();\n\n $packages->each(function ($properties)\n {\n try {\n $provider = $this->resolveServiceProvider($properties);\n\n $this->app->register($provider);\n }\n catch (Exception $e) {\n // Do nothing.\n }\n });\n }", "public function register()\n {\n $providerGroups = config('providers', []);\n\n foreach ($providerGroups as $group) {\n $this->loadProviderGroup($group);\n }\n }", "protected function registerServices()\n {\n $this->app->singleton('guanyierpapi', function ($app) {\n $config = $app->make('config')->get('guanyi');\n return new Guanyi ($config);\n });\n }", "protected function registerServices()\n {\n $this->app->bind(GetAllFromDateOrdersAsArrayContract::class, GetAllFromDateOrdersAsArray::class);\n $this->app->bind(GetAllProductsQuantityAsArrayContract::class, GetAllProductsQuantityAsArray::class);\n }", "public function register()\n {\n $this->registerAdditionalProviders();\n $this->registerProvidersAliases();\n }", "public function registerProviders($providers)\n {\n foreach ($providers as $className => $providerInfo) {\n $this->registerProvider($className, $providerInfo);\n }\n }", "public function register()\n {\n //register the service providers\n if ($this->app->isLocal() && ! empty($this->localProviders)) {\n foreach ($this->localProviders as $provider) {\n $this->app->register($provider);\n }\n }\n //register the alias\n if ($this->app->isLocal() && ! empty($this->localAliases)) {\n foreach ($this->localAliases as $alias => $facade) {\n $this->app->alias($alias, $facade);\n }\n }\n }", "public function register() // fired for every single service provider, primary place to bind things into container\n {\n $this->app->singleton('service', function() {\n \n return 'Service Provider example';\n });\n }", "protected function registerServices()\n {\n foreach ($this->serviceBindings as $key => $value) {\n is_numeric($key)\n ? $this->app->singleton($value)\n : $this->app->singleton($key, $value);\n }\n }", "protected function registerServiceProviders()\n\t{\n\t\tforeach(config('melon.providers', []) as $provider)\n\t\t{\n\t\t\t$this->app->register($provider);\n\t\t}\n\n\t\treturn $this;\n\t}", "protected function registerServices()\n {\n $di = new FactoryDefault();\n $loader = new Loader();\n\n /**\n * Register the common libraries\n */\n $loader->registerDirs([\n APP_PATH . '/common/components/',\n APP_PATH . '/common/helpers/'\n ]);\n\n /**\n * Register common namespaces\n */\n $loader->registerNamespaces([\n 'app\\common\\base' => APP_PATH . '/common/base/',\n 'app\\common\\components' => APP_PATH . '/common/components/',\n 'app\\common\\helpers' => APP_PATH . '/common/helpers/'\n ]);\n\n $loader->register();\n\n /**\n * Register a router\n */\n $di->set('router', function () {\n $router = new Router();\n\n $router->setDefaultModule('frontend');\n\n $router->add('/', [\n 'module' => 'frontend',\n 'controller' => 'index',\n 'action' => 'index'\n ]);\n\n $router->add('/:controller/:action', [\n 'module' => 'frontend',\n 'controller' => 1,\n 'action' => 2\n ]);\n\n $router->add('/admin', [\n 'module' => 'backend',\n 'controller' => 'index',\n 'action' => 'index'\n ]);\n\n $router->add('/admin/:controller/:action', [\n 'module' => 'backend',\n 'controller' => 1,\n 'action' => 2\n ]);\n\n $router->add('/api/:controller/:action', [\n 'module' => 'api',\n 'controller' => 1,\n 'action' => 2\n ]);\n\n $router->add('/console/:controller/:action', [\n 'module' => 'console',\n 'controller' => 1,\n 'action' => 2\n ]);\n\n return $router;\n });\n\n $this->setDI($di);\n }", "protected function registerServices()\r\n\t{\r\n /*\r\n $this->addService('cache', 'snb\\cache\\MemcachedCache')->setArguments(array(\r\n '::config::snb.cache.host',\r\n '::config::snb.cache.port',\r\n '::config::snb.cache.prefix'\r\n ));\r\n\r\n $this->addService('config', 'snb\\config\\CachedConfigSettings')\r\n ->setArguments(array('::service::kernel'))\r\n ->addCall('load', array($this->getConfigName()));\r\n */\r\n\t}", "public static function register_services(){\n foreach (self::get_services() as $class ) {\n $service = self::instantiante( $class );\n\n if ( method_exists($service ,'register')) {\n $service->register();\n }\n }\n }", "public function registerConfiguredProviders(){\n\t\t\t//Count Providers Array in Config\n\t\tif (is_array($this['config']->get('plugin.providers'))) {\n\t\t\tforeach ($this['config']->get('plugin.providers') as $index => $namespace) {\n\t\t\t\t$this->register($namespace);\n\t\t\t}\n\t\t}\n\t}", "public function register()\n{\n$this->registerHasher();\n$this->registerUserProvider();\n$this->registerGroupProvider();\n$this->registerThrottleProvider();$this->registerSession();\n$this->registerCookie();\n$this->registerSentry();\n}", "public function register($serviceProviderClass);", "public function register()\n {\n /*\n |--------------------------------------------------------------------------\n | Providers\n |--------------------------------------------------------------------------\n */\n\n $this->app->register(FormMakerProvider::class);\n $this->app->register(CryptoProvider::class);\n $this->app->register(CrudMakerProvider::class);\n $this->app->register(CerebrumProvider::class);\n $this->app->register(LaraTestProvider::class);\n\n /*\n |--------------------------------------------------------------------------\n | Register the Commands\n |--------------------------------------------------------------------------\n */\n\n $this->commands([\n Activity::class,\n Api::class,\n Billing::class,\n Notifications::class,\n Features::class,\n Socialite::class,\n Bootstrap::class,\n Semantic::class,\n Docs::class,\n Logs::class,\n Starter::class,\n ]);\n }", "public function register(): void\n {\n $this->app->register(AdmEventServiceProvider::class);\n// $this->app->register(AuthServiceProvider::class);\n }", "public static function register_services(){\n foreach (self::get_services() as $class){\n $service=self::instantiate($class);\n if(method_exists($service,'register')){\n $service->register();\n }\n }\n }", "public function register()\n {\n $this->app->register(\\KRepository\\KRepositoryServiceProvider::class);\n if (!empty(config('kproviders'))) {\n foreach (config('kproviders') as $provider )\n {\n $this->app->register( $provider );\n }\n }\n }", "public static function register(array $filters): void\n {\n self::$providers = array_merge(self::$providers, $filters);\n }", "static private function getRegisters()\n {\n $app = self::getSilexApplication();\n\n $providers = array(\n new DoctrineProvider(),\n new SecurityProvider(),\n new UrlProvider(),\n new TranslationProvider()\n );\n\n foreach ($providers as $provider) {\n $provider\n ->setApp($app)\n ->register()\n ->configure();\n }\n }", "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n $this->registerServices();\n }", "public function makeServices()\n {\n $this->registrars = $this->get('config')->get('registrars');\n\n $instances = array();\n\n foreach ($this->registrars as $provider)\n {\n $instance = new $provider;\n\n $instance->register($this);\n\n $instances[] = $instance;\n }\n\n \n foreach ($instances as $instance) {\n $instance->booted();\n }\n }", "public function register()\n {\n $this->registerSeoMetaService();\n $this->registerSeoOpenGraphService();\n $this->registerSeoTwitterService();\n }", "public function register()\n {\n\n /** Register Services */\n collect($this->getServices())->each(function($service){\n $this->app->singleton(class_basename($service), function($app) use ($service){\n return new $service();\n });\n });\n }", "public function register(): void\n {\n $this->registerMergedConfig();\n $this->registerService();\n }", "public function register()\n {\n\n if (config('app.env')=='local' && class_exists(\\Barryvdh\\Debugbar\\ServiceProvider::class))\n $this->app->register(\\Barryvdh\\Debugbar\\ServiceProvider::class);\n\n if (class_exists(\\Laravel\\Cashier\\CashierServiceProvider::class))\n $this->app->register(\\Laravel\\Cashier\\CashierServiceProvider::class);\n\n if (class_exists(\\ErpNET\\Bot\\Providers\\ErpnetBotServiceProvider::class))\n $this->app->register(\\ErpNET\\Bot\\Providers\\ErpnetBotServiceProvider::class);\n\n if (class_exists(\\ErpNET\\Migrates\\Providers\\ErpnetMigratesServiceProvider::class))\n $this->app->register(\\ErpNET\\Migrates\\Providers\\ErpnetMigratesServiceProvider::class);\n\n if (class_exists(\\ErpNET\\Models\\Providers\\ErpnetModelsServiceProvider::class))\n $this->app->register(\\ErpNET\\Models\\Providers\\ErpnetModelsServiceProvider::class);\n\n if (class_exists(\\ErpNET\\Delivery\\Providers\\ErpnetDeliveryServiceProvider::class))\n $this->app->register(\\ErpNET\\Delivery\\Providers\\ErpnetDeliveryServiceProvider::class);\n\n if (class_exists(\\ErpNET\\Auth\\Providers\\ErpnetAuthServiceProvider::class))\n $this->app->register(\\ErpNET\\Auth\\Providers\\ErpnetAuthServiceProvider::class);\n\n if (class_exists(\\ErpNET\\WidgetResource\\Providers\\ErpnetWidgetResourceServiceProvider::class))\n $this->app->register(\\ErpNET\\WidgetResource\\Providers\\ErpnetWidgetResourceServiceProvider::class);\n\n if (class_exists(\\ErpNET\\SocialAuth\\Providers\\ErpnetSocialAuthServiceProvider::class))\n $this->app->register(\\ErpNET\\SocialAuth\\Providers\\ErpnetSocialAuthServiceProvider::class);\n\n }", "protected function registerServices()\n\t{\n\t\t// Bind our Menu class to the IoC container\n\t\t$this->app->singleton('menu', function($app) {\n\t\t\treturn new Menu($app['config']);\n\t\t});\n\t}", "protected function registerServices()\n {\n $di = new DI();\n\n // Registering a router\n $di->set('router', function () {\n\n $router = new Router(false);\n\n\t\t\t// Define a route\n\t\t\t$router->addGet(\n\t\t\t\t\"/subscribers/\",\n\t\t\t\t[\n\t\t\t\t\t\"controller\" => \"subscribers\",\n\t\t\t\t\t\"action\" => \"index\",\n\t\t\t\t]\n\t\t\t);\n\n\t\t\t// Define a route\n\t\t\t$router->addGet(\n\t\t\t\t\"/debug/\",\n\t\t\t\t[\n\t\t\t\t\t\"controller\" => \"index\",\n\t\t\t\t\t\"action\" => \"debug\",\n\t\t\t\t]\n\t\t\t);\n\n\t\t\t// Define a route\n\t\t\t$router->addPost(\n\t\t\t\t\"/debug/\",\n\t\t\t\t[\n\t\t\t\t\t\"controller\" => \"index\",\n\t\t\t\t\t\"action\" => \"debug\",\n\t\t\t\t]\n\t\t\t);\n\n\t\t\t// Define a route\n\t\t\t$router->addPut(\n\t\t\t\t\"/debug/\",\n\t\t\t\t[\n\t\t\t\t\t\"controller\" => \"index\",\n\t\t\t\t\t\"action\" => \"debug\",\n\t\t\t\t]\n\t\t\t);\n\n\t\t\t// Define a route\n\t\t\t$router->addGet(\n\t\t\t\t\"/users/{id:[0-9]+}\",\n\t\t\t\t[\n\t\t\t\t\t\"controller\" => \"users\",\n\t\t\t\t\t\"action\" => \"findOne\",\n\t\t\t\t]\n\t\t\t);\n\n // Define a route\n $router->addDelete(\n \"/users/{id:[0-9]+}\",\n [\n \"controller\" => \"users\",\n \"action\" => \"delete\",\n ]\n );\n\n\t\t\t// Define a route\n\t\t\t$router->addGet(\n\t\t\t\t\"/users/\",\n\t\t\t\t[\n\t\t\t\t\t\"controller\" => \"users\",\n\t\t\t\t\t\"action\" => \"findAll\",\n\t\t\t\t]\n\t\t\t);\n\n\t\t\t// Define a route\n\t\t\t$router->addGet(\n\t\t\t\t\"/users/search/{user_id:[0-9]+}\",\n\t\t\t\t[\n\t\t\t\t\t\"controller\" => \"users\",\n\t\t\t\t\t\"action\" => \"search\",\n\t\t\t\t]\n\t\t\t);\n\n\t\t\t// Define a route\n\t\t\t$router->addPut(\n\t\t\t\t\"/users/{user_id:[0-9]+}\",\n\t\t\t\t[\n\t\t\t\t\t\"controller\" => \"users\",\n\t\t\t\t\t\"action\" => \"update\",\n\t\t\t\t]\n\t\t\t);\n\n\t\t\t// Define a route\n\t\t\t$router->addPost(\n\t\t\t\t\"/users/\",\n\t\t\t\t[\n\t\t\t\t\t\"controller\" => \"users\",\n\t\t\t\t\t\"action\" => \"create\",\n\t\t\t\t]\n\t\t\t);\n\n\t\t\t$router->setUriSource(Router::URI_SOURCE_SERVER_REQUEST_URI);\n\n\t\t\treturn $router;\n\n });\n\n // Registering a dispatcher\n $di->set('dispatcher', function () {\n $dispatcher = new Dispatcher();\n $dispatcher->setDefaultNamespace('DemoAWS\\Controllers\\\\');\n return $dispatcher;\n });\n\n // Registering a Http\\Response\n $di->set('response', function () {\n return new Response();\n });\n\n // Registering a Http\\Request\n $di->set('request', function () {\n return new LambdaRequest();\n });\n\n // Registering the view component\n $di->set('view', function () {\n $view = new View();\n $view->disable();\n return $view;\n });\n\n\t\t/**\n\t\t * Services can be registered as \"shared\" services this means that they always will act as singletons. Once the service is resolved for the first time the same instance of it is returned every time a consumer retrieve the service from the container:\n\t\t */\n\t\t$di->setShared(\n\t\t\t\"dynamoDBClient\",\n\t\t\tfunction () {\n\t\t\t\treturn new DynamoDbClient([\n\t\t\t\t\t'version' => 'latest',\n\t\t\t\t\t'region' => getenv('AWS_REGION')\n\t\t\t\t]);\n\t\t\t}\n\t\t);\n\n // Registering the Models-Metadata\n $di->set('modelsMetadata', function () {\n return new MemoryMetaData();\n });\n\n // Registering the Models Manager\n $di->set('modelsManager', function () {\n return new ModelsManager();\n });\n\n $this->setDI($di);\n }", "public function initializeServices(array $providers)\n {\n foreach ($providers as $name => $class) {\n $this->initializeService(new $class($this->di));\n }\n }", "protected function registerServices()\n {\n // For standalone package, laravel container does not exist.\n // And cache manager uses container to get the settings.\n // Get the container instance.\n $this->container = Container::getInstance();\n\n // Lumen does not exist. Basic setup require to bootstrap cache.\n // For testing, we only using array driver.\n // The CacheManager creates the cache \"repository\" based on config values\n // which are loaded from the config class in the container.\n $this->container['config'] = [\n 'cache.default' => 'array',\n 'cache.stores.array' => [\n 'driver' => 'array',\n ],\n ];\n\n // Bind Services to IoC container\n $this->bindServicesToContainer();\n\n // Register Cache and Log facades\n $this->registerFacades();\n }", "public function registerPluginsProvider()\n {\n if (is_array(config('sanjab.plugins.providers'))) {\n foreach (config('sanjab.plugins.providers') as $provider) {\n $this->app->register($provider);\n }\n }\n }", "public function register()\n\t{\t\t\t\t\n\t\t$this->registerProviders();\n\t\t$this->registerFacades();\n\t\t$this->registerGenerators();\n\t}", "public function register()\n {\n\n $this->app->singleton(ExceptionHandler::class, Handler::class);\n $this->app->singleton(KernelContract::class, Kernel::class);\n\n $this->app->middleware([HandleCors::class]);\n\n // Mathrix Lumen Zero Providers\n $this->app->register(ObserverServiceProvider::class);\n $this->app->register(PolicyServiceProvider::class);\n $this->app->register(RegistrarServiceProvider::class);\n\n $this->app->register(CorsServiceProvider::class);\n }", "public function registerServices() {\n array_walk($this->services, function ( $service ) {\n if ( ! class_exists( $service[0] ) ) {\n throw new Exception( sprintf( 'Service class \\'%s\\' does not exist', $service[0] ));\n }\n\n $class = new \\ReflectionClass( $service[0] );\n\n if ( ! $class->implementsInterface( 'Service' ) ) {\n throw new Exception( sprintf( 'Service class \\'%s\\' does not implement Service interface', $service[0] ));\n }\n\n $class->newInstance( ...$service[1] );\n });\n }", "public function register()\n\t{\n\t\t// This service provider is a convenient place to register your modules\n\t\t// services in the IoC container. If you wish, you may make additional\n\t\t// methods or service providers to keep the code more focused and granular.\n\n\t\t$this->registerNamespaces();\n\t\t$this->registerProviders();\n\n\t}", "public function register()\n {\n $guzzleClient = new Client(['timeout' => 1200, 'read_timeout' => 1200]);\n\n $this->app->bind(ConsultaEmpresaService::class, function ($app) use ($guzzleClient) {\n return new ConsultaEmpresaService($guzzleClient);\n });\n\n $this->app->bind(ConsultaSociosService::class, function ($app) use ($guzzleClient) {\n return new ConsultaSociosService($guzzleClient);\n });\n\n\n }", "public function register()\n {\n $this->app->register('Bican\\Roles\\RolesServiceProvider');\n $this->app->register('Maatwebsite\\Excel\\ExcelServiceProvider');\n $this->app->register('Intervention\\Image\\ImageServiceProvider');\n $this->app->register('Barryvdh\\DomPDF\\ServiceProvider');\n $this->app->register('Jenssegers\\Agent\\AgentServiceProvider');\n $this->app->register('Milon\\Barcode\\BarcodeServiceProvider');\n $this->app->register('GrahamCampbell\\Flysystem\\FlysystemServiceProvider');\n $this->app->register('Websight\\GcsProvider\\CloudStorageServiceProvider');\n\n // register service providers\n $this->app->booting(function () {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n\n // external facades\n $loader->alias('Str', 'Illuminate\\Support\\Str');\n $loader->alias('Carbon', 'Carbon\\Carbon');\n $loader->alias('Excel', 'Maatwebsite\\Excel\\Facades\\Excel');\n $loader->alias('Number', 'Point\\Core\\Helpers\\NumberHelper');\n $loader->alias('Image', 'Intervention\\Image\\Facades\\Image');\n $loader->alias('PDF', 'Barryvdh\\DomPDF\\Facade');\n $loader->alias('Agent', 'Jenssegers\\Agent\\Facades\\Agent');\n $loader->alias('DNS1D', 'Milon\\Barcode\\Facades\\DNS1DFacade');\n $loader->alias('DNS2D', 'Milon\\Barcode\\Facades\\DNS2DFacade');\n $loader->alias('Flysystem', 'GrahamCampbell\\Flysystem\\Facades\\Flysystem');\n });\n\n // include helpers file to the project\n $helpers_file = __DIR__ . '/helpers.php';\n if (file_exists($helpers_file)) {\n require_once($helpers_file);\n }\n\n // register aliases\n $this->app->booting(function () {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n\n // helpers\n $loader->alias('DateHelper', 'Point\\Core\\Helpers\\DateHelper');\n $loader->alias('GritterHelper', 'Point\\Core\\Helpers\\GritterHelper');\n $loader->alias('NumberHelper', 'Point\\Core\\Helpers\\NumberHelper');\n $loader->alias('PermissionHelper', 'Point\\Core\\Helpers\\PermissionHelper');\n $loader->alias('PluginHelper', 'Point\\Core\\Helpers\\PluginHelper');\n $loader->alias('StorageHelper', 'Point\\Core\\Helpers\\StorageHelper');\n $loader->alias('TimelineHelper', 'Point\\Core\\Helpers\\TimelineHelper');\n $loader->alias('TempDataHelper', 'Point\\Core\\Helpers\\TempDataHelper');\n $loader->alias('UsageLimitHelper', 'Point\\Core\\Helpers\\UsageLimitHelper');\n });\n }", "public function register(): void\n {\n $this->registerApiClient();\n $this->registerApiAdapter();\n $this->registerManager();\n }", "public function register()\n {\n // This service provider is a convenient place to register your modules\n // services in the IoC container. If you wish, you may make additional\n // methods or service providers to keep the code more focused and granular.\n\n $this->registerNamespaces();\n $this->registerProviders();\n }", "public function register()\n {\n $this->defineServices();\n }" ]
[ "0.83759", "0.8181239", "0.8147619", "0.79507685", "0.7928695", "0.783458", "0.78188455", "0.7725922", "0.7723817", "0.7723026", "0.77082187", "0.7647642", "0.7643861", "0.76223385", "0.75376177", "0.7525581", "0.7424312", "0.74210256", "0.74016696", "0.7396534", "0.73832864", "0.73819506", "0.73819506", "0.7377608", "0.737716", "0.7364965", "0.7351521", "0.7341663", "0.7325037", "0.73224586", "0.73192596", "0.7317386", "0.7303338", "0.7298527", "0.72717166", "0.7224572", "0.7185226", "0.71683043", "0.71541506", "0.71538585", "0.71499044", "0.71494544", "0.71427417", "0.713892", "0.71307504", "0.7115917", "0.7100831", "0.70850253", "0.7084926", "0.7064444", "0.70449865", "0.7021894", "0.7009735", "0.69948614", "0.6920136", "0.69081604", "0.6858004", "0.68501776", "0.68261397", "0.68214095", "0.6808897", "0.6807795", "0.67968273", "0.67964435", "0.67735386", "0.6764523", "0.6755526", "0.67485476", "0.6746197", "0.6714283", "0.67133343", "0.6683054", "0.66746926", "0.66697127", "0.66679573", "0.66610247", "0.6653101", "0.6626485", "0.6618277", "0.6612859", "0.6612859", "0.6593309", "0.65831417", "0.658166", "0.657381", "0.6572282", "0.65420496", "0.65372545", "0.6536233", "0.6533336", "0.6530664", "0.65272474", "0.6519803", "0.651788", "0.6513003", "0.65117925", "0.65087223", "0.6505528", "0.65023464", "0.64769983" ]
0.83889675
0
Removed icon by map id
Удалён иконка по id карты
private function removeIcon($id) { $mapDir = $this->appConfig->getRootDir() . self::ICON_PATH . '/' . $id; if (is_dir($mapDir)) { return FileManager::rmdir($mapDir); } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function borraUnIcono($id){\n\n\t\t$recurso = $this->getResourcesId($id);\n\n\t\tif($recurso->name != \"\" && $recurso->iconoov==\"S\"){\n\n\t\t\t$path = getcwd().\"/../download/iconos\";\n\n\t\t\t$nombreIco = $this->getNombreIcono($recurso->idov,$recurso->name);\n\n\t\t\tif(file_exists($path.\"/\".$nombreIco)){\n\n\t\t\t\tunlink($path.\"/\".$nombreIco);\n\n\t\t\t}\n\n\t\t}\n\n\t\t\n\n\t}", "public function removeImage($id);", "public static function removeIcon($type) {\n unset(self::$icons[$type]);\n }", "public function removeInfowindow() {\n \n }", "function amazon_remove_map_marker( $post_id ) {\n\n\t\t//error_log('============================== this is a error log on the REMOVE MAP MARKER');\n\n\t\ttry {\n\t\t\tif ( is_null($this->dynamoDb) ) {\n\t\t\t\t$sdk = new Aws\\Sdk([\n\t\t\t\t\t'region' => $this->get_aws_region(),\n\t\t\t\t\t'version' => 'latest',\n\t\t\t\t\t'credentials' => [\n\t\t\t\t\t\t'key' => $this->get_access_key_id(),\n\t\t\t\t\t\t'secret' => $this->get_secret_access_key(),\n\t\t\t\t\t],\n\t\t\t\t]);\n\n\t\t\t\t\t$dynamoDb = $sdk->createDynamoDb();\n\t\t\t}\n\n\t\t\t$tableName = 'mojo-map-posts';\n\n\t\t\t$response = $dynamoDb->deleteItem ( [\n\t\t\t\t'TableName' => $tableName,\n\t \t'Key' => [\n\t\t\t\t\t'mojoSite' => ['S' => $this->get_mojo_site() ],\n\t\t\t\t\t'postId' => ['N' => $post_id . '' ],\n\t \t],\n\t \t'ReturnValues' => 'ALL_OLD'\n\t\t\t]);\n\n\t\t} catch(Exception $e) {\n\t\t\terror_log(\"Unable to remove map post marker from DynamoDB \" . $e->getMessage());\n\t\t}\n\t}", "public function removeTheExistingIconFile($id){\n \n //retreve the existing zip file from the database\n \n if($this->isTheIconNotTheDefault($id)){\n \n $criteria = new CDbCriteria();\n $criteria->select = '*';\n $criteria->condition='id=:id';\n $criteria->params = array(':id'=>$id);\n $icon= ProductType::model()->find($criteria);\n \n //$directoryPath = dirname(Yii::app()->request->scriptFile);\n $directoryPath = \"/admin.oneroof.com.ng/cobuy_images/icons/\";\n // $iconpath = '..\\appspace_assets\\icons'.$icon['icon'];\n $filepath =$directoryPath.$icon['icon'];\n //$filepath = $directoryPath.$iconpath;\n \n if(unlink($filepath)){\n return true;\n }else{\n return false;\n }\n \n }else{\n return true;\n }\n \n \n \n }", "public function removeicon($input)\n {\n $setting = $this->query()->get();\n if ($input == 'logo') {\n if ($setting[0]->logo) {\n if (file_exists(public_path().'/img/site_logo/'.$setting[0]->logo)) {\n unlink('img/site_logo/'.$setting[0]->logo);\n }\n $this->query()->update(['logo' => null]);\n }\n } else {\n if ($setting[0]->favicon) {\n if (file_exists(public_path().'/img/favicon_icon/'.$setting[0]->favicon)) {\n unlink('img/favicon_icon/'.$setting[0]->favicon);\n }\n }\n $this->query()->update(['favicon' => null]);\n }\n }", "public function remove_information($i_id=0)\r\n {}", "public function remove ($id) {\n\t\tunset($this->_map[$id]);\n\t}", "public function removeImage () {}", "function unsetIconsize()\r\n{\r\n\tunset($this->iconsize['width']);\r\n\tunset($this->iconsize['height']);\r\n\t$this->issetIconsize = false;\r\n}", "public function destroy($id)\n\t{\n\t\t$map = Map::find($id);\n\n\t\tif(file_exists($map->image))\n\t\t{\n\t\t\tunlink($map->image);\n\t\t}\n\n\t\t$map->delete();\n\n\t\treturn ['map'=>$map];\n\t}", "public function removeIconClass($classes);", "function ac_shortcode_ac_gmap_delete_marker($form, &$form_state) {\n\tif (isset($form_state['clicked_button']['#parents'][2])) {\n\t\t$id = $form_state['clicked_button']['#parents'][2];\n\t\tif ( isset($form_state['values']['markers']['marker'][$id]) ) {\n\t\t\tunset($form_state['values']['markers']['marker'][$id]);\n\t\t\t$form_state['values']['markers']['marker'] = array_values($form_state['values']['markers']['marker']);\n\t\t\t$form_state['marker_nums']--;\n\t\t\t$form_state['rebuild'] = TRUE;\n\t\t}\n\t}\n\n}", "function bk_delete_retina_support_images( $attachment_id ) {\n $meta = wp_get_attachment_metadata( $attachment_id );\n $upload_dir = wp_upload_dir();\n if(isset($meta['file'])) {\n $path = pathinfo( $meta['file'] );\n foreach ( $meta as $key => $value ) {\n if ( 'sizes' === $key ) {\n foreach ( $value as $sizes => $size ) {\n $original_filename = $upload_dir['basedir'] . '/' . $path['dirname'] . '/' . $size['file'];\n $retina_filename = substr_replace( $original_filename, '@2x.', strrpos( $original_filename, '.' ), strlen( '.' ) );\n if ( file_exists( $retina_filename ) )\n unlink( $retina_filename );\n }\n }\n }\n }\n }", "public function dropMark($id)\n\t{\n\t\tif(isset($this->_markers[$id])){\n\t\t\tunset($this->_markers[$id]);\n\t\t}\n\t}", "function _remove_site_icon() {\n\t\tdelete_option( 'site_icon' );\n\t}", "public static function clearIcons() {\n self::$icons = array();\n }", "public function destroy($id)\n {\n MapIcon::destroy($id);\n\n return response()->success('success');\n }", "function wppb_delete_user_map_markers( $user_id, $meta_name ) {\r\n\r\n global $wpdb;\r\n\r\n $meta_name .= '_';\r\n\r\n $delete = $wpdb->query( $wpdb->prepare( \"DELETE FROM {$wpdb->usermeta} WHERE user_id=%d AND meta_key LIKE %s\", $user_id, '%' . $meta_name . '%' ) );\r\n\r\n wp_cache_delete( $user_id, 'user_meta' );\r\n\r\n}", "function delete_single_map_item() {\n\t\t\t\t$id = $this->input->post('mapid');\n\t\t\t\t$this->Activity_model->delete_map_item($id);\n\t\t}", "public function icon ( ) { return null; }", "function panier_remove($id) {\n\tglobal $panier;\n\tglobal $panier_items_cache;\n\tforeach ($panier as $key => $item) {\n\t\tif ($item['id'] == $id)\n\t\t\tunset($panier[$key]);\n\t}\n\t$panier_items_cache['time'] = 0; // invalidate the cache\n}", "public static function remove($id)\n {\n $db = Zend_Registry::get('dbAdapter');\n $db->delete('satellite_pictures', 'satellite_pictures.id = ' . $id);\n }", "public static function refresh_map_icons( $value, $name_attr, $form ) {\n\t\t?><?php gmw_refresh_map_icons_button( 'admin.php?page=gmw-forms&gmw_action=edit_form&form_id='.$form['ID'], false ); ?><?php\n\t}", "public function onDelete($id) {\n // Obter o nome da imagem.\n $imageName = arrayValue($this->getById($id), 'imagem');\n // Eliminar.\n Imagem::delete($imageName);\n }", "function ceres_delete_retina_support_images( $attachment_id ) {\r\n $meta = wp_get_attachment_metadata( $attachment_id );\r\n $upload_dir = wp_upload_dir();\r\n $path = pathinfo( $meta['file'] );\r\n foreach ( $meta as $key => $value ) {\r\n if ( 'sizes' === $key ) {\r\n foreach ( $value as $sizes => $size ) {\r\n $original_filename = $upload_dir['basedir'] . '/' . $path['dirname'] . '/' . $size['file'];\r\n $retina_filename = substr_replace( $original_filename, '@2x.', strrpos( $original_filename, '.' ), strlen( '.' ) );\r\n if ( file_exists( $retina_filename ) )\r\n unlink( $retina_filename );\r\n }\r\n }\r\n }\r\n}", "public function removeIconBar()\n\t{\n\t\tglobal $wp_admin_bar;\n\t\t$wp_admin_bar->remove_menu(\"wp-logo\");\n\t}", "public static function deactivate_icon($id){\n\n try {\n\n DB::beginTransaction(); \n\n $icon_information = Icons::find($id);\n $icon_information->active = 0;\n $icon_information->save();\n DB::commit();\n\n return $icon_information;\n\n }catch(\\Exception $e){\n DB::rollback();\n $errores = New ErrorIncidence();\n $errores->script = \"Icons\";\n $errores->funcion = \"deactivate_icon\";\n $errores->codigo = $e->getCode();\n $errores->linea = $e->getLine();\n $errores->descripcion = $e->getMessage();\n $errores->save();\n //$error_anwser = ErrorIncidence::error_incidences('Category','deactivate_ads',$e->getLine(),$e->getMessage());\n\n\n }\n }", "function akun_map_delete($pkid){\r\n\t\t\t// You could do some checkups here and return '0' or other error consts.\r\n\t\t\t// Make a single query to delete all of the akun_maps at the same time :\r\n\t\t\tif(sizeof($pkid)<1){\r\n\t\t\t\treturn '0';\r\n\t\t\t} else if (sizeof($pkid) == 1){\r\n\t\t\t\t$query = \"DELETE FROM akun_map WHERE map_id = \".$pkid[0];\r\n\t\t\t\t$this->db->query($query);\r\n\t\t\t} else {\r\n\t\t\t\t$query = \"DELETE FROM akun_map WHERE \";\r\n\t\t\t\tfor($i = 0; $i < sizeof($pkid); $i++){\r\n\t\t\t\t\t$query = $query . \"map_id= \".$pkid[$i];\r\n\t\t\t\t\tif($i<sizeof($pkid)-1){\r\n\t\t\t\t\t\t$query = $query . \" OR \";\r\n\t\t\t\t\t} \r\n\t\t\t\t}\r\n\t\t\t\t$this->db->query($query);\r\n\t\t\t}\r\n\t\t\tif($this->db->affected_rows()>0)\r\n\t\t\t\treturn '1';\r\n\t\t\telse\r\n\t\t\t\treturn '0';\r\n\t\t}", "function deletemap($id){\n global $wpdb;\n $table_map = $wpdb->prefix.'cefiimap';\n $sql = $wpdb->prepare(\"DELETE FROM \".$table_map.\" WHERE id=%d LIMIT 1\",$id);\n $req = $wpdb->query($sql);\n return $req;\n }", "function heatmap_grade_item_delete($heatmap) {\n global $CFG;\n require_once($CFG->libdir.'/gradelib.php');\n\n return grade_update('mod/heatmap', $heatmap->course, 'mod', 'heatmap',\n $heatmap->id, 0, null, array('deleted' => 1));\n}", "function heatmap_delete_instance($id) {\n global $DB;\n\n if (! $heatmap = $DB->get_record('heatmap', array('id' => $id))) {\n return false;\n }\n\n // Delete any dependent records here.\n\n $DB->delete_records('heatmap', array('id' => $heatmap->id));\n\n heatmap_grade_item_delete($heatmap);\n\n return true;\n}", "public function removeImg($id) {\n $this->missionService->removeImg($id);\n return \\Redirect::route('mission/profile', ['id' => $id]);\n }", "public function destroy(Map $map)\n {\n //\n }", "public function destroy($id)\n {\n $icon = Icon::destroy($id);\n return response()->json([\n 'message' => 'Icon deleted successfully'\n ], 200);\n }", "public function removeFlow(MapInterface $map, Request $request);", "function unsetMap(ClassMapping $map) {\n $className = $map->getClassName();\n unset($this->classMapping[$className]);\n }", "function sobeAnno($map_file){\n\t$mapa = ms_newMapObj($map_file);\n\t$numlayers = $mapa->numlayers;\n\tfor ($i=0;$i<$numlayers;++$i){\n\t\t$layer = $mapa->getlayer($i);\n\t\tif($layer->type == 4){\n\t\t\t$temp = ms_newLayerObj($mapa,$layer);\n\t\t\t$layer->set(\"status\",MS_DELETE);\n\t\t}\n\t}\n\t$mapa->save($map_file);\n}", "function bfg_remove_wp_icon_from_admin_bar() {\n\n\tglobal $wp_admin_bar;\n\t$wp_admin_bar->remove_menu('wp-logo');\n\n}", "private function unregisterId()\n {\n unset(self::$activeIds[$this->templateId][$this->attr_id]);\n }", "function qode_remove_vc_image_zoom() {\n\t\t\t$param = WPBMap::getParam( 'vc_single_image', 'onclick' );\n\t\t\tunset($param['value']['Zoom']);\n\t\t\tvc_update_shortcode_param( 'vc_single_image', $param );\n\t\t}", "public function removeCover($id);", "private function _deleteImage($id)\n {\n $product = $this->getById($id);\n if ($product->gambar_toko != \"default.jpg\") {\n $filename = explode(\".\", $product->gambar_toko)[0];\n return array_map('unlink', glob(FCPATH.\"upload/tokomatoa_ind/$filename.*\"));\n }\n }", "function br_getIcon($id = false) {\n switch(BR_ICON_SET) {\n default :\n return '<span class=\"icon-'.br_getPageIcon($id).'\"></span>';\n break;\n }\n}", "public function destroy($id)\r\n {\r\n $this->image_map->delete($id);\r\n\r\n session()->flash('success', trans('admin_message.deleted_successful', ['attr' => trans('admin_image_map.image_map')]));\r\n\r\n return redirect()->back();\r\n }", "function removeImage($ct, $id) {\n\tglobal $g;\n\t$db = $g['db'];\n\t$ctdb = $g['content'][$ct];\n\tforeach ($ctdb->references as $v) {//$v - validate type\n\t\t//echo $v;\n\t\tif ($v == 'image')\n\t\t\tremove_file_specific($ct, $id, $v);\n\t}\n\treturn true;\n}", "function limpiaIconos($idov){\n\n\t\t$obj=new ClsResources();\n\n\t\t$sql = \"SELECT * FROM resources where iconoov='S' and idov=\".$idov.\" order by id \";\n\n\t\t$collection = $this->execSQL( $sql, $obj );\t\t\n\n\t\t$path = getcwd().\"/../download/iconos\";\n\n\t\tforeach ($collection as $clave=>$item){\n\n\t\t\tif($item->name != \"\"){\t\t\t\n\n\t\t\t\t$nombreIco = $this->getNombreIcono($item->idov,$item->name);\n\n\t\t\t\tif(file_exists($path.\"/\".$nombreIco)){\n\n\t\t\t\t\tunlink($path.\"/\".$nombreIco);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}", "public function getSpriteIconCode() {}", "public function deleteById($id)\n {\n return $this->mapMapper->deleteByPk($id) && $this->removeIcon($id);\n }", "function removeAdminPicture($conn, $admiID) {\r\n\r\n\t\t\t\tglobal $adminAccessTB, $wizGradeDefaultPic, $wizGradeAdminPicDir, $foreal; \r\n\r\n\t\t\t\t$ebele_mark = \"SELECT a_picture\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\tFROM $adminAccessTB\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t \t\tWHERE admin_id = :admin_id\";\r\n\t\t\t\t\t \r\n \t\t\t $igweze_prep = $conn->prepare($ebele_mark);\r\n\t\t\t\t$igweze_prep->bindValue('admin_id', $admiID);\r\n \t\t\t\t$igweze_prep->execute();\r\n\t\t\t\t\r\n\t\t\t\t$rows_count = $igweze_prep->rowCount(); \r\n\t\t\t\t\r\n\t\t\t\tif($rows_count == $foreal) {\r\n\t\t\t\t\r\n\t\t\t\t\twhile($row = $igweze_prep->fetch(PDO::FETCH_ASSOC)) {\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$pic = $row['a_picture'];\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$adminPic = $wizGradeAdminPicDir.$pic;\r\n\t\t\r\n\t\t\t\t\tif ((!is_null($pic)) && ($pic != '') && (file_exists($adminPic))){ unlink($adminPic); } \r\n\r\n \t} \r\n \r\n\t\t}", "function wpdocs_dequeue_dashicon() {\n if (current_user_can( 'update_core' )) {\n return;\n }\n wp_deregister_style('dashicons');\n }", "public function removeData($id);", "public function icon();", "function getIcon() ;", "public function delete_info($i_id) {\r\n \r\n }", "private function removeEntry($id)\n {\n foreach ($this->items as $item) {\n // If $item with $id found\n if($item->getID() == $id){\n // Get $item index in $items array\n $arrayIndex = array_search($item, $this->items);\n // Remove item from $items array\n unset($this->items[$arrayIndex]);\n }\n }\n }", "function eliminar_tip_imagen($id_tip){\n $this->db->escape($id_tip);\n $this->db->set('imagen_url', NULL);\n $this->db->set('imagen_thumb_url', NULL);\n $this->db->where('id_tip', $id_tip);\n $this->db->update('tips');\n }", "public static function remover(CgmBase $oCgm) {\n /**\n *\n */\n if (array_key_exists($oCgm->getCodigo(), CgmRepository::getInstance()->aItens)) {\n unset(CgmRepository::getInstance()->aItens[$oCgm->getCodigo()]);\n }\n return true;\n }", "public function destroy($id) {\n\n $mapa = $this->mapa->find($id);\n File::delete('repositoriomapas/' . $mapa->archivo);\n $mapa->delete();\n DB::table('consorcioxmapas')->where('mapa','=',$id)->delete();\n DB::table('deptoxmapas')->where('mapa','=',$id)->delete();\n return Redirect::route('mapas.index')->with('message', 'Mapa eliminado correctamente');\n }", "public function removeItem($id) {\r\n if(isset($this->nodesByItem[$id])) {\r\n $node = &$this->nodesByItem[$id];\r\n unset($node['items'][$id]);\r\n unset($this->nodesByItem[$id]);\r\n unset($this->nodeIdByItem[$id]);\r\n unset($this->rectsByItem[$id]);\r\n }\r\n }", "public function removeImageMatchEntryForLocation($gameId, $intLocationId, $intMatchMediaID)\n {\n $query = \"SELECT * FROM qrcodes WHERE game_id = {$gameId} AND link_id ={$intLocationId}\";\n $result = Module::query($query);\n if(mysql_num_rows($result) == 1){\n $query = \"UPDATE qrcodes SET match_media_id = '0' WHERE game_id = {$gameId} AND link_id={$intLocationId} AND match_media_id = {$intMatchMediaID}\";\n Module::query($query);\n deleteImageMatchXML($intMatchMediaID, $gameId);\n return new returnData(0);\n }\n elseif(mysql_num_rows($result) > 1){\n $query = \"DELETE FROM qrcodes WHERE game_id = {$gameId} AND link_id={$intLocationId} AND match_media_id={$intMatchMediaID}\";\n Module::query($query);\n deleteImageMatchXML($intMatchMediaID, $gameId);\n return new returnData(0);\n }\n else{\n return new returnData(1);\n }\n }", "function wpdocs_dequeue_dashicon() {\n\tif (current_user_can( 'update_core' )) {\n\t\treturn;\n\t}\n\twp_deregister_style('dashicons');\n}", "private function deleteOldIcon(String $login)\n {\n $path_to_dir = storage_path('app/public/' . $login . '/icon');\n $glob = glob($path_to_dir . '/*');\n $is_empty = count(glob($path_to_dir . '/*')) ? false : true;\n if (!$is_empty)\n unlink($glob[0]);\n }", "public function getIcon();", "public function getIcon();", "public function getIcon();", "public function getIcon();", "public function disableMarkers();", "public function actionRemove()\n {\n\n $id = Yii::$app->request->post('id');\n\n if(!empty($id)){\n \n $img = Img::findOne($id);\n \n $img->delete();\n \n }\n }", "public function offsetUnset($offset) {\n throw new \\RuntimeException(\"Bitmap does not support offsetUnset\");\n }", "public function removeAcc($id);", "public function removePathEntityIdMapping($path)\n {\n unset($this->pathEntityIdMapping[$this->unifyPath($path)]);\n }", "public function hapus($id=''){\n\t\t$this->db->where('id_hotspot',$id);\n\t\t$get=$this->Model->get()->row();\n\t\t$geojson_hotspot=$get->geojson_hotspot;\n\t\tunlink('assets/unggah/geojson/'.$geojson_hotspot);\n\t\t// end hapus file di dalam folder\n\t\t$this->Model->delete([\"id_hotspot\"=>$id]);\n\t\tredirect('admin/hotspot');\n\t}", "public function deleteImage($id)\n {\n $sql = \"SELECT address FROM images WHERE id_image = :id\";\n $req = $this->getBdd()->prepare($sql);\n $req->execute(['id' => $id]);\n $result = $req->fetch();\n ?><h1><?php print(\"../public/pictures/\".$result['address']); ?> <h1> <?php\n unlink(\"public/pictures/\".$result['address']);\n\n //delete pic from the database\n $sql = 'DELETE FROM images WHERE id_image = :id';\n $req = $this->getBdd()->prepare($sql);\n $req->execute(['id' => $id]);\n }", "public function deleteMapObjects() {\n\t\t$daction = false;\n\t\t$options = array(\n\t\t\t'type' => 'object',\n\t\t\t'subtype' => 'drawmapobject',\n\t\t\t'limit' => 0,\n\t\t\t'full_view' => false,\n\t\t\t'view_toggle_type' => false,\n\t\t\t'metadata_name_value_pairs' => array(\n\t\t\t\tarray('name' => 'map_guid', 'value' => $this->guid, 'operand' => '='), \n\t\t\t)\n\t\t);\n\t\t\n\t\t$map_objects = elgg_get_entities_from_metadata($options);\t\n\t\t\n\t\tif ($map_objects) \t{\n\t\t\tforeach ($map_objects as $mo)\t{\n\t\t\t\tif ($mo->delete())\t\n\t\t\t\t\t$daction = true;\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $map_objects;\n }", "function unpin_image( $img, $redir=1 )\n\t{\t\t\n\t\t$img = $this->glib->validate_int( $img );\n\t\t\n $this->ipsclass->DB->do_update( 'gallery_images', array( 'pinned' => '0' ), \"id={$img}\" );\n \n if( $redir )\n {\n\t\t\t$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['img_unpinned'], \"automodule=gallery&cmd=si&img={$img}\" ); \t\n } \n\t}", "function wpdocs_dequeue_dashicon()\n{\n if (current_user_can('update_core')) {\n return;\n }\n wp_deregister_style('dashicons');\n}", "public function supprimerPhoto($id){\n\n //suppression de la photo de la BDD\n Habitat::deletePhoto($id);\n\n //supprimer la photo du serveur\n //unlink(asset('public/img/photos/habitats/grandes/tipi_1.jpg'));\n\n }", "public function deleteSmileyObject()\n\t{\n\t\tglobal $rbacsystem, $ilCtrl, $lng;\n\n\t\tif(!$rbacsystem->checkAccess('write', $this->gui->ref_id))\n\t\t{\n\t\t\t$this->ilias->raiseError(\n\t\t\t\t$lng->txt('msg_no_perm_write'), $this->ilias->error_obj->MESSAGE\n\t\t\t);\n\t\t}\n\n\t\tinclude_once 'Modules/Chatroom/classes/class.ilChatroomSmilies.php';\n\n\t\tilChatroomSmilies::_deleteSmiley($_REQUEST[\"chatroom_smiley_id\"]);\n\n\t\t$ilCtrl->redirect($this->gui, \"smiley\");\n\t}", "public function postCustomAppIconRemove()\n {\n // Get security link with site_id, page_id\n\t\t$sl = \\Input::get('sl', '');\n\t\t$qs = \\App\\Core\\Secure::string2array($sl);\n\n\t\t// Get app\n\t\t$app = \\Mobile\\Model\\App::where('id', '=', $qs['app_id'])\n\t\t\t->where('user_id', '=', $this->parent_user_id)->first();\n\n\t\tif(! empty($app))\n\t\t{\n\t\t\t$app->header = STAPLER_NULL;\n\t\t\t$app->save();\n\t\t}\n\n\t\treturn \\Response::json(array('status' => 'success'));\n }", "public function updated_mapsvg_meta($meta_id, $object_id, $meta_key, $_meta_value) {\n\t\t$this->clear($object_id);\n\t}", "public function removeImage() {\n //check if we have an old image\n if ($this->image) {\n //store the old name to delete on the update\n $this->temp = $this->image;\n //delete the current image\n $this->image = NULL;\n }\n }", "function gmw_ps_modify_member_map_icon( $args, $member, $gmw ) {\n \n $map_icon = '_default.png';\n\n //set default map icon usage if not exist\n if ( ! isset( $gmw['map_markers']['usage'] ) ) {\n $gmw['map_markers']['usage'] = 'global';\n }\n\n $usage = isset( $gmw['map_markers']['usage'] ) ? $gmw['map_markers']['usage'] : 'global';\n $global_icon = isset( $gmw['map_markers']['default_marker'] ) ? $gmw['map_markers']['default_marker'] : '_default.png';\n \n //if same global map icon\n if ( $usage == 'global' ) {\n \n $map_icon = $global_icon;\n \n //per member map icon \n } elseif ( $usage == 'per_member' && isset( $member->map_icon ) ) {\n \n $map_icon = $member->map_icon;\n \n //avatar map icon\n } elseif ( $usage == 'avatar' ) {\n $avatar = bp_core_fetch_avatar( array( \n 'item_id' => $member->ID, \n 'type' => 'thumb', \n 'width' => 10, \n 'height' => 10, \n 'html' => false \n ) );\n $map_icon = ( $avatar ) ? $avatar : GMW_PS_URL . '/friends/assets/map-icons/_no_avatar.png';\n //oterwise, default map icon \n } else {\n $map_icon = '_default.png';\n }\n \n //generate the map icon\n if ( $usage != 'avatar' ) {\n\n if ( $map_icon == '_default.png' ) {\n $map_icon = 'https://chart.googleapis.com/chart?chst=d_map_pin_letter&chld='. $member->location_count.'|FF776B|000000';\n } else {\n $icons = gmw_get_icons();\n $map_icon = $icons['fl_map_icons']['url'].$map_icon;\n }\n }\n\n $args['map_icon'] = $map_icon;\n\n return $args;\n}", "public function remove($id)\n {\n $currentUser = Auth::user();\n\n //check if current user can remove the avatar\n if ( ! $currentUser->isAdmin) {\n return response(trans('app.noPermissions'), 403);\n }\n\n $results = ImageSticker::where('id',$id)->get()->first();\n\n $path = '/assets/images/stickers/'.$results->category.'/'.$results->image_name;\n\n $url = url().$path;\n\n if ($url) {\n $this->deleteFromFilesystem($url);\n return response(trans('app.avatarRemoveSuccess'), 200);\n }\n ImageSticker::destroy($id);\n\n return response(trans('app.genericError'), 500);\n }", "public function offsetUnset($offset): void\n {\n unset($this->images[$offset]);\n }", "function ut_icon_map( $atts, $content = null ) {\n\textract(shortcode_atts(array(\n\t\t\"color\" => '#'\n\t), $atts));\n return '<span class=\"uticon icon-map '.$color.'\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M17.492 15.432c-.433 0-.855-.087-1.253-.259l.467-1.082c.25.107.514.162.786.162.222 0 .441-.037.651-.11l.388 1.112c-.334.118-.683.177-1.039.177zm-10.922-.022c-.373 0-.741-.066-1.093-.195l.407-1.105c.221.081.451.122.686.122.26 0 .514-.05.754-.148l.447 1.09c-.382.157-.786.236-1.201.236zm8.67-.783l-1.659-.945.583-1.024 1.66.945-.584 1.024zm-6.455-.02l-.605-1.011 1.639-.981.605 1.011-1.639.981zm3.918-1.408c-.243-.101-.5-.153-.764-.153-.23 0-.457.04-.674.119l-.401-1.108c.346-.125.708-.188 1.075-.188.42 0 .83.082 1.217.244l-.453 1.086zm7.327-.163c-.534 0-.968.433-.968.968 0 .535.434.968.968.968.535 0 .969-.434.969-.968 0-.535-.434-.968-.969-.968zm-16.061 0c-.535 0-.969.433-.969.968 0 .535.434.968.969.968s.969-.434.969-.968c0-.535-.434-.968-.969-.968zm18.031-.832v6.683l-4 2.479v-4.366h-1v4.141l-4-2.885v-3.256h-2v3.255l-4 2.885v-4.14h-1v4.365l-4-2.479v-13.294l4 2.479v3.929h1v-3.927l4-2.886v4.813h2v-4.813l1.577 1.138c-.339-.701-.577-1.518-.577-2.524l.019-.345-2.019-1.456-5.545 4-6.455-4v18l6.455 4 5.545-4 5.545 4 6.455-4v-11.618l-.039.047c-.831.982-1.614 1.918-1.961 3.775zm2-8.403c0-2.099-1.9-3.801-4-3.801s-4 1.702-4 3.801c0 3.121 3.188 3.451 4 8.199.812-4.748 4-5.078 4-8.199zm-5.5.199c0-.829.672-1.5 1.5-1.5s1.5.671 1.5 1.5-.672 1.5-1.5 1.5-1.5-.671-1.5-1.5zm-.548 8c-.212-.992-.547-1.724-.952-2.334v2.334h.952z\"/></svg>' . do_shortcode($content) . '</span> ';\n}", "private function markerRemoveFilter()\n {\n // LOOP each filter\n foreach ( ( array ) $this->conf_view[ 'filter.' ] as $tableWiDot => $fields )\n {\n foreach ( array_keys( ( array ) $fields ) as $field )\n {\n // CONTINUE : field has an dot\n if ( rtrim( $field, '.' ) != $field )\n {\n continue;\n }\n // CONTINUE : field has an dot\n\n $currFilter = $tableWiDot . $field;\n $hashFilter = '###' . strtoupper( $currFilter ) . '###';\n\n unset( $this->markerArray[ $hashFilter ] );\n }\n }\n // LOOP each filter\n }", "public function getIcon() {}", "public function removeImageById($id)\n {\n return ArticleImages::where('id', $id)->delete();\n }", "function remove_custom_image_header()\n{\n}", "protected function deleteMapItem(MapItem $mapItem): void\n {\n $em = $this->doctrine->getManager();\n $em->remove($mapItem);\n $em->flush();\n }", "public function delete_imagem($id)\n { \n if($result = $this->getImagem($id)) {\n $file = \"../../../\".$result->url;\n //$path = \"../../../assets/imagens/produtos/f4eb8c04fc537053a2e260acf53aab00.jpg\";\n if(file_exists($file)) {\n if(unlink($file)) \n $sql = \"DELETE FROM produto_imagens WHERE id = :id\";\n $stmt = Conexao::prepare($sql);\n $stmt->bindValue(':id', $id);\n $stmt->execute();\n if ($stmt->rowCount() > 0) { \n return \"Excluido com sucesso!\";\n }\n else\n return \"Oops, Ocorreu algum erro ao excluir!\";\n } else {\n return \"Oops, arquivo não encontrado no diretório: \".$file;\n }\n } else {\n return \"Oops, arquivo não foi localizado na nossa base de dados!\";\n }\n }", "function WPBikeRent_Theme_map_icon(){ \n\t\t$testlogo2 = 'img_map_logo';\n\t\techo $this->WPBikeRent_Theme_image_uploader_field( $testlogo2, get_option('img_map_logo') );\n\t}", "public function notUnlinkPicture($id) {\n return \t$this->dataBase->update(\"picture\", [[\"field\"=>\"isDeleted\",\"type\"=>\"i\",\"value\"=>0]],\"id\",$id);\n }", "public function appendRemoves(\\Basho\\Riak\\Api\\Pb\\Message\\MapField $value)\n {\n return $this->append(self::REMOVES, $value);\n }", "public function icon(string $key, string $path, ?string $url = null): void;", "private function removeFromCache($id) {\n @unlink(\"..\" . DIRECTORY_SEPARATOR . \"cache\" . DIRECTORY_SEPARATOR . $id . \".cache\");\n }", "public function footerFriendsLogoDelete($id){\n\n\t\tDB::table('images')\n\t\t\t->where('position', 'footer-friends-logo')\n\t\t\t->where('id' , '=' , $id)\n\t\t\t->delete();\n\t\treturn redirect('admin/footer/friends-logo');\n\n\t}", "public function removeDiagramObject($id) {\n $object = $this->getDiagramObject($id);\n\n $dimension = $object->getDimension();\n\n $cellsX = ceil($dimension->getWidth() / $this->cellDimension->getWidth());\n $cellsY = ceil($dimension->getHeight() / $this->cellDimension->getHeight());\n\n for ($i = 0; $i < $cellsX; $i++) {\n $loopX = $i + $x;\n\n for ($j = 0; $j < $cellsY; $j++) {\n unset($this->grid[$loopX][$loopY]);\n }\n }\n\n $object->setGridPoint(null);\n $object->setGridDimension(null);\n\n unset($this->objects[$id]);\n }" ]
[ "0.674841", "0.6386695", "0.63283676", "0.63021046", "0.6287551", "0.6264522", "0.6205194", "0.61905706", "0.6123214", "0.6064052", "0.6048533", "0.60437053", "0.59550595", "0.5936047", "0.5921095", "0.589056", "0.58792675", "0.58370763", "0.5836513", "0.5830962", "0.57784057", "0.5750534", "0.5704175", "0.56051636", "0.55853224", "0.557149", "0.5551782", "0.5551676", "0.5550525", "0.55499464", "0.5533197", "0.5518855", "0.54850346", "0.54788756", "0.54324275", "0.54190826", "0.5414733", "0.5395523", "0.5390918", "0.53892106", "0.5387602", "0.5374226", "0.5369101", "0.53688395", "0.53533685", "0.5320726", "0.53160095", "0.5310372", "0.530695", "0.53052527", "0.53001463", "0.5297252", "0.52791953", "0.5260764", "0.5255379", "0.52530634", "0.52484673", "0.5220828", "0.5220038", "0.5208925", "0.52052665", "0.52038425", "0.52012247", "0.519121", "0.51907134", "0.51907134", "0.51907134", "0.51907134", "0.51834774", "0.51812893", "0.51721185", "0.51719177", "0.51656985", "0.5164938", "0.5159726", "0.5157692", "0.515626", "0.51529247", "0.5145275", "0.51348054", "0.5131669", "0.51303077", "0.5128102", "0.51251113", "0.51225823", "0.5118375", "0.51122886", "0.5100373", "0.51003116", "0.5092259", "0.5091721", "0.5088268", "0.50870293", "0.5084432", "0.5064964", "0.50632906", "0.5062029", "0.50606775", "0.5055441", "0.50481343" ]
0.7072428
0
Returns last map id
Возвращает последний идентификатор карты
public function getLastId() { return $this->mapMapper->getMaxId(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMapId()\n {\n return md5(serialize($this->map)) . '_' . $this->map->getMapId();\n }", "public function getMapID()\n {\n return $this->sMapId;\n }", "public function getMapid()\n {\n $value = $this->get(self::MAPID);\n return $value === null ? (integer)$value : $value;\n }", "public function getLastId()\r\n {\r\n return $this->itemMapper->getLastId();\r\n }", "function get_map_id () {\n\t\t\tsrand ((double) microtime () * 1000000); \n\t\t\treturn rand (0, 1000); \n\t\t}", "public static function getLastId() {\n return static::$_last_id;\n }", "public function fetchLastId();", "public function getLastId()\n {\n return $this->announceMapper->getLastId();\n }", "public function getLastId() {\n return $this->lastId;\n }", "public function getLastId()\n {\n return $this->lastId;\n }", "public function get_last_id()\n {\n //now just try to get the last\n $row = $this->db->order_by('id','desc')->get($this->_table)->row();\n return ($row)? $row->id : 0 ;\n\n }", "public function lastID() {\n return $this->lastID;\n }", "public function getLastId();", "public function getLastId();", "function easydita_knowledge_portal_get_root_map_id() {\n\t\t$hierarchy = easydita_knowledge_portal_get_hierarchy();\n\t\tif (easydita_knowledge_portal_is_versioning_enabled()) {\n\t \treturn $hierarchy[1];\n \t} else {\n \t\treturn $hierarchy[0];\n \t}\n\t}", "static function lastId()\r\n {\r\n return Cache::variable(Posts::$lastId, function() {\r\n return DB::object('lastPostId')['id'];\r\n });\r\n }", "protected function lastId()\n {\n return $this->group->speciesIds()->last();\n }", "public function getLastId() {\n\t\t\tif ($this->lastId) {\n\t\t\t\treturn $this->lastId;\n\t\t\t} else {\n\t\t\t\tthrow new AtlasException(\"Can't get last ID, this query wasn't executed or isn't an insert!\");\n\t\t\t}\n\t\t}", "public function getLastId()\n\t{\n\t\t$sql = 'select scope_identity() as n';\n\t\t$res = $this->query( $sql );\n\t\t\n\t\treturn $res[0]['n'];\n\t}", "public function get_last_id(){\n\t$sql = $this->db->query(\"SELECT MAX(id)+1 AS id FROM lit_tab_jabatan\")->row_array();\n\t$idnya = $sql['id'];\n\treturn $idnya;\n\t}", "public function get_last_id(): int {\r\n\t\treturn $this->id;\r\n\t}", "function lastId() {\n $r=$this->f([\":sort\" => \"-_id\", \":limit\" => 1], \"_id\");\n if (! $r)\n return 0;\n return key($r);\n }", "public function getLastId()\n {\n return $this->lastInsert;\n }", "public function getLastId() {\n \treturn $this->lastInsertId;\n }", "function getLastId(){\n\t\treturn mysql_insert_id($this->daoConnection->Conexion_ID);\n }", "public function getLastId()\n {\n return $this->db->getLastId();\n }", "public function fetchLastId()\r\n {\r\n return $this->fetchId('DESC');\r\n }", "public function getLastId() {\n return $this->dbConnection->getLastId();\n }", "public function getLastId()\n {\n return DB::table($this->tableName)->latest('id')->first()->id;\n }", "public function getLastId() {\n\n }", "function getLastID()\n{\n\t$sql= \"select max(tank_mix) as id from tank_mix\";\n\t$rs = dbcall($sql,\"2015_crop\");\n\t$id = $rs->fields[\"id\"];\n\tif($id==null)\n\t{\n\t\t$id = 1;\n\t}\n\treturn $id+1;\n}", "function GetLastID()\n {\n return mysql_insert_id($this->Active);\n }", "function getLastId()\n {\n return $this->finder()->getInsertId();\n }", "static function getLastID()\r\n {\r\n $tableProofTalks = DatabaseManager::getNameTable('TABLE_PROFF_TALKS');\r\n\r\n $query = \"SELECT MAX(id) AS Max FROM $tableProofTalks\";\r\n\r\n return DatabaseManager::singleFetchAsoc($query)[\"Max\"];\r\n }", "function getLastId()\r\n\t{\r\n\t\t//must override this function\r\n\t\tassert(FALSE);\r\n\t}", "public function getLastId(){\n\t\treturn $this->pdo->lastInsertId();\n\t}", "public function getLastId()\n {\n return $this->couponMapper->getLastId();\n }", "public function get_last_id()\n\t{\n\t\t return $this->_database->lastInsertId();\n\t}", "public function getLastID()\n {\n return $this->db->getLastID();\n }", "public function get_last_id($table) {\n try {\n $tid = $table . '_id';\n $id = PluSQL::from($this->profile)->$table->select($tid)->limit('0,1')->orderBy(\"$tid DESC\")->run()->$table->$tid;\n return $id;\n } catch (\\EmptySetException $e) {\n return 0;\n } catch (\\Exception $e) {\n return 0;\n }\n }", "public function getLastId()\n {\n $new_id = array(200);\n $query = \"SELECT MAX(id) FROM comments\";\n if($result = $this->connection->query($query)) {\n $new_id = $result->fetch(\\PDO::FETCH_NUM);\n }\n return $new_id[0];\n }", "private function getLastId()\n {\n $last = Convoy::withTrashed()->orderBy('id', 'desc')->first();\n\n return $last ? $last->id : 0;\n }", "public function getLastId(){\n $this->curQuery = \"SELECT MAX(id) AS max FROM $this->curTable\";\n return $this->executeQuery(false, true);\n }", "public function getLastId()\n {\n return $this->_getPDO()->lastInsertId();\n }", "public function getLastId()\n {\n return self::$pdo[$this->DBID]->lastInsertId();\n }", "function getLastID(){\n\t\treturn $this->db_link->insert_id;\n\t}", "public function lastIdInsert()\n {\n $sql = \"SELECT LAST_INSERT_ID()\";\n try {\n $this->connection = Connection::getInstance();\n $resultSet = $this->connection->execute($sql); //Sino va execute($sql, $parameters);\n $resp = array_map(function ($p) {\n $idCompra = ($p['LAST_INSERT_ID()']);\n return $idCompra;\n }, $resultSet);\n return (count($resp) > 1 ? $resp : $resp['0']);\n } catch (Exception $ex) {\n throw $ex;\n }\n }", "public function getLastId(){\n\t\t\treturn $this->_connection->lastInsertId();\n\t\t}", "public function lastId() {\n\t\treturn $this->dbh->lastInsertId();\n\t}", "protected function _getLastId()\n\t{\n\t\t$query = 'SELECT MAX(id)'\n\t\t\t. ' FROM #__' . $this->records_dbtbl;\n\t\t$this->_db->setQuery($query);\n\t\t$lastid = $this->_db->loadResult();\n\n\t\treturn (int) $lastid;\n\t}", "public function last_id($table)\n {\n\n // DB::getPdo()->lastInsertId();\n\n $last_id = $this->table($table)->orderBy('id', 'DESC')->take(1)->first();\n if (isset($last_id->id)) {\n return $last_id->id;\n }\n }", "public function getLastId()\n\t{\n\t\treturn $this->pdo->lastInsertId();\n\t}", "public function getLastId()\n {\n return mysql_insert_id($this->_db_connection);\n }", "public function lastId() {\n return $this->dbh->lastInsertId();\n }", "private function prismGetLatestId() {\n\t\treturn $this->prismDatabase->get_field(\"SELECT `id` FROM `prism_data` ORDER BY `id` DESC LIMIT 1\");\n\t}", "private function getLastId(){\n\t\t\t$sql = \"SELECT max(id) as max FROM produto\";\n\t\t\t$result = self::$conn->query($sql); //executa o select e retorna os dados em $result\n\t\t\t$data = $result->fetch(PDO::FETCH_OBJ);\n\t\t\treturn $data->max;\n\t\t}", "public function get_new_id()\n {\n $query = \"select MAX(id) as id from prediction\";\n $res = $this->db->query($query);\n $res->result_array();\n $last_id = ($res->result()[0]->id)+1;\n return $last_id;\n }", "public function lastId() {\n\t\treturn $this->_pdo->lastInsertId();\n\t}", "public function get_last_id( $table_name ){\n\t\t$last_id = $this->db->get_var(\"SELECT MAX(id) FROM \" . $table_name );\n\t\treturn $last_id;\n\t}", "public static function getLastId()\n {\n return self::_getPdo()->lastInsertId();\n }", "public function lastId()\n\t{\n\t\treturn $this->lastInsertID();\n\t}", "function last_id()\n{\n\tGlobal $db;\n\n\t$frok=mysql_query(\"SELECT LAST_INSERT_ID( )\",$db);\n\n\t$row=mysql_fetch_array($frok);\n\n\treturn $row[0];\n}", "public function lastId()\n\t\t{\n\t\t\treturn $this->lastInsertID();\n\t\t}", "public function getLastId($id, $table){\n\t\t$last_id = $this->db->order_by($id, 'DESC')->limit(1)->get($table)->result_array();\n\t\treturn $last_id[0][$id];\n\t}", "function lastID() {\n $sql = \"SELECT AUTO_INCREMENT\n FROM information_schema.tables\n WHERE table_name = 'course'\";\n $query = $this->conn->query($sql);\n $lastid = $query->fetch()['AUTO_INCREMENT'] - 1;\n return $lastid;\n }", "public function getLastId()\n {\n return $this->deliveryTypeMapper->getLastId();\n }", "public function getLastId()\n {\n $query = new Query();\n\n $result = $query->select(['Max(id) as ProjectID'])\n ->from('project_pii')\n ->where(['status' => 1])\n ->one();\n\n if(count($result) > 0) {\n return $result['ProjectID'] + 1;\n\n }else{\n return 0;\n\n }\n\n }", "public function lastid() {\n return $this->connection->insert_id;\n }", "public function lastId() {\n return $this->dbh->lastInsertId();\n }", "public function __get_last_id()\n {\n $this->__last_id = $this->__db\n ::getPdo()\n ->lastInsertId()\n ;\n }", "public function getLastId()\n\t\t{\n\t\t\t$sql = 'SELECT LAST_INSERT_ID()';\n\t\t\t$result = $this->_db->fetchAll($sql);\n\t\t\t$result = $result[0]['LAST_INSERT_ID()'];\n\t\t\treturn $result;\n\t\t}", "public function myLastInsertId()\n {\n $myId = 0;\n $sql = \"SELECT @@IDENTITY AS mixLastId;\";\n $statement = $this->adapter->query($sql);\n //$results = $statement->execute(array('id' => 1));\n $results = $statement->execute();\n foreach($results as $row){\n $myId = $row['mixLastId'];\n }\n return $myId;\n }", "public function lastId(){\n \t return $this->_lastInsertID;\n }", "public static function getLastId($index_name='kd_plusmin')\n {\n $index = \"MAX(\".$index_name.\")\";\n $lat=SELF::find()->SELECT([$index])->scalar();\n if($lat){\n return (int)$lat+1;\n }else { return 1;}\n }", "abstract function lastInsertId();", "public static function getLastId()\n {\n return self::$pdo_connection->lastInsertId();\n }", "public function getlastid()\n\t{\n\t\treturn mysqli_insert_id($this->conn);\n\t}", "public function getLastInsertId ()\n\t{\n\t\treturn $this->lastId;\n\t}", "private function getLastId() {\n $shows = $this->showList;\n $id = 0;\n\n foreach($shows as $show) {\n if($id <= $show->getId()) {\n $id = $show->getId();\n $id++;\n }\n }\n return $id == 0 ? 1 : $id; // Si no hay ninguno creado, arranca con el id 1\n }", "function lastid()\n\t{\n\t\tglobal $dbConn;\n\t\treturn mysqli_insert_id($dbConn);\n\t}", "function lastid (){\n global $db;\n $sql = \"SELECT LAST_INSERT_ID() AS ID;\";\n $qry = $db->sqlQuery($sql);\n $row = $db->sqlFetchArray($qry);\n return $row['ID'];\n }", "public function last_id() {\n return $this->_db->lastInsertId();\n }", "public function lastGeneratedId(){\n\t\treturn $this->link->insert_id;\n\t}", "public function getLastId() \r\n\t{\r\n\t\treturn @mysql_insert_id();\r\n }", "public static function lastID($db){\n\t\t\treturn $db->lastInsertId(); \n\t\t}", "public function getLastId()\n {\n return Db::getLastInsertedId();\n }", "public function getLastBatchId()\n {\n return $this->db_last_id;\n }", "public function lastId(){\n\t\treturn mysql_insert_id();\n\t}", "function lastId() {\n $last = DB::select(DB::raw('SELECT LAST_INSERT_ID()'));\n return collect($last[0])->toArray()[\"LAST_INSERT_ID()\"];\n}", "private function getLastInsertId(){\n\t\t$query = \"SELECT LAST_INSERT_ID() AS last\";//sud specify the table\n\t\t$result =$this->db->query($query);\n\t\t$result = $result->result_array();\n\t\treturn $result[0]['last'];\n\n\t}", "function dbLastInsertID() {\n $db = getDB();\n $stmt = $db->query(\"SELECT LAST_INSERT_ID()\");\n $lastId = $stmt->fetch();\n $lastId = $lastId[0];\n return $lastId;\n}", "public function getLastInsertID();", "function lastInsertId ()\n {\n }", "function _getLastID()\n \t{\n \t\t$this->db->select('SUBSTRING(max(id),3,4) as id', FALSE)->from('breeder');\n \t\t$query = $this->db->get();\n \t\treturn $query->row();\n \t}", "public function currentMap() : string\r\n {\r\n return $this->currentMaps()['current'];\r\n }", "function lastID(){ \n \t switch ($this->tipo){ \n\t\t\tcase 'mysql': \n\t\t\t\t return mysqli_insert_id($this->conexion); \n\t\t\tbreak; \n\t\t\tcase 'sqlite':\n\t\t\t\treturn $this->sqlite->lastInsertRowID();\n\t\t\tbreak; \n }\n }", "public function lastInsertId() {\n\t\treturn $this->_lastID;\n\t}", "public function lastID()\n\t\t{\n\t\t\treturn $this->adapter->lastInsertId();\n\t\t}", "public static function last_insert_id() {\r\n//\t\t$filas = self::get_rows($sql);\r\n//\t\treturn $filas[0]['id'];\r\n\t\t\r\n\t\treturn mysqli_insert_id(self::$connection);\r\n\t\t\r\n\t}", "function getNextGenomeID() {\n\t\t$row = $this->q(\"SELECT `ID` FROM `genomes` WHERE `ID` > (SELECT `genome` FROM `analytics` ORDER BY `ID` DESC LIMIT 1) AND `generation` = (SELECT MAX(`generation`) FROM `genomes`) LIMIT 1\");\n\t\tif (empty($row)) $row = $this->q(\"SELECT `ID` FROM `genomes` WHERE `generation` = (SELECT MAX(`generation`) FROM `genomes`) LIMIT 1\");\n\t\treturn $row[0]['ID'];\n\t}" ]
[ "0.77103436", "0.7489575", "0.74176776", "0.7188051", "0.71220726", "0.70019704", "0.69687474", "0.69665563", "0.69562966", "0.69548583", "0.68966436", "0.6889395", "0.6886641", "0.6886641", "0.6846938", "0.6827268", "0.6818967", "0.68171406", "0.6771792", "0.67313457", "0.67272663", "0.67240644", "0.67133737", "0.6701332", "0.6681963", "0.66799337", "0.6668307", "0.6663073", "0.66562366", "0.6652411", "0.6632793", "0.6626199", "0.6620495", "0.661807", "0.66011345", "0.6587447", "0.65750974", "0.65560097", "0.65386814", "0.6531611", "0.6530829", "0.6518545", "0.6506602", "0.6501553", "0.6500527", "0.64920545", "0.64690745", "0.6458587", "0.64549637", "0.6448512", "0.64453083", "0.64384127", "0.64169914", "0.64136565", "0.64080906", "0.6404302", "0.6399271", "0.6397318", "0.6387292", "0.6385779", "0.6380757", "0.6380175", "0.6375948", "0.6372578", "0.6367223", "0.6365132", "0.6364032", "0.636334", "0.63559914", "0.63550067", "0.6351747", "0.6350774", "0.6347877", "0.633724", "0.6332849", "0.6325075", "0.63209975", "0.6314218", "0.6310472", "0.63069123", "0.6304469", "0.6297588", "0.62960684", "0.62916815", "0.628675", "0.6285583", "0.62725794", "0.6271973", "0.62706554", "0.6268915", "0.62642026", "0.6252511", "0.6252218", "0.6249206", "0.6238462", "0.62380195", "0.62204945", "0.6210238", "0.6206552", "0.62059796" ]
0.816219
0
Return a stdClass object of info associated with a posts thumbnail.
Вернуть объект stdClass с информацией, связанной с миниатюрой поста.
function pm_get_post_thumbnail( $size=null, $post_id=null ) { if( $post_id ) { $post = get_post( $post_id ); } else { global $post; } if ( has_post_thumbnail( $post->ID ) ) { $thumb = new stdClass(); // get/set thumbnail id $thumb->id = get_post_thumbnail_id( $post->ID ); // get thumb src based on provided size $thumb_src = ( $size ) ? wp_get_attachment_image_src( $thumb->id , $size ) : null; // get thumbnail post data $post_data = get_post( $thumb->id ); $post_meta = get_post_meta( $thumb->id ); // load more meta $post_attachment_meta = ( isset( $post_meta['_wp_attachment_metadata'][0] ) ) ? unserialize( $post_meta['_wp_attachment_metadata'][0] ) : null; // load credit from custom field $thumb->credit = ( isset( $post_meta['_pm_attachment_credit'][0] ) ) ? $post_meta['_pm_attachment_credit'][0] : null; // set thumb properties $thumb->title = $post_data->post_title; $thumb->description = $post_data->post_content; //$thumb->caption = $post_data->post_excerpt; $thumb->caption = ( !empty( $post_data->post_excerpt ) ) ? $post_data->post_excerpt : $thumb->description; // fall back to description as this was normally populated $thumb->url = ( $thumb_src ) ? $thumb_src[0] : $post_data->guid; $thumb->width = ( $thumb_src ) ? $thumb_src[1] : ( ( $post_attachment_meta ) ? $post_attachment_meta['width'] : '' ); $thumb->height = ( $thumb_src ) ? $thumb_src[2] : ( ( $post_attachment_meta ) ? $post_attachment_meta['height'] : '' ); $thumb->alt = $post->post_title; // title of post // ALT: check if alt then excerpt available to replace title if ( isset( $post_meta['_wp_attachment_image_alt'][0] ) && strlen( trim( $post_meta['_wp_attachment_image_alt'][0] ) ) > 0 ) $thumb->alt = $post_meta['_wp_attachment_image_alt'][0]; // alt of image else if ( !empty( $post_data->post_excerpt ) ) $thumb->alt = $post_data->post_excerpt; // caption of image else if ( !empty( $post_data->post_title ) ) $thumb->alt = $post_data->post_title; // title of image // description not wanted as an alt fallback //else if ( !empty( $post_data->post_content ) ) // $thumb->alt = strip_tags( $post_data->post_content ); return $thumb; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getThumbnail() {\r\n\treturn $this->_imageInfo[\"h\"][\"Thumbnail\"];\r\n }", "function the_image_info() {\n\tglobal $post;\n\tif(!$post->thumb_url) {\n\t\timage_setup($post);\n\t}\n\treturn $post->image_info;\n}", "function build_post_obj($post) {\n return array(\n 'link' => get_permalink($post),\n 'post' => $post,\n 'thumbnail' => get_the_post_thumbnail_url($post, 'full')\n );\n }", "public function getThumbnail();", "function get_thumb ($post_ID){\n $thumbargs = array(\n 'post_type' => 'attachment',\n 'numberposts' => 1,\n 'post_status' => null,\n 'post_parent' => $post_ID\n );\n $thumb = get_posts($thumbargs);\n if ($thumb) {\n return wp_get_attachment_image($thumb[0]->ID);\n }\n}", "function acf_get_post_thumbnail($post = \\null, $size = 'thumbnail') {}", "abstract public function getThumbnail();", "function getThumbnail ()\r\n \t{\r\n \t\r\n \t return $this->image;\r\n \t\r\n \t}", "function WBC3_api_get_post_thumbnail( $blog_id = null, $post_id = null ) {\r\n\r\n\t$post_thumbnail = '';\r\n\r\n\tif( isset( $blog_id ) && isset( $post_id ) ) {\r\n\t\t\r\n\t\tif( has_post_thumbnail( $post_id ) && ( 'standard' == get_post_meta( $post_id, 'template_type', true ) ) ) {\r\n\t\t\t\r\n\t\t\t// featured image\r\n\t\t\t$image_id = get_post_thumbnail_id( $post_id );\r\n\t\t\t\r\n\t\t\t// resize image\r\n\t\t\t$resized_featured_image = vt_resize( $image_id, NULL, 300, 169, true );\r\n\t\t\t\r\n\t\t\tif( !empty( $resized_featured_image ) ) {\r\n\t\t\t\t$post_thumbnail = $resized_featured_image['url'];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} elseif( class_exists( 'MultiPostThumbnails' ) && MultiPostThumbnails::get_the_post_thumbnail( 'post', 'square-image', $post_id ) ) {\r\n\r\n\t\t\t// square image\r\n\t\t\t$image_id = MultiPostThumbnails::get_post_thumbnail_id( 'post', 'square-image', $post_id );\r\n\r\n\t\t\t// resize image\r\n\t\t\t$resized_square_image = vt_resize( $image_id, NULL, 300, 300, true );\r\n\t\t\t\r\n\t\t\tif( !empty( $resized_square_image ) ) {\r\n\t\t\t\t$post_thumbnail = $resized_square_image['url'];\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\r\n\t\t\t// check for images embedded in content\r\n\r\n\t\t\t// never call the thumbnail generator unless the post has been published\r\n\t\t\tif( 'publish' == get_post_status( $post_id ) ) {\r\n\t\t\t\t$post_thumbnail = ppi_get_post_thumbnail_url( 'o', $blog_id, $post_id );\r\n\t\t\t\terror_log( 'IMAGE THUMB 1 - ppi_get_post_thumbnail_url() ' . $post_thumbnail );\r\n\t\t\t}\r\n\r\n\t\t\tif( !empty( $post_thumbnail ) ) {\r\n\t\t\t\t$post_thumbnail = apply_filters( 'cdn_wrapper', $post_thumbnail );\r\n\t\t\t\terror_log( 'IMAGE THUMB 2 - cdn_wrapper() ' . $post_thumbnail );\r\n\t\t\t} else {\r\n\t\t\t\t$post_thumbnail = ''; // don't send false or 0 ever; CSR-169\r\n\t\t\t}\r\n\r\n\t\t\terror_log( 'IMAGE THUMB FINAL ' . $post_thumbnail );\r\n\t\t\t\t\t\r\n\t\t}\r\n\t}\r\n\r\n\treturn $post_thumbnail;\r\n}", "public static function get_thumbnail_data( $thumbnail_id ) {\n\t\t$img_src = wp_get_attachment_image_src( $thumbnail_id, 'full' );\n\t\tlist ( $src, $width, $height ) = $img_src;\n\t\t$generated = (bool) get_post_meta( $thumbnail_id, self::POSTER_POST_META_KEY, true );\n\t\treturn compact( 'src', 'width', 'height', 'generated' );\n\t}", "private function get_thumbnail() {\n return get_the_post_thumbnail($this->product_id);\n }", "public function getThumbnailImageAttribute()\n {\n $photo = $this->getFirstPhotoTo([\"use\"=>\"thumbnail\"]);\n return $photo ? $photo : new stdClass;\n }", "private function getThumb() { return $this->thumb; }", "public function getThumbnail()\n {\n return $this->thumbnail;\n }", "public function getThumbnail()\n {\n return $this->thumbnail;\n }", "public function getPostThumbnailImage()\n\t{\n\t\treturn $this->_getImagePath('post-thumbnail');\n\t}", "function get_thumbnail() {\n \n $sizes = get_intermediate_image_sizes();\n\n array_unshift($sizes, 'full');\n \n foreach ( $sizes as $size ) {\n $thumbs[$size] = wp_get_attachment_image_src( $this->get__thumbnail_id(), $size );\n }\n\n return apply_filters(\"tainacan-item-get-thumbnail\", $thumbs, $this);\n }", "function getImageStd($imageId){\n $image = new stdClass();\n $image->url = wp_get_attachment_image_url($imageId, 'large');\n $image->title = get_the_title($imageId);\n $image->caption = wp_get_attachment_caption($imageId);\n\n return $image;\n}", "function wpex_blog_entry_thumbnail( $args = '' ) {\n\techo wpex_get_blog_entry_thumbnail( $args );\n}", "public function getThumbnail()\n {\n if (!isset($this->thumbnail)) {\n $this->thumbnail = $this->getByMetaProperty('og:image');\n }\n\n return $this->thumbnail;\n }", "function get_post_thumbnail_id($post = \\null)\n{\n}", "function wpex_get_staff_post_thumbnail() {\n\n // Define thumbnail args\n $args = array(\n 'size' => 'staff_post',\n 'class' => 'staff-single-media-img',\n 'alt' => wpex_get_esc_title(),\n );\n\n // Apply filters\n $args = apply_filters( 'wpex_get_staff_post_thumbnail_args', $args );\n\n // Return thumbanil\n return wpex_get_post_thumbnail( $args );\n\n}", "public function getThumbnail()\n {\n if (! isset($this->source->thumbnail)) {\n return null;\n }\n\n return $this->thumbnail ?: $this->thumbnail = Subdef::fromValue($this->source->thumbnail);\n }", "function getArrayPostInfo($wpPost, $thumbSize=array('450', 450))\n{\n // $image_post = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'nix-croche-thumb-88-88' );\n $postId = $wpPost->ID;\n $image_post = wp_get_attachment_image_src(get_post_thumbnail_id($postId), $thumbSize);\n $link_post = get_permalink($wpPost);\n $title_post = get_the_title($wpPost);\n $excerpt = get_the_excerpt($wpPost);\n $mes_post = acerta_nome_mes(get_the_date(\"M\", $wpPost));\n $dia_post = get_the_date(\"d\", $wpPost);\n $author = get_author_name($wpPost);\n $totComment = get_comments_number($wpPost);\n $urlDownload = get_field('url_download', $postId);\n $qtdDownload = get_field('qt_downloads', $postId);\n\n $tag_id = \"\";\n $tag_post = \"\";\n $tag_url = \"\";\n $posttags = get_the_tags($wpPost);\n if ($posttags) {\n foreach ($posttags as $tag) {\n $tag_id = $tag->term_id;\n $tag_post = $tag->name;\n $tag_url = 'https://crochepassoapasso.com.br/categoria-receitas-graficos/' . $tag->slug;\n }\n }\n \n $cat_id = \"\";\n $cat_post = \"\";\n $cat_url = \"\";\n $postcats = get_the_category($wpPost);\n if ($postcats) {\n foreach ($postcats as $cat) {\n $cat_id = $cat->term_id;\n $cat_post = $cat->name;\n $cat_url = 'https://crochepassoapasso.com.br/sessao/' . $cat->slug;\n }\n }\n\n return array(\n 'ID' => $postId,\n 'img' => $image_post[0],\n 'link' => $link_post,\n 'title' => $title_post,\n 'excerpt' => $excerpt,\n 'tag_id' => $tag_id,\n 'tag' => $tag_post,\n 'tagUrl' => $tag_url,\n 'cat_id' => $cat_id,\n 'cat' => $cat_post,\n 'catUrl' => $cat_url,\n 'date' => $dia_post . \"/\" . ucfirst($mes_post),\n 'author' => $author,\n 'totComment' => $totComment,\n 'urlDownload' => $urlDownload,\n 'qtdDownload' => $qtdDownload,\n );\n}", "function get_the_post_thumbnail($post = \\null, $size = 'post-thumbnail', $attr = '')\n{\n}", "function wpex_blog_post_thumbnail( $args = '' ) {\n\techo wpex_get_blog_post_thumbnail( $args );\n}", "function wpex_get_blog_entry_thumbnail( $args = '' ) {\n\n\t// If args isn't array then it's the attachment\n\tif ( $args && ! is_array( $args ) ) {\n\t\t$args = array(\n\t\t\t'attachment' => $args,\n\t\t);\n\t}\n\n\t// Define thumbnail args\n\t$defaults = array(\n\t\t'attachment' => get_post_thumbnail_id(),\n\t\t'size' => 'blog_entry',\n\t\t'alt' => wpex_get_esc_title(),\n\t\t'width' => '',\n\t\t'height' => '',\n\t\t'class' => '',\n\t\t'apply_filters' => 'wpex_blog_entry_thumbnail_args',\n\t);\n\n\t// Parse arguments\n\t$args = wp_parse_args( $args, $defaults );\n\n\t// Custom sizes for categories\n\tif ( is_category() ) {\n\n\t\t// Get term data\n\t\t$term = get_query_var('cat');\n\t\t$term_data = get_option(\"category_$term\");\n\n\t\t// Width\n\t\tif ( ! empty( $term_data['wpex_term_image_width'] ) ) {\n\t\t\t$args['size'] = 'wpex_custom';\n\t\t\t$args['width'] = $term_data['wpex_term_image_width'];\n\t\t}\n\n\t\t// height\n\t\tif ( ! empty( $term_data['wpex_term_image_height'] ) ) {\n\t\t\t$args['size'] = 'wpex_custom';\n\t\t\t$args['height'] = $term_data['wpex_term_image_height'];\n\t\t}\n\n\t}\n\n\t// Generate thumbnail and apply filters\n\treturn apply_filters( 'wpex_blog_entry_thumbnail', wpex_get_post_thumbnail( $args ) );\n\n}", "public function fetch_data() {\n\t\tstatic $cache_thumbnail = [];\n\n\t\tif ( ! $this->exists() ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tif ( null !== $this->data ) {\n\t\t\treturn $this->data;\n\t\t}\n\n\t\t$image_sizes = $this->get_image_sizes();\n\t\t$thumbnail_id = $this->thumbnail_id;\n\n\t\t$cache_key = empty( $thumbnail_id ) ? -1 : $thumbnail_id;\n\n\t\tif ( empty( $cache_thumbnail[ $cache_key ] ) ) {\n\t\t\t$thumbnail_data = array_combine(\n\t\t\t\t$image_sizes,\n\t\t\t\tarray_map(\n\t\t\t\t\tstatic function( $size ) use ( $thumbnail_id ) {\n\t\t\t\t\t\tstatic $cache_size_data = [];\n\n\t\t\t\t\t\t$size_data_cache_key = empty( $thumbnail_id ) ? -1 : $thumbnail_id;\n\t\t\t\t\t\t$size_data_cache_key = \"{$size_data_cache_key}:{$size}\";\n\n\t\t\t\t\t\tif ( ! isset( $cache_size_data[ $size_data_cache_key ] ) ) {\n\t\t\t\t\t\t\t$cache_size_data[ $size_data_cache_key ] = wp_get_attachment_image_src( $thumbnail_id, $size );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$size_data = $cache_size_data[ $size_data_cache_key ];\n\n\t\t\t\t\t\tif ( false === $size_data ) {\n\t\t\t\t\t\t\treturn (object) [\n\t\t\t\t\t\t\t\t'url' => '',\n\t\t\t\t\t\t\t\t'width' => '',\n\t\t\t\t\t\t\t\t'height' => '',\n\t\t\t\t\t\t\t\t'is_intermediate' => false,\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn (object) [\n\t\t\t\t\t\t\t'url' => Arr::get( $size_data, 0, '' ),\n\t\t\t\t\t\t\t'width' => Arr::get( $size_data, 1, '' ),\n\t\t\t\t\t\t\t'height' => Arr::get( $size_data, 2, '' ),\n\t\t\t\t\t\t\t'is_intermediate' => (bool) Arr::get( $size_data, 3, false ),\n\t\t\t\t\t\t];\n\t\t\t\t\t},\n\t\t\t\t\t$image_sizes\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$srcset = wp_get_attachment_image_srcset( $thumbnail_id );\n\t\t\t$thumbnail_data['srcset'] = ! empty( $srcset ) ? $srcset : false;\n\n\t\t\t$title = get_the_title( $thumbnail_id );\n\t\t\t$thumbnail_data['title'] = ! empty( $title ) ? $title : false;\n\n\t\t\t$alt = trim( strip_tags( get_post_meta( $thumbnail_id, '_wp_attachment_image_alt', true ) ) );\n\t\t\t$thumbnail_data['alt'] = ! empty( $alt ) ? $alt : false;\n\n\t\t\t$cache_thumbnail[ $cache_key ] = $thumbnail_data;\n\t\t}\n\n\t\t/**\n\t\t * Filters the post thumbnail data and information that will be returned for a specific post.\n\t\t *\n\t\t * Note that the thumbnail data will be cast to an object after this filtering.\n\t\t *\n\t\t * @since 4.9.14\n\t\t *\n\t\t * @param array $thumbnail_data The thumbnail data for the post.\n\t\t * @param int $post_id The ID of the post the data is for.\n\t\t */\n\t\t$thumbnail_data = apply_filters( 'tribe_post_thumbnail_data', $cache_thumbnail[ $cache_key ], $this->post_id );\n\n\t\t$this->resolved();\n\n\t\treturn $thumbnail_data;\n\t}", "function athen_get_staff_post_thumbnail() {\n\n // Define thumbnail args\n $args = array(\n 'size' => 'staff_post',\n 'class' => 'staff-single-media-img',\n 'alt' => athen_get_esc_title(),\n );\n\n // Apply filters\n $args = apply_filters( 'athen_get_staff_post_thumbnail_args', $args );\n\n // Return thumbanil\n return athen_get_post_thumbnail( $args );\n\n}", "function wp_ajax_get_post_thumbnail_html()\n{\n}", "function cardealer_get_attachment_detail( $attachment_id ) {\r\n\t$attachment = get_post( $attachment_id );\r\n\treturn array(\r\n\t\t'alt' => get_post_meta( $attachment->ID, '_wp_attachment_image_alt', true ),\r\n\t\t'caption' => $attachment->post_excerpt,\r\n\t\t'description' => $attachment->post_content,\r\n\t\t'href' => get_permalink( $attachment->ID ),\r\n\t\t'src' => $attachment->guid,\r\n\t\t'title' => $attachment->post_title\r\n\t);\r\n}", "function get_post_thumbnail_url( $size = 'full', $post_id = false, $icon = false )\n{\n if(!$post_id) {\n $post_id = get_the_ID();\n }\n\n $thumb_url_array = wp_get_attachment_image_src(get_post_thumbnail_id( $post_id ), $size, $icon);\n return $thumb_url_array[0];\n}", "public function getThumb()\n {\n return $this->thumb;\n }", "function karmic_post_thumbnail() {\n if( ! karmic_can_show_post_thumbnail( ) ) {\n return;\n }\n\n if( is_singular( ) ) : ?>\n <figure class=\"post-thumbnail\">\n <?php get_the_post_thumbnail(); ?>\n </figure>\n\n <?php else : ?>\n\n <figure class=\"post-thumbnail\">\n <a class=\"post-thumbnail-inner\" src=\"<?php the_permalink(); ?>\" aria-hidden=\"true\" tabindex=\"-1\">\n <?php get_the_post_thumbnail(); ?>\n </a>\n </figure>\n <?php endif; // End is_singular\n }", "function retrieve_post_meta($post, $thumb_size, $excrpt_len) {\n\t\t// get the post object by its ID we got from the DB by wp_query earlier\n\t\t$post_post = get_post($post, 'display');\n\t\t$post_author = get_user_by('id', apply_filters('the_author', $post_post->post_author))->display_name;\n\n\t\t$post_categories = list_categories('div', 'categories small-txt-75', apply_filters('the_category', $post_post->post_category), '');\n\t\t$post_date = get_the_date('', $post);\n\t\t$post_excerpt = excerpt_str_by_words(apply_filters('the_excerpt', $post_post->post_excerpt), $excrpt_len);\n\t\t$post_link = get_permalink($post);\n\t\t$post_thumb = get_the_post_thumbnail_url($post, $thumb_size);\n\t\t$post_title = apply_filters( 'the_title', $post_post->post_title );\n\n\t\t$out = array(\n\t\t\tauthor => $post_author, \n\t\t\tcategories => $post_categories, \n\t\t\tdate => $post_date, \n\t\t\texcerpt => $post_excerpt, \n\t\t\tlink => $post_link, \n\t\t\tthumb => $post_thumb, \n\t\t\ttitle => $post_title\n\t\t);\n\t\treturn $out;\n\t}", "function wp_get_attachment_thumb_file($post_id = 0)\n{\n}", "function post_thumbnail_meta_box($post)\n{\n}", "function wpex_get_blog_post_thumbnail( $args = '' ) {\n\n\t$supports_thumbnail = ( 'audio' == get_post_format() ) ? false : true;\n\n\tif ( ! apply_filters( 'wpex_blog_post_supports_thumbnail', $supports_thumbnail ) ) {\n\t\treturn;\n\t}\n\n\t// If args isn't array then it's the attachment\n\tif ( ! is_array( $args ) && ! empty( $args ) ) {\n\t\t$args = array(\n\t\t\t'attachment' => $args,\n\t\t\t'alt' => wpex_get_esc_title(),\n\t\t\t'width' => '',\n\t\t\t'height' => '',\n\t\t\t'class' => '',\n\t\t\t'schema_markup' => false,\n\t\t);\n\t}\n\n\t// Defaults\n\t$defaults = array(\n\t\t'size' => 'blog_post',\n\t\t'schema_markup' => true,\n\t\t'alt' => wpex_get_esc_title(),\n\t\t'apply_filters' => 'wpex_blog_post_thumbnail_args',\n\t);\n\n\t// Parse arguments\n\t$args = wp_parse_args( $args, $defaults );\n\n\t// Change size for above media\n\tif ( 'above' == get_post_meta( get_the_ID(), 'wpex_post_media_position', true ) ) {\n\t\t$args['size'] = 'blog_post_full';\n\t}\n\n\t// Generate thumbnail\n\t$thumbnail = wpex_get_post_thumbnail( $args );\n\n\t// Apply filters for child theming\n\treturn apply_filters( 'wpex_blog_post_thumbnail', $thumbnail );\n\n}", "function wpex_get_staff_entry_thumbnail() {\n\n // Define thumbnail args\n $args = array(\n 'size' => 'staff_entry',\n 'class' => 'staff-entry-img',\n 'alt' => wpex_get_esc_title(),\n );\n\n // Apply filters\n $args = apply_filters( 'wpex_get_staff_entry_thumbnail_args', $args );\n\n // Return thumbanil\n return wpex_get_post_thumbnail( $args );\n\n}", "function anatomy_post_thumbnail() {\n global $post_id;\n $post_thumbnail = get_the_post_thumbnail( $post_id, 'thumbnail' );\n if ( empty( $post_thumbnail ) ) {\n // If the thumbnail isn't set, try to get the first image or just use the default\n global $post, $posts;\n $first_img = '';\n ob_start();\n ob_end_clean();\n $output = preg_match_all('/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', $post->post_content, $matches);\n $first_img_url = isset( $matches[1][0] ) ? $matches[1][0] : null;\n $attachment_id = get_attachment_id_from_src( $first_img_url );\n $first_img = !empty( $attachment_id ) ? wp_get_attachment_thumb_url( $attachment_id ) : null;\n if ( empty( $attachment_id ) and !empty( $first_img_url ) ) {\n // External URL\n $first_img = $first_img_url;\n } elseif ( empty( $first_img ) ) {\n // No images at all\n $first_img = null;\n }\n $post_thumbnail = $first_img ? '<img src=\"'.$first_img.'\" class=\"wp-post-image attachment-thumbnail\">' : null;\n }\n return $post_thumbnail;\n}", "function WBC3_get_featured_image_meta( $post_id = null, $type = 'featured' ) {\r\n\t\r\n\tglobal $post;\r\n\t$post_id = ( isset( $post_id ) ) ? $post_id : $post->ID;\r\n\r\n\t// get the featured image id\r\n\tswitch( $type ) {\r\n\t\tcase 'featured':\r\n\t\t\t$image_id = get_post_thumbnail_id( $post_id );\r\n\t\tbreak;\r\n\t\t\r\n\t\tcase 'square':\r\n\t\t\t$image_id = MultiPostThumbnails::get_post_thumbnail_id( 'post', 'square-image', $post_id );\r\n\t\tbreak;\r\n\t}\r\n\t\r\n\tif( $image_id ) {\r\n\r\n\t\t$image_meta = array();\r\n\r\n\t\t// get image src, width, height\r\n\t\t$image_data = wp_get_attachment_image_src( $image_id, 'large' );\r\n\t\t\r\n\t\t// set url, width, height\r\n\t\tif( $image_data ) {\r\n\r\n\t\t\t// check for Company Life post\r\n\t\t\t$subtype = get_post_meta( $post_id, 'WBC3_subtype', true );\r\n\t\t\t\r\n\t\t\tif( $subtype == 'companylife' ) {\r\n\r\n\t\t\t\t$resized_image = vt_resize( $image_id, NULL, 1152, 1152, false );\r\n\t\t\t\t\r\n\t\t\t\tif( !empty( $resized_image ) ) {\r\n\t\t\t\t\t$image_meta['url'] = $resized_image['url'];\r\n\t\t\t\t\t$image_meta['width'] = $resized_image['width'];\r\n\t\t\t\t\t$image_meta['height'] = $resized_image['height'];\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\t$image_meta['url'] = $image_data[0];\r\n\t\t\t\t$image_meta['width'] = $image_data[1];\r\n\t\t\t\t$image_meta['height'] = $image_data[2];\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// get image title, caption, description\r\n\t\t$image = get_posts( array(\r\n\t\t\t'p' => $image_id,\r\n\t\t\t'post_type' => 'attachment',\r\n\t\t\t'posts_per_page' => 1\r\n\t\t) );\r\n\t\t\r\n\t\t// set title, caption, description\r\n\t\tif( $image && isset( $image[0] ) ) {\r\n\t\t\t$image_meta['title'] = $image[0]->post_title;\r\n\t\t\t$image_meta['caption'] = $image[0]->post_excerpt;\r\n\t\t\t$image_meta['description'] = $image[0]->post_content;\r\n\t\t}\r\n\r\n\t\t// set alt text\r\n\t\t$alt = get_post_meta( $image_id, '_wp_attachment_image_alt', true );\r\n\t\t\r\n\t\tif( !empty( $alt ) ) {\r\n\t\t\t$image_meta['alt'] = $alt;\r\n\t\t}\r\n\t} else {\r\n\t\t$image_meta = null;\r\n\t}\r\n\t\r\n\treturn $image_meta;\r\n}", "static public function getThumb($obj,$smallthumb=false) {\n $image = self::getImage($obj);\n\n $thumb = new AMProjectThumb($smallthumb);\n\ttry {\n\t\t$thumb->codeFile = $image;\n\t try {\n \t\t$thumb->load();\n \t}catch(CMDBException $e) {\n \t\tnew AMErrorReport($e, 'AMProjectImage::getThumb', AMLog::LOG_PROJECTS);\n \t}\n\t}catch (CMObjEPropertieValueNotValid $e) { \n\t\t$thumb->type = self::DEFAULT_IMAGE;\n\t}\n\t\n return $thumb;\n }", "public function getThumb()\r\n\t{\r\n\t\tif($this->PhotoID && $this->Photo())\r\n\t\t\treturn $this->Photo()->CMSThumbnail();\r\n\t\telse\t\r\n\t\t\treturn '(No Image)';\r\n\t}", "static public function method_get_thumbnail(ImageActiveRecord $ar)\n\t{\n\t\treturn self::method_thumbnail($ar, 'primary');\n\t}", "function vira_post_thumbnail()\n {\n if (!vira_can_show_post_thumbnail()) {\n return;\n }\n\n if (is_singular()) :\n ?>\n\n <figure class=\"post-thumbnail\">\n <?php the_post_thumbnail(); ?>\n </figure><!-- .post-thumbnail -->\n\n <?php\n else :\n ?>\n\n <figure class=\"post-thumbnail\">\n <a class=\"post-thumbnail-inner\" href=\"<?php the_permalink(); ?>\" aria-hidden=\"true\" tabindex=\"-1\">\n <?php the_post_thumbnail('post-thumbnail'); ?>\n </a>\n </figure>\n\n <?php\n endif; // End is_singular().\n }", "public function getThumb()\n\t\t{\n\t\t\tif($this->PhotoID && $this->Photo())\n\t\t\t\treturn $this->Photo()->CMSThumbnail();\n\t\t\telse\t\n\t\t\t\treturn '(No Image)';\n\t\t}", "function capezzahill_post_thumbnail() {\r\n if ( ! capezzahill_can_show_post_thumbnail() ) {\r\n return;\r\n }\r\n\r\n if ( is_singular() ) :\r\n ?>\r\n <figure class=\"post-thumbnail\">\r\n <?php the_post_thumbnail(); ?>\r\n </figure><!-- .post-thumbnail -->\r\n <?php \r\n else:\r\n ?>\r\n\r\n <figure class=\"post-thumbnail\">\r\n <a href=\"<?php the_permalink(); ?>\" class=\"post-thumbnail-inner\" aria-hidden=\"true\" tabindex=\"-1\" >\r\n <?php the_post_thumbnail( 'post-thumbnail' ); ?>\r\n </a>\r\n </figure>\r\n <?php\r\n endif; // End is_singular().\r\n }", "function featured_image_in_post( ) {\n global $post;\n $thumbnail_id = get_post_thumbnail_id($post->ID);\n $thumbnail_details = get_posts(array('p' => $thumbnail_id, 'post_type' => 'attachment'));\n $thumbnail_src = wp_get_attachment_image_src( $thumbnail_id, 'category-thumb' );\n $thumbnail_width = $thumbnail_src[1];\n\n if ($thumbnail_src && isset($thumbnail_src[0])) {\n echo '<div class=\"featured-image\">';\n the_post_thumbnail( 'large', array( 'class'=>'img-responsive' ) );\n if ( !empty( $thumbnail_details[0]->post_excerpt ) ) {\n echo '<p class=\"featured-image-caption\">';\n echo $thumbnail_details[0]->post_excerpt;\n echo '</p>';\n }\n echo '</div>';\n }\n}", "function su_get_post_image( $post_id = false ) {\n\n\t\tglobal $post;\n\n\t\t$id = ( $post_id ) ? $post_id : $post->ID;\n\t\t$default = su_plugin_url() . '/images/thumbnail.png';\n\t\t$timthumb = su_plugin_url() . '/lib/timthumb.php';\n\t\t$meta = 'thumbnail';\n\n\t\t// Check post-thumbnails theme support\n\t\tif ( !current_theme_supports( 'post-thumbnails' ) )\n\t\t\tadd_theme_support( 'post-thumbnails' );\n\n\t\t// Get post attachments\n\t\t$attachments = get_posts( array(\n\t\t\t'post_type' => 'attachment',\n\t\t\t'numberposts' => 1,\n\t\t\t'order' => 'ASC',\n\t\t\t'post_status' => null,\n\t\t\t'post_parent' => $id\n\t\t\t) );\n\n\t\t### Post thumbnail ###\n\t\tif ( has_post_thumbnail( $id ) ) {\n\t\t\t$image = wp_get_attachment_image_src( get_post_thumbnail_id( $id ), 'full' );\n\t\t\t$src = $image[0];\n\t\t}\n\n\t\t### Meta field ###\n\t\telseif ( get_post_meta( $id, $meta, true ) ) {\n\t\t\t$src = get_post_meta( $id, $meta, true );\n\t\t}\n\n\t\t### First post attachment ###\n\t\telseif ( $attachments ) {\n\t\t\t$vars = get_object_vars( $attachments[0] );\n\t\t\t$src = $vars['guid'];\n\t\t}\n\n\t\t### First post_content image ###\n\t\telse {\n\t\t\tob_start();\n\t\t\tob_end_clean();\n\t\t\t$output = preg_match_all( '/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', $post->post_content, $matches );\n\t\t\t$src = $matches[1][0];\n\t\t}\n\n\t\t### Default image ###\n\t\tif ( empty( $src ) ) {\n\t\t\t$src = $default;\n\t\t}\n\n\t\treturn $src;\n\t}", "function inf_get_post_image( $size, $post_id = null ) {\n global $post;\n\n if ( ! $post_id ) {\n $post_id = $post->ID;\n }\n\n if ( has_post_thumbnail( $post_id ) ) {\n $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post_id ), $size );\n $image_src = $image[0];\n $image_width = $image[1];\n $image_height = $image[2];\n } else {\n $image = IMAGE_URL . 'no-image-' . $size . '.jpg';\n $image_src = $image;\n $image_width = 1440;\n $image_height = 700;\n }\n\n return [\n 'image' => esc_url( $image_src ),\n 'width' => $image_width,\n 'height' => $image_height,\n ];\n }", "abstract protected function getThumbnailMembers();", "function wp_get_attachment_thumb_url($post_id = 0)\n{\n}", "public function thumbnail()\n {\n return null;\n }", "function retreat_feature_image ( $post ) {\n $id = $post->id;\n $postType = get_post_type($id);\n if ($postType == 'job_listing') {\n $job_cover = get_post_meta($id, '_job_cover', true);\n print_r( get_the_post_thumbnail($id, '_job_cover'));\n global $wpdb;\n $attachment = $wpdb->get_col($wpdb->prepare(\"SELECT '%s' FROM $wpdb->posts WHERE guid='%s';\", $id, $job_cover ));\n set_post_thumbnail( $id, $attachment[0] );\n }\n}", "function athen_get_staff_entry_thumbnail() {\n\n // Define thumbnail args\n $args = array(\n 'size' => 'staff_entry',\n 'class' => 'staff-entry-img',\n 'alt' => athen_get_esc_title(),\n );\n\n // Apply filters\n $args = apply_filters( 'athen_get_staff_entry_thumbnail_args', $args );\n\n // Return thumbanil\n return athen_get_post_thumbnail( $args );\n\n}", "public function postThumbnail()\n {\n $tempImageInfo = $this->uploadRepository->setModelIdentifier(UploadRepository::MODEL_IDENTIFIER_THUMBNAIL)->tempPrepare()->tempUpload();\n return empty ($tempImageInfo) ? $this->getErrorJsonResponse([], trans('video::videos.messsage.resolutionInvalid')) : $this->getSuccessJsonResponse(['info' => array_shift($tempImageInfo)]);\n }", "function the_post_thumbnail_title() {\n global $post;\n\n $thumbnail_id = get_post_thumbnail_id($post->ID);\n $thumbnail_image = get_posts(array('p' => $thumbnail_id, 'post_type' => 'attachment'));\n\n if ($thumbnail_image && isset($thumbnail_image[0])) {\n echo '<span>'.$thumbnail_image[0]->post_title.'</span>';\n }\n}", "function kleo_get_post_thumbnail_url( $post_id = null ) {\n $image_url = '';\n\n $thumb = get_post_thumbnail_id( $post_id );\n //all good. we have a featured image\n $featured_image_url = wp_get_attachment_url( $thumb );\n if ( $featured_image_url ) {\n $image_url = $featured_image_url;\n } elseif ( sq_option( 'blog_get_image', 1 ) == 1 ) {\n global $post;\n if (! is_object($post) && $post_id != NULL ) {\n $post = setup_postdata( get_post($post_id) );\n }\n ob_start();\n ob_end_clean();\n if (isset($post->post_content)) {\n $output = preg_match_all('|<img.*?src=[\\'\"](.*?)[\\'\"].*?>|i', $post->post_content, $matches);\n $image_url = isset($matches[1][0]) ? $matches[1][0] : null;\n }\n }\n\n //Defines a default image\n if ( empty( $image_url ) ) {\n $image_url = sq_option_url('blog_default_image', '');\n }\n\n return $image_url;\n}", "function get_post_thumbnail_caption()\n{\n if ($thumb = get_post_thumbnail_id()) {\n return get_post($thumb)->post_excerpt;\n }\n}", "function bm_getPostImage($id = -1, $content = '', $title = '') {\n\n\tif ($id < 0) {\n\t\tglobal $post;\n\t\t$id = $post->ID;\n\t\t$content = $post->post_content;\n\t\t$title = get_the_title();\n\t}\n\t\n\t$theImageSrc = '';\n\t\n\t$imageArray = array(\n\t\t'Image',\n\t\t'image'\n\t);\n\n\t// check for custom fields\n\tforeach ($imageArray as $image) {\n\t\t$values = get_post_custom_values($image, $id);\n\t\tif(isset($values[0]) && $values[0] != '') {\n\t\t\t$theImageSrc = $values[0];\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\t// regex on post content\n\tif ($theImageSrc == '') {\n\t\tif ($content != '') {\n\t\t\t// use regex to find the src of the image\n\t\t\tpreg_match_all ('|<img.*?src=[\\'\"](.*?)[\\'\"].*?>|i', $content, $matches);\n\t\t\t\n\t\t\t$imageCount = count ($matches);\n\t\t\t\n\t\t\tif ($imageCount >= 1) {\n\t\t\t\tfor ($i = 1; $i <= $imageCount; $i += 2) {\n\t\t\t\t\tif (isset($matches[$i][0])) {\n\t\t\t\t\t\t$theImageSrc = $matches[$i][0];\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\t}\n\t\n\t// post attachments\n\tif ($theImageSrc == '') {\n\t\t$values = get_children(array('post_parent' => $id, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order'));\n\t\tif ($values) {\n\t\t\tforeach ($values as $childId => $attachment) {\n\t\t\t\t// add check for image post_mime_type (jpg, gif, png)\n\t\t\t\t$theImageSrc = wp_get_attachment_image_src($childId, 'full');\n\t\t\t\t$theImageSrc = $theImageSrc[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\n\t\n\t\n\t// return values\n\t$ret = array(\n\t\t'src' => $theImageSrc,\n\t\t'alt' => __('Thumbnail') . ' : ' . $title,\n\t);\n\t\n\t$ret = apply_filters('bm_getPostImage', $ret);\n\t\n\treturn $ret;\n\n}", "function on_reading_post_thumbnail() {\n\t\tif ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( is_singular() ) :\n\t\t\t?>\n\n\t\t\t<div class=\"post-thumbnail\">\n\t\t\t\t<?php the_post_thumbnail('post-thumbnail', ['class' => 'img-fluid w-100', 'title' => 'Feature image']); ?>\n\t\t\t</div><!-- .post-thumbnail -->\n\n\t\t<?php else : ?>\n\n\t\t\t<a class=\"post-thumbnail\" href=\"<?php the_permalink(); ?>\" aria-hidden=\"true\" tabindex=\"-1\">\n\t\t\t\t<?php the_post_thumbnail('post-thumbnail', ['class' => 'img-fluid w-100', 'title' => 'Feature image']); ?>\n\t\t\t\t<?php\n// \t\t\t\t\tthe_post_thumbnail(\n// \t\t\t\t\t\t'post-thumbnail',\n// \t\t\t\t\t\tarray(\n// \t\t\t\t\t\t\t'alt' => the_title_attribute(\n// \t\t\t\t\t\t\t\tarray(\n// \t\t\t\t\t\t\t\t\t'echo' => false,\n// \t\t\t\t\t\t\t\t)\n// \t\t\t\t\t\t\t),\n// \t\t\t\t\t\t)\n// \t\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</a>\n\n\t\t\t<?php\n\t\tendif; // End is_singular().\n\t}", "function frame_post_thumbnail( $post_id, $thumb_type = 'full' ) {\n $thumb_data = frame_get_thumb_data( $post_id );\n echo frame_responsive_image( $thumb_data, $thumb_type );\n}", "function rss_post_thumbnail($content) {\n\tglobal $post;\n\t$post_id = $post->ID;\n\n\t// Content\t\n\t$main_image_obj = get_field( 'main_image', $post_id);\n\t$news_img ='';\n\t\n\tif ( has_post_thumbnail($post_id) && empty($main_image_obj)) :\n\t\t$post_img_id = get_post_thumbnail_id($post_id);\n\t\t$post_img_array = wp_get_attachment_image_src($post_img_id, 'post-thumb', true);\n\t\t$post_img_url = $post_img_array[0];\n\t\n\t\t$news_img = '<img src=\"'.$post_img_url.'\">';\n\telseif(!empty($main_image_obj)):\n\t\n\t\t$news_img = '<img src=\"'.$main_image_obj['sizes']['post-thumb'].'\">';\n\tendif;\t\t\n\n\t$content = $news_img . '<p>' . get_field('google_description', $post_id) .'</p>';\n\n\n\treturn $content;\n}", "function the_post_thumbnail_and_caption($size = '', $attr = '') {\nglobal $post;\n$thumb_id = get_post_thumbnail_id($post->ID);\n $args = array(\n 'post_type' => 'attachment',\n 'post_status' => null,\n 'parent' => $post->ID,\n 'include' => $thumb_id\n );\n \n$thumbnail_image = get_posts($args);\n$get_description = get_post(get_post_thumbnail_id())->post_excerpt;\n\nif ($thumb_id && $get_description && $thumbnail_image && isset($thumbnail_image[0])) {\n $image = wp_get_attachment_image_src( $thumb_id, $size );\n $image_width = $image[1];\n \n if($attr) $attr_class = $attr['class'];\n $attr['class'] = ''; //move any 'class' attributes to the outer div, and remove from the thumbnail\n \n $output = '<div class=\"thumbnail-caption attachment-'.$size.($attr?' '.$attr_class:'').'\" style=\"width: ' . ($image_width) . 'px\">';\n \n $output .= get_the_post_thumbnail($post->ID, $size, $attr);\n \n /* to show the thumbnail caption */\n $caption = $thumbnail_image[0]->post_excerpt;\n if($caption) {\n $output .= '<p class=\"thumbnail-caption-text\">';\n $output .= $caption;\n $output .= '</p>';\n }\n \n $output .= '</div>';\n } else {\n\t\t$output = get_the_post_thumbnail();\n\t\t}\n\techo $output;\n}", "function get_featured_image_thumb_standard($post, $field_name, $request)\n{\n return wp_get_attachment_image_src($post['featured_media'], 'thumb-standard', false)[0];\n}", "function _wp_post_thumbnail_html($thumbnail_id = \\null, $post = \\null)\n{\n}", "public function add_thumbnail_data( $data, $post, $context ) {\n\t\tif ( ! post_type_supports( $post['post_type'], 'thumbnail' ) ) {\n\t\t\treturn $data;\n\t\t}\n\n\t\t// Don't embed too deeply\n\t\tif ( $context !== 'view' && $context !== 'edit' ) {\n\t\t\t$data['featured_image'] = null;\n\t\t\t$thumbnail_id = get_post_thumbnail_id( $post['ID'] );\n\n\t\t\tif ( $thumbnail_id ) {\n\t\t\t\t$data['featured_image'] = absint( $thumbnail_id );\n\t\t\t}\n\n\t\t\treturn $data;\n\t\t}\n\n\t\t// Thumbnail\n\t\t$data['featured_image'] = null;\n\t\t$thumbnail_id = get_post_thumbnail_id( $post['ID'] );\n\n\t\tif ( $thumbnail_id ) {\n\t\t\t$data['featured_image'] = $this->get_post( $thumbnail_id, 'child' );\n\t\t}\n\n\t\treturn $data;\n\t}", "function WBC3_api_get_featured_images( $post_id = null ) {\r\n\t\r\n\tif( isset( $post_id ) ) {\r\n\t\t\r\n\t\t$data = array();\r\n\r\n\t\t// Featured Image only available for Standard template type\r\n\t\tif( has_post_thumbnail( $post_id ) && ( 'standard' == get_post_meta( $post_id, 'template_type', true ) ) ) {\r\n\t\t\t$data['featured'] = WBC3_get_featured_image_meta( $post_id, $type = 'featured' );\r\n\t\t}\r\n\r\n\t\t// Square Image available for all template types\r\n\t\tif( class_exists( 'MultiPostThumbnails' ) && MultiPostThumbnails::get_the_post_thumbnail( 'post', 'square-image', $post_id ) ) {\r\n\t\t\t$data['square'] = WBC3_get_featured_image_meta( $post_id, $type = 'square' );\r\n\t\t}\r\n\r\n\t\tif (sizeof($data)) return json_encode( $data );\r\n\t\telse return NULL;\r\n\r\n\t} else {\r\n\t\treturn null;\r\n\t}\r\n}", "function tpf_get_featured_image($post_ID) {\n $post_thumbnail_id = get_post_thumbnail_id($post_ID);\n if ($post_thumbnail_id) {\n $post_thumbnail_img = wp_get_attachment_image_src($post_thumbnail_id, 'featured_preview');\n\n return $post_thumbnail_img[0];\n }\n}", "function get_post_img($post_id, $width, $height) {\n\t$image_id = get_post_thumbnail_id($post_id);\n\t$image_url = wp_get_attachment_image_src($image_id, array($width, $height), true);\n\tif( $image_url[1] == $width and $image_url[2] == $height ) {\n\t\treturn get_the_post_thumbnail($post_id, array($width, $height));\n\t} else {\n\t\treturn get_the_post_thumbnail($post_id, \"full\");\n\t}\n}", "function add_media_thumbnail() {\n global $post;\n if( has_post_thumbnail( $post->ID )) {\n $thumb_ID = get_post_thumbnail_id( $post->ID );\n $details = wp_get_attachment_image_src($thumb_ID, 'large');\n if( is_array($details) ) {\n echo '<media:content url=\"' . $details[0]\n . '\" type=\"image/jpg\"'\n . ' width=\"' . $details[1] \n . '\" height=\"' . $details[2] . '\"></media:content> ';\n }\n }\n}", "function the_post_thumbnail_caption() {\n global $post;\n\n $thumbnail_id = get_post_thumbnail_id( $post->ID );\n $thumbnail_image = get_posts( array( 'p' => $thumbnail_id, 'post_type' => 'attachment' ) );\n\n if ( $thumbnail_image && isset( $thumbnail_image[0] ) ) {\n echo '<span>' . $thumbnail_image[0]->post_excerpt . '</span>';\n }\n }", "function kalium_extract_post_format_content( $post = null ) {\n\t$result = null;\n\n\tif ( ! $post ) {\n\t\t$post = get_post();\n\t}\n\n\tif ( $post instanceof WP_Post ) {\n\t\t$post_content_plain = $post->post_content;\n\n\t\t// Thumbnail size to use\n\t\tif ( is_single() ) {\n\t\t\t$thumbnail_size = kalium_blog_get_option( 'single/post_image/size' );\n\t\t} else {\n\t\t\t$thumbnail_size = kalium_blog_get_option( 'loop/post_thumbnail/size' );\n\t\t}\n\n\t\t// Extract post format\n\t\t$post_format = get_post_format( $post );\n\n\t\tswitch ( $post_format ) {\n\n\t\t\t// Image post format\n\t\t\tcase 'image':\n\n\t\t\t\t// Find image within tag\n\t\t\t\tif ( preg_match( \"/(<a.*?href=(\\\"|')(?<href>.*?)(\\\"|').*?>)?<img.*?\\s+src=(\\\"|')(?<image>.*?)(\\\"|').*?>(<\\/a>)?/\", $post_content_plain, $matches ) ) {\n\t\t\t\t\t$href = $matches['href'];\n\t\t\t\t\t$image_url = $matches['image'];\n\n\t\t\t\t\t// Use href if its image type\n\t\t\t\t\tif ( $href && preg_match( '/\\.(png|jpe?g|gif)$/i', $href ) ) {\n\t\t\t\t\t\t$image_url = $href;\n\t\t\t\t\t}\n\n\t\t\t\t\t$result = [\n\t\t\t\t\t\t'type' => $post_format,\n\t\t\t\t\t\t'content' => $matches[0],\n\t\t\t\t\t\t'media' => $image_url\n\t\t\t\t\t];\n\t\t\t\t} // Find image urls\n\t\t\t\telse if ( $urls = wp_extract_urls( $post_content_plain ) ) {\n\t\t\t\t\t$image_url = '';\n\t\t\t\t\t$urls = array_reverse( $urls );\n\n\t\t\t\t\twhile ( ! $image_url && ( $url = array_pop( $urls ) ) ) {\n\t\t\t\t\t\tif ( preg_match( '#\\.(jpe?g|gif|png)$#i', $url ) ) {\n\t\t\t\t\t\t\t$image_url = $url;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( $image_url ) {\n\t\t\t\t\t\t$result = [\n\t\t\t\t\t\t\t'type' => $post_format,\n\t\t\t\t\t\t\t'content' => $image_url,\n\t\t\t\t\t\t\t'media' => $image_url,\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t// Gallery post format\n\t\t\tcase 'gallery':\n\t\t\t\t$gallery_images = kalium_get_field( 'post_slider_images', $post->ID );\n\n\t\t\t\t// Assign featured image as well\n\t\t\t\tif ( has_post_thumbnail( $post ) ) {\n\t\t\t\t\t$featured_image = [\n\t\t\t\t\t\t'id' => get_post_thumbnail_id( $post ),\n\t\t\t\t\t];\n\n\t\t\t\t\tif ( ! is_array( $gallery_images ) ) {\n\t\t\t\t\t\t$gallery_images = [];\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( apply_filters( 'kalium_blog_post_gallery_format_include_featured_image', true ) ) {\n\t\t\t\t\t\tarray_unshift( $gallery_images, $featured_image );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Only when has gallery items\n\t\t\t\tif ( ! empty( $gallery_images ) ) {\n\t\t\t\t\t$gallery_html = '';\n\n\t\t\t\t\tforeach ( $gallery_images as $gallery_image ) {\n\t\t\t\t\t\tif ( ! empty( $gallery_image['id'] ) ) {\n\t\t\t\t\t\t\t$image = kalium_get_attachment_image( $gallery_image['id'], $thumbnail_size );\n\t\t\t\t\t\t\t$image_link = is_single() ? kalium_blog_post_image_link( get_post( $gallery_image['id'] ) ) : get_permalink( $post );\n\n\t\t\t\t\t\t\t$gallery_html .= sprintf( '<li><a href=\"%s\">%s</a></li>', $image_link, $image );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Gallery has items\n\t\t\t\t\tif ( $gallery_html ) {\n\t\t\t\t\t\t$gallery_autoswitch_image = kalium_blog_get_option( 'single/gallery_autoswitch_image' );\n\n\t\t\t\t\t\tif ( is_single() && $gallery_autoswitch_image > 0 ) {\n\t\t\t\t\t\t\t$gallery_html = sprintf( '<ul class=\"%s\" data-autoswitch=\"%d\">%s</ul>', 'post-gallery-images', $gallery_autoswitch_image, $gallery_html );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$gallery_html = sprintf( '<ul class=\"%s\">%s</ul>', 'post-gallery-images', $gallery_html );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$result = [\n\t\t\t\t\t\t\t'type' => $post_format,\n\t\t\t\t\t\t\t'content' => '',\n\t\t\t\t\t\t\t'media' => $gallery_html\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t// Audio\n\t\t\tcase 'video':\n\t\t\tcase 'audio':\n\t\t\t\tif ( 'audio' === $post_format ) {\n\t\t\t\t\t$autoplay = is_single() ? kalium_get_field( 'auto_play_audio', $post->ID ) : false;\n\t\t\t\t} else {\n\t\t\t\t\t$autoplay = is_single() ? kalium_get_field( 'auto_play_video', $post->ID ) : false;\n\t\t\t\t\t$resolution = kalium_get_field( 'video_resolution', $post->ID );\n\t\t\t\t}\n\n\t\t\t\t// Media attributes\n\t\t\t\t$media_atts = [];\n\n\t\t\t\t// Poster\n\t\t\t\tif ( apply_filters( 'kalium_blog_media_use_featured_image_poster', true ) && has_post_thumbnail( $post ) && ( $featured_image = wp_get_attachment_image( get_post_thumbnail_id( $post ), $thumbnail_size ) ) ) {\n\t\t\t\t\t$featured_image_arr = kalium()->helpers->parse_attributes( $featured_image );\n\t\t\t\t\t$featured_image_atts = $featured_image_arr['attributes'];\n\n\t\t\t\t\t$media_atts['poster'] = $featured_image_atts['src'];\n\t\t\t\t\t$media_atts['width'] = $featured_image_atts['width'];\n\t\t\t\t\t$media_atts['height'] = $featured_image_atts['height'];\n\t\t\t\t}\n\n\t\t\t\t// Autoplay\n\t\t\t\tif ( $autoplay ) {\n\t\t\t\t\t$media_atts['autoplay'] = 'autoplay';\n\t\t\t\t}\n\n\t\t\t\t// Video resolution\n\t\t\t\tif ( ! empty( $resolution ) ) {\n\t\t\t\t\t$resolution = kalium_extract_aspect_ratio( $resolution );\n\t\t\t\t\t$media_atts = array_merge( $media_atts, $resolution );\n\t\t\t\t}\n\n\t\t\t\t// Media element\n\t\t\t\t$media = kalium()->media->parse_media( $post_content_plain, $media_atts );\n\n\t\t\t\tif ( $media ) {\n\t\t\t\t\t$result = [\n\t\t\t\t\t\t'type' => $post_format,\n\t\t\t\t\t\t'content' => $media,\n\t\t\t\t\t\t'media' => $media,\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t// Quotes\n\t\t\tcase 'quote':\n\t\t\t\tif ( preg_match( \"/^\\s*<blockquote.*?>(?<quote>.*?)(?<cite><cite>(?<author>.*?)<\\/cite>)?<\\/blockquote>/s\", $post_content_plain, $matches ) ) {\n\t\t\t\t\t$content = $matches[0];\n\t\t\t\t\t$quote = $matches['quote'];\n\t\t\t\t\t$author = kalium_get_array_key( $matches, 'author' );\n\n\t\t\t\t\t$result = [\n\t\t\t\t\t\t'type' => $post_format,\n\t\t\t\t\t\t'content' => $content,\n\t\t\t\t\t\t'quote' => $quote,\n\t\t\t\t\t\t'author' => $author,\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Generate media\n\t\tif ( is_array( $result ) ) {\n\n\t\t\t// Generate image placeholder\n\t\t\tif ( 'image' === $result['type'] ) {\n\t\t\t\t$result['generated'] = sprintf(\n\t\t\t\t\t'<a href=\"%1$s\" target=\"%2$s\" rel=\"bookmark\">%3$s</a>',\n\t\t\t\t\tesc_url( get_permalink( $post ) ),\n\t\t\t\t\tesc_attr( kalium_blog_post_link_target() ),\n\t\t\t\t\tkalium_get_attachment_image( $result['media'] )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $result;\n}", "function get_the_post_thumbnail_url($post = \\null, $size = 'post-thumbnail')\n{\n}", "function WBC3_post_thumbnail_meta_box() {\r\n\r\n\tglobal $post;\r\n\r\n\t// 16:9 aspect ratio\r\n\t$minimum = array(\r\n \t'width' => '970',\r\n \t'height' => '546'\r\n );\r\n\r\n\tif( has_post_thumbnail() ) {\r\n \t\r\n \t// get the featured image id\r\n\t\t$image_id = get_post_thumbnail_id( $post->ID );\r\n\t\t\r\n\t\t// get image src, width, height\r\n\t\t$image_data = wp_get_attachment_image_src( $image_id, 'large' );\r\n\t\t\r\n\t\t// enforce minimum image size\r\n\t\tif( $image_data ) {\r\n\t\t\t\r\n\t\t\t// get width and height\r\n\t\t\t$width = $image_data[1];\r\n\t\t\t$height = $image_data[2];\r\n\r\n\t\t\t// error if image is not 16:9 aspect ratio also\r\n\t\t\tif( ( $width < $minimum['width'] ) || ( $height < $minimum['height'] ) ) {\r\n\r\n\t\t\t\t// delete post thumbnail\r\n\t\t\t\tdelete_post_thumbnail( $post );\r\n\r\n\t\t\t\t// display error message\r\n\t\t\t\techo '<div class=\"error\"><p>Featured Image dimensions are too small: ' . $width . 'px by ' . $height . 'px. Minimum dimensions are <strong>' . $minimum['width'] . 'px by ' . $minimum['height'] . 'px</strong>.</p></div>';\r\n\t\t\t}\r\n\t\t}\r\n }\r\n\r\n // display the html markup for the thumbnail\r\n\techo _wp_post_thumbnail_html( get_post_meta( $post->ID, '_thumbnail_id', true ) );\r\n}", "public function image()\n {\n return optional($this->media->first())->getFullUrl('thumbnail');\n }", "public function getThumbnailLink() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"thumbnailLink\");\n\t}", "function wb_post_thumbnail_caption()\n{\n\tglobal $post;\n\n\t$thumbnail_id = get_post_thumbnail_id($post->ID);\n\t$thumbnail_image = get_posts(array('p' => $thumbnail_id, 'post_type' => 'attachment'));\n\n\tif ($thumbnail_image && isset($thumbnail_image[0])) {\n\t\treturn $thumbnail_image[0]->post_excerpt;\n\t}\n}", "function instagram_get_photo($photoid) {\n // returned on the call in the above function.\n $instagram = get_instagram_api();\n $data = $instagram->getMedia($photoid);\n $data = $data->data;\n $photo = array(\n 'url' => $data->images->standard_resolution->url,\n 'caption' => $data->caption->text\n );\n return $photo;\n}", "function process(){\n if ( isset($this->data[1]) && $this->data[1] ){\n // We got the image from a plugin, it follows our api....\n $this->image = (object) $this->data[0];\n } else{\n // We got the image from wordpress gallery, fit it to our API\n $attachment_id = $this->data[0]->ID;\n $image = wp_get_attachment_image_src($attachment_id, 'wiziapp-iphone');\n $thumb = wp_get_attachment_image_src($attachment_id, 'wiziapp-thumbnail');\n $imageDetails = get_post($attachment_id);\n $caption = $imageDetails->post_excerpt;\n if ( empty($caption) ){\n $caption = str_replace('&amp;', '&', $imageDetails->post_title);\n }\n $this->image = new wiziappImage($thumb[0],$image[0], $imageDetails->post_content,$attachment_id,$imageDetails->post_parent,$caption);\n } \n parent::process();\n }", "function kleo_get_post_thumbnail( $post_id = null, $size = 'post-thumbnail', $attr = '', $archive_only = true ) {\n $image_url = '';\n \n if ( has_post_thumbnail( $post_id ) ) {\n $image_url = get_the_post_thumbnail( $post_id, $size, $attr );\n }\n if ( $image_url ) {\n return $image_url;\n }\n else {\n if ( is_single() && $archive_only === true ) {\n return '';\n }\n global $post;\n\n if ( sq_option( 'blog_get_image', 1 ) == 1 ) {\n $output = preg_match_all('|<img.*?src=[\\'\"](.*?)[\\'\"].*?>|i', $post->post_content, $matches);\n\n if( isset( $matches[1][0] ) ) {\n return '<img src=\"' . $matches[1][0] . '\" alt=\"' . $post->post_title . '\">';\n }\n }\n\n //Defines a default image\n $image_url = sq_option_url( 'blog_default_image', '' );\n\n if ( $image_url == '' ) {\n return '';\n } else {\n return '<img src=\"' . $image_url . '\" alt=\"' . $post->post_title . '\">';\n }\n\t}\n}", "function get_post_thumbnail_url($post_id, $size = 'full') {\n return wp_get_attachment_url(get_post_thumbnail_id($post_id, $size));\n}", "public function postThumbnail() {\n $tempImageInfo = $this->uploadRepository->setModelIdentifier ( UploadRepository::MODEL_IDENTIFIER_THUMBNAIL )->tempPrepare ()->tempUpload ();\n return empty ( $tempImageInfo ) ? $this->getErrorJsonResponse ( [ ], trans ( StringLiterals::UNABLE_TO_UPLOAD ) ) : $this->getSuccessJsonResponse ( [ 'info' => array_shift ( $tempImageInfo ) ] );\n }", "function frmw_post_thumbnail() {\n\t\tif ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( is_singular() ) :\n\t\t\t?>\n\n\t\t\t<div class=\"post-thumbnail\">\n\t\t\t\t<?php the_post_thumbnail(); ?>\n\t\t\t</div><!-- .post-thumbnail -->\n\n\t\t<?php else : ?>\n\n\t\t<a class=\"post-thumbnail\" href=\"<?php the_permalink(); ?>\" aria-hidden=\"true\" tabindex=\"-1\">\n\t\t\t<?php\n\t\t\tthe_post_thumbnail( 'post-thumbnail', array(\n\t\t\t\t'alt' => the_title_attribute( array(\n\t\t\t\t\t'echo' => false,\n\t\t\t\t) ),\n\t\t\t) );\n\t\t\t?>\n\t\t</a>\n\n\t\t<?php\n\t\tendif; // End is_singular().\n\t}", "public function getThumbnail()\n {\n if ($this->getImages() && $this->getImages()->hasConnectedItems()) {\n return $this->getImages()->getFirstConnectedMediaItem();\n }\n\n return null;\n }", "function set_post_thumbnail($post, $thumbnail_id)\n{\n}", "function getThumbnail(){\n\t\treturn $GLOBALS[\"SiteRoot\"]. $this->thumbnail;\n\t}", "function image_data( $image_id, $image_thumb_name ) {\n\treturn wp_get_attachment_image_src( $image_id, $image_thumb_name );\n}", "public static function getPost($slug) {\n $post = Post::where(['slug' => $slug, 'status' => Post::STATUS_PUBLISHED])\n ->select('id', 'title', 'content', 'created_at')\n ->firstOrFail()\n ->toArray();\n\n $post['created_at'] = Carbon::createFromTimestamp($post['created_at'])->format('Y-m-d, H:i');\n\n\n if (Storage::disk('public')->exists('images/posts/' . $post['id'] . '.jpg')) {\n $post['img'] = Storage::disk('public')->url('images/posts/' . $post['id'] . '.jpg');\n } else {\n $post['img'] = '';\n }\n\n return $post;\n }", "function the_monolith_post_thumbnail( $size ) {\n echo get_monolith_post_thumbnail( $size );\n }", "function wp_ajax_set_post_thumbnail()\n{\n}", "function junio_post_thumbnail() {\n\tif ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {\n\t\treturn;\n\t}\n\n\tif ( is_singular() ) :\n\t?>\n\n\t<div class=\"post-thumbnail\">\n\t\t<?php the_post_thumbnail( 'large', array( 'class' => 'img-responsive', 'alt' => get_the_title() ) ); ?>\n\t</div><!-- .post-thumbnail -->\n\n\t<?php else : ?>\n\n\t<a class=\"post-thumbnail\" href=\"<?php the_permalink(); ?>\" aria-hidden=\"true\">\n\t\t<?php\n\t\t\tthe_post_thumbnail( 'post-thumbnail', array( 'class' => 'img-responsive', 'alt' => get_the_title() ) );\n\t\t?>\n\t</a>\n\n\t<?php endif;\n}", "function test_get_thumbnail_url_returns_null_when_no_featured_image_is_set(){\n\t\t$post = new StandardPost(get_post($this->factory->post->create_and_get()));\n\t\t$this->assertNull($post->get_thumbnail_url());\n\t}", "protected function getInfo()\n {\n return get_post($this->id);\n }", "function sg_get_post_thumbnail($image_size='thumbnail', $params=array()){\n\tob_start();\n\tif(has_post_thumbnail()) {\n\t\tthe_post_thumbnail($image_size, $params);\n\t}\n\t$output = ob_get_clean();\n\n\tif(!$output && sg_opt('use_default_image', true)){\t\n\t\tob_start();\t\t\n\t\t\tsg_get_post_first_image();\n\t\t$output = ob_get_clean();\n\t}\n\n\treturn $output;\n}", "function ktf2021_post_thumbnail() {\n\t\tif ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( is_singular() ) :\n\t\t\t?>\n\n\t\t\t<div class=\"post-thumbnail\">\n\t\t\t\t<?php the_post_thumbnail('middle'); ?>\n\t\t\t</div><!-- .post-thumbnail -->\n\n\t\t<?php else : ?>\n\n\t\t<a class=\"post-thumbnail\" href=\"<?php the_permalink(); ?>\" aria-hidden=\"true\" tabindex=\"-1\">\n\t\t\t<?php\n\t\t\tthe_post_thumbnail( 'thumbnail', array(\n\t\t\t\t'alt' => the_title_attribute( array(\n\t\t\t\t\t'echo' => false,\n\t\t\t\t) ),\n\t\t\t) );\n\t\t\t?>\n\t\t</a>\n\n\t\t<?php\n\t\tendif; // End is_singular().\n\t}", "function ng_get_thumbnail_url( $post ) {\n\t\t$sizes = ['thumbnail', 'medium'];\n\t\t$imgArray = [];\n\n\t\tif ( has_post_thumbnail( $post['id'] ) ){\n\t\t\t$post_type = get_post_type();\n\n\t\t\tswitch ( $post_type ) {\n\t\t\t\tcase 'team':\n\t\t\t\t\t// Add new images size for post type 'team'\n\t\t\t\t\t$sizes['ionic_team'] = 'ionic_team';\n\t\t\t\t\t// Iterate over selected sizes\n\t\t\t\t\tforeach ($sizes as $size) {\n\t\t\t\t\t\t//wp_get_attachment_image_src(id, size)[0] -> with [0] get URL from attachment\n\t\t\t\t\t\t$imgArray[$size] = wp_get_attachment_image_src( get_post_thumbnail_id( $post['id'] ), $size )[0];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'work':\n\t\t\t\t\t// Add new images size for post type 'work'\n\t\t\t\t\t$sizes['ionic_work'] = 'ionic_work';\n\t\t\t\t\tforeach ($sizes as $size) {\n\t\t\t\t\t\t$imgArray[$size] = wp_get_attachment_image_src( get_post_thumbnail_id( $post['id'] ), $size )[0];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tforeach ($sizes as $size) {\n\t\t\t\t\t\t$imgArray[$size] = wp_get_attachment_image_src( get_post_thumbnail_id( $post['id'] ), $size )[0];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn $imgArray;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "function getThumbnail($id,$use=\"full\"){\r\n\t\t\tglobal $post;\r\n\t\t\t$thumbnail_id = get_post_thumbnail_id( $id);\r\n\t\t\t\r\n\t\t\t$img = wp_get_attachment_image_src( $thumbnail_id, $use);\r\n\t\t\tif($img[0] !=\"\"){\r\n\r\n\t\t\t} \r\n\t\t\treturn $img[0];\r\n\t\t\t\r\n\t\t}", "protected function get_featured_image_props() {\n\t\t$post_id = $this->container->post_id;\n\t\t$thumb_id = get_post_thumbnail_id( $post_id );\n\t\tif ( empty( $thumb_id ) && function_exists( 'acf_get_attachment' ) ) {\n\t\t\t$thumb_props = acf_get_attachment( $GLOBALS['EXCHANGE_PLUGIN_CONFIG']['IMAGES']['fallback_image_att_id'] );\n\t\t} else {\n\t\t\tif ( 'attachment' === get_post( $thumb_id )->post_type && function_exists( 'acf_get_attachment' ) ) {\n\t\t\t\t$thumb_props = acf_get_attachment( $thumb_id );\n\t\t\t}\n\t\t}\n\t\treturn $thumb_props;\n\t}", "function shatteredmm_post_thumbnail()\n {\n if (post_password_required() || !has_post_thumbnail()) {\n return;\n }\n if (is_singular()) : ?>\n <div class=\"post-thumbnail\">\n <?php the_post_thumbnail(); ?>\n </div>\n <?php else : ?>\n <a class=\"post-thumbnail\" href=\"<?php the_permalink(); ?>\">\n <?php the_post_thumbnail('post-thumbnail', array('alt' => get_the_title())); ?>\n </a>\n <?php endif; // End is_singular()\n }" ]
[ "0.6947055", "0.6908098", "0.69078857", "0.6772722", "0.6665993", "0.66139656", "0.6593293", "0.6549301", "0.65475285", "0.6532687", "0.6492597", "0.6485249", "0.64639014", "0.64416045", "0.64416045", "0.6363939", "0.63552135", "0.6343859", "0.6311795", "0.6285381", "0.62419987", "0.6219661", "0.6211773", "0.62102485", "0.6200902", "0.6198443", "0.61903965", "0.61650807", "0.61436784", "0.61422145", "0.61267656", "0.6122003", "0.612062", "0.61117977", "0.6109727", "0.6100436", "0.6092374", "0.6089902", "0.6083733", "0.6080821", "0.6075963", "0.6069551", "0.6066393", "0.6054687", "0.6038649", "0.6035793", "0.6032234", "0.60310745", "0.6026072", "0.6018318", "0.6017466", "0.5987075", "0.59856784", "0.59750056", "0.59646237", "0.59545255", "0.5946102", "0.59431463", "0.5932844", "0.59312", "0.59292734", "0.5922646", "0.5911338", "0.5910198", "0.58950615", "0.58927673", "0.5876708", "0.5869958", "0.5868938", "0.58660287", "0.5865382", "0.5864293", "0.5862278", "0.5844134", "0.5837575", "0.581773", "0.5814777", "0.58114344", "0.58102363", "0.5801146", "0.5800962", "0.58006537", "0.5799768", "0.57981616", "0.57979035", "0.57977545", "0.579118", "0.5780402", "0.57682115", "0.5765885", "0.5758552", "0.575518", "0.57476276", "0.57474005", "0.574735", "0.5745201", "0.5740952", "0.57374024", "0.5735238", "0.57239467" ]
0.7441529
0
Parse the width and height from a WordPress sizesuffixed image filename, e.g. murthy480x318.jpg
Разберите ширину и высоту из имени файла изображения WordPress с суффиксом размера, например, murthy480x318.jpg
function elit_parse_dimensions( $filename ) { $re = '/\d{3}x\d{3}/'; $match = preg_match( $re, $filename, $matches ); if ( $match ) { $vals = explode( 'x', $matches[0] ); $keys = array( 'width', 'height' ); return array_combine( $keys, $vals ); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function affinity_mikado_get_image_dimensions($url) {\n\t\t$image_sizes = array();\n require_once(ABSPATH . 'wp-admin/includes/file.php');\n\n\t\t//is url passed?\n\t\tif ($url !== '') {\n\t\t\t//get image sizes from posts meta if attachment exists\n\t\t\t$image_sizes = affinity_mikado_get_attachment_meta_from_url($url, array('width', 'height'));\n\n\t\t\t//image does not exists in post table, we have to use PHP way of getting image size\n\t\t\tif (!count($image_sizes)) {\n\t\t\t\t//can we open file by url?\n\t\t\t\tif (ini_get('allow_url_fopen') == 1 && file_exists($url)) {\n\t\t\t\t\tlist($width, $height, $type, $attr) = getimagesize($url);\n\t\t\t\t} else {\n\t\t\t\t\t//we can't open file directly, have to locate it with relative path.\n\t\t\t\t\t$image_obj = parse_url($url);\n $image_relative_path = rtrim(get_home_path(), '/') . $image_obj['path'];\n\n\t\t\t\t\tif (file_exists($image_relative_path)) {\n\t\t\t\t\t\tlist($width, $height, $type, $attr) = getimagesize($image_relative_path);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//did we get width and height from some of above methods?\n\t\t\t\tif (isset($width) && isset($height)) {\n\t\t\t\t\t//set them to our image sizes array\n\t\t\t\t\t$image_sizes = array(\n\t\t\t\t\t\t'width' => $width,\n\t\t\t\t\t\t'height' => $height\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $image_sizes;\n\t}", "function vcex_parse_image_size( $atts ) {\n\t$img_size = ( isset( $atts['img_size'] ) && 'wpex_custom' == $atts['img_size'] ) ? 'wpex_custom' : '';\n\t$img_size = empty( $atts['img_size'] ) ? 'wpex_custom' : '';\n\tif ( 'wpex_custom' == $img_size && empty( $atts['img_height'] ) && empty( $atts['img_width'] ) ) {\n\t\t$atts['img_size'] = 'full';\n\t}\n\treturn $atts;\n}", "function vcex_parse_image_size( $atts ) {\n\t$img_size = ( isset( $atts['img_size'] ) && 'wpex_custom' == $atts['img_size'] ) ? 'wpex_custom' : '';\n\t$img_size = empty( $atts['img_size'] ) ? 'wpex_custom' : '';\n\tif ( 'wpex_custom' == $img_size && empty( $atts['img_height'] ) && empty( $atts['img_width'] ) ) {\n\t\t$atts['img_size'] = 'full';\n\t}\n\treturn $atts;\n}", "function get_prodpic_wh($src){\n\tif (strpos($src, 'timthumb.php') !== false){\n\t\t$src_arr = explode(\"&\", $src);\n\t\tforeach ($src_arr as $x){\n\t\t\tif (substr($x, 0, 2)==\"w=\")\t\t$width = substr($x, 2);\n\t\t\tif (substr($x, 0, 2)==\"h=\")\t\t$height = substr($x, 2);\n\t\t}\n\t}\n\telse{\n\t\tlist($width, $height) = getimagesize($src);\n\t}\n\treturn array($width, $height);\n}", "function zuhaus_mikado_get_image_dimensions( $url ) {\n\t\t$image_sizes = array();\n\t\t\n\t\t//is url passed?\n\t\tif ( $url !== '' ) {\n\t\t\t//get image sizes from posts meta if attachment exists\n\t\t\t$image_sizes = zuhaus_mikado_get_attachment_meta_from_url( $url, array( 'width', 'height' ) );\n\t\t\t\n\t\t\t//image does not exists in post table, we have to use PHP way of getting image size\n\t\t\tif ( ! count( $image_sizes ) ) {\n\t\t\t\t//can we open file by url?\n\t\t\t\tif ( ini_get( 'allow_url_fopen' ) == 1 && file_exists( $url ) ) {\n\t\t\t\t\tlist( $width, $height, $type, $attr ) = getimagesize( $url );\n\t\t\t\t} else {\n\t\t\t\t\t//we can't open file directly, have to locate it with relative path.\n\t\t\t\t\t$image_obj = parse_url( $url );\n\t\t\t\t\t$image_relative_path = $_SERVER['DOCUMENT_ROOT'] . $image_obj['path'];\n\t\t\t\t\t\n\t\t\t\t\tif ( file_exists( $image_relative_path ) ) {\n\t\t\t\t\t\tlist( $width, $height, $type, $attr ) = getimagesize( $image_relative_path );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//did we get width and height from some of above methods?\n\t\t\t\tif ( isset( $width ) && isset( $height ) ) {\n\t\t\t\t\t//set them to our image sizes array\n\t\t\t\t\t$image_sizes = array(\n\t\t\t\t\t\t'width' => $width,\n\t\t\t\t\t\t'height' => $height\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $image_sizes;\n\t}", "function acf_get_image_sizes() {}", "function getimagesize($filename,$image_info=NULL)\n{\n\treturn array();\n}", "function get_image_size($name) {\n\t\t$file['site_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['email_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['site_favicon'] = array('width' => '50', 'height' => '50');\n\t\t$file['store_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['footer_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['app_logo'] = array('width' => '140', 'height' => '140');\n\t\t$file['driver_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['driver_white_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['home_slider'] = array('width' => '1300', 'height' => '500');\n\t\t$file['dietary_icon_size'] = array('width' => '256', 'height' => '256');\n\t\t$file['item_image_sizes'] = [\n\t\t\tarray('width' => '120', 'height' => '120'),\n\t\t\tarray('width' => '600', 'height' => '350'),\n\t\t\tarray('width' => '520', 'height' => '320'),\n\t\t];\n\t\t$file['category_image_size'] = array('width' => '250', 'height' => '140');\n\t\t$file['store_image_sizes'] = [\n\t\t\tarray('width' => '520', 'height' => '320'),\n\t\t\tarray('width' => '520', 'height' => '280'),\n\t\t\tarray('width' => '480', 'height' => '320'),\n\t\t\tarray('width' => '100', 'height' => '100'),\n\t\t];\n\n\t\treturn $file[$name];\n\t}", "private function getImageSize($image_size) {\n\t\t$image_size = trim($image_size);\n\t\t//Find digits\n\t\tpreg_match_all( '/\\d+/', $image_size, $matches );\n\t\tif(in_array( $image_size, array('thumbnail', 'thumb', 'medium', 'large', 'full'))) {\n\t\t\treturn $image_size;\n\t\t} elseif(!empty($matches[0])) {\n\t\t\treturn array(\n\t\t\t\t\t$matches[0][0],\n\t\t\t\t\t$matches[0][1]\n\t\t\t);\n\t\t} else {\n\t\t\treturn 'thumbnail';\n\t\t}\n\t}", "function fluid_edge_get_image_dimensions($url) {\n\t\t$image_sizes = array();\n\n\t\t//is url passed?\n\t\tif($url !== '') {\n\t\t\t//get image sizes from posts meta if attachment exists\n\t\t\t$image_sizes = fluid_edge_get_attachment_meta_from_url($url, array('width', 'height'));\n\n\t\t\t//image does not exists in post table, we have to use PHP way of getting image size\n\t\t\tif(!count($image_sizes)) {\n\t\t\t\t//can we open file by url?\n\t\t\t\tif(ini_get('allow_url_fopen') == 1 && file_exists($url)) {\n\t\t\t\t\tlist($width, $height, $type, $attr) = getimagesize($url);\n\t\t\t\t} else {\n\t\t\t\t\t//we can't open file directly, have to locate it with relative path.\n\t\t\t\t\t$image_obj = parse_url($url);\n\t\t\t\t\t$image_relative_path = $_SERVER['DOCUMENT_ROOT'].$image_obj['path'];\n\n\t\t\t\t\tif(file_exists($image_relative_path)) {\n\t\t\t\t\t\tlist($width, $height, $type, $attr) = getimagesize($image_relative_path);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//did we get width and height from some of above methods?\n\t\t\t\tif(isset($width) && isset($height)) {\n\t\t\t\t\t//set them to our image sizes array\n\t\t\t\t\t$image_sizes = array(\n\t\t\t\t\t\t'width' => $width,\n\t\t\t\t\t\t'height' => $height\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $image_sizes;\n\t}", "function getimagesize($filename, $image_info = null)\n{\n return array();\n}", "function jet_engine_get_image_sizes() {\n\n\tglobal $_wp_additional_image_sizes;\n\n\t$sizes = get_intermediate_image_sizes();\n\t$result = array();\n\n\tforeach ( $sizes as $size ) {\n\t\tif ( in_array( $size, array( 'thumbnail', 'medium', 'medium_large', 'large' ) ) ) {\n\t\t\t$result[ $size ] = ucwords( trim( str_replace( array( '-', '_' ), array( ' ', ' ' ), $size ) ) );\n\t\t} else {\n\t\t\t$result[ $size ] = sprintf(\n\t\t\t\t'%1$s (%2$sx%3$s)',\n\t\t\t\tucwords( trim( str_replace( array( '-', '_' ), array( ' ', ' ' ), $size ) ) ),\n\t\t\t\t$_wp_additional_image_sizes[ $size ]['width'],\n\t\t\t\t$_wp_additional_image_sizes[ $size ]['height']\n\t\t\t);\n\t\t}\n\t}\n\n\treturn array_merge( array( 'full' => esc_html__( 'Full', 'jet-engine' ), ), $result );\n}", "function image_size() {\n }", "function rocket_specify_image_dimensions( $buffer ) {\r\n\t_deprecated_function( __FUNCTION__ . '()', '3.8', 'WP_Rocket\\Engine\\Media\\ImagesSubscriber::specify_image_dimensions()' );\r\n\t/**\r\n\t * Filter images dimensions attributes\r\n\t *\r\n\t * @since 2.2\r\n\t *\r\n\t * @param bool Do the job or not.\r\n\t */\r\n\tif ( ! apply_filters( 'rocket_specify_image_dimensions', false ) ) {\r\n\t\treturn $buffer;\r\n\t}\r\n\r\n\t// Get all images without width or height attribute.\r\n\tpreg_match_all( '/<img(?:[^>](?!(height|width)=))*+>/i', $buffer, $images_match );\r\n\r\n\tforeach ( $images_match[0] as $image ) {\r\n\r\n\t\t// Don't touch lazy-load file (no conflit with Photon (Jetpack)).\r\n\t\tif ( strpos( $image, 'data-lazy-original' ) || strpos( $image, 'data-no-image-dimensions' ) ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t$tmp = $image;\r\n\r\n\t\t// Get link of the file.\r\n\t\tpreg_match( '/src=[\\'\"]([^\\'\"]+)/', $image, $src_match );\r\n\r\n\t\t// Get infos of the URL.\r\n\t\t$image_url = wp_parse_url( $src_match[1] );\r\n\r\n\t\t// Check if the link isn't external.\r\n\t\tif ( empty( $image_url['host'] ) || rocket_remove_url_protocol( home_url() ) === $image_url['host'] ) {\r\n\t\t\t// Get image attributes.\r\n\t\t\t$sizes = getimagesize( ABSPATH . $image_url['path'] );\r\n\t\t} else {\r\n\t\t\t/**\r\n\t\t\t * Filter distant images dimensions attributes\r\n\t\t\t *\r\n\t\t\t * @since 2.2\r\n\t\t\t *\r\n\t\t\t * @param bool Do the job or not\r\n\t\t\t */\r\n\t\t\tif ( ini_get( 'allow_url_fopen' ) && apply_filters( 'rocket_specify_image_dimensions_for_distant', false ) ) {\r\n\t\t\t\t// Get image attributes.\r\n\t\t\t\t$sizes = getimagesize( $image_url['scheme'] . '://' . $image_url['host'] . $image_url['path'] );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( ! empty( $sizes ) ) {\r\n\t\t\t// Add width and width attribute.\r\n\t\t\t$image = str_replace( '<img', '<img ' . $sizes[3], $image );\r\n\r\n\t\t\t// Replace image with new attributes.\r\n\t\t\t$buffer = str_replace( $tmp, $image, $buffer );\r\n\t\t}\r\n\t}\r\n\r\n\treturn $buffer;\r\n}", "function mai_get_image_sizes() {\n\n\t// Get labels.\n\t$labels = mai_get_image_size_labels();\n\n\t/**\n\t * Create the initial image sizes.\n\t * @link http://andrew.hedges.name/experiments/aspect_ratio/\n\t */\n\t$image_sizes = array(\n\t\t'banner' => array(\n\t\t\t'label' => $labels[ 'banner' ],\n\t\t\t'width' => 1600,\n\t\t\t'height' => 533,\n\t\t\t'crop' => true, // 3x1\n\t\t),\n\t\t'section' => array(\n\t\t\t'label' => $labels[ 'section' ],\n\t\t\t'width' => 1600,\n\t\t\t'height' => 900,\n\t\t\t'crop' => true, // 16x9\n\t\t),\n\t\t'full-width' => array(\n\t\t\t'label' => $labels[ 'full-width' ],\n\t\t\t'width' => 1248,\n\t\t\t'height' => 832,\n\t\t\t'crop' => true, // 3x2\n\t\t),\n\t\t'featured' => array(\n\t\t\t'label' => $labels[ 'featured' ],\n\t\t\t'width' => 800,\n\t\t\t'height' => 600,\n\t\t\t'crop' => true, // 4x3 (works better for no sidebar)\n\t\t),\n\t\t'one-half' => array(\n\t\t\t'label' => $labels[ 'one-half' ],\n\t\t\t'width' => 550,\n\t\t\t'height' => 413,\n\t\t\t'crop' => true, // 4x3\n\t\t),\n\t\t'one-third' => array(\n\t\t\t'label' => $labels[ 'one-third' ],\n\t\t\t'width' => 350,\n\t\t\t'height' => 263,\n\t\t\t'crop' => true, // 4x3\n\t\t),\n\t\t'one-fourth' => array(\n\t\t\t'label' => $labels[ 'one-fourth' ],\n\t\t\t'width' => 260,\n\t\t\t'height' => 195,\n\t\t\t'crop' => true, // 4x3\n\t\t),\n\t\t'tiny' => array(\n\t\t\t'label' => $labels[ 'tiny' ],\n\t\t\t'width' => 80,\n\t\t\t'height' => 80,\n\t\t\t'crop' => true, // square\n\t\t),\n\t);\n\n\t/**\n\t * Filter the image sizes to allow the theme to override.\n\t *\n\t * // Change the default Mai image sizes\n\t * add_filter( 'mai_image_sizes', 'prefix_custom_image_sizes' );\n\t * function prefix_custom_image_sizes( $image_sizes ) {\n\t *\n\t * // Change one-third image size\n\t * $image_sizes['one-third'] = array(\n\t * 'width' => 350,\n\t * 'height' => 350,\n\t * 'crop' => true,\n\t * );\n\t *\n\t * // Change one-fourth image size\n\t * $image_sizes['one-fourth'] = array(\n\t * 'width' => 260,\n\t * 'height' => 260,\n\t * 'crop' => true,\n\t * );\n\t *\n\t * return $image_sizes;\n\t *\n\t * }\n\t *\n\t */\n\t$image_sizes = apply_filters( 'mai_image_sizes', $image_sizes );\n\n\t/**\n\t * Make sure labels are added.\n\t * 'mai_image_sizes' didn't have 'label' in the array prior to 1.8.0.\n\t * This insures existing filters don't break.\n\t */\n\tforeach( $image_sizes as $name => $values ) {\n\t\tif ( ! isset( $values['label'] ) || empty( $values['label'] ) ) {\n\t\t\t$image_sizes[ $name ]['label'] = $labels[ $name ];\n\t\t}\n\t}\n\n\treturn $image_sizes;\n}", "function imagesize($imgfile,$type){\n\tif(!empty($imgfile)){\n\t\t$filetype = strtolower(substr($imgfile, strrpos($imgfile, '.') + 1));\n\t\t$basename = substr($imgfile, 0, strrpos($imgfile, '.') );\n\t\t$filename = $basename.$type.\".\".$filetype;\n\t\treturn $filename;\n\t}\n}", "function img_dim($img,$type=0)\r\n{\r\n $arr_img = GetImageSize($img);\r\n if ($type==0)\r\n\t return $arr_img[3]; \t\t\t\t\t\t\t\t\t\t\t\t\t\t// normal fuer bild\r\n if ($type==1)\r\n\t return \" width: \".$arr_img[0].\"px; height: \".$arr_img[1].\"px; \";\t\t\t// fuer style (CSS)\r\n if ($type==2)\r\n\t return array($arr_img[0],$arr_img[1]);\t\t\t\t\t\t\t\t\t// als 2 numerische\r\n}", "function _wp_get_image_size_from_meta($size_name, $image_meta)\n{\n}", "private function processGetImageSize()\n {\n\n list(\n $this->width,\n $this->height,\n $this->type,\n $this->attributes\n ) = getimagesize($this->file->withPath());\n }", "function image_sizes() {\n add_image_size( 'banner', 1980 );\n}", "function getResizedImageSize($image){\n\t\t$imageSize = array();\n\t\tlist($width, $height, $type, $attr) = getimagesize($image);\n\t\t//echo $width.\" width resized: \". $width/35 .\"<br/>\";\n\t\t//echo $height.\" height resized: \". $height/35 .\"<br/>\";\n\t\t//while($height>150){\n\t\t\t//$height = $height/7;\n\t\t\t//$width /= 7;\n\t\t//}\n\t\t\n\t\t//$imageSize[\"width\"] = $width/35;\n\t\t//$imageSize[\"height\"] = $height/35;\n\t\t\n\t\treturn $imageSize;\t\n\t}", "function getThumbnailWidthHeight($file,$persentage)\r\n {\r\n $imag=array();\r\n $ary=(getimagesize($file));\r\n $imag['width']= ceil($ary[0]/100)*$persentage;\r\n $imag['height']=ceil(($ary[1]/100)*$persentage);\r\n \r\n return $imag;\r\n }", "public function file_resized($filename);", "function ootheme_get_images_sizes() {\n\t\treturn array(\n\t\t\t'post' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'post-gthumbnail',\n\t\t\t\t\t'width'\t\t=> 75,\n\t\t\t\t\t'height'\t=> 75,\n\t\t\t\t\t'crop'\t\t=> true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'post-thumbnail',\n\t\t\t\t\t'width'\t\t=> 200,\n\t\t\t\t\t'height'\t=> 110,\n\t\t\t\t\t'crop'\t\t=> true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'post-preview',\n\t\t\t\t\t'width'\t\t=> 660,\n\t\t\t\t\t'height'\t=> 400,\n\t\t\t\t\t'crop'\t\t=> false,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'post-cover',\n\t\t\t\t\t'width'\t\t=> 430,\n\t\t\t\t\t'height'\t=> 516,\n\t\t\t\t\t'crop'\t\t=> true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'post-cat-cover',\n\t\t\t\t\t'width'\t\t=> 430,\n\t\t\t\t\t'height'\t=> 230,\n\t\t\t\t\t'crop'\t\t=> true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'post-carousel-crop',\n\t\t\t\t\t'width'\t\t=> 394,\n\t\t\t\t\t'height'\t=> 525,\n\t\t\t\t\t'crop'\t\t=> true,\n\t\t\t\t),\n\t\t\t),\n\n\t\t\t'venue' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'venue-gthumbnail',\n\t\t\t\t\t'width'\t\t=> 75,\n\t\t\t\t\t'height'\t=> 75,\n\t\t\t\t\t'crop'\t\t=> true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'venue-thumbnail',\n\t\t\t\t\t'width'\t\t=> 200,\n\t\t\t\t\t'height'\t=> 200,\n\t\t\t\t\t'crop'\t\t=> true,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'venue-preview',\n\t\t\t\t\t'width'\t\t=> 660,\n\t\t\t\t\t'height'\t=> 9999,\n\t\t\t\t\t'crop'\t\t=> false,\n\t\t\t\t),\n\t\t\t),\n\t\t\t'event' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'event-preview',\n\t\t\t\t\t'width'\t\t=> 430,\n\t\t\t\t\t'height'\t=> 230,\n\t\t\t\t\t'crop'\t\t=> false,\n\t\t\t\t),\n\t\t\t),\n\t\t\t'issue' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name'\t\t=> 'issue-preview',\n\t\t\t\t\t'width'\t\t=> 600,\n\t\t\t\t\t'height'\t=> 9999,\n\t\t\t\t\t'crop'\t\t=> false,\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t}", "public function getMediaInfo($filename) {\n if($info = @getimagesize($filename)) {\n $output = array();\n $output['width'] = $info[0];\n $output['height'] = $info[1];\n $output['type'] = $info[2]; // <-- see http://www.php.net/manual/en/image.constants.php\n $output['duration'] = ''; // TODO\n $output['mime'] = $info['mime'];\n return $output;\n }\n return false;\n }", "function _fetchImagesize() {\r\n\t\t\t\t\t$size = @getimagesize($this->systemFilePath());\r\n\t\t\t\t\tif (!empty($size)) {\r\n\t\t\t\t\t\t$this->width = $size[0];\r\n\t\t\t\t\t\t$this->height = $size[1];\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "function wp_get_additional_image_sizes()\n{\n}", "function wprichfeeds_process_image_url($image_url) {\n\t$i = array();\n\t\n\tif ($image_url != '' ) {\n\t\t$i['url'] \t= '';\n\t\t$i['path'] \t= '';\n\t\t$i['size'] \t= '';\n\t\t$i['type']\t= '';\n\t\t$i['width'] = '';\n\t\t$i['height']= '';\n\t\t$i['attr'] \t= '';\n\t\t$i['mime'] \t= '';\n\t\t\n\t\t$i['url'] \t= apply_filters('wprichfeeds_image_url',$image_url);\n\t\t$i['path'] = apply_filters('wprichfeeds_image_path',$image_url);\t\t\n\t\t\n\t\tif (trim($i['path']) != '')\n\t\t\tlist($i['width'], $i['height'], $i['type'], $i['attr'], $i['mime']) = getimagesize($i['path']);\t\t\t\n\t\t\t\n\t\tif (trim($i['type']) != '')\n\t\t\t$i['type'] = image_type_to_mime_type($i['type']);\n\t\telseif (version_compare( phpversion(), '4.3.0', '>=' ))\n\t\t\t$i['type'] = $i['mime'];\n\t\t\n\t\tif ( substr($i['url'],0,strlen(get_bloginfo('url')) == get_bloginfo('url') ) ) {\n\t\t\tif (version_compare( phpversion(), '5.0', '>=' )) {\n\t\t\t\ttry {\n\t\t\t\t $i['size']\t= filesize($i['path']);\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t// \n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( filesize($i['path']) !== false) {\n\t\t\t\t\t$i['size']\t= filesize($i['path']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn $i;\n}", "function remove_image_dimensions( $html ) {\n\t$html = preg_replace( '/(width|height)=\\\"\\d*\\\"\\s/', \"\", $html );\n\treturn $html;\n}", "function get_image_info($file = NULL) \n{ \n\n if(!is_file($file)) return false; \n\n if(!$data = getimagesize($file) or !$filesize = filesize($file)) return false; \n\n $extensions = array(1 => 'gif', 2 => 'jpg', 3 => 'png', 4 => 'bmp'); \n\n return array(\n 'width'\t =>\t$data[0], \n 'height'\t=>\t$data[1], \n 'extension'\t=>\t$extensions[$data[2]], \n 'size'\t =>\t$filesize, \n 'mime'\t =>\t$data['mime']\n ); \n\n //return $result; \n}", "function remove_thumbnail_dimensions( $html, $post_id, $post_image_id ) {\n\tif ( ! strpos( $html, 'attachment-shop_single' ) ) {\n\t\t$html = preg_replace( '/^(width|height)=\\\"\\d*\\\"\\s/', '', $html );\n\t}\n\treturn $html;\n}", "protected function extractMetadataFromImage($fileName)\n {\n static::getLogger()->debug('Extracting metadata from image');\n\n $metadata = $this->getMetadata($fileName);\n $metadata['Unit'] = 'px';\n\n // Try to extract additional metadata\n if (($imageSize = getimagesize($fileName)) !== false) {\n $colorSpace = null;\n $accurate = false;\n switch ($imageSize['bits']) {\n case 1:\n $colorSpace = 'grey';\n $accurate = true;\n break;\n case 2:\n $colorSpace = 'indx'; // More general than 'grey'\n $accurate = false;\n break;\n case 8:\n if ($imageSize['mime'] === 'image/jpeg' && $imageSize['channels'] == 4) {\n $colorSpace = 'CMYK';\n $accurate = true;\n } else {\n $colorSpace = 'RGB';\n $accurate = false; // Could be 'YUV'\n }\n break;\n }\n\n if ($colorSpace !== null) {\n if (!$accurate) {\n $actualColorSpace = ColorSpace::detect($fileName);\n if ($actualColorSpace !== null) {\n $colorSpace = $actualColorSpace;\n }\n }\n $metadata['ColorSpace'] = $colorSpace;\n }\n }\n\n return $metadata;\n }", "function resize($url) {\n\treturn join(\"upload/h_260\", explode(\"upload\", $url));\n}", "function resize($url) {\n\treturn join(\"upload/h_260\", explode(\"upload\", $url));\n}", "protected static function _get_thumbnail_size() {\n\t\treturn apply_filters( 'snow_monkey_page_header_thumbnail_size', 'large' );\n\t}", "function get_intermediate_image_sizes()\n{\n}", "function kite_remove_image_size_attr( $html ) {\n $html = preg_replace( '/(width|height)=\"\\d*\"\\s/', \"\", $html );\n return $html;\n}", "function kite_remove_image_size_attr( $html ) {\n $html = preg_replace( '/(width|height)=\"\\d*\"\\s/', \"\", $html );\n return $html;\n}", "function GetPictureSize( $filename )\n\n\t{\n\n\t\t$size_info=getimagesize(\"./products_pictures/\".$filename);\n\n\t\treturn ((string)($size_info[0] + 40 )).\", \".((string)($size_info[1] + 40 ));\n\n\t}", "function has_image_size($name)\n{\n}", "function image_w($path,$width)\n{\n return ImagePicker::get_image_by_width($path,$width);\n}", "function mixtape_qodef_get_masonry_gallery_image_size($size) {\n\n\t\t$image_size = 'mixtape_qodef_square';\n\n\t\tswitch($size):\n\n\t\t\tcase 'large-width':\n\t\t\t\t$image_size = 'mixtape_qodef_large_width';\n\t\t\t\tbreak;\n\t\t\tcase 'large-height':\n\t\t\t\t$image_size = 'mixtape_qodef_large_height';\n\t\t\t\tbreak;\n\t\t\tcase 'large-width-height':\n\t\t\t\t$image_size = 'mixtape_qodef_large_width_height';\n\t\t\t\tbreak;\n\t\tendswitch;\n\n\t\treturn $image_size;\n\t}", "function getImageSize($path);", "function _pfx_remove_thumbnail_dimensions($html)\n{\n $html = preg_replace('/(width|height)=\\\"\\d*\\\"\\s/', \"\", $html);\n\n return $html;\n}", "public static function get_image_sizes()\n {\n return array(\n 'thumbnail' => array( 150, 150, true ),\n 'es-image-size-archive' => array( 875, 604, true ),\n 'es-agent-size' => array( 190, 250, true ),\n );\n }", "function get_image_size( $source, $dimension = 'both' ) {\n\t\t// Check file exists\n\t\tif( !file_exists( $source ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Get the image size\n\t\t$image_size = getimagesize( $source );\n\n\t\tif( $dimension == 'width' ) { return $image_size[0]; }\n\t\tif( $dimension == 'height' ) { return $image_size[1]; }\n\n\t\treturn $image_size;\n\t}", "public function get_image_sizes() {\n\n\t\t\tglobal $_wp_additional_image_sizes;\n\n\t\t\t$sizes = get_intermediate_image_sizes();\n\t\t\t$result = array();\n\n\t\t\tforeach ( $sizes as $size ) {\n\t\t\t\tif ( in_array( $size, array( 'thumbnail', 'medium', 'medium_large', 'large' ) ) ) {\n\t\t\t\t\t$result[ $size ] = ucwords( trim( str_replace( array( '-', '_' ), array( ' ', ' ' ), $size ) ) );\n\t\t\t\t} else {\n\t\t\t\t\t$result[ $size ] = sprintf(\n\t\t\t\t\t\t'%1$s (%2$sx%3$s)',\n\t\t\t\t\t\tucwords( trim( str_replace( array( '-', '_' ), array( ' ', ' ' ), $size ) ) ),\n\t\t\t\t\t\t$_wp_additional_image_sizes[ $size ]['width'],\n\t\t\t\t\t\t$_wp_additional_image_sizes[ $size ]['height']\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn array_merge( array( 'full' => esc_html__( 'Full', 'jet-woo-builder' ), ), $result );\n\n\t\t}", "function remove_thumbnail_dimensions( $html, $post_id, $post_image_id ) {\n $html = preg_replace( '/(width|height)=\\\"\\d*\\\"\\s/', \"\", $html);\n return $html;\n }", "function remove_image_size($name)\n{\n}", "function zuhaus_mikado_get_image_sizes() {\n\tglobal $_wp_additional_image_sizes;\n\t\n\t$sizes = array();\n\t\n\tforeach ( get_intermediate_image_sizes() as $_size ) {\n\t\tif ( in_array( $_size, array( 'medium', 'large' ) ) ) {\n\t\t\t$sizes[ $_size ]['width'] = get_option( \"{$_size}_size_w\" );\n\t\t\t$sizes[ $_size ]['height'] = get_option( \"{$_size}_size_h\" );\n\t\t\t$sizes[ $_size ]['crop'] = (bool) get_option( \"{$_size}_crop\" );\n\t\t} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {\n\t\t\t$sizes[ $_size ] = array(\n\t\t\t\t'width' => $_wp_additional_image_sizes[ $_size ]['width'],\n\t\t\t\t'height' => $_wp_additional_image_sizes[ $_size ]['height'],\n\t\t\t\t'crop' => $_wp_additional_image_sizes[ $_size ]['crop'],\n\t\t\t);\n\t\t}\n\t}\n\t\n\treturn $sizes;\n}", "function getimginfo($file){\n \t$imagesize = file_exists($file) ? getimagesize($file) : null;\n return $imagesize;\n }", "public static function get_image_size_names() {\n\t\treturn apply_filters( 'image_size_names_choose', array(\n\t\t\t'thumbnail' => __( 'Thumbnail', 'blazersix-widget-image-i18n' ),\n\t\t\t'medium' => __( 'Medium', 'blazersix-widget-image-i18n' ),\n\t\t\t'large' => __( 'Large', 'blazersix-widget-image-i18n' ),\n\t\t\t'full' => __( 'Full Size', 'blazersix-widget-image-i18n' )\n\t\t) );\n\t}", "function remove_thumbnail_dimensions( $html, $post_id, $post_image_id ) {\n $html = preg_replace( '/(width|height)=\\\"\\d*\\\"\\s/', \"\", $html);\n return $html;\n}", "public function get_image_sizes() {\n\n\t\t\tglobal $_wp_additional_image_sizes;\n\n\t\t\t$sizes = get_intermediate_image_sizes();\n\t\t\t$result = array();\n\n\t\t\tforeach ( $sizes as $size ) {\n\t\t\t\tif ( in_array( $size, array( 'thumbnail', 'medium', 'medium_large', 'large' ) ) ) {\n\t\t\t\t\t$result[ $size ] = ucwords( trim( str_replace( array( '-', '_' ), array( ' ', ' ' ), $size ) ) );\n\t\t\t\t} else {\n\t\t\t\t\t$result[ $size ] = sprintf(\n\t\t\t\t\t\t'%1$s (%2$sx%3$s)',\n\t\t\t\t\t\tucwords( trim( str_replace( array( '-', '_' ), array( ' ', ' ' ), $size ) ) ),\n\t\t\t\t\t\t$_wp_additional_image_sizes[ $size ]['width'],\n\t\t\t\t\t\t$_wp_additional_image_sizes[ $size ]['height']\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn array_merge( array( 'full' => esc_html__( 'Full', 'jet-cw' ), ), $result );\n\n\t\t}", "function width()\r\n {\r\n if ( eZFile::file_exists( $this->filePath( true ) ) and is_file( $this->filePath( true ) ) )\r\n {\r\n $size = getimagesize( $this->filePath( true ) );\r\n return $size[0];\r\n }\r\n else\r\n return 120;\r\n }", "function flotheme_get_images_sizes() {\n\treturn array();\n}", "public function getImageResolution () {}", "public function getImageDimensions()\n\t{\n\t\treturn [65, 65];\n\t}", "function get_thumbnail($image_name)\n{\n $pieces = explode('.', $image_name);\n\n return $pieces[0] . '_thumb.' . $pieces[1];\n}", "function hys_get_thumbnail($image_url, $size = 'thumbnail') {\n\t\t$size = (in_array($size,array('thumbnail','medium','large','full'))) \n\t\t\t\t\t\t\t\t\t\t? strtolower($size) : 'thumbnail';\n\t\tif ($size == 'full')\n\t\t\treturn $image_url;\n\t\t\n\t\t//break down the file url string\n\t\t$ext = pathinfo($image_url, PATHINFO_EXTENSION);\n\t\t$file = str_replace('.'.$ext,'',$image_url);\n\t\t$ext = strtolower($ext);\n\t\t\n\t\t//get the ap width height\n\t\t$width = get_option($size.'_size_w');\n\t\t$height = get_option($size.'_size_h');\n\t\t\n\t\t//replace \"jpeg\" w wordpress \"jpg\"\n\t\t$ext = ($ext == 'jpeg') ? 'jpg': $ext;\n\t\t\n\t\t//reconstruct url\n\t\t$thumb = \"{$file}-{$width}x{$height}.{$ext}\";\n\t\treturn $thumb;\n\t}", "function affinity_mikado_get_masonry_gallery_image_size($size) {\n\n\t\t$image_size = 'affinity_mikado_square';\n\n\t\tswitch ($size):\n\n\t\t\tcase 'large-width':\n\t\t\t\t$image_size = 'affinity_mikado_large_width';\n\t\t\t\tbreak;\n\t\t\tcase 'large-height':\n\t\t\t\t$image_size = 'affinity_mikado_large_height';\n\t\t\t\tbreak;\n\t\t\tcase 'large-width-height':\n\t\t\t\t$image_size = 'affinity_mikado_large_width_height';\n\t\t\t\tbreak;\n\t\tendswitch;\n\n\t\treturn $image_size;\n\t}", "function _custom_theme_init_images_size()\n{\n\t//add_image_size( '1920', 1920, 9999 );\n}", "function image_size() {\n //Resources\n add_image_size('sample_pack', 720, 337, true);\n add_image_size( 'slider', 1920, 500, true);\n}", "function ceres_retina_support_create_images( $file, $width, $height, $crop = false ) {\r\n if ( $width || $height ) {\r\n $resized_file = wp_get_image_editor( $file );\r\n if ( ! is_wp_error( $resized_file ) ) {\r\n $filename = $resized_file->generate_filename( $width . 'x' . $height . '@2x' );\r\n \r\n $resized_file->resize( $width * 2, $height * 2, $crop );\r\n $resized_file->save( $filename );\r\n \r\n $info = $resized_file->get_size();\r\n \r\n return array(\r\n 'file' => wp_basename( $filename ),\r\n 'width' => $info['width'],\r\n 'height' => $info['height'],\r\n );\r\n }\r\n }\r\n return false;\r\n}", "function wp_calculate_image_sizes($size, $image_src = \\null, $image_meta = \\null, $attachment_id = 0)\n{\n}", "function codeless_get_additional_image_sizes(){\n $add = codeless_wp_get_additional_image_sizes();\n $array = array('theme_default' => 'default', 'full' => 'full');\n\n foreach($add as $size => $val){\n $array[$size] = $size . ' - ' . $val['width'] . 'x' . $val['height'];\n }\n\n return $array;\n}", "function _dt_gallery_get_image_sizes() {\n return [2, 3, 4, 5, 6, 7, 8, 12];\n}", "function imageSizeFromAcf($imageId, $imageSize = '') {\n // Get the array of available images for the image ID and size\n $imageArray = wp_get_attachment_image_src($imageId, $imageSize);\n // Grab the url for the requested image size\n $imageUrl = $imageArray[0];\n\n return $imageUrl;\n}", "function wsu_medicine_setup_image_sizes() {\n\tadd_image_size( 'medicine-featured-image', 1600, 99164 );\n}", "public function getImageDimensions() {\n\t\tIf ($this->isBuilderObject) {\n\t\t\tlist($width, $height) = $this->gifBuilder->getImageDimensions($this->imageFile);\n\t\t} else {\n\t\t\tlist($width, $height) = getimagesize($this->getImageFile(TRUE));\n\t\t}\n\t\treturn array('width'=>$width, 'height'=>$height, 'builderObject'=>$this->isBuilderObject);\n\t}", "function exif_imagetype ( $fileName ) {\n\t\tif ( ( $info = getimagesize( $fileName ) ) !== false ) {\n\t\t\treturn $info[2];\n\t\t}\n\t\treturn false;\n\t}", "function basethemechild_get_theme_image_sizes() {\n $image_sizes = array();\n\n /** Example\n $image_sizes[ 'banner' ] = array(\n 'width' => 1600,\n 'height' => 500,\n /**\n * Whether to crop the image to the exact dimensions specified.\n * true = hard crop, will lose some of the image.\n * false = soft crop, the whole image will be visible but may not \n * be the exact width and height specified above.\n * The image will be scaled to the largest of the 2 dimensions.\n * /\n 'hard_crop' => true,\n );\n //*/\n\n /**\n * Filter the image sizes.\n * @param array $image_sizes The custom sizes currently defined.\n * @return array\n */\n return apply_filters( 'basethemechild_custom_image_sizes', $image_sizes );\n}", "function people_image_size() {\n\tadd_image_size( 'people_member_archive_thumb', 500, 374, true );\n\n\t// image size for single members page\n\tadd_image_size( 'people_member_single_thumb', 424, 317, true );\n\n}", "function sc_get_image_sizes() {\n\t\tglobal $_wp_additional_image_sizes;\n\n\t\t$sizes = array();\n\n\t\tforeach ( get_intermediate_image_sizes() as $_size ) {\n\t\t\tif ( in_array( $_size, array('thumbnail', 'medium', 'medium_large', 'large') ) ) {\n\t\t\t\t$sizes[ $_size ]['width'] = get_option( \"{$_size}_size_w\" );\n\t\t\t\t$sizes[ $_size ]['height'] = get_option( \"{$_size}_size_h\" );\n\t\t\t\t$sizes[ $_size ]['crop'] = (bool) get_option( \"{$_size}_crop\" );\n\t\t\t} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {\n\t\t\t\t$sizes[ $_size ] = array(\n\t\t\t\t\t'width' => $_wp_additional_image_sizes[ $_size ]['width'],\n\t\t\t\t\t'height' => $_wp_additional_image_sizes[ $_size ]['height'],\n\t\t\t\t\t'crop' => $_wp_additional_image_sizes[ $_size ]['crop'],\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn $sizes;\n\t}", "function remove_thumbnail_dimensions( $html )\r\n{\r\n $html = preg_replace('/(width|height)=\\\"\\d*\\\"\\s/', \"\", $html);\r\n return $html;\r\n}", "function _getThumbnailDimensions($parameters=array()) {\r\n\r\n\t\t\t\t\t$result = array();\r\n\r\n\t\t\t\t\t// First of all some minor performance tweaking\r\n\t\t\t\t\t// with a little help of an internal info cache\r\n\r\n\t\t\t\t\t$cacheKey = $this->_getUniqueThumbnailIdentifier($parameters);\r\n\t\t\t\t\tif (isset($this->_thumbInfoCache[$cacheKey])) {\r\n\r\n\t\t\t\t\t\t// We have a cachehit\r\n\t\t\t\t\t\t// That means we calculated the dimensions\r\n\t\t\t\t\t\t// before and just redeliver the result\r\n\t\t\t\t\t\t$result = $this->_thumbInfoCache[$cacheKey];\r\n\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t// No cachehit - Let's do some fetching or calculation\r\n\t\t\t\t\t\t// to get that thumbnail dimensions\r\n\r\n\t\t\t\t\t\tif (file_exists($this->_getUniqueThumbnailPath($parameters))) {\r\n\r\n\t\t\t\t\t\t\t// Hehe, we have a file - Let's get the dimensions directly\r\n\t\t\t\t\t\t\t$size = getimagesize($this->_getUniqueThumbnailPath($parameters));\r\n\t\t\t\t\t\t\t$result['width'] = $size[0];\r\n\t\t\t\t\t\t\t$result['height'] = $size[1];\r\n\r\n\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\t// Hmmm. no file generated yet. We have to do an calculation\r\n\t\t\t\t\t\t\t// based on the given parameters\r\n\r\n\t\t\t\t\t\t\t// Since i don't want to reverse engeneer phpThumb\r\n\t\t\t\t\t\t\t// (and i hope that future versions won't change that much)\r\n\t\t\t\t\t\t\t// i'll use internal methods of the phpThumb class for that\r\n\r\n\t\t\t\t\t\t\trequire_once realpath(dirname(__file__) . '/' . YAPB_PHPTHUMB_DIR . '/phpthumb.class.php');\r\n\t\t\t\t\t\t\t$phpThumb = new phpthumb();\r\n\r\n\t\t\t\t\t\t\t// Default value for jpg quality gets set right here before\r\n\t\t\t\t\t\t\t// going through the given parameters. If no option is set,\r\n\t\t\t\t\t\t\t// i do define 80 as a good balance between image quality and\r\n\t\t\t\t\t\t\t// file size.\r\n\r\n\t\t\t\t\t\t\t$phpThumb->q = get_option('yapb_phpthumb_jpeg_quality', 80);\r\n\r\n\t\t\t\t\t\t\t// First fetch and parse the parameters we need,\r\n\t\t\t\t\t\t\t// and give them to the phpThumb instance\r\n\r\n\t\t\t\t\t\t\t$parametersWeSearchFor = array('w', 'h', 'wp', 'hp', 'wl', 'hl', 'ws', 'hs', 'zc', 'q');\r\n\t\t\t\t\t\t\tfor ($i=0, $len=count($parameters); $i<$len; $i++) {\r\n\t\t\t\t\t\t\t\tpreg_match('/([^=]+)=(.*)/', $parameters[$i], $matches);\r\n\t\t\t\t\t\t\t\t$key = $matches[1];\r\n\t\t\t\t\t\t\t\t$value = $matches[2];\r\n\t\t\t\t\t\t\t\tif (in_array($key, $parametersWeSearchFor)) {\r\n\t\t\t\t\t\t\t\t\t$phpThumb->$key = $value;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// For the calculation phpThumb needs the size of the original image\r\n\t\t\t\t\t\t\t$phpThumb->source_width = $this->width;\r\n\t\t\t\t\t\t\t$phpThumb->source_height = $this->height;\r\n\r\n\t\t\t\t\t\t\t// Now let phpThumb calculate the size\r\n\t\t\t\t\t\t\t$phpThumb->CalculateThumbnailDimensions();\r\n\r\n\t\t\t\t\t\t\t// TODO: fetch the desired dimensions and return them\r\n\t\t\t\t\t\t\t$result['width'] = $phpThumb->thumbnail_width;\r\n\t\t\t\t\t\t\t$result['height'] = $phpThumb->thumbnail_height;\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn $result;\r\n\r\n\t\t\t\t}", "function get_thumbnail($image_name)\n{\n if ($image_name) {\n $pieces = explode('.', $image_name);\n\n return $pieces[0] . '_thumb.' . $pieces[1];\n }\n\n}", "function elit_get_image_sizes() {\n \tglobal $_wp_additional_image_sizes;\n \n \t$sizes = array();\n \n \tforeach ( get_intermediate_image_sizes() as $_size ) {\n \t\tif ( in_array( $_size, array('thumbnail', 'medium', 'medium_large', 'large') ) ) {\n \t\t\t$sizes[ $_size ]['width'] = get_option( \"{$_size}_size_w\" );\n \t\t\t$sizes[ $_size ]['height'] = get_option( \"{$_size}_size_h\" );\n \t\t\t$sizes[ $_size ]['crop'] = (bool) get_option( \"{$_size}_crop\" );\n \t\t} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {\n \t\t\t$sizes[ $_size ] = array(\n \t\t\t\t'width' => $_wp_additional_image_sizes[ $_size ]['width'],\n \t\t\t\t'height' => $_wp_additional_image_sizes[ $_size ]['height'],\n \t\t\t\t'crop' => $_wp_additional_image_sizes[ $_size ]['crop'],\n \t\t\t);\n \t\t}\n \t}\n \n \treturn $sizes;\n }", "function starter_custom_thumbnail_size() {\n\tadd_image_size( 'w200', 200 );\n\tadd_image_size( 'w400', 400 );\n\tadd_image_size( 'w600', 600 );\n\tadd_image_size( 'w800', 800 );\n\tadd_image_size( 'w1000', 1000 );\n\tadd_image_size( 'w1200', 1200 );\n\tadd_image_size( 'w1400', 1400 );\n\tadd_image_size( 'w1600', 1600 );\n\tadd_image_size( 'w1800', 1800 );\n\tadd_image_size( 'w2000', 2000 );\n}", "private function parseDimensions($dimensions)\n {\n $sizes = array();\n\n $sizes = explode('x', $dimensions);\n $width = (int) isset($sizes[0]) ? $sizes[0] : env('IMAGES_DEFAULT_X', 600);\n $height = (int) isset($sizes[1]) ? $sizes[1] : env('IMAGES_DEFAULT_y', 400);\n\n if($width < 1 || $width > env('IMAGES_MAX_X', 600))\n {\n $width = env('IMAGES_DEFAULT_X', 600);\n }\n\n if($height < 1 || $height > env('IMAGES_MAX_Y', 600))\n {\n $height = env('IMAGES_DEFAULT_Y', 400);\n }\n\n return array(\n 'x' => $width,\n 'y' => $height\n );\n }", "function remove_thumbnail_dimensions( $html ) {\r\n $html = preg_replace('/(width|height)=\\\"\\d*\\\"\\s/', \"\", $html);\r\n return $html;\r\n}", "function sukelius_add_image_sizes() { \r\n\tadd_image_size( 'sukelius-slider-image', 940, 385, true ); \r\n}", "function image_hwstring($width, $height)\n{\n}", "private function get_image_size( $instance ) {\r\n\t\tif ( !empty( $instance['size'] ) && $instance['size'] != self::CUSTOM_IMAGE_SIZE_SLUG ) {\r\n\t\t\t$size = $instance['size'];\r\n\t\t} elseif ( isset( $instance['width'] ) && is_numeric($instance['width']) && isset( $instance['height'] ) && is_numeric($instance['height']) ) {\r\n\t\t\t//$size = array(abs($instance['width']),abs($instance['height']));\r\n\t\t\t$size = array($instance['width'],$instance['height']);\r\n\t\t} else {\r\n\t\t\t$size = 'full';\r\n\t\t}\r\n\t\treturn $size;\r\n\t}", "private static function get_image_sizes() {\n\t\tglobal $_wp_additional_image_sizes;\n\t\n\t\t$sizes = array();\n\t\n\t\tforeach ( get_intermediate_image_sizes() as $_size ) {\n\t\t\tif ( in_array( $_size, array('thumbnail', 'medium', 'medium_large', 'large') ) ) {\n\t\t\t\t$sizes[ $_size ]['width'] = get_option( \"{$_size}_size_w\" );\n\t\t\t\t$sizes[ $_size ]['height'] = get_option( \"{$_size}_size_h\" );\n\t\t\t\t$sizes[ $_size ]['crop'] = (bool) get_option( \"{$_size}_crop\" );\n\t\t\t} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {\n\t\t\t\t$sizes[ $_size ] = array(\n\t\t\t\t\t'width' => $_wp_additional_image_sizes[ $_size ]['width'],\n\t\t\t\t\t'height' => $_wp_additional_image_sizes[ $_size ]['height'],\n\t\t\t\t\t'crop' => $_wp_additional_image_sizes[ $_size ]['crop'],\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\n\t\treturn $sizes;\n\t}", "public function getDimensions($dim = \"string\") {\n\t\tif($this->getField('Filename')) {\n\n\t\t\t$imagefile = $this->getFullPath();\n\t\t\tif( $this->fileExists() ) {\n\t\t\t\t$size = getimagesize($imagefile);\n\t\t\t\treturn ($dim === \"string\") ? \"$size[0]x$size[1]\" : $size[$dim];\n\t\t\t} else {\n\t\t\t\treturn ($dim === \"string\") ? \"file '$imagefile' not found\" : null;\n\t\t\t}\n\t\t}\n\t}", "function eino_add_image_sizes() {\n\n\tadd_image_size( 'eino-thumbnail-download', 330, 330, true );\n\tadd_image_size( 'eino-bigger-image', 860, 9999 );\n\t\n}", "function remove_thumbnail_dimensions( $html )\n{\n $html = preg_replace('/(width|height)=\\\"\\d*\\\"\\s/', \"\", $html);\n return $html;\n}", "function remove_thumbnail_dimensions( $html )\n{\n $html = preg_replace('/(width|height)=\\\"\\d*\\\"\\s/', \"\", $html);\n return $html;\n}", "function remove_thumbnail_dimensions( $html )\n{\n $html = preg_replace('/(width|height)=\\\"\\d*\\\"\\s/', \"\", $html);\n return $html;\n}", "function remove_thumbnail_dimensions( $html )\n{\n $html = preg_replace('/(width|height)=\\\"\\d*\\\"\\s/', \"\", $html);\n return $html;\n}", "function remove_thumbnail_dimensions( $html )\n{\n $html = preg_replace('/(width|height)=\\\"\\d*\\\"\\s/', \"\", $html);\n return $html;\n}", "function remove_thumbnail_dimensions( $html )\n{\n $html = preg_replace('/(width|height)=\\\"\\d*\\\"\\s/', \"\", $html);\n return $html;\n}", "function remove_thumbnail_dimensions( $html )\n{\n $html = preg_replace('/(width|height)=\\\"\\d*\\\"\\s/', \"\", $html);\n return $html;\n}", "function remove_thumbnail_dimensions( $html )\n{\n $html = preg_replace('/(width|height)=\\\"\\d*\\\"\\s/', \"\", $html);\n return $html;\n}", "function siteorigin_widgets_get_image_sizes() {\n\tglobal $_wp_additional_image_sizes;\n\n\t$sizes = array();\n\n\tforeach ( get_intermediate_image_sizes() as $_size ) {\n\t\tif ( in_array( $_size, array('thumbnail', 'medium', 'medium_large', 'large') ) ) {\n\t\t\t$sizes[ $_size ]['width'] = get_option( \"{$_size}_size_w\" );\n\t\t\t$sizes[ $_size ]['height'] = get_option( \"{$_size}_size_h\" );\n\t\t\t$sizes[ $_size ]['crop'] = (bool) get_option( \"{$_size}_crop\" );\n\t\t} elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) {\n\t\t\t$sizes[ $_size ] = array(\n\t\t\t\t'width' => $_wp_additional_image_sizes[ $_size ]['width'],\n\t\t\t\t'height' => $_wp_additional_image_sizes[ $_size ]['height'],\n\t\t\t\t'crop' => $_wp_additional_image_sizes[ $_size ]['crop'],\n\t\t\t);\n\t\t}\n\t}\n\n\treturn $sizes;\n}", "public function GetSize()\n {\n $command = \"{$this->imagemagickdir}identify -verbose \\\"\" . $this->temp_dir . '/tmp' . $this->count . '_' . $this->temp_file . \"\\\"\";\n exec($command, $returnarray, $returnvalue);\n if ($returnvalue){\n die(\"ImageMagick: Corrupt image\");\n }\n else {\n $num = count($returnarray);\n for ($i = 0; $i < $num; $i++)\n $returnarray[$i] = trim($returnarray[$i]);\n $this->image_data = $returnarray;\n }\n $num = count($this->image_data);\n for ($i = 0; $i < $num; $i++)\n if(stristr($this->image_data[$i], 'Geometry') !== FALSE) {\n $tmp1 = explode(' ', trim($this->image_data[$i]));\n $tmp2 = explode('x', $tmp1[1]);\n $tmp2[0] = (int)$tmp2[0];\n $tmp2[1] = (int)$tmp2[1];\n $this->size = $tmp2;\n return $tmp2;\n }\n }", "public function getThumbnailImageSize() {\n\t\t\treturn $this->getImageSizeWithLabelOfImageWithKey('thumbnail','image1');\n\t\t}", "function cardealer_remove_img_dimensions( $html ) {\r\n\t// Loop through all <img> tags\r\n\tif ( preg_match( '/<img[^>]+>/ims', $html, $matches ) ) {\r\n\t\tforeach ( $matches as $match ) {\r\n\t\t\t// Replace all occurences of width/height\r\n\t\t\t$clean = preg_replace( '/(width|height)=[\"\\'\\d%\\s]+/ims', \"\", $match );\r\n\t\t\t// Replace with result within html\r\n\t\t\t$html = str_replace( $match, $clean, $html );\r\n\t\t}\r\n\t}\r\n\treturn $html;\r\n}", "function remove_thumbnail_dimensions( $html ){\n $html = preg_replace('/(width|height)=\\\"\\d*\\\"\\s/', \"\", $html);\n return $html;\n}" ]
[ "0.68239474", "0.67383146", "0.67383146", "0.67249143", "0.6657643", "0.6551852", "0.65450436", "0.6533207", "0.64278257", "0.64100075", "0.63790077", "0.6359987", "0.6352573", "0.63500625", "0.6327257", "0.62856823", "0.627269", "0.6271889", "0.62463814", "0.6181209", "0.6178182", "0.61620903", "0.6154468", "0.61501914", "0.61445886", "0.6117564", "0.6113435", "0.61016273", "0.60752934", "0.60601336", "0.6058209", "0.603952", "0.6022349", "0.6022349", "0.6011269", "0.60004187", "0.5986865", "0.5986865", "0.5984519", "0.598017", "0.5972879", "0.59726566", "0.59717095", "0.596658", "0.59615594", "0.5958717", "0.59555024", "0.5947203", "0.594515", "0.5944079", "0.5943416", "0.59406966", "0.5937745", "0.59306777", "0.5924818", "0.59215677", "0.59179485", "0.5917803", "0.59168065", "0.59102666", "0.59027636", "0.5899749", "0.5895424", "0.588376", "0.58830124", "0.5866768", "0.5866337", "0.585006", "0.58483887", "0.5826398", "0.58240974", "0.5823767", "0.58232", "0.58215094", "0.5819568", "0.5817369", "0.58110225", "0.5810882", "0.5802377", "0.57945246", "0.57871526", "0.5780411", "0.57758605", "0.57722217", "0.5766669", "0.5764354", "0.5761945", "0.57600766", "0.57600766", "0.57600766", "0.57600766", "0.57600766", "0.57600766", "0.57600766", "0.57600766", "0.5759689", "0.57575375", "0.5757177", "0.5753096", "0.57470566" ]
0.7288521
0
Get the width of a specific image size.
Получить ширину конкретного размера изображения.
function get_image_width( $size ) { if ( ! $size = get_image_size( $size ) ) { return false; } if ( isset( $size['width'] ) ) { return $size['width']; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getWidth()\n {\n $imageSizes = $this->getImageSizes();\n return $imageSizes[0];\n }", "public function getWidth()\n {\n return $this->isImage() ? $this->imageSize[0] : null;\n }", "public static function get_image_width( $size ) {\n if ( ! $size = self::get_image_size( $size ) ) {\n return false;\n }\n\n if ( isset( $size['width'] ) ) {\n return $size['width'];\n }\n\n return false;\n }", "public function width()\n {\n\n if (empty($this->width)) {\n\n $this->processGetImageSize();\n\n }\n\n return $this->width;\n\n }", "public function getWidth($image) {\n $sizes = getimagesize($image);\n $width = $sizes[0];\n return $width;\n }", "function getWidth($image) \r\n {\r\n $size = getimagesize($image);\r\n $width = $size[0];\r\n return $width;\r\n }", "public function getImageWidth()\n {\n if ($this->getData('imagewidth') == '') {\n return DEFAULT_IMAGE_WIDTH;\n }\n return (int)$this->getData('imagewidth');\n }", "function getWidth($image) {\n $size = getimagesize($image);\n $width = $size[0];\n return $width;\n }", "public function getImageWidth()\n {\n if ( empty($this->getData('imagewidth')) ) {\n return self::DEFAULT_IMAGE_WIDTH;\n }\n\n return (int) $this->getData('imagewidth');\n }", "public function getWidth() {\n return imagesx($this->image);\n }", "function getWidth($image) {\n\t$sizes = getimagesize($image);\n\t$width = $sizes[0];\n\treturn $width;\n}", "function getWidth($image) {\n\t\t$sizes = getimagesize($image);\n\t\t$width = $sizes[0];\n\t\treturn $width;\n\t}", "function getWidth($image) {\r\n $sizes = getimagesize($image);\r\n $width = $sizes[0];\r\n return $width;\r\n}", "public function getWidth()\n\t{\n\t\treturn imagesx($this->image());\n\t}", "function getWidth($image) {\n\t\t$size = getimagesize($image);\n\t\t$width = $size[0];\n\t\treturn $width;\n\t}", "public function getWidth($image) \n {\n \n $size = getimagesize($image);\n $width = $size[0];\n return $width;\n }", "function getWidth($image) {\n\t$size = getimagesize($image);\n\t$width = $size[0];\n\treturn $width;\n}", "function getWidth($image) {\n\t$size = getimagesize($image);\n\t$width = $size[0];\n\treturn $width;\n}", "function getWidth($image) {\n\t$size = getimagesize($image);\n\t$width = $size[0];\n\treturn $width;\n}", "function getWidth($image) {\n $sizes = getimagesize($image);\n $width = $sizes[0];\n return $width;\n}", "public function width()\n {\n return imagesx($this->image);\n }", "public function getWidth($image) {\n $size = getimagesize($image);\n $width = $size[0];\n return $width;\n }", "public function getWidth()\n {\n return imagesx($this->currentImage);\n }", "function getWidth($image) {\n $size = getimagesize($image);\n $width = $size[0];\n return $width;\n}", "function getWidth($image) {\r\n\t$sizes = getimagesize($image);\r\n\t$width = $sizes[0];\r\n\treturn $width;\r\n}", "function width()\r\n {\r\n if ( eZFile::file_exists( $this->filePath( true ) ) and is_file( $this->filePath( true ) ) )\r\n {\r\n $size = getimagesize( $this->filePath( true ) );\r\n return $size[0];\r\n }\r\n else\r\n return 120;\r\n }", "public function width()\n {\n return $this->getInterventionImage()->width();\n }", "public function getImageWidth() {\r\n\t\t$current = $this->getCurrentImage();\r\n\t\treturn $current['width'];\r\n\t}", "public function getWidth() {\n if(!$this->getProcessed()) {\n $this->processImage();\n }\n return $this->width;\n }", "public function imageWidth(): int\n {\n return $this->imageWidth;\n }", "protected function _getImageWidth()\n {\n return imagesx($this->_resource);\n }", "public function getImageWidth()\n {\n return $this->image_width;\n }", "public function getWidthAttribute()\n {\n if ($this->isImage()) {\n $dimensions = $this->getImageDimensions();\n\n return $dimensions[0];\n }\n }", "public function getWidth(){\n return imagesx($this->outputImage);\n }", "public function getWidth() {\n list($width, $height) = explode('x', $this->getSize());\n return $width;\n }", "public function getImgWidth()\n\t{\n\t\treturn $this->imgWidth;\n\t}", "public function getImgWidth()\n {\n return $this->strImgWidth;\n }", "public function width()\n {\n return imagesx($this->resource());\n }", "public function getWidth() {\n\t\treturn $this->originalDimensions['width'];\n\t}", "public function getWidth() {\n\t\treturn $this->originalDimensions['width'];\n\t}", "public final function getWidth() : int\n {\n\n return $this->disposed ? 0 : $this->size->getWidth();\n\n }", "public function get_image_width()\n {\n }", "public function getResizeWidth(): int\n {\n return (int)$this->getData(self::RESIZE_WIDTH);\n }", "public function getWidth(): int\n {\n return $this->width;\n }", "public function getWidth(): int\n {\n return $this->width;\n }", "function getWidth($image)\n{\n $size = cms_getimagesize($image);\n $width = $size[0];\n return $width;\n}", "public function getWidth() : int\n {\n return $this->width;\n }", "public function getWidth() : int\n {\n return $this->width;\n }", "function ImageWidth()\n\t{\n\t\tif (!$this->ImageID)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn imagesx($this->ImageID);\n\t}", "function getImgWidth($img) {\n list($width, $height) = getimagesize($img);\n return $width;\n}", "public function getImageWidth () {}", "public function getWidth() : int\n\t{\n\t\treturn $this->width;\n\t}", "public function getWidth()\n\t{\n\t\treturn self::getInfo($this->file, 'width');\n\t}", "public function getWidth(): int\n {\n return $this->_width;\n }", "public function getImageWidth() {\n return Mage::getStoreConfig('hawksearch_datafeed/imagecache/image_width');\n }", "public function getWidth() {\n\t\treturn $this->iWidth;\n\t}", "public function get_width() {\n\t\treturn $this->width;\n\t}", "private function getCoverImageWidth()\n {\n return $this->isRetinaClient() ? 290 : 145;\n }", "public function getIconWidth()\n {\n return $this->getIconForType($this->getCardType())['width'];\n }", "public function getWidth(): int\n\t{\n\t\treturn (int) $this->productWidth;\n\t}", "public function getImageWidth(): ?int\n {\n return $this->iImageWidth;\n }", "public function getIconWidth() { return $this->_imgWidth; }", "public function getWidth(): int\n {\n // So we don't do -box[0].\n return max($this->box[2], $this->box[4]);\n }", "public function getWidth()\n {\n return $this->attributes->mustHave('width')->asInteger();\n }", "public function wcva_get_image_width($thumbsize) {\r\n\t $width=32;\r\n\t \r\n\t switch($thumbsize) {\r\n\t \r\n\t case \"small\":\r\n\t $width=32;\r\n\t break;\r\n\t \r\n\t case \"extrasmall\":\r\n\t $width=22;\r\n\t break;\r\n\t \r\n\t case \"medium\":\r\n\t $width=40;\r\n\t break;\r\n\t \r\n\t case \"big\":\r\n\t $width=60;\r\n\t break;\r\n\t \r\n\t case \"extrabig\":\r\n\t $width=90;\r\n\t break;\r\n\t\t \r\n\t\t case \"custom\":\r\n\t $width=get_option('woocommerce_custom_swatch_width');\r\n\t break;\r\n\t \r\n\t default : \r\n\t $width=32;\r\n\t \r\n\t }\r\n\t \r\n\t return $width;\r\n\t }", "public function getWidth() {\n\t\treturn $this->width;\n\t}", "public function getWidth() {\n\t\treturn $this->width;\n\t}", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->width;\n }", "public function getWidth()\n {\n return $this->get('width');\n }", "public function getWidth() {\r\n\t\treturn $this->width; \r\n\t}", "#[Pure]\n public function getWidth() : int\n {\n return \\imagesx($this->instance);\n }", "protected function getSize()\n {\n return $this->config->get('image.avatar_width');\n }", "public function getWidth();", "public function getWidth();", "public function getWidth();", "public function getWidth();", "public function getWidth();", "public function GetWidth () {\n\t\treturn $this->width;\n\t}", "public function getWidthPixels()\n {\n return $this->width_pixels;\n }", "public function getWidthPixels()\n {\n return $this->width_pixels;\n }", "public function getWidth()\r\n {\r\n return $this->width;\r\n }", "public function getOriginalWidth()\n {\n return $this->_getImageObj()->getOriginalWidth();\n }", "public function getWidth()\n {\n return $this->i->width;\n }", "function getThumbnailWidth($parameters = array()) {\r\n\t\t\t$dimension = $this->_getThumbnailDimensions($parameters);\r\n\t\t\treturn $dimension['width'];\r\n\t\t}", "public function getWidth(): int;", "public function getWidth(): int;" ]
[ "0.81814134", "0.79311675", "0.78200465", "0.78013", "0.7779817", "0.7707976", "0.7698518", "0.769431", "0.76530254", "0.76257336", "0.76124", "0.7611352", "0.76012886", "0.75825125", "0.7572024", "0.7569253", "0.7568764", "0.7568764", "0.7568764", "0.7566878", "0.7544901", "0.75307375", "0.7516891", "0.74754137", "0.7467746", "0.7461952", "0.7448916", "0.7435506", "0.74270356", "0.74054444", "0.73975736", "0.73853916", "0.73550344", "0.729944", "0.7299251", "0.7283911", "0.7168129", "0.71123254", "0.70937055", "0.70937055", "0.70637345", "0.7013396", "0.69995457", "0.69784415", "0.69784415", "0.69688743", "0.69617933", "0.69617933", "0.69485784", "0.69265926", "0.6878791", "0.68526375", "0.6834311", "0.6827253", "0.67368186", "0.67205316", "0.6699674", "0.6673665", "0.66580945", "0.66391504", "0.6625256", "0.6618038", "0.66143566", "0.66004217", "0.6585689", "0.65837556", "0.65837556", "0.6572924", "0.6572924", "0.6572924", "0.6572924", "0.6572924", "0.6572924", "0.6572924", "0.6572924", "0.6572924", "0.6572924", "0.6572924", "0.6572924", "0.6572924", "0.6572924", "0.6572924", "0.65603465", "0.65590566", "0.65399903", "0.6521835", "0.6507322", "0.6507322", "0.6507322", "0.6507322", "0.6507322", "0.6497813", "0.6496966", "0.6496966", "0.6493669", "0.64887387", "0.64797634", "0.6475849", "0.6462621", "0.6462621" ]
0.7948176
1
Get the height of a specific image size.
Получить высоту конкретного размера изображения.
function get_image_height( $size ) { if ( ! $size = get_image_size( $size ) ) { return false; } if ( isset( $size['height'] ) ) { return $size['height']; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHeight()\n {\n $imageSizes = $this->getImageSizes();\n return $imageSizes[1];\n }", "public function getHeight()\n {\n return $this->isImage() ? $this->imageSize[1] : null;\n }", "public static function get_image_height( $size ) {\n if ( ! $size = self::get_image_size( $size ) ) {\n return false;\n }\n\n if ( isset( $size['height'] ) ) {\n return $size['height'];\n }\n\n return false;\n }", "public function getHeight() {\n return imagesy($this->image);\n }", "public function getHeight()\n\t{\n\t\treturn imagesy($this->image());\n\t}", "function getHeight($image) \r\n {\r\n $size = getimagesize($image);\r\n $height = $size[1];\r\n return $height;\r\n }", "function getHeight($image) {\n $size = getimagesize($image);\n $height = $size[1];\n return $height;\n }", "function getHeight($image) {\n\t$size = getimagesize($image);\n\t$height = $size[1];\n\treturn $height;\n}", "function getHeight($image) {\n\t$size = getimagesize($image);\n\t$height = $size[1];\n\treturn $height;\n}", "function getHeight($image) {\n\t$size = getimagesize($image);\n\t$height = $size[1];\n\treturn $height;\n}", "function getHeight($image) {\n\t\t$size = getimagesize($image);\n\t\t$height = $size[1];\n\t\treturn $height;\n\t}", "public function getImageHeight()\n {\n if ( empty($this->getData('imageheight')) ) {\n return self::DEFAULT_IMAGE_HEIGHT;\n }\n\n return (int) $this->getData('imageheight');\n }", "function getHeight($image) {\n\t$sizes = getimagesize($image);\n\t$height = $sizes[1];\n\treturn $height;\n}", "public function getImageHeight()\n {\n if ($this->getData('imageheight') == '') {\n return DEFAULT_IMAGE_HEIGHT;\n }\n return (int)$this->getData('imageheight');\n }", "function getHeight($image) {\n\t\t$sizes = getimagesize($image);\n\t\t$height = $sizes[1];\n\t\treturn $height;\n\t}", "public function getHeight()\n {\n return imagesy($this->currentImage);\n }", "function getHeight($image) {\r\n $sizes = getimagesize($image);\r\n $height = $sizes[1];\r\n return $height;\r\n}", "function getHeight($image) {\n $sizes = getimagesize($image);\n $height = $sizes[1];\n return $height;\n}", "public function getHeight(){\n return imagesy($this->outputImage);\n }", "function getHeight($image) {\n $size = getimagesize($image);\n $height = $size[1];\n return $height;\n}", "public function getHeight($image) \n {\n \n $size = getimagesize($image);\n $height = $size[1];\n return $height;\n }", "public function getHeight($image) {\n $size = getimagesize($image);\n $height = $size[1];\n return $height;\n }", "public function height()\n {\n\n if (empty($this->height)) {\n\n $this->processGetImageSize();\n\n }\n\n return $this->height;\n\n }", "function getHeight($image) {\r\n\t$sizes = getimagesize($image);\r\n\t$height = $sizes[1];\r\n\treturn $height;\r\n}", "public function getHeight($image) {\n $sizes = getimagesize($image);\n $height = $sizes[1];\n return $height;\n }", "public function height()\n {\n return imagesy($this->image);\n }", "public function getImgHeight()\n\t{\n\t\treturn $this->imgHeight;\n\t}", "public function getImageHeight()\n {\n return $this->image_height;\n }", "function height()\r\n {\r\n if ( eZFile::file_exists( $this->filePath( true ) ) and is_file( $this->filePath( true ) ) )\r\n {\r\n $size = getimagesize( $this->filePath( true ) );\r\n return $size[1];\r\n }\r\n else\r\n return 40;\r\n }", "public function getHeight() {\n if(!$this->getProcessed()) {\n $this->processImage();\n }\n return $this->height;\n }", "public function getHeight() { \n list($width, $height) = explode('x', $this->getSize());\n return $height;\n }", "public function height()\n {\n return $this->getInterventionImage()->height();\n }", "public function getImgHeight()\n {\n return $this->strImgHeight;\n }", "public function getHeightAttribute()\n {\n if ($this->isImage()) {\n $dimensions = $this->getImageDimensions();\n\n return $dimensions[1];\n }\n }", "protected function _getImageHeight()\n {\n return imagesy($this->_resource);\n }", "public function lvGetDetailsImageMaxHeight() {\n $oConfig = $this->getConfig();\n $aSizes = $oConfig->getConfigParam( 'aDetailImageSizes' );\n $aSize = explode( '*', $aSizes['oxpic1'] );\n \n if ( is_array( $aSize ) && is_numeric( $aSize[0] ) && is_numeric( $aSize[1] ) ) {\n $sHeight = $aSize[1];\n }\n else {\n // dummy standard default\n $sHeight = '380';\n }\n \n return $sHeight;\n }", "public function get_image_height()\n {\n }", "public function height()\n {\n return imagesy($this->resource());\n }", "public function getImageHeight () {}", "function getHeight($image)\n{\n $size = cms_getimagesize($image);\n $height = $size[1];\n return $height;\n}", "public function lvGetListImageMaxHeight() {\n $oConfig = $this->getConfig();\n \n $sSize = $oConfig->getConfigParam( 'sThumbnailsize' );\n $aSize = explode( '*', $sSize );\n \n if ( is_array( $aSize ) && is_numeric( $aSize[0] ) && is_numeric( $aSize[1] ) ) {\n $sHeight = $aSize[1];\n }\n else {\n // dummy standard default\n $sHeight = '150';\n }\n \n return $sHeight;\n }", "public function getHeight() {\n\t\treturn $this->originalDimensions['height'];\n\t}", "public function getHeight() {\n\t\treturn $this->originalDimensions['height'];\n\t}", "public function getHeight()\n\t{\n\t\treturn self::getInfo($this->file, 'height');\n\t}", "function ImageHeight()\n\t{\n\t\tif (!$this->ImageID)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn imagesy($this->ImageID);\n\t}", "public function getImageHeight() {\n return Mage::getStoreConfig('hawksearch_datafeed/imagecache/image_height');\n }", "public final function getHeight() : int\n {\n\n return $this->disposed ? 0 : $this->size->getHeight();\n\n }", "function get_height() {\n //based on image height\n return $this->_height;\n }", "public function getResizeHeight(): int\n {\n return (int)$this->getData(self::RESIZE_HEIGHT);\n }", "public function imageHeight(): int\n {\n return $this->imageHeight;\n }", "public function getHeight() {\n return $this->_getGridParam('height');\n }", "public function getHeight();", "public function getHeight();", "public function getHeight();", "public function getHeight();", "public function getHeight();", "function getHeight()\n\t{\n\t\treturn $this->YSize;\n\t}", "public function getImageHeight(): ?int\n {\n return $this->iImageHeight;\n }", "public function getHeight() : int\n {\n return $this->height;\n }", "public function getHeight() : int\n {\n return $this->height;\n }", "public function getHeight(): int\n {\n return $this->height;\n }", "public function getHeight(): int\n {\n return $this->height;\n }", "public function getHeight() {\n\t\treturn $this->iHeight;\n\t}", "public function getSizeY() \n\t{\n\t\treturn imagesy($this->getImage());\n\t}", "public function wcva_get_image_height($thumbsize) {\r\n\t $height=32;\r\n\t switch($thumbsize) {\r\n\t \r\n\t case \"small\":\r\n\t $height=32;\r\n\t break;\r\n\t \r\n\t \r\n\t case \"extrasmall\":\r\n\t $height=22;\r\n\t break;\r\n\t \r\n\t case \"medium\":\r\n\t $height=40;\r\n\t break;\r\n\t \r\n\t case \"big\":\r\n\t $height=60;\r\n\t break;\r\n\t \r\n\t case \"extrabig\":\r\n\t $height=90;\r\n\t break;\r\n\t\t \r\n\t\t case \"custom\":\r\n\t $height=get_option('woocommerce_custom_swatch_height');\r\n\t break;\r\n\t \r\n\t default : \r\n\t $height=32;\r\n\t \r\n\t \r\n\t }\r\n\t \r\n\t return $height;\r\n\t }", "public function getHeight() : int\n\t{\n\t\treturn $this->height;\n\t}", "public function getMaxHeightForPictures()\n {\n return $this->maxHeightForPictures;\n }", "function getThumbnailHeight($parameters = array()) {\r\n\t\t\t$dimension = $this->_getThumbnailDimensions($parameters);\r\n\t\t\treturn $dimension['height'];\r\n\t\t}", "public function getIconHeight() { return $this->_imgHeight; }", "public function getHeight() {\n\t\treturn $this->height;\n\t}", "public function getHeightPixels()\n {\n return $this->height_pixels;\n }", "public function getHeightPixels()\n {\n return $this->height_pixels;\n }", "public function getHeight(): int\n {\n return $this->_height;\n }", "public function getImgHeightThumb()\n\t{\n\t\treturn $this->imgHeightThumb;\n\t}", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight()\n {\n return $this->height;\n }", "public function getHeight() : int{\n\t\treturn $this->height;\n\t}", "public function getHeight()\n {\n return $this->getAttribute('height');\n }", "public function getIconHeight()\n {\n return $this->getIconForType($this->getCardType())['height'];\n }", "public function getHeight(): int;", "public function getHeight(): int;", "public function getHeight(): int;", "public function getImageSize();", "public function getMaxImageHeight()\n {\n return null;\n }", "public function getHeight()\n {\n return $this->i->height;\n }", "abstract public function getHeight();", "public function getMaxHeight();" ]
[ "0.8352466", "0.8233275", "0.80886316", "0.80170757", "0.79766756", "0.79469615", "0.7940672", "0.7877656", "0.7877656", "0.7877656", "0.78771174", "0.7876649", "0.7872256", "0.7870074", "0.78672266", "0.78562003", "0.7832626", "0.78147936", "0.77937186", "0.7787796", "0.7761359", "0.77415925", "0.7740917", "0.7734588", "0.7726659", "0.7719339", "0.7666288", "0.7663225", "0.7610757", "0.7597109", "0.7595029", "0.75884044", "0.7537065", "0.7488663", "0.747207", "0.7465685", "0.7447168", "0.7446301", "0.7432483", "0.73866487", "0.73690885", "0.73162496", "0.73162496", "0.72652316", "0.7187438", "0.7155456", "0.7137407", "0.7135222", "0.71102923", "0.7089221", "0.70866454", "0.7030898", "0.7030898", "0.7030898", "0.7030898", "0.7030898", "0.6998092", "0.6971145", "0.6953086", "0.6953086", "0.69523114", "0.69523114", "0.6928982", "0.6907509", "0.6903111", "0.68902385", "0.6889945", "0.68726426", "0.6846895", "0.6833035", "0.6831611", "0.6831611", "0.6813686", "0.6809909", "0.6797373", "0.6797373", "0.6797373", "0.6797373", "0.6797373", "0.6797373", "0.6797373", "0.6797373", "0.6797373", "0.6797373", "0.6797373", "0.6797373", "0.6797373", "0.6797373", "0.6797373", "0.6796562", "0.6789313", "0.67690784", "0.6767837", "0.6767837", "0.6767837", "0.6759178", "0.67529446", "0.6747123", "0.67137533", "0.6672268" ]
0.8250547
1
Get the name of the largest image size available.
Получить имя самого крупного доступного размера изображения.
function elit_get_largest_image_name() { $image_sizes = elit_get_image_sizes(); $keys = array_keys($image_sizes); $widest = 0; $widest_name = null; for ($i = 0; $i < count($keys); $i++) { //echo '<pre>'; var_dump($keys[$i], ($image_sizes[$keys[$i]]['width']), $widest_name, $widest, $image_sizes[$keys[$i]]['width'] > $widest ); echo '</pre>'; if ($image_sizes[$keys[$i]]['width'] > $widest) { $widest = $image_sizes[$keys[$i]]['width']; $widest_name = $keys[$i]; } } return $widest_name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getName() \t\t { return 'NP_ImageLimitSize'; }", "public function imageMaxSizeDescription(): string\n {\n return\n Yii::t('app', 'Max. size of image') . ': ' . \n ArrayHelper::getValue($this->imageSize, 'maxWidth') . 'x' . \n ArrayHelper::getValue($this->imageSize, 'maxHeight') . 'px';\n }", "public function getLargeImageSize() {\n\t\t\treturn $this->getImageSizeWithLabelOfImageWithKey('large','image1');\n\t\t}", "public function lvGetDetailsImageMaxHeight() {\n $oConfig = $this->getConfig();\n $aSizes = $oConfig->getConfigParam( 'aDetailImageSizes' );\n $aSize = explode( '*', $aSizes['oxpic1'] );\n \n if ( is_array( $aSize ) && is_numeric( $aSize[0] ) && is_numeric( $aSize[1] ) ) {\n $sHeight = $aSize[1];\n }\n else {\n // dummy standard default\n $sHeight = '380';\n }\n \n return $sHeight;\n }", "public function lvGetDetailsImageMaxWidth() {\n $oConfig = $this->getConfig();\n $aSizes = $oConfig->getConfigParam( 'aDetailImageSizes' );\n $aSize = explode( '*', $aSizes['oxpic1'] );\n \n if ( is_array( $aSize ) && is_numeric( $aSize[0] ) && is_numeric( $aSize[1] ) ) {\n $sWidth = $aSize[0];\n }\n else {\n // dummy standard default\n $sWidth = '340';\n }\n \n return $sWidth;\n }", "public function lvGetListImageMaxHeight() {\n $oConfig = $this->getConfig();\n \n $sSize = $oConfig->getConfigParam( 'sThumbnailsize' );\n $aSize = explode( '*', $sSize );\n \n if ( is_array( $aSize ) && is_numeric( $aSize[0] ) && is_numeric( $aSize[1] ) ) {\n $sHeight = $aSize[1];\n }\n else {\n // dummy standard default\n $sHeight = '150';\n }\n \n return $sHeight;\n }", "public static function get_image_size_names() {\n\t\treturn apply_filters( 'image_size_names_choose', array(\n\t\t\t'thumbnail' => __( 'Thumbnail', 'blazersix-widget-image-i18n' ),\n\t\t\t'medium' => __( 'Medium', 'blazersix-widget-image-i18n' ),\n\t\t\t'large' => __( 'Large', 'blazersix-widget-image-i18n' ),\n\t\t\t'full' => __( 'Full Size', 'blazersix-widget-image-i18n' )\n\t\t) );\n\t}", "public function lvGetListImageMaxWidth() {\n $oConfig = $this->getConfig();\n \n $sSize = $oConfig->getConfigParam( 'sThumbnailsize' );\n $aSize = explode( '*', $sSize );\n \n if ( is_array( $aSize ) && is_numeric( $aSize[0] ) && is_numeric( $aSize[1] ) ) {\n $sWidth = $aSize[0];\n }\n else {\n // dummy standard default\n $sWidth = '185';\n }\n \n return $sWidth;\n }", "public function getLargeImage()\n\t{\n\t\treturn $this->_getImagePath('large');\n\t}", "public function getMaxSize()\n {\n return $this->size;\n }", "public function maximumSize()\n {\n return $this->size;\n }", "private function getMaxUploadSize() {\n $size = ini_get('upload_max_filesize');\n\n $size = trim($size);\n $last = strtolower($size[strlen($size) - 1]);\n\n switch($last) {\n case 'g':\n $size *= 1024;\n case 'm':\n $size *= 1024;\n case 'k':\n $size *= 1024;\n }\n\n return $size;\n }", "public static function get_maximum_upload_size_text()\n {\n $bytes = apply_filters('import_upload_size_limit', \\wp_max_upload_size());\n $size = \\size_format($bytes);\n\n return sprintf(__('Maximum size: %s'), $size);\n }", "public function getMaxSize()\n\t{\n\t\treturn $this->max_size;\n\t}", "public function getMaxSize()\n {\n return $this->max_size;\n }", "public function getMaxSize()\n {\n return $this->maxSize;\n }", "private function findMaxLength()\n {\n $length = 0;\n foreach ($this->items as $itemValue) {\n $lengthOfProductName = $this->getLengthOfString($itemValue['product']->getName());\n if ($length < $lengthOfProductName) {\n $length = $lengthOfProductName;\n }\n }\n\n return $length;\n }", "public function getNameSize()\n {\n return $this->nameSize;\n }", "function BestPicSize($width)\n{\n $folders = PicFolderList();\n $n = count($folders);\n if($n <= 1) return $folders[0];\n for($i = $n-1; $i >= 1; $i--)\n {\n $f = $folders[$i];\n $w = intval(substr($f, 1));\n if($width <= $w) return $f;\n }\n return $folders[0];\n}", "protected function _getMax()\n\t{\n\t\t$max = 0;\n\t\tif (!empty($this->_tagsArray)) {\n\t\t\t$p_size = 0;\n\t\t\tforeach ($this->_tagsArray as $cKey => $cVal) {\n\t\t\t\t$c_size = $cVal['size'];\n\t\t\t\tif ($c_size > $p_size) {\n\t\t\t\t\t$max = $c_size;\n\t\t\t\t\t$p_size = $c_size;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $max;\n\t}", "public function getHeight()\n {\n return $this->isImage() ? $this->imageSize[1] : null;\n }", "function getMaxSize()\n\t{\n\t\treturn $this->_maxsize;\n\t}", "public function getSizeLimit() {\n $validator = $this->getValidator('Size');\n if ($validator) {\n return $validator->getMax('raw');\n } else {\n return null;\n }\n }", "public function getThumpnailHeight() {\n $page_map = $this->search_result_item->getPagemap();\n return isset($page_map['cse_thumbnail'][0]['height']) ? $page_map['cse_thumbnail'][0]['height'] : '';\n }", "public function getHeight()\n {\n $imageSizes = $this->getImageSizes();\n return $imageSizes[1];\n }", "public static function detectMaxUploadFileSize()\n {\n /**\n * Converts shorthands like \"2M\" or \"512K\" to bytes\n *\n * @param $size\n * @return mixed\n */\n $normalize = function($size) {\n if (preg_match('/^([\\d\\.]+)([KMG])$/i', $size, $match)) {\n $pos = array_search($match[2], array(\"K\", \"M\", \"G\"));\n if ($pos !== false) {\n $size = $match[1] * pow(1024, $pos + 1);\n }\n }\n return $size;\n };\n $max_upload = $normalize(ini_get('upload_max_filesize'));\n $max_post = $normalize(ini_get('post_max_size'));\n $memory_limit = $normalize(ini_get('memory_limit'));\n $maxFileSize = min($max_upload, $max_post, $memory_limit);\n return $maxFileSize;\n }", "function size () {\n\t\t$ret = NULL;\n\t\tif (function_exists('getimagesize')) :\n\t\t\t$ret = getimagesize($this->streamify(__CLASS__.\".\".__METHOD__));\n\t\tendif;\n\t\treturn $ret;\n\t}", "public function getMaxUploadFileSize()\n\t{\n\t\t$objResult = \\Database::getInstance()->prepare(\"SELECT MAX(maxlength) AS maxlength FROM tl_form_field WHERE pid=? AND invisible='' AND type='upload' AND maxlength>0\")\n\t\t\t\t\t\t\t\t\t\t\t ->execute($this->id);\n\n\t\tif ($objResult->numRows > 0 && $objResult->maxlength > 0)\n\t\t{\n\t\t\treturn $objResult->maxlength;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \\Config::get('maxFileSize');\n\t\t}\n\t}", "public function getSize(): string\n {\n return $this->size;\n }", "public function sizeForHumans() {\n $bytes = $this->size;\n\n $units = ['b', 'kb', 'gb', 'tb'];\n\n for ($i = 0; $bytes > 1024; $i++) {\n $bytes /= 1024;\n }\n\n return round($bytes, 2) . $units[$i];\n }", "public static function getMaxUploadFileSize()\n {\n return '2M';\n }", "function height()\r\n {\r\n if ( eZFile::file_exists( $this->filePath( true ) ) and is_file( $this->filePath( true ) ) )\r\n {\r\n $size = getimagesize( $this->filePath( true ) );\r\n return $size[1];\r\n }\r\n else\r\n return 40;\r\n }", "function width()\r\n {\r\n if ( eZFile::file_exists( $this->filePath( true ) ) and is_file( $this->filePath( true ) ) )\r\n {\r\n $size = getimagesize( $this->filePath( true ) );\r\n return $size[0];\r\n }\r\n else\r\n return 120;\r\n }", "public static function getMaxSize()\n {\n $maxUpload = File::ini2bytes(ini_get('upload_max_filesize'));\n $maxPost = File::ini2bytes(ini_get('post_max_size'));\n $legalSize = File::ini2bytes(LegalFile::config()->max_size);\n\n return min($maxPost, $maxUpload, $legalSize);\n }", "public function getLargestAllowedMaxFileSize()\n {\n if (!count($this->allowedMaxFileSize ?? [])) {\n return null;\n }\n\n return max(array_values($this->allowedMaxFileSize ?? []));\n }", "function GetPictureSize( $filename )\n\n\t{\n\n\t\t$size_info=getimagesize(\"./products_pictures/\".$filename);\n\n\t\treturn ((string)($size_info[0] + 40 )).\", \".((string)($size_info[1] + 40 ));\n\n\t}", "public function getImageSize()\n {\n return $this->image_size;\n }", "function get_image_size( $size ) {\n \t$sizes = elit_get_image_sizes();\n \n \tif ( isset( $sizes[ $size ] ) ) {\n \t\treturn $sizes[ $size ];\n \t}\n \n \treturn false;\n }", "public function GetMaxSize ();", "public function img_limit() {\n $limit = self::UPLOAD_MAX_SIZE;\n \n return $limit;\n }", "public static function getMaxFilesize()\n {\n return round(UploadedFile::getMaxFilesize() / 1024);\n }", "public function getMaximumSizeInBytes() {\n\t\treturn $this->maxIndividualSize;\n\t}", "public function get_size() {\r\n if ($this->sizefixed == false) {\r\n $this->recompute_size();\r\n }\r\n return $this->labelsize;\r\n }", "function get_image_size($name) {\n\t\t$file['site_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['email_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['site_favicon'] = array('width' => '50', 'height' => '50');\n\t\t$file['store_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['footer_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['app_logo'] = array('width' => '140', 'height' => '140');\n\t\t$file['driver_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['driver_white_logo'] = array('width' => '130', 'height' => '65');\n\t\t$file['home_slider'] = array('width' => '1300', 'height' => '500');\n\t\t$file['dietary_icon_size'] = array('width' => '256', 'height' => '256');\n\t\t$file['item_image_sizes'] = [\n\t\t\tarray('width' => '120', 'height' => '120'),\n\t\t\tarray('width' => '600', 'height' => '350'),\n\t\t\tarray('width' => '520', 'height' => '320'),\n\t\t];\n\t\t$file['category_image_size'] = array('width' => '250', 'height' => '140');\n\t\t$file['store_image_sizes'] = [\n\t\t\tarray('width' => '520', 'height' => '320'),\n\t\t\tarray('width' => '520', 'height' => '280'),\n\t\t\tarray('width' => '480', 'height' => '320'),\n\t\t\tarray('width' => '100', 'height' => '100'),\n\t\t];\n\n\t\treturn $file[$name];\n\t}", "public function getSize()\n {\n return $this->parameters->get('size');\n }", "public function getThumbnailHeightPictureImageUploadDisplay()\n {\n return $this->thumbnailHeightPictureImageUploadDisplay;\n }", "protected function determineMaximumGalleryWidth() {}", "public function getMaximalSize()\n\t{\n\t\t$size = ini_get('post_max_size');\n\t\t\n\t\t$type = mb_strtoupper(mb_substr($size, -1));\n\t\t\n\t\t$size = (int) $size;\n\n\t\tswitch ($type) {\n\t\t\tcase PostSizeTypes::KILO_BYTES_TYPE:\n\t\t\t\t$size = $size * PostSizeTypes::KILO_BYTES; break;\n\t\t\tcase PostSizeTypes::MEGA_BYTES_TYPE:\n\t\t\t\t$size = $size * PostSizeTypes::MEGA_BYTES; break;\n\t\t\tcase PostSizeTypes::GIGA_BYTES_TYPE:\n\t\t\t\t$size = $size * PostSizeTypes::GIGA_BYTES; break;\n\t\t}\n\t\t\n\t\treturn (int) $size;\n\t}", "public function getImageSize();", "public function maxSizeDescription(): ?string\n {\n $rules = ArrayHelper::getValue($this->rules, 'maxSize');\n if ($rules === null) {\n return null;\n }\n\n return Yii::t('app', 'Max. file size') . ': ' . Yii::$app->formatter->asShortSize($rules) . ' ';\n }", "public function height()\n {\n return imagesy($this->resource());\n }", "public function sizeAsString()\n\t\t{\n\t\t\tglobal $ibforums;\n\n\t\t\tif ($this->from_post_row)\n\t\t\t{\n\t\t\t\treturn sprintf($ibforums->lang['attachment_size_kb'], $this->size);\n\t\t\t}\n\t\t\t$sizes_strings = array(\n\t\t\t\t'attachment_size_b',\n\t\t\t\t'attachment_size_kb',\n\t\t\t\t'attachment_size_mb',\n\t\t\t\t'attachment_size_gb',\n\t\t\t);\n\n\t\t\t$out_size = $this->size;\n\t\t\t$i = 0;\n\t\t\twhile (($i < 4) && ($out_size >= 1024))\n\t\t\t{\n\t\t\t\t$i++;\n\t\t\t\t$out_size /= 1024.0;\n\t\t\t}\n\n\t\t\treturn (sprintf($ibforums->lang[$sizes_strings[$i]], round($out_size, 2)));\n\n\t\t}", "public function getThumbnailImageSize() {\n\t\t\treturn $this->getImageSizeWithLabelOfImageWithKey('thumbnail','image1');\n\t\t}", "protected static function _get_thumbnail_size() {\n\t\treturn apply_filters( 'snow_monkey_page_header_thumbnail_size', 'large' );\n\t}", "public function getImageHeight() {\n return Mage::getStoreConfig('hawksearch_datafeed/imagecache/image_height');\n }", "public function getImageSize()\n {\n return @getimagesize($path ?: $this->path);\n }", "function GetMaximumFileSize()\n {\n return $this->MaximumFileSize;\n }", "protected function getSize()\n {\n return $this->config->get('image.avatar_width');\n }", "function qa_get_max_upload_size()\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\t$mindb = 16777215; // from MEDIUMBLOB column type\n\n\t$minphp = trim(ini_get('upload_max_filesize'));\n\t$minphp = convert_to_bytes(substr($minphp, -1), $minphp);\n\n\treturn min($mindb, $minphp);\n}", "public function getMaxImageWidth()\n {\n return null;\n }", "public function getMaxFileSize()\n {\n return $this->max_file_size;\n }", "function getCountSizeResized() {\n\t\t$SQL = \"SELECT SUM(sizeresized) AS size FROM \". TABLEPREFIX .\"img\";\n\t\t$Count = mysql_fetch_object(mysql_query($SQL));\n\t\treturn $Count->size;\n\t}", "function GetMaximumWidth()\n {\n return $this->MaximumWidth;\n }", "public function getHumanSizeAttribute()\n {\n $size = (int) $this->size;\n\n if ($size >= 1 << 30) {\n return number_format($size / (1 << 30), 2).'GB';\n }\n\n if ($size >= 1 << 20) {\n return number_format($size / (1 << 20), 2).'MB';\n }\n\n if ($size >= 1 << 10) {\n return number_format($size / (1 << 10), 2).'KB';\n }\n\n return number_format($size).' bytes';\n }", "public function getMaxFileSize() {\r\n\t\treturn $this->maxFileSize;\r\n\t}", "function codeless_get_team_thumbnail_size(){\n $team = codeless_get_mod( 'team_image_size', 'team_entry' );\n return $team;\n}", "function zuhaus_mikado_get_image_size( $size ) {\n\t$sizes = zuhaus_mikado_get_image_sizes();\n\t\n\tif ( isset( $sizes[ $size ] ) ) {\n\t\treturn $sizes[ $size ];\n\t}\n\t\n\treturn false;\n}", "function getHeight($image) {\r\n $sizes = getimagesize($image);\r\n $height = $sizes[1];\r\n return $height;\r\n}", "function getHeight($image) {\n $size = getimagesize($image);\n $height = $size[1];\n return $height;\n}", "function amapnews_getIconSize($size = 'master') {\n $photo_sizes = elgg_get_config('amapnews_photo_sizes');\n $sizenames = array();\n foreach ($photo_sizes as $name => $photo_info) {\n array_push($sizenames, $name);\n }\n if (!in_array($size, $sizenames)) {\n $size = 'medium';\n }\n\n return $size;\n}", "public function getShrinkHeightPictureImageUpload()\n {\n return $this->shrinkHeightPictureImageUpload;\n }", "function getHeight($image) {\n $sizes = getimagesize($image);\n $height = $sizes[1];\n return $height;\n}", "public function getHeight(){\n return imagesy($this->outputImage);\n }", "public function getMaxImageHeight()\n {\n return null;\n }", "function getMaxThumbnail()\n{\n\t$db = database();\n\n\t$result = $db->query('', '\n\t\tSELECT \n\t\t\tMAX(id_attach)\n\t\tFROM {db_prefix}attachments\n\t\tWHERE attachment_type = {int:thumbnail}',\n\t\tarray(\n\t\t\t'thumbnail' => 3,\n\t\t)\n\t);\n\tlist ($thumbnail) = $result->fetch_row();\n\t$result->free_result();\n\n\treturn $thumbnail;\n}", "public function getSize()\n {\n return $this->maxHeap->size();\n }", "protected function _getFacetMaxSize()\n {\n /** @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */\n $attribute = $this->getAttributeModel()->getData();\n return isset($attribute['facets_max_size']) ? $attribute['facets_max_size'] : self::DEFAULT_FACET_MAX_SIZE;\n }", "function get_biggest_label($labels)\n\t{\n\t\t$label_lengths = [];\n\t\tforeach ($labels as $key => $label)\n\t\t{\n\t\t\t$text = $key;\n\t\t\tif ($this->chart_info['grouped'] == 0)\n\t\t\t{\n\t\t\t\tif (is_array($label))\n\t\t\t\t{\n\t\t\t\t\t$text = $label['name'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->chart_options['filetype'] == 'svg')\n\t\t\t{\n\t\t\t\t$get_label_length = $this->text_size($text, $this->chart_options['label_font_size'], 0.6, 'UTF-8');\n\t\t\t}\n\t\t\telse if ($this->chart_options['filetype'] == 'png' || $this->chart_options['filetype'] == 'jpg')\n\t\t\t{\n\t\t\t\t$get_label_length = [imagefontwidth(3) * strlen($text)];\n\t\t\t}\n\t\t\t$label_lengths[] = $get_label_length;\n\t\t}\n\t\trsort($label_lengths);\n\n\t\t$this->biggest_label = array_slice($label_lengths[0], 0, 1)[0];\n\t}", "protected function getMaximumUploadSize()\n {\n // Get the upload_max_filesize from the php.ini\n $uploadMaxFileSize = ini_get('upload_max_filesize');\n\n // Convert the value to bytes\n if (stripos($uploadMaxFileSize, 'K') !== false) {\n $uploadMaxFileSize = round($uploadMaxFileSize * 1024);\n } elseif (stripos($uploadMaxFileSize, 'M') !== false) {\n $uploadMaxFilesize = round($uploadMaxFileSize * 1024 * 1024);\n } elseif (stripos($uploadMaxFileSize, 'G') !== false) {\n $uploadMaxFileSize = round($uploadMaxFileSize * 1024 * 1024 * 1024);\n }\n\n return min($uploadMaxFileSize, \\Config::get('maxFileSize'));\n }", "public function getNom_size()\n {\n return $this->nom_size;\n }", "public static function getMaxUploadSize()\n\t{\n\t\t$phpIniMaxSize = ini_get('upload_max_filesize');\n\t\tif ($phpIniMaxSize &&\n\t\t\tsubstr($phpIniMaxSize, -1) == 'M') {\n\n\t\t\t$phpIniMaxSize = substr($phpIniMaxSize, 0, strlen($phpIniMaxSize) -1) * 1024 * 1024;\n\t\t} else {\n\t\t\t$phpIniMaxSize = NULL;\n\t\t}\n\n\t\t$appIniMaxSize = L8M_Config::getOption('mediabrowser.maxupload');\n\n\t\t$returnValue = $appIniMaxSize;\n\t\tif ($phpIniMaxSize !== NULL &&\n\t\t\t$appIniMaxSize > $phpIniMaxSize) {\n\n\t\t\t$returnValue = $phpIniMaxSize;\n\t\t}\n\n\t\treturn $returnValue;\n\t}", "function getHeight($image)\n{\n $size = cms_getimagesize($image);\n $height = $size[1];\n return $height;\n}", "public function getThumbnailHeightAvatarAvatarUploadDisplay()\n {\n return $this->thumbnailHeightAvatarAvatarUploadDisplay;\n }", "function getHeight($image) {\n\t$sizes = getimagesize($image);\n\t$height = $sizes[1];\n\treturn $height;\n}", "public function getHeight()\n\t{\n\t\treturn imagesy($this->image());\n\t}", "public static function getMaxUploadFileSize() {}", "function getHeight($image) {\r\n\t$sizes = getimagesize($image);\r\n\t$height = $sizes[1];\r\n\treturn $height;\r\n}", "public function getHeight()\n {\n return imagesy($this->currentImage);\n }", "public static function getNativeMaxUpload () {\n $upload_max_filesize = upload::getBytesFromGreek(ini_get('upload_max_filesize'));\n $post_max_size = upload::getBytesFromGreek(ini_get('post_max_size'));\n if ($upload_max_filesize >= $post_max_size) {\n return $post_max_size;\n } else {\n return $upload_max_filesize;\n }\n \n }", "public function height()\n {\n return imagesy($this->image);\n }", "public function getSize()\n\t{\n\t\t$command = new Commands\\Command($this->_driver, 'get_window_size', null, array('window_handle' => 'current'));\n\t\t$results = $command->execute();\n\t\treturn $results['value'];\n\t}", "private static function get_smallest_available_size(){\n\t\t$sizes = PostThumbnail::get_image_sizes();\n\t\t$smallest = false;\n\t\t$temp = 9999999999999;\n\n\t\tforeach($sizes as $key => $size){\n\t\t\tif($size['width'] != 0 && $size['width'] < $temp){\n\t\t\t\t$smallest = $key;\n\t\t\t\t$temp = $size['width'];\n\t\t\t}\n\n\t\t}\n\n\t\treturn $smallest;\n\t}", "public function getImageWidth() {\n return Mage::getStoreConfig('hawksearch_datafeed/imagecache/image_width');\n }", "public function getMaxWidthForPictures()\n {\n return $this->maxWidthForPictures;\n }", "public function findBest()\n {\n $bestBitCount = 0;\n $bestWidth = 0;\n $best = null;\n foreach ($this->images as $image) {\n if (($image->width > $bestWidth) ||\n (($image->width == $bestWidth) && ($image->bitCount > $bestBitCount))\n ) {\n $bestWidth = $image->width;\n $bestBitCount = $image->bitCount;\n $best = $image;\n }\n }\n return $best;\n }", "public function getThumpnailWidth() {\n $page_map = $this->search_result_item->getPagemap();\n return isset($page_map['cse_thumbnail'][0]['width']) ? $page_map['cse_thumbnail'][0]['width'] : '';\n }", "function getHeight($image) \r\n {\r\n $size = getimagesize($image);\r\n $height = $size[1];\r\n return $height;\r\n }", "private static function determineMaximumUploadSize() {\n\t\t$postMaxSize = self::parseIniSize(\n\t\t\t\\ini_get('post_max_size')\n\t\t);\n\n\t\tif ($postMaxSize <= 0) {\n\t\t\t$postMaxSize = \\PHP_INT_MAX;\n\t\t}\n\n\t\t$memoryLimit = self::parseIniSize(\n\t\t\t\\ini_get('memory_limit')\n\t\t);\n\n\t\tif ($memoryLimit === -1) {\n\t\t\t$memoryLimit = \\PHP_INT_MAX;\n\t\t}\n\n\t\treturn \\min(\n\t\t\tself::parseIniSize(\n\t\t\t\t\\ini_get('upload_max_filesize')\n\t\t\t),\n\t\t\t$postMaxSize,\n\t\t\t$memoryLimit\n\t\t);\n\t}", "protected function get_size_label()\n {\n $x_name = get_option(self::X_NAME_KEY, self::DEFAULT_X_NAME);\n $y_name = get_option(self::Y_NAME_KEY, self::DEFAULT_Y_NAME);\n $label = $x_name;\n if (get_option(self::USE_TWO_FIELDS_KEY, self::DEFAULT_USE_TWO_FIELDS) == 1) {\n $label .= \" x {$y_name}\";\n }\n return $label;\n }", "public function getHeight() {\n return imagesy($this->image);\n }" ]
[ "0.6886294", "0.6863302", "0.6811783", "0.6740035", "0.67299056", "0.6715389", "0.6704701", "0.6659275", "0.6652494", "0.66408724", "0.6621742", "0.6609557", "0.66076034", "0.65971947", "0.6530389", "0.65226454", "0.64825386", "0.6481871", "0.647746", "0.6459235", "0.64476407", "0.642637", "0.6368196", "0.6337735", "0.63363874", "0.63057107", "0.6291684", "0.62883294", "0.6279509", "0.6270537", "0.6270374", "0.6270112", "0.6254755", "0.62456185", "0.62371165", "0.62197405", "0.619952", "0.6198964", "0.61955047", "0.61943954", "0.618621", "0.61828697", "0.61785597", "0.61678684", "0.61610866", "0.61552095", "0.6154122", "0.61452746", "0.61390907", "0.6128035", "0.6126933", "0.61226934", "0.61221975", "0.6105152", "0.6100531", "0.60963166", "0.6094311", "0.6094047", "0.6086705", "0.60836184", "0.60806894", "0.6068355", "0.60645974", "0.60558134", "0.6044591", "0.6044095", "0.6038289", "0.603794", "0.60369116", "0.6034387", "0.6031056", "0.6023791", "0.6017843", "0.6014192", "0.6012014", "0.6002755", "0.59948206", "0.5994576", "0.5993157", "0.59925544", "0.5990089", "0.5988253", "0.59850574", "0.59806764", "0.59786445", "0.5973917", "0.5972055", "0.5969953", "0.5963012", "0.59596175", "0.5958855", "0.5958133", "0.59576905", "0.59571654", "0.5956811", "0.5954927", "0.5953762", "0.5953735", "0.5951551", "0.5949822" ]
0.7777181
0
Set the source step.
Установите шаг источника.
public function setSource(StepInterface $step): self;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setSource($source)\r\n\t{\r\n\t\t$this->source = $source;\r\n\t}", "public function setSource($source) {\n $this->source = $source;\n }", "public function setSource($source) {\n\n\t\t$this->source = $source;\n\t}", "public function setSource($source);", "public function setSource($source);", "public function setSource($source);", "public function setSource($source)\n\t{\n\t\t$this->source = $source;\n\t}", "public function setSource($value) {\n $this->source=$value;\n }", "public function setSource($source)\n {\n $this->arguments['source'] = escapeshellarg($source);\n }", "public function setSource($data) { $this->_source\t= $data; }", "function setSourceLocation($source)\n {\n $this->sourceLocation = $source;\n }", "public function source($source)\n {\n $this->file = $source;\n }", "public function setSource($data) { $this->source = $data; }", "public function setSource(Source $source) {\n $this->source = $source;\n }", "public function setSource($source)\n {\n $this->internalSourceLink = $source;\n }", "public function getSource(): StepInterface;", "public function setSource(string $source)\n {\n $this->source = $source;\n $this->sourceRowService = new SourceRowService($source);\n $this->sourceObjectService = new SourceObjectService($source);\n }", "public function set_step( $step ) {\n\t\t$this->step = absint( $step );\n\t}", "protected function setSource(string $source)\n {\n $this->source = $source;\n $this->extension = pathinfo($this->source, PATHINFO_EXTENSION);\n }", "public function setSource($file, $line)\n {\n $this->source_file = $file;\n $this->source_line = $line;\n }", "public function causedAt($source){\n $this->source = $source;\n }", "public function setSource(FilesystemOperator $source)\n {\n $this->source = $source;\n }", "public function setSource(array $source) {\r\n $this->source = $source;\r\n $this->lines = count($source);\r\n }", "public function source($source)\r\n\t{\r\n\t\t$this->_post = $source;\r\n\t}", "public function __construct($target, \\tool_usertours\\step $step) {\n $this->step = $step;\n\n parent::__construct($target);\n }", "public function setStep($value)\n\t{\n\t\t$this->attributes['data-step'] = $value;\n\t\treturn $this;\n\t}", "public function setSourceNode($node) {}", "public function setSource(?DeviceAndAppManagementAssignmentSource $value): void {\n $this->getBackingStore()->set('source', $value);\n }", "public function setSource($location)\n {\n $this->updateAttributes(array('src' => $location));\n }", "public function setStep($var)\n {\n GPBUtil::checkString($var, True);\n $this->step = $var;\n\n return $this;\n }", "public function SetSourceUrl ($sourceUrl) {\n\t\t$this->sourceUrl = $sourceUrl;\n\t}", "public function setSource($source) {\n\t\treturn $this->setParam('_source', $source);\n\t}", "public function set_src($src)\n\t{\n\t\t\t$this->src = $src;\n\t}", "public function set_src($src)\n\t{\n\t\t\t$this->src = $src;\n\t}", "public function setEntitySource(?int $value): void {\n $this->getBackingStore()->set('entitySource', $value);\n }", "public function setSourceId(?string $value): void {\n $this->getBackingStore()->set('sourceId', $value);\n }", "public function setSourcePayment($source)\n {\n $this->src_payment_id = $source;\n }", "public function setSource(string $source): self {\n $this->source = $source;\n return $this;\n }", "public function setSource(&$data_source)\n\t{\n\t\tunset( $this->data ) ;\n\t\t$this->data =& $data_source;\n\t}", "protected function parseSource()\n {\n $this->parameter['source'] = $this->input['source'];\n }", "public function setUrlSource($urlSource) { $this->urlSource = $urlSource ; }", "public function &set( $source )\n\t{\n\t\t// We reset the table list if set is called\n\t\t$this->_tableList = array();\n\t\treturn parent::set( $source );\n\t}", "public function setSource($source) {\n if (String::isEmpty($source)) {\n throw new ZiboException('Empty source provided');\n }\n $this->source = $source;\n }", "public function setSourceDir(string $sourceDir) {\n $this->sourceDir = $sourceDir;\n }", "public function setSource(string $source = null) : self\n {\n $this->source = $source ?? 'auto';\n return $this;\n }", "function initSource($source, $sourceType = \"file\")\n {\n $this->source = $source;\n //$this->vertexTotal = $vertexTotal;\n $this->sourceType = $sourceType;\n }", "public function setSource(array $source);", "public function setSource($val)\n {\n $this->_propDict[\"source\"] = $val;\n return $this;\n }", "function setSourceRevision($sourceRevision) {\n\t\treturn $this->setData('sourceRevision', $sourceRevision);\n\t}", "public function __construct($source) {\n $this->setSource($source);\n }", "private function _setSteps()\n {\n $this->_fields['step']\n ->addStep('start')\n ->addStep('step2')\n ->setAttribute('value', 'start')\n ;\n }", "public function setSource(TemplateSource $source)\n {\n $this->source = $source;\n }", "public function setSourceFinder(SourceFinder $sourceFinder): void\n {\n $this->sourceFinder = $sourceFinder;\n }", "public function setSourceId(string $sourceId): void\n {\n $this->sourceId = $sourceId;\n }", "public function set_source($sourceProject)\n\t{\n\t\t$this->sourceProject = $sourceProject;\n\t}", "public function setSource(Source $source)\n {\n if(!is_null($this->source)) {\n throw new \\InvalidArgumentException('Source can be set just once.');\n }\n\n $this->source = $source;\n\n $this->source->initialise($this->container);\n\n //get cols from source\n $this->source->getColumns($this->columns);\n\n //generate hash\n $this->createHash();\n\n // Persistence or reset - kill previous session\n if ((!$this->request->isXmlHttpRequest() && !$this->persistence && $this->request->headers->get('referer') != $this->request->getUri())\n || !is_null($this->getDataFromContext(self::REQUEST_QUERY_RESET, true, false))) {\n $this->session->remove($this->getHash());\n }\n\n if (is_null($this->session->get($this->getHash()))) {\n $this->newSession = true;\n }\n\n //store column data\n $this->fetchAndSaveColumnData();\n\n //execute massActions\n $this->executeMassActions();\n\n //execute exports\n $this->executeExports();\n\n //store grid data\n $this->fetchAndSaveGridData();\n\n return $this;\n }", "public function importSourceCanBeSet()\n {\n $value = 'something';\n $this->instance->setImportSource($value);\n $this->assertEquals($value, $this->instance->getImportSource());\n }", "public function setSourceFromFile($filename) {}", "protected function _gotoSourcePage()\n {\n if ($this->_sourcePage) {\n $this->redirect($this->_sourcePage);\n }\n elseif ($this->session->sourcePage) {\n $this->redirect($this->session->sourcePage);\n }\n else {\n $this->redirect(WEB_ROOT);\n }\n }", "function setSourceID($val) {\n\t\tif (is_numeric($val)) {\n\t\t\t$this->sourceID = $val;\n\t\t}\n\t}", "public function setSource(?string $source): self\n {\n $this->source = $source;\n\n return $this;\n }", "function setSourceSet(mofilmEventSourceSet $inSourceSet) {\n\t\tif ( $inSourceSet !== $this->_SourceSet ) {\n\t\t\t$this->_SourceSet = $inSourceSet;\n\t\t}\n\t\treturn $this;\n\t}", "public function testGetAndSetSource(): void\n {\n $entity = new Entity();\n $this->assertSame('', $entity->getSource());\n $entity->setSource('foos');\n $this->assertSame('foos', $entity->getSource());\n }", "public function setSource($source, $model)\r\n {\r\n $ds = ConnectionManager::create('source', array(\r\n 'datasource' => 'Database/SqlServerAscii',\r\n 'persistent' => false,\r\n 'host' => Configure::read('Clips.database.website.host'),\r\n 'login' => Configure::read('Clips.database.website.user'),\r\n 'password' => Configure::read('Clips.database.website.password'),\r\n 'database' => $source,\r\n 'schema' => '',\r\n 'prefix' => ''\r\n ));\r\n $model->useDbConfig = 'source';\r\n }", "public function setSource(FileHandlerContract $source): void;", "public function setNextStep($step)\n {\n $this->nextStep = $step;\n }", "public function setSource(string $source): self\n {\n $this->source = $source;\n\n return $this;\n }", "public function setSource($value)\n {\n if (null !== $value && !$value instanceof \\Model\\Source) {\n throw new \\InvalidArgumentException('The \"source\" embedded one is not an instance of Model\\Source.');\n }\n if (null !== $value) {\n if ($this instanceof \\Mongator\\Document\\Document) {\n $value->setRootAndPath($this, 'source');\n } elseif ($rap = $this->getRootAndPath()) {\n $value->setRootAndPath($rap['root'], $rap['path'].'.source');\n }\n }\n\n if (!$this->getArchive()->has('embedded_one.source')) {\n $originalValue = isset($this->data['embeddedsOne']['source']) ? $this->data['embeddedsOne']['source'] : null;\n $this->getArchive()->set('embedded_one.source', $originalValue);\n } elseif ($this->getArchive()->get('embedded_one.source') === $value) {\n $this->getArchive()->remove('embedded_one.source');\n }\n\n $this->data['embeddedsOne']['source'] = $value;\n\n return $this;\n }", "public function setDest($dest)\n {\n $this->dest = $dest;\n }", "public function setSource($source) {\n $this->properties['source'] = $source;\n\n return $this;\n }", "public function stepChanged($sender, $param)\n\t{\t\t\n\t\t$this->dataBind();\t\t\n\t}", "public static function setSourcePathAndUser($source) {\n\t\tlist($uid, $path) = self::getUidAndFilename($source);\n\t\tself::$sourcePathAndUser[$source] = ['uid' => $uid, 'path' => $path];\n\t}", "public static function set_source( $source ) {\n\t\tif ( ! is_string( $source ) ) {\n\t\t\tthrow new RuntimeException( 'RequestsLibrary::$source must be a string.' );\n\t\t}\n\n\t\tif ( ! in_array( $source, self::VALID_SOURCES, true ) ) {\n\t\t\tthrow new RuntimeException(\n\t\t\t\tsprintf(\n\t\t\t\t\t'Invalid RequestsLibrary::$source, must be one of: %s.',\n\t\t\t\t\timplode( ', ', self::VALID_SOURCES )\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\tWP_CLI::debug( 'Setting RequestsLibrary::$source to ' . $source, 'bootstrap' );\n\n\t\tself::$source = $source;\n\t}", "public function onSource(SourcePipelineEvent $event)\n {\n $context = $event->getContext();\n $dir = $context['dir'];\n $path = $context['path'];\n $event->addSource($this->download($dir, $path));\n }", "public function setSourcePort(int $source_port): void\n {\n if ($source_port < 0 || $source_port > USHORT_MAXVALUE) {\n throw new Exception(\"Invalid value for TCP source port: \" . $source_port);\n }\n $this->source_port = $source_port;\n }", "public function setSourcePath($sourcePath)\n\t{\n\t\tif (!is_string($sourcePath))\n\t\t\tthrow new Exception('Invalid parameter type.');\n\n\t\t$this->_sourcePath = $sourcePath;\n\n\t\treturn $this;\n\t}", "public function setSourceFilter(?SearchOrdersSourceFilter $sourceFilter): void\n {\n $this->sourceFilter = $sourceFilter;\n }", "public function set_src_path($src_path){\n $this->src_path = $src_path;\n }", "public function setSourceCode(?string $sourceCode): void;", "function setSource($inSource) {\n\t\tif ( $inSource !== $this->_Source ) {\n\t\t\t$this->_Source = $inSource;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}", "public function setScriptSource(ContextInterface $ctx, SetScriptSourceRequest $request): SetScriptSourceResponse;", "protected function assignSteps() {}", "function setOrdinateStep($ordinateStep) {\n\n\t$this->ordinateStep = $ordinateStep;\n\n}", "public function __invoke($source = [])\n {\n $this->orig_source = $this->source = $source;\n\n return $this;\n }", "public function setSource($fileName)\n {\n if (!file_exists($fileName) || !is_readable($fileName))\n throw new Exception(\"Either source file '$fileName' is invalid or cannot be read\");\n\n $this->_source = $fileName;\n }", "function setTerminal($terminal, $source)\n\t {\n\t \tif ($source)\n\t \t{\n\t \t\t$this->source = $terminal;\n\t \t}\n\t \telse\n\t \t{\n\t \t\t$this->target = $terminal;\n\t \t}\n\t \t\n\t \treturn $terminal;\n\t}", "public function setStep(StepInterface $step, $step_id) {\n $this->steps[$step_id] = $step;\n }", "public function __construct($source = null)\n {\n $this->source = $source;\n }", "public function setSource($resource)\n {\n if ($resource != null && is_resource($resource))\n $this->source = $resource;\n else\n throw new Exception('La ressource n est pas valide.');\n }", "public function setSourceArguments(array $sourceArguments)\n {\n $this->sourceArguments = $sourceArguments;\n }", "public function edit(Source $source)\n {\n //\n }", "public function setSource($url, $hash = null)\r\n {\r\n $this->sourceUrl = $url;\r\n $this->sourceHash = $hash;\r\n }", "public function setSourceGroup(?string $groupName): void\n {\n if (null === $groupName) {\n $this->remove(self::SOURCE_GROUP);\n } else {\n $this->set(self::SOURCE_GROUP, $groupName);\n }\n }", "public function setSource($var)\n {\n GPBUtil::checkString($var, True);\n $this->source = $var;\n\n return $this;\n }", "public function setSource($var)\n {\n GPBUtil::checkString($var, True);\n $this->source = $var;\n\n return $this;\n }", "public function setImageSourcePath($strSource = NULL) \n\t {\n\t\t$this->objParent->source_path = $this->configs->get('Application.server.document_root') . \n\t\t\tstr_replace($this->configs->get('Application.server.document_root'), \"\", $strSource);\t \n\t }", "public function & SetStep ($step) {\n\t\t/** @var $this \\MvcCore\\Ext\\Forms\\IField */\n\t\t$this->step = $step;\n\t\treturn $this;\n\t}", "public function setSrcfile($file)\n {\n if (is_string($file)) {\n $file = new PhingFile($file);\n }\n $this->_sourceFile = $file;\n }", "public function setSmallPreview($source) {\n $this->_setPreview($source, $this->getSmallPath());\n }", "public function testGetSource(): void\n {\n self::assertNull($this->sut->getSource(), 'The attribute has not been set.');\n \n $value1 = $this->createAnyUriTypeDummy();\n $this->sut->setSource($value1);\n self::assertSame($value1, $this->sut->getSource(), 'Set the attribute with a value: AnyUriType.');\n \n $value2 = $this->createAnyUriTypeDummy();\n $this->sut->setSource($value2);\n self::assertSame($value2, $this->sut->getSource(), 'Set the attribute with another value: AnyUriType.');\n }" ]
[ "0.674754", "0.6740017", "0.67248255", "0.67063016", "0.67063016", "0.67063016", "0.6705842", "0.6651604", "0.65046126", "0.6497031", "0.64850897", "0.6468831", "0.6395893", "0.636517", "0.6345902", "0.6290369", "0.62349755", "0.62206405", "0.6185511", "0.61039656", "0.6095046", "0.60537606", "0.6032073", "0.60242736", "0.59594464", "0.5905723", "0.58832836", "0.5883009", "0.58504367", "0.5847683", "0.58166385", "0.57876", "0.5750917", "0.5750917", "0.57391375", "0.57391137", "0.5727561", "0.5724563", "0.57151484", "0.569608", "0.56289077", "0.5619628", "0.56107783", "0.5601285", "0.5572117", "0.55667573", "0.55626315", "0.5561331", "0.5558701", "0.55262375", "0.55262274", "0.55210125", "0.5502015", "0.54817414", "0.547472", "0.5467175", "0.5466922", "0.54617375", "0.5459962", "0.54484624", "0.5447293", "0.5441967", "0.54063773", "0.54023993", "0.5395277", "0.5373401", "0.5351711", "0.53448373", "0.53209335", "0.5318159", "0.5308378", "0.53059655", "0.53025234", "0.5298172", "0.5296106", "0.52767324", "0.52660096", "0.524552", "0.5241365", "0.52188605", "0.52003384", "0.51970774", "0.5188053", "0.5171407", "0.5166823", "0.5160094", "0.51587814", "0.5146865", "0.5139341", "0.5138061", "0.51367795", "0.5131784", "0.5118448", "0.51133275", "0.51133275", "0.51119125", "0.5111409", "0.50805676", "0.50744945", "0.50699425" ]
0.7598724
0
Get the source step.
Получить шаг источника.
public function getSource(): StepInterface;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_step() {\n\t\treturn $this->step;\n\t}", "public function GetStep () {\n\t\treturn $this->step;\n\t}", "private function getSource() {\n\t\treturn $this->line['source'];\n\t}", "public function getSource()\n {\n return $this->arguments['source'];\n }", "public function getStep()\n {\n return $this->step;\n }", "public function getStep()\n {\n return $this->step;\n }", "public function getSource()\r\n {\r\n return $this->source;\r\n }", "public static function get_source() {\n\t\treturn self::$source;\n\t}", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource()\n {\n return $this->source;\n }", "public function getSource() {\n return $this->source;\n }", "public function getSource() {\n return $this->source;\n }", "public function getSource() {\n\t\treturn $this->source;\n\t}", "public function getSource()\n\t{\n\t\treturn $this->getSourcePart();\n\t}", "public function getSource() {\n return $this->source;\n }", "public function getSource() {\n return $this->source;\n }", "public function getSource() {\n return $this->source;\n }", "private function getSource() { return $this->source; }", "public function getSourceLine()\n {\n return $this->source_line;\n }", "public function getSource()\n\t{\n\t\treturn $this->source;\n\t}", "public function getSource()\n\t{\n\t\treturn $this->source;\n\t}", "public function getSource()\n {\n return $this->_source;\n }", "public function getSource()\n {\n return $this->_source;\n }", "public function getSource()\n {\n return $this->_source;\n }", "public function getSource() {\n\n\t\treturn $this->source;\n\t}", "public function getSource() {\r\n return $this->source;\r\n }", "public static function getSource() {\n\t\tif (empty(static::$source))\n\t\t\tstatic::$source = static::create();\n\n\t\treturn static::$source;\n\t}", "function getSource() {\n return $this->source;\n }", "function getSource() {\n\t\treturn $this->_Source;\n\t}", "public function getSource() {\n if (!isset($this->source)) {\n $this->source = new Source($this->migration, $this);\n }\n return $this->source;\n }", "public function getSource()\n {\n if (array_key_exists(\"source\", $this->_propDict)) {\n return $this->_propDict[\"source\"];\n } else {\n return null;\n }\n }", "public function source()\n {\n return $this->source;\n }", "public function getCurrentStep() {\n return $this->_currentStep;\n }", "public function get_step($step) {\n\t}", "function get_source() {\n if (!empty($this->source_id)) {\n backup_migrate_include('destinations');\n return backup_migrate_get_destination($this->source_id);\n }\n }", "function getSource(): string {\n\t\treturn $this->source;\n\t}", "public function setSource(StepInterface $step): self;", "public function get_current_step()\n {\n }", "public function getSource() {\n return $this->aCfg['source'];\n }", "protected function getSource(): string\n {\n return $this->source;\n }", "public function getSource(): Source;", "function getCurrentStep() ;", "function getSource(){\n return $this->source;\n }", "public function getSourceFile()\n {\n return $this->source_file;\n }", "public function getSource()\n {\n return $this->getParentBlock()->getSource();\n }", "function getResolvedStep() {\n $this->initializeWizardObject();\n return $this->wizardObject->resolvedStep;\n }", "public function grabPageSource() {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('grabPageSource', func_get_args()));\n }", "public function source(): string\n {\n return $this->source;\n }", "function getActualStep() {\n $this->initializeWizardObject();\n return $this->wizardObject->currentStep;\n }", "function step_get($step) {\n\t\tinclude PLUGINPATH.$this->file.\".php\";\n\t\tif($step == \"global\") {\n\t\t\treturn $content;\n\t\t}\n\t\treturn $content[$step];\n\t}", "public function get_source() {\n\t\t\t$args = $this->args;\n\n\t\t\treturn ! empty( $args['source'] ) ? $args['source'] : false;\n\t\t}", "public function getSource() {}", "function getValue() {\n\t\treturn $this->Source;\n\t}", "public function first()\n {\n return $this->steps->first();\n }", "public function getSource()\n {\n $config = Core_Module_Config::getConfig('application');\n if (APPLICATION_ENV == 'testing') {\n $source = $config['testing']['resources']['navigation']['source'];\n } else {\n $source = $config['production']['resources']['navigation']['source'];\n }\n\n if (isset($source[$this->_section])) {\n return $source[$this->_section];\n } else {\n return null;\n }\n\n }", "public function getPageSource()\n {\n return $this->execute(DriverCommand::GET_PAGE_SOURCE);\n }", "public function getCurrentStep() : string\n {\n return $this->workflow->currentStep;\n }", "public function get_current_step()\n {\n if (! isset($this->current_step))\n {\n $this->current_step = Request::get(self::PARAM_STEP) ? Request::get(self::PARAM_STEP) : 1;\n if (is_array($this->current_step))\n {\n $this->current_step = $this->current_step[0];\n }\n }\n \n return $this->current_step;\n }", "private function getSourceFile() {\n return $this->sourceFile;\n }", "public function getSource(): ?string\n {\n return $this->source;\n }", "public function getSource(): ?string\n {\n return $this->source;\n }", "public function getSource();", "public function getSource();", "public function getSource();", "public function getSource();", "public function getSource();", "public function getSource();", "public function getSource();", "public function getSourceFile() {\n return $this->sourceFile;\n }", "public function source()\n {\n return $this->resource->getSource();\n }", "public function GetSourceUrl () {\n\t\treturn $this->sourceUrl;\n\t}", "public function getSource() {\n return @$this->attributes['source'];\n }", "public function getTargetSource()\n {\n return $this->targetSource;\n }", "private function seleniumGetSource()\n\t{\n\t\treturn($this->seleniumExec(array('type' => 'sel_getsource')));\n\t}", "public function getSource(): string;", "public function getSource(): string;", "public function getSourcePath()\n\t{\n\t\treturn $this->_sourcePath;\n\t}", "abstract public function getSource();", "public function getInitialStep()\n {\n return self::STEP_1;\n }", "public function getSource(): string\n {\n\n $command = new Commands\\GetSource();\n return $command->getFormattedOutput();\n\n }", "public function getSource() {\n $response = $this->execute(\"GET\", \"/session/:sessionId/source\");\n return $this->GetJSONValue($response);\n }", "public function get_source()\n {\n }", "public function getSource()\n {\n return $this->browser->source();\n }", "protected function _getSource()\n {\n if (!$this->_source) {\n throw new LocalizedException(__('Please specify a source.'));\n }\n return $this->_source;\n }", "public function getSourceText() {\n\t\treturn $this->_pageSource;\n\t}", "public function source()\n {\n return $this->getExceptionAttribute('source');\n }", "public function getSource() : string;", "protected function pageSource()\n {\n return $this->webDriver()->getPageSource();\n }" ]
[ "0.7201959", "0.71413285", "0.7133461", "0.7041648", "0.69850266", "0.69850266", "0.6961313", "0.69578755", "0.6948628", "0.6948628", "0.6948628", "0.6948628", "0.6948628", "0.6948628", "0.6948628", "0.6948628", "0.6948628", "0.6948628", "0.6948628", "0.6948628", "0.6948628", "0.6948628", "0.6944455", "0.6944455", "0.6938899", "0.6930279", "0.6916002", "0.6916002", "0.6916002", "0.69142824", "0.690959", "0.6902083", "0.6902083", "0.68813825", "0.68813825", "0.68813825", "0.68795156", "0.6836324", "0.6815506", "0.68144757", "0.67746514", "0.6774458", "0.67279685", "0.6721189", "0.6715346", "0.6696427", "0.66551656", "0.6624563", "0.6579277", "0.6548494", "0.6544024", "0.65434736", "0.65060514", "0.6465165", "0.6440249", "0.64074713", "0.63956505", "0.6394333", "0.63937384", "0.6389845", "0.63764435", "0.6350004", "0.634621", "0.634604", "0.6343195", "0.6340779", "0.63382703", "0.6322654", "0.631808", "0.63175786", "0.6286592", "0.62738204", "0.62738204", "0.62699527", "0.62699527", "0.62699527", "0.62699527", "0.62699527", "0.62699527", "0.62699527", "0.6250037", "0.62487423", "0.62393767", "0.6238234", "0.6233655", "0.61996984", "0.61960876", "0.61960876", "0.61839443", "0.6183633", "0.6171185", "0.616707", "0.61662024", "0.61551404", "0.6138134", "0.61224973", "0.6095932", "0.6087555", "0.60829383", "0.6071145" ]
0.8069971
0
Add a destination step.
Добавьте шаг назначения.
public function addDestination(StepInterface $step): self;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add(Step $step): void;", "public function addStep($step)\n {\n $this->steps[] = $step;\n }", "public function actionAdd()\n\t{\n\t\t$formId = $this->_input->filterSingle('form_id', XenForo_Input::UINT);\n\t\t$destinationId = $this->_input->filterSingle('destination_id', XenForo_Input::UINT);\n\t\t\n\t\tif ($formId && $destinationId)\n\t\t{\n\t\t\treturn $this->_getFormDestinationAddEditResponse(array(\n\t\t\t\t'destination_id' => $destinationId,\n\t\t\t\t'form_id' => $formId\t\n\t\t\t));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$destinationModel = $this->_getDestinationModel();\n\t\t\t$destinations = $destinationModel->getDestinations();\n\t\t\t\n\t\t\t$destinationOptions = array();\n\t\t\tforeach ($destinations as $destinationId => $destination)\n\t\t\t{\n\t\t\t\t$destinationOptions[] = array(\n\t\t\t\t\t'label' => $destination['name'],\n\t\t\t\t\t'value' => $destinationId\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\t$viewParams = array(\n\t\t\t\t'destinationOptions' => $destinationOptions,\n\t\t\t\t'formId' => $formId\t\n\t\t\t);\n\t\t\t\n\t\t\treturn $this->responseView('KomuKu_SimpleForms_ViewAdmin_FormDestination_AddType', 'kmkform__form_destination_add_type', $viewParams);\n\t\t}\n\t}", "protected function _urlAddDestination(&$url, $destination = null) \n {\n if (empty($destination)) {\n return;\n }\n \n if(is_array($destination)) {\n $route = 'default';\n if(isset($destination['route'])) {\n $route = $destination['route'];\n unset($destination['route']);\n }\n \n $reset = false;\n if(isset($destination['reset_params'])) {\n $reset = $destination['reset_params'];\n unset($destination['reset_params']);\n }\n \n $destination = self::url(\n $destination,\n $route,\n $reset,\n true\n );\n }\n \n $url .= '?destination=' . $destination;\n }", "public function addStep(BuildStep $step)\n {\n $this->_steps[] = $step;\n }", "protected function add($source, $destination)\n {\n $this->add[] = $source .' '. $destination;\n $this->_order('add');\n }", "public function setDestination($var)\n {\n GPBUtil::checkString($var, True);\n $this->destination = $var;\n\n return $this;\n }", "public function addRoute( $route = false, $destination = false ) \n {\n \t// Filter parameters\n \t$route = trim($route);\n\n \t// Verify parameters\n \tif( strlen($route) > 0 && is_array($destination) )\n \t{\n\t $newRoute = new Router\\Route( $route, $destination );\n\t if( is_object($newRoute) )\n\t {\n\t \t$this->_routes[] = $newRoute;\n\t \treturn true;\n\t }\n }\n\n return false;\n }", "public function addStep(StepInterface $step) {\n $this->steps[$step->getStep()] = $step;\n }", "function setDestination(string $destination): self;", "public function setDestination($destination)\n {\n $this->destination = $destination;\n }", "public function setDestination($destination)\n {\n $this->destination = $destination;\n }", "public function addStep($step)\n {\n if (!isset($this->steps)) {\n $this->steps = array();\n }\n if (in_array($step, $this->steps)) {\n return $this;\n }\n $this->steps []= $step;\n return $this;\n }", "public function addStep(Ezer_Step $step)\r\n\t{\r\n\t\t$step->in_flows = array();\r\n\t\t$step->out_flows = array();\r\n\t\t\t\t\r\n\t\tif(count($this->steps))\r\n\t\t\tthrow new Ezer_SyntaxException('If object can contain only one step [' . $step->getName() . ']');\r\n\t\t\t\r\n\t\tparent::addStep($step);\r\n\t}", "function step_add($step) {\n\t\t// create the directory if not exists\n\t\tif(!is_dir(PLUGINPATH.$this->filedir)) {\n\t\t\tmkdir(PLUGINPATH.$this->filedir);\n\t\t}\n\t\t// get existing data\n\t\t$content = $this->step_get(\"global\");\n\t\t// add our data to the existing one\n\t\t$content[$step] = $this->input;\n\t\t$content = '<?php\n\n// This is the plugin in its PluginMaker\\'s early shape. It is not recommended to edit this directly.\n\n$content = '.var_export($content, true).\"\n\n?>\";\n\t\tfile_put_contents(PLUGINPATH.$this->file.\".php\", $content);\n\t}", "public function addStep( Closure $Step ) {\n\n\t\t$this->_steps[ ] = $Step;\n\t}", "public function addStep($step)\n {\n $this->step[] = $step;\n return $this;\n }", "public static function addMigration($db, $formData = array(), $destination)\n {\n\n if ($destination == \"diplomats\" && $formData[\"migrant_type\"] == \"HEAD\") {\n try {\n if ($db->create(\"track_movement\", $formData)) {\n return $db->inset_id();\n }\n return 0;\n } catch (Exception $exception) {\n var_dump($exception->getMessage());\n die();\n }\n }\n\n if ($destination == \"members\" && $formData[\"migrant_type\"] == \"MEMBER\") {\n try {\n if ($db->create(\"track_movement\", $formData)) {\n return $db->inset_id();\n }\n return 0;\n } catch (Exception $exception) {\n var_dump($exception->getMessage());\n die();\n }\n }\n\n return 1;\n }", "public function move($dest)\n {\n }", "public function addStep($newStep)\r\n\t\t{\r\n\t\t\t/* We can only add Step objects */\r\n\t\t\tif (get_class($newStep) != 'Step')\r\n\t\t\t\treturn false;\r\n\t\t\t/* Is this step already added? */\r\n\t\t\tforeach ($this->steps as $indice => $step)\r\n\t\t\t{\r\n\t\t\t\tif \t($step->id == $newStep->id)\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t$newStep->position = count($this->steps);\r\n\t\t\t$newStep->recipe = $this->id;\t\t\t\r\n\t\t\t$this->steps[] = $newStep;\r\n\t\t\treturn $this;\r\n\t\t}", "public function addStep($key, EasyDeploy_InstallStrategy_Steps_Interface $step) {\n\t\t$this->installSteps[$key] = $step;\n\t}", "public function setDestination(Destination $destination) {\n $this->destination = $destination;\n }", "public function insert(Destination $destination) {\n return $this->_insert($destination);\n }", "public function setDest($dest)\n {\n $this->dest = $dest;\n }", "public function setDestinationPayment($dest)\n {\n $this->dst_payment_id = $dest;\n }", "public function setDestination($destination) {\n\t\t$urlParts = parse_url($destination);\n\t\tif (!$urlParts['scheme']) {\n\t\t\t$destination = 'http://' . $destination;\n\t\t}\n\t\t$this->destination = $destination;\n\t}", "public function setDestination($value)\n {\n $this->_fields['Destination']['FieldValue'] = $value;\n return $this;\n }", "public function get_next_step_link($step = '')\n {\n }", "public function get_next_step_link($step = '')\n {\n }", "public function getDestination(string $name): ?StepInterface;", "public function saveDestinationForPageData($destId)\n {\n $this->destinationsNeedingPageData[] = $destId;\n }", "function backup_migrate_create_destination($destination_type, $params = array()) {\n $params['type'] = $destination_type;\n // Create a new dummy destination to call the create method on because the base item create is not static.\n $destination = new DestinationBase();\n return $destination->create($params);\n}", "public function resolveDestination(NavigatorInterface $navigator): ?StepInterface;", "protected function to_step(): Steps\\Step {\n\t\treturn new Steps\\Step( $this->model->get_id(), $this->model->get_title(), $this->model->get_permalink() );\n\t}", "public function getDestination();", "public function getDestination();", "public function setSource(StepInterface $step): self;", "public function setDest($var)\n {\n GPBUtil::checkString($var, false);\n $this->dest = $var;\n\n return $this;\n }", "public function destination(string $location)\n {\n $this->parameters['destination'] = $location;\n\n return $this;\n }", "public function add()\n {\n $sql = \"INSERT INTO situatedprinter (printerId, location, costingdepartment) VALUES (?,?,?)\";\n $this->dbObj->runQuery($sql,\n array(\n $this->getPrinterId(),\n $this->getLocation(),\n $this->getCostDepartment()\n ));\n }", "public function appendDestinationUrl($value)\n {\n return $this->append(self::DESTINATION_URL, $value);\n }", "function addProcessStep($name, $class);", "public function addPair($destination_column = NULL, $source_column = NULL, $as_sql = TRUE) {\n $this->items[$this->index]['pairs'][] = array('to' => $destination_column, 'from' => $source_column, 'as_sql' => $as_sql);\n return $this;\n }", "public function add_exception_destination($name, $destination)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n // Validation\n //-----------\n Validation_Exception::is_valid($this->validate_name($name));\n Validation_Exception::is_valid($this->validate_address($destination));\n\n $rule = new Rule();\n\n try {\n $rule->set_name($name);\n $rule->set_address($destination);\n $rule->set_flags(Rule::OUTGOING_BLOCK | Rule::ENABLED);\n $this->_add_rule($rule);\n } catch (Exception $e) {\n throw new Engine_Exception(clearos_exception_message($e), CLEAROS_ERROR);\n }\n }", "public function addRoute(RouteInterface $route): self;", "public function addRoute() {\r\n \t$this->auth()->setRequirements('roles', ['Admin']);\r\n \t$this->redirectNotAuthorized();\r\n \t\r\n \tif(isset($_POST['addRoute'])){\r\n \t\t$route = new Route();\r\n \t\t$route->setPropValues($_POST);\r\n \t\tif(!is_null($route->create())){\r\n \t\t\theader(\"Location: \".BASE_URI.Routes::getUri('admin_routes_edit').\"?new=true&id=\".$route->getIdentifier());\r\n \t\t}\r\n \t}\r\n \t\r\n \t$this->layout()->render('admin/routes/add.php');\r\n \t\r\n }", "public function add_directions($facility){\n\n\t\tMultiOpponentFacility::create(array(\n\t\t\t'name' => $facility['name'],\n\t\t\t'address' => $facility['address'],\n\t\t\t'city' => $facility['city'],\n\t\t\t'state' => $facility['state'],\n\t\t\t'zip' => $facility['zip'],\n\t\t\t'directions' => $facility['directions']\n\t\t));\n\t\treturn true;\n\n\t}", "public function hook_after_add($id) {\n\t //Your code here\n\t\t\t// $this->return_url=url('/admin/tenaga_kerja/step2?id='.$id);\n\t }", "public function addLocation($location)\n {\n $this->paths[] = $this->resolvePath($location);\n }", "public function destination()\n {\n return $this->belongsTo(Destination::class, 'destination_id');\n }", "public function setDestination($destination)\n {\n return $this->setOptionValue(self::DESTINATION, $destination);\n }", "public function insertAsNextSiblingOf(Doctrine_Record $dest)\n {\n if ($this->isValidNode()) {\n throw new Doctrine_Node_Exception('Can not insert existing nodes.');\n }\n if (!$dest->getNode()->getLevel()) $this->makeRoot();\n else $this->insertAsLastChildOf($dest->getParent());\n }", "public function add_job_flow_steps($job_flow_id, $steps, $opt = null)\n\t{\n\t\tif (!$opt) $opt = array();\n\t\t$opt['JobFlowId'] = $job_flow_id;\n\t\t\n\t\t// Required list + map\n\t\t$opt = array_merge($opt, CFComplexType::map(array(\n\t\t\t'Steps' => (is_array($steps) ? $steps : array($steps))\n\t\t), 'member'));\n\n\t\treturn $this->authenticate('AddJobFlowSteps', $opt);\n\t}", "function add_substep($title, $substep_description, $id_task, $executed_substep){\n\tglobal $bdd;\n\n\t$req = $bdd -> prepare('INSERT INTO substep (title, substep_description, id_task, executed_substep) \n\t\tVALUES (:title, :substep_description, :id_task, :executed_substep)');\n\n\t$req -> execute(array(\n\t\t'title' => $_POST['title'],\n\t\t'substep_description' => $_POST['substep_description'],\n\t\t'id_task' => $id_task,\n\t\t'executed_substep' => 'false'\n\t));\n}", "public function setNextStep($step)\n\t{\n\t\tlist($method, $parameters) = $this->parseStepString($step);\n\n\t\tif ( ! method_exists($this, $method))\n\t\t{\n\t\t\tthrow new UpdaterException('Method does not exist on this Steppable class: '.$method, 20);\n\t\t}\n\n\t\t$index = array_search($this->currentStep, $this->steps);\n\n\t\tif ($index === FALSE OR in_array($step, $this->steps))\n\t\t{\n\t\t\t$this->nextStep = $step;\n\t\t\treturn;\n\t\t}\n\n\t\t// Inject this step into our steps array\n\t\tif ( ! in_array($step, $this->steps))\n\t\t{\n\t\t\tarray_splice($this->steps, $index + 1, 0, $step);\n\t\t}\n\t}", "public function getDestination()\n {\n return $this->destination;\n }", "public function getDestination()\n {\n return $this->destination;\n }", "public function getDestination()\n {\n return $this->destination;\n }", "public function getDestination()\n {\n return $this->destination;\n }", "public function addStep(Request $request)\n {\n //dd('test');\n $project = Project::where('id', $request->project_id)\n ->where('user_id', Auth::user()->id)\n ->firstOrFail();\n\n $step_end = Step::where('user_id', Auth::user()->id)\n ->where('project_id', $request->project_id)\n ->get();\n\n if ($project->step == $step_end->count())\n {\n if ($project->status == 'Pending' || $project->status == 'In Process')\n {\n $project->update(['status'=>'Finished']);\n }\n\n msg_flash(\"Nombre d'étape atteint\", \"danger\");\n return redirect()->route('project.show', $request->project_id);\n }\n\n\n $this->validate($request, ['name' => 'required|min:3']);\n Step::create(\n [\n 'user_id' => Auth::user()->id,\n 'project_id'=> $request->project_id,\n 'name'=> $request->name,\n 'description'=> $request->description,\n ]\n );\n msg_flash('Etape ajoutée avec succès', \"success\");\n return redirect()->route('project.show', $request->project_id);\n }", "public function setStep($var)\n {\n GPBUtil::checkString($var, True);\n $this->step = $var;\n\n return $this;\n }", "public function destination()\n {\n return $this->destination;\n }", "public function add($step, $callback)\n {\n //Check if step is allowed\n\n (new \\Phramework\\Validate\\EnumValidator([\n self::STEP_BEFORE_AUTHENTICATION_CHECK,\n self::STEP_AFTER_AUTHENTICATION_CHECK,\n self::STEP_AFTER_CALL_URISTRATEGY,\n self::STEP_BEFORE_CALL_URISTRATEGY,\n self::STEP_BEFORE_CLOSE,\n self::STEP_FINALLY,\n self::STEP_ERROR\n ]))->parse($step);\n\n if (!is_callable($callback)) {\n throw new \\Exception(\n Phramework::getTranslated('Callback is not callable')\n );\n }\n\n //If stepCallback list is empty\n if (!isset($this->stepCallback[$step])) {\n //Initialize list\n $this->stepCallback[$step] = [];\n }\n\n //Push\n $this->stepCallback[$step][] = $callback;\n }", "public function setDest($value)\n {\n $this->set('dest', (string)$value);\n }", "public function redirect_to_step() {\n\n\t\tglobal $post;\n\n\t\t$first_step = $this->get_first_step_url( $post );\n\n\t\tif ( $first_step ) {\n\n\t\t\twp_safe_redirect( $first_step );\n\t\t\tdie;\n\t\t}\n\t}", "public static function add_new($name){\n\t\t$mysql = mysql_connection::get_instance();\n\t\t\n\t\t$stmt = $mysql->prepare('INSERT INTO `shipping_destinations` (`shipping_destination_name`) VALUES (?)');\n\t\t$stmt->bind_param('s', $name);\n\t\t$stmt->execute();\n\t\t$stmt->close();\n\t\t\n\t\treturn new self($mysql->insert_id, $name);\n\t}", "public function add($path, $route = array());", "public function destinationUrl($value)\n {\n $this->destinationUrl = $value;\n\n return $this;\n }", "public function __construct(RedirectDestinationInterface $destination) {\n $this->destination = $destination;\n }", "public function destination()\n {\n return $this->data['destination'];\n }", "public function withDestination($value)\n {\n $this->setDestination($value);\n return $this;\n }", "public function extractTo ($destination, $entries = null) {}", "public function withDestination(string $destination): self\n {\n $result = clone $this;\n $result->destination = $destination;\n\n return $result;\n }", "public function setTargetDestination($value, $desc = \"\")\n {\n $this->setValueObject('target_destination', $value, $desc);\n }", "protected function addTarget()\n\t{\n\t\tglobal $tpl, $ilTabs, $ilCtrl, $lng;\n\n\t\t$ilTabs->setBackTarget($lng->txt(\"back\"), $ilCtrl->getLinkTarget($this, \"listTargets\"));\n\n\t\t$tpl->setContent($this->initTargetForm(\"create\"));\n\t}", "public function getDestination() {\n\t\treturn $this->destination;\n\t}", "public function setDestinationLocation($value, $desc = \"\")\n {\n $this->setValueObject('destination_location', $value, $desc);\n }", "public function link($destination, $args = array()) {\n\t\treturn 'link';\n\t}", "private function addAlias( $source, $dest ) {\n\t\t$parts = explode( '\\\\', $dest );\n\t\tforeach ( $parts as $part ) {\n\t\t\tif ( ReservedWords::isReserved( $part ) ) {\n\t\t\t\t$this->error( \"Class name is reserved: $dest\" );\n\t\t\t}\n\t\t}\n\n\t\t// Check for conflicts\n\t\t$lcDest = strtolower( $dest );\n\t\tif ( isset( $this->destClasses[$lcDest]) ) {\n\t\t\t$this->error( \"Duplicate qualified class name \\\"$dest\\\", \" .\n\t\t\t\t\"from sources \\\"$source\\\" and \\\"{$this->destClasses[$lcDest]}\\\"\" );\n\t\t}\n\n\t\tif ( isset( $this->aliases[$source] ) ) {\n\t\t\t$this->error( \"Duplicate source class name \\\"$source\\\"\" );\n\t\t}\n\n\t\t$lcLastPart = strtolower( end( $parts ) );\n\t\t$this->destNames[$lcLastPart][] = $dest;\n\t\t$this->destClasses[$lcDest] = $source;\n\t\t$this->aliases[$source] = $dest;\n\t}", "public function addTask(string $target, ExecuteShell $task)\n {\n $this->tasks[$target] = $task;\n $this->description = sprintf(\n '%s (%s)',\n $task->getDescription(),\n implode(', ', array_keys($this->tasks))\n );\n }", "public function admin_moveup($id, $step = 1) {\n\t\t$link = $this->Link->findById($id);\n\t\tif (!isset($link['Link']['id'])) {\n\t\t\t$this->Session->setFlash(__d('muffin', 'Invalid id for Link'), 'alert', array('class' => 'alert-error'));\n\t\t\t$this->redirect(array('action' => 'index'));\n\t\t}\n\t\t$this->Link->Behaviors->attach('Tree', array(\n\t\t\t'scope' => array(\n\t\t\t\t'Link.menu_id' => $link['Link']['menu_id'],\n\t\t\t),\n\t\t));\n\t\tif ($this->Link->moveUp($id, $step)) {\n\t\t\t$this->Session->setFlash(__d('muffin', 'Moved up successfully'), 'alert', array('class' => 'alert-success'));\n\t\t} else {\n\t\t\t$this->Session->setFlash(__d('muffin', 'Could not move up'), 'alert', array('class' => 'alert-error'));\n\t\t}\n\t\t$this->redirect(array('action' => 'index'));\n\t}", "public function __construct($target, \\tool_usertours\\step $step) {\n $this->step = $step;\n\n parent::__construct($target);\n }", "public function addPath(Page\\Path $path);", "public function addRelation(VersionInfo $sourceVersion, ContentInfo $destinationContent)\n {\n throw new \\Exception('@todo: Implement.');\n }", "public function moveAsNextSiblingOf(Doctrine_Record $dest) {\n if (!$this->isValidNode()) {\n throw new Doctrine_Node_Exception('Can not move unexisting nodes.');\n }\n $this->insertAsNextSiblingOf($dest);\n }", "public function add(RouteInterface $route)\n\t{\n\t\t$this->addItem($route);\n\t}", "public function onGoToStep(){\n if (($step = post('step')) != ''){\n\n $this->currentStep = $step;\n $this->currentGroupId = post('groupId');\n \n $this->prepareVars();\n\n return [\n \"#step\" => $this->renderPartial($step)\n ];\n }\n }", "public function add_to($wizard) {\n\t\t\n\t\t// generate HTML from properties\n\t\t$this->__set(\"html\",$this->generate_html());\n\t\t$this->__set(\"html_base64\",base64_encode($this->html));\n\t\t\n\t\t// generate fallback HTML if method exists\n\t\tif (method_exists($this,\"generate_fallback_html\")) {\n\t\t\t$this->__set(\"fallback_html\",$this->generate_fallback_html());\n\t\t\t$this->__set(\"fallback_html_base64\",base64_encode($this->fallback_html));\n\t\t}\n\t\t\n\t\t// add to wizard\n\t\tarray_push($wizard->items,$this);\n\t\t\n\t\t// add any jQuery code to the wizard\n\t\tif (count($this->jquery) > 0) {\n\t\t\tforeach ($this->jquery as $statement) {\n\t\t\t\tarray_push($wizard->jquery,$statement);\n\t\t\t}\n\t\t}\n\n\t}", "private function move(){\t\n\t\tif(!$this->hasAccessRight())\n\t\t\treturn;\t\t\t\t\t\n\t\t$sourceTask = $this->getParam('source');\t\n\t\t$targetTask = $this->getParam('target');\n\t\tvar_dump($sourceTask.$targetTask);\n\t\t$sourceTaskParent = WTTaskUtil::findParenttaskByTaskid($sourceTask);\n\t\tif($sourceTaskParent != null)\n\t\t\tWTFactsAPI::delFact($sourceTaskParent, 'SubTask', $sourceTask, null, null);\n\t\tif(!WTTaskUtil::pageExist($targetTask))\n\t\t\tWTFactsAPI::createPageWithCategory($targetTask, 'Task');\t\n\t\tWTFactsAPI::addFact($targetTask, 'SubTask', $sourceTask, null, true, null);\n\t\t$this->result['success'] = true;\n\t}", "public function move($source, $destination);", "public function add($serviceId, $class, $name, $workerServiceId, $redirectionManagerServiceId);", "protected function _addRoute($route, $url, $actions, $params = null){return self::$app->getRouter()->addRoute($route, $url, $actions, $params);}", "public function addTarget(Rule $rule, TargetCreateStruct $targetCreateStruct): Target;", "public static function destinationPath($package_name, $destination, Interpolator $location_replacements) {\n $dest_full_path = $location_replacements->interpolate($destination);\n return new self('dest', $package_name, $destination, $dest_full_path);\n }", "public function add(string $from, $to, array $options = null);", "protected function define_my_steps() {\n $this->add_step(new backup_panopto_activity_structure_step('panopto_structure', 'panopto.xml'));\n }", "public function addCommerceCheckoutStep($orderModel = null, $step = 1, $option = \"\")\n {\n if ($orderModel)\n {\n craft()->instantAnalytics->addCommerceCheckoutStep($this, $orderModel, $step, $option);\n }\n }", "public function addRoute(Route $route)\n \t{\n \t\tif(!in_array($route, $this->routes))// if the route doesn't exist.\n \t\t{ \n \t\t\t$this->routes[] = $route; // The array routes will receive the new route.\n \t\t}\n \t}", "public function setStep(StepInterface $step, $step_id) {\n $this->steps[$step_id] = $step;\n }", "public function post($pattern, $destination, $name = null)\n {\n return $this->add($pattern, $destination, 'POST', $name);\n }" ]
[ "0.6735098", "0.649479", "0.6313146", "0.6290758", "0.6259214", "0.6095764", "0.6039076", "0.59629184", "0.59128165", "0.59097165", "0.59062946", "0.59062946", "0.5868683", "0.58228135", "0.58126307", "0.5790946", "0.5750853", "0.5662209", "0.5589725", "0.5585289", "0.55795556", "0.5535633", "0.54986334", "0.5475027", "0.5378461", "0.5311973", "0.530194", "0.5292051", "0.5292051", "0.52730185", "0.5269353", "0.52578086", "0.51864046", "0.51704395", "0.5131694", "0.5131694", "0.51223004", "0.510463", "0.50979465", "0.5087172", "0.50827605", "0.50744855", "0.50560975", "0.50469345", "0.5046825", "0.50460905", "0.5030011", "0.50263727", "0.50187904", "0.50148714", "0.50122887", "0.49734393", "0.496811", "0.49635932", "0.49510637", "0.49202037", "0.49202037", "0.49202037", "0.49202037", "0.49183214", "0.4911912", "0.49069226", "0.490474", "0.4901178", "0.48944604", "0.4891297", "0.4881546", "0.48812157", "0.48811346", "0.48807776", "0.4879001", "0.4866388", "0.48435795", "0.4838987", "0.48376447", "0.48312452", "0.4829396", "0.4822411", "0.48198313", "0.4818491", "0.4808451", "0.48011884", "0.4794226", "0.47881833", "0.47810826", "0.4777905", "0.47774628", "0.47726873", "0.47718775", "0.47650653", "0.4761137", "0.4760016", "0.47571105", "0.4748304", "0.47425735", "0.474137", "0.47397417", "0.4733957", "0.4731751", "0.47250956" ]
0.79703826
0
Returns the path types used to construct the path.
Возвращает типы путей, используемые для построения пути.
public function getType(): PathTypeInterface;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPaths($type);", "function __paths($type) {\n\t\t$type = strtolower($type);\n\t\t$paths = array();\n\n\t\tif ($type === 'core') {\n\t\t\treturn App::core('libs');\n\t\t}\n\t\tif (isset($this->{$type . 's'})) {\n\t\t\treturn $this->{$type . 's'};\n\t\t}\n\t\treturn $paths;\n\t}", "public function getFieldType()\n {\n return self::TYPE_PATH;\n }", "function path($type) {\n\t\t$_this =& App::getInstance();\n\t\tif (!isset($_this->{$type})) {\n\t\t\treturn array();\n\t\t}\n\t\treturn $_this->{$type};\n\t}", "public static function typeRoutes () {\n return include dirname(__FILE__). '/../../../routes/type.php';\n }", "public function getType($path);", "function pathauto_path_alias_types() {\n $objects['user/'] = t('Users');\n $objects['node/'] = t('Content');\n if (\\Drupal::moduleHandler()->moduleExists('taxonomy')) {\n $objects['taxonomy/term/'] = t('Taxonomy terms');\n }\n if (\\Drupal::moduleHandler()->moduleExists('forum')) {\n $objects['forum/'] = t('Forums');\n }\n return $objects;\n}", "public function type($path);", "public function getPathType() {\n return ($this->code & static::TYPE_FILE) === static::TYPE_FILE;\n }", "public function typesDataProvider(): array\n {\n return [\n // #0\n [\n DynamicRoutesUnitTest::TYPES_ROUTE_CATALOG_INT_BAR,\n '/catalog/1/',\n 1\n ],\n // #1\n [\n DynamicRoutesUnitTest::TYPES_ROUTE_CATALOG_INT_BAR,\n '/catalog/-1/',\n - 1\n ],\n // #2\n [\n DynamicRoutesUnitTest::TYPES_ROUTE_CATALOG_INT_BAR,\n '/catalog/+1/',\n 1\n ],\n // #3\n [\n DynamicRoutesUnitTest::TYPES_ROUTE_CATALOG_FIX_POINT_BAR,\n '/catalog/1.1/',\n 1.1\n ],\n // #4\n [\n DynamicRoutesUnitTest::TYPES_ROUTE_CATALOG_FIX_POINT_BAR,\n '/catalog/-1.1/',\n - 1.1\n ],\n // #5\n [\n DynamicRoutesUnitTest::TYPES_ROUTE_CATALOG_FIX_POINT_BAR,\n '/catalog/+1.1/',\n 1.1\n ],\n // #6\n [\n '/[a:bar]/',\n '/.-@/',\n '.-@'\n ],\n // #7\n [\n '/[s:bar]/',\n '/, ;:/',\n ', ;:'\n ],\n // #8\n [\n [\n '/[fp:number]/',\n '/[s:bar]/'\n ],\n '/abc/',\n 'abc'\n ],\n // #9\n [\n '/catalog/[il:bar]/',\n '/catalog/123,456,789/',\n '123,456,789'\n ],\n // #10\n [\n '/catalog/[s:bar]/',\n '/catalog/123&456/',\n '123&456'\n ],\n // #11, parameter name chars testing\n [\n '/[s:Aa_x-0]/',\n '/abc123/',\n 'abc123',\n 'Aa_x-0'\n ]\n ];\n }", "private static function get_types() {\n\t\treturn array(\n\t\t\t'story' => 'post',\n\t\t\t'gallery' => 'gallery',\n\t\t\t'versus' => 'versus',\n\t\t\t'sunshinegirl' => 'sunshinegirl',\n\t\t\t'pointer' => 'pn_pointer',\n\t\t\t'feature' => 'feature',\n\t\t);\n\t}", "public function types()\n {\n $types = array();\n foreach ($this->all('rdf:type') as $uri) {\n $type = EasyRdf_Namespace::shorten($uri);\n array_push($types, $type);\n }\n return $types;\n }", "protected function getTypes() {}", "public function get_all_types ()\r\n\t{\r\n\t\treturn array (LINK_EXERCISE,\r\n\t\t\t\t\t LINK_DROPBOX,\r\n\t\t\t\t\t LINK_STUDENTPUBLICATION,\r\n\t\t\t\t\t LINK_LEARNPATH,\r\n\t\t\t\t\t );\r\n\t}", "public function getTypes()\n {\n return join('', $this->types);\n }", "public function getRoutableTypes(): array\n {\n return $this->routableTypes;\n }", "public static function getTypes() {\n\t\treturn array(\n\t\t\tself::TYPE_IMAGE,\n\t\t\tself::TYPE_INPUT,\n\t\t\tself::TYPE_SELECT,\n\t\t\tself::TYPE_COLOR_LIST,\n\t\t\tself::TYPE_COLOR,\n\t\t\tself::TYPE_DATE_TIME,\n\t\t\tself::TYPE_URL,\n\t\t\tself::TYPE_CHECKBOX,\n\t\t\tself::TYPE_HTML_TEXT,\n\t\t\tself::TYPE_HTML_TEXT_TAB,\n\t\t\tself::TYPE_APPLICATION_TAB,\n\t\t\tself::TYPE_TEXT\n\t\t);\n\t}", "public static function types()\n {\n return [\n self::TYPE_UPLOAD,\n self::TYPE_DOWNLOAD,\n self::TYPE_SIGNATURE\n ];\n }", "public function getDataWithTypePath() {}", "public static function types()\n {\n return self::$types;\n }", "public function getPathInfo();", "public function getPathInfo();", "protected function _getPathsSpecs()\n {\n return $this->pathSpecs;\n }", "public function getValidPaths();", "protected function getMetadataPaths( $type, array $collection )\n {\n $paths = [ ];\n\n if ( isset( $collection[ $type ] ) )\n {\n foreach ( $collection[ $type ] as $items )\n {\n foreach ( $items as $key => $value )\n {\n if ( 'path' === $key )\n {\n $paths[ ] = $value;\n }\n }\n }\n }\n\n return $paths;\n }", "public function locationTypes()\n {\n return $this->type->all();\n }", "function typeToPath($type) {\n\t\tswitch ($type) {\n\t\t\tcase MONOGRAPH_FILE_PUBLIC: return 'public';\n\t\t\tcase MONOGRAPH_BOOKFILE_UPLOAD: return 'submission';\n\t\t\tcase MONOGRAPH_ARTWORK_UPLOAD: return 'artwork';\n\t\t\tcase MONOGRAPH_FILE_NOTE: return 'note';\n\t\t\tcase MONOGRAPH_FILE_REVIEW: return 'submission/review';\n\t\t\tcase MONOGRAPH_FILE_EDITOR: return 'submission/editor';\n\t\t\tcase MONOGRAPH_FILE_COPYEDIT: return 'submission/copyedit';\n\t\t\tcase MONOGRAPH_FILE_PRODUCTION: return 'submission/production';\n\t\t\tcase MONOGRAPH_FILE_GALLEY: return 'submission/galleys';\n\t\t\tcase MONOGRAPH_FILE_LAYOUT: return 'submission/layout';\n\t\t\tcase MONOGRAPH_FILE_ATTACHMENT: default: return 'attachment';\n\t\t}\n\t}", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function getTypes()\n {\n $types = Cache::rememberForever(\n 'file_types',\n function () {\n return array_pluck($this->get(['name'])->toArray(), 'name');\n }\n );\n\n return $types;\n }", "public function path() : array;", "public function location_types() {\n return backup_migrate_get_source_subtypes();\n }", "public function getClasses()\n\t{\n\t\treturn $this->getProp('rdfs:type');\n\t}", "public function getResourceTypes()\n {\n return $this->types;\n }", "public function getTypes(): array\n {\n return [\n static::TYPE_PLAINTEXT => 'Plain Text',\n static::TYPE_RICHTEXT => 'Rich Text',\n static::TYPE_IMAGE => 'Image (*.jpg, *.png, *.gif)',\n static::TYPE_FILE => 'File (*.*)',\n static::TYPE_NUMBER => 'Number',\n static::TYPE_URL => 'URL',\n static::TYPE_EMAIL => 'Email',\n ];\n }", "public static function typePath($type)\n {\n if ($type === 'S') {\n return PATH_typo3 . 'sysext/';\n } elseif ($type === 'G') {\n return PATH_typo3 . 'ext/';\n } elseif ($type === 'L') {\n return PATH_typo3conf . 'ext/';\n }\n return PATH_typo3conf . 'ext/';\n }", "public function get_link_types() {\n return array(\n 'content' => t('Content'),\n 'waywire' => t('Waywire'),\n );\n }", "public static function getTypes()\n {\n return self::$types;\n }", "public static function getPathsByRouteType(RequestInterface $request)\n {\n $entire_uri_without_queries = (strpos($request->getUri(), '?') !== false) ?\n substr($request->getUri(), 0, strpos($request->getUri(), '?')) :\n $request->getUri();\n\n $return = array(\n Route::ROUTE_TYPE_ABSOLUTE_PROTOCOL => $entire_uri_without_queries,\t// Absolute URL's with protocol, are an entire HTTP request URL. Compare against the entire request URL.\n Route::ROUTE_TYPE_ABSOLUTE_PROTOCOL_WITH_WILDCARDS => $entire_uri_without_queries,\n Route::ROUTE_TYPE_ABSOLUTE_DOMAIN => '//'.$request->getHost().$request->getPathInfo(),\t// Compare with just the domain and pathinfo\n Route::ROUTE_TYPE_ABSOLUTE_DOMAIN_WITH_WILDCARDS => '//'.$request->getHost().$request->getPathInfo(),\n Route::ROUTE_TYPE_ABSOLUTE_PATH => $request->getPathInfo(), // Compare with just the path info\n Route::ROUTE_TYPE_ABSOLUTE_PATH_WITH_WILDCARDS => $request->getPathInfo()\n );\n\n return $return;\n }", "public static function getTypes() {\n return array('bar' => 'Bar', 'restaurant' => 'Restaurant', 'hotel' => 'Hôtel');\n }", "public static function providePaths () : iterable {\n // Example from PSR-4 canonical document\n yield ['File_Writer', 'File_Writer.php'];\n yield ['Response\\Status', 'Response/Status.php'];\n yield ['Request', 'Request.php'];\n }", "public function getTypes() {\n return $this->info['types'];\n }", "public function get_typ() {\n\t\t$path = strtolower(get_class($this));\n\t\t// replace language-constructs\n\t\t$types = strtr($path, array('array0'=>'array','function0'=>'function'));\n\n\t\treturn array_slice(explode('\\\\', $types), 2);\n\t}", "public function fileTypes()\n {\n return [\n [\n 'photo',\n ],\n [\n 'audio',\n ],\n [\n 'video',\n ],\n [\n 'voice',\n ],\n [\n 'sticker',\n ],\n [\n 'document',\n ],\n ];\n }", "abstract public static function types(): array;", "public function getPaths()\n\t{\n\t\treturn [\n '/containers/nixnative/api/list',\n\t\t];\n\t}", "public static function getTypes()\n {\n return static::$TYPES;\n }", "abstract public function paths(): array;", "public function getXsdTypesPath()\n {\n return $this->getOptionValue(self::XSD_TYPES_PATH);\n }", "public function getTypes(): array;", "public function getPathFormat() {\n return $this->pathFormat;\n }", "public static function availableTypes(){\n $methods = get_class_methods(__CLASS__);\n $types = array_filter($types, function($type){\n return stripos('__', $type) === false;\n });\n return array_map(function($type){\n return str_replace('__', '', $type);\n }, $types);\n }", "public static function swaggerTypes()\n {\n return [\n 'resource_id' => 'string',\n 'resource_server_id' => 'string',\n 'scope_type' => 'string'\n ];\n }", "public function getPaths()\n {\n return $this->_query->getFilespecs();\n }", "public function listTypes()\n {\n $this->calledMethods[] = ['method' => 'listTypes', 'arguments' => func_get_args()];\n return $this->types;\n }", "public static function swaggerTypes()\n {\n return [\n 'scope_type' => 'string',\n 'permissions' => 'string[]'\n ];\n }", "public static function getSupportedFiletypes() : array;", "protected static function getPathsInternal() {}", "static function getTypes()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tself::TYPE_STRING,\r\n\t\t\tself::TYPE_BOOLEAN,\r\n\t\t\tself::TYPE_INTEGER,\r\n\t\t\tself::TYPE_FLOAT,\r\n\t\t\tself::TYPE_HTML\r\n\t\t);\r\n\t}", "public function getResourceTypes(): array\n {\n return $this->resourceTypes;\n }", "public static function types()\n {\n return [\n 'expense',\n 'income',\n 'transfer',\n ];\n }", "public function generalType($path)\n {\n }", "public static function getTypes()\n\t{\n\t\treturn array('TL_ERROR', 'TL_CONFIRM', 'TL_NEW', 'TL_INFO', 'TL_RAW');\n\t}", "public static function getTypes()\n\t{\n\t\treturn array('TL_ERROR', 'TL_CONFIRM', 'TL_NEW', 'TL_INFO', 'TL_RAW');\n\t}", "public static function GeCallTypeFullPath () {\n\t\treturn static::GetVendorPath() .'/'. static::GetCallTypePath();\n\t}", "static function getTypes()\n\t{\n\t\tif (! static::$initialized)\n\t\t\tstatic::initialize();\n\n\t\treturn static::$types;\n\t}", "public function getPaths()\n\t{\n\t\treturn [\n\t\t\t'/internal-api/ffrpc/list',\n\t\t];\n\t}", "public function getFileTypes()\n {\n if (array_key_exists(\"fileTypes\", $this->_propDict)) {\n return $this->_propDict[\"fileTypes\"];\n } else {\n return null;\n }\n }", "public function getNodeTypes() {}", "public function getType()\n {\n if (is_file($this->path)) {\n return 'file';\n } elseif (is_link($this->path)) {\n return 'link';\n } elseif (is_dir($this->path)) {\n return 'dir';\n }\n\n return \"Unknown\";\n }", "public function getPaths() : array\n {\n return [new TemplatePath($this->path)];\n }", "public function getPaths();", "public static function getTypes(){\n\t\treturn array('round robin' => 'round robin');\n\t}", "public function getTypes(): array\n {\n return $this->keys();\n }", "public function getPathName(): string\n {\n return 'path';\n }", "function getListeTypes ( ) {\n\t\treturn array ( '%'=>'--', 'CCAM'=>'CCAM', 'NGAP'=>'NGAP', 'DIAG'=>'DIAG' ) ;\n\t}", "public function types(){\n $types = array('1' => 'Free text',\n '2' => 'Yes\\No',\n '3' => 'Check box',\n '4' => 'Option',\n '5' => 'List',\n '6' => 'Number');\n return $types;\n }", "protected function getActionTypes()\n {\n if (true === $this->option('api')) {\n $this->actionTypes = ['index', 'show', 'store', 'update', 'destroy'];\n }\n\n if (!is_null($this->option('only'))) {\n return array_intersect($this->actionTypes, explode(',', $this->option('only')));\n } elseif (!is_null($this->option('except'))) {\n return array_diff($this->actionTypes, explode(',', $this->option('except')));\n }\n\n return $this->actionTypes;\n }", "public function getAvailableFolderTypes()\n {\n $ret = array();\n $ret['CAT'][''] = _(\"Unspecified\"); \n $ret['CAT']['mail']= _(\"Mails\"); \n $ret['CAT']['task']= _(\"Tasks\"); \n $ret['CAT']['journal']= _(\"Journals\"); \n $ret['CAT']['event']= _(\"Calendar\"); \n $ret['CAT']['contact']= _(\"Contacts\"); \n $ret['CAT']['note']= _(\"Notes\"); \n\n $ret['SUB_CAT'][''][''] = _(\"Unspecified\"); \n $ret['SUB_CAT']['mail'][''] = _(\"Unspecified\"); \n $ret['SUB_CAT']['mail']['inbox'] = _(\"Inbox\"); \n $ret['SUB_CAT']['mail']['drafts'] = _(\"Drafts\"); \n $ret['SUB_CAT']['mail']['sentitems'] = _(\"Sent\"); \n $ret['SUB_CAT']['mail']['junkemail'] = _(\"SPAM\"); \n\n $ret['SUB_CAT']['task']['default'] = _(\"Default\"); \n $ret['SUB_CAT']['journal']['default'] = _(\"Default\"); \n $ret['SUB_CAT']['event']['default'] = _(\"Default\"); \n $ret['SUB_CAT']['contact']['default'] = _(\"Default\"); \n $ret['SUB_CAT']['note']['default'] = _(\"Default\"); \n\n return($ret);\n }", "public static function getTypes()\n {\n static $array = false;\n\n if ($array) return $array;\n\n $array = [\n self::TYPE_ONE_FILE => 'One file on input block',\n self::TYPE_MULTIPLICITY => 'Multiple files on input block',\n ];\n\n return $array;\n }", "public static function buildTypesString() : string\n {\n $parts = [];\n\n foreach (array_keys(self::$typesToExtensions) as $type) {\n $parts[] = 'image/' . $type;\n }\n\n return implode(', ', $parts);\n }", "public function getObjectsTypesUris() {\n $model = new YiiScientificObjectModel();\n\n $objectsTypes = [];\n $totalPages = 1;\n for ($i = 0; $i < $totalPages; $i++) {\n $model->page = $i;\n $objectsConcepts = $model->getObjectTypes(Yii::$app->session['access_token']);\n if ($objectsConcepts === \"token\") {\n return \"token\";\n } else {\n $totalPages = $objectsConcepts[\\app\\models\\wsModels\\WSConstants::PAGINATION][\\app\\models\\wsModels\\WSConstants::TOTAL_PAGES];\n foreach ($objectsConcepts[\\app\\models\\wsModels\\WSConstants::DATA] as $objectType) {\n $objectsTypes[] = $objectType->uri;\n }\n }\n }\n\n return $objectsTypes;\n }", "public static function paths()\n {\n return (self::$routes);\n }", "public function supported_filetypes()\n {\n //New context call from moodle 2.5\n if(class_exists('context_course'))\n {\n $context = context_course::instance(1);\n }\n else\n {\n $context = get_context_instance(CONTEXT_COURSE, 1);\n }\n \n $filetypes = array();\n if(has_capability(\"repository/capture:view\", $context))\n {\n if ($this->record_video == 1 && has_capability(\"repository/capture:video\", $context))\n {\n $filetypes[] = 'video';\n }\n if ($this->record_audio == 1 && has_capability(\"repository/capture:audio\", $context))\n {\n $filetypes[] = 'audio';\n }\n if ($this->record_photo == 1 && has_capability(\"repository/capture:photo\", $context))\n {\n $filetypes[] = 'image';\n }\n }\n return $filetypes;\n }", "public static function getTypes()\n\t{\n\t\treturn array(\n\t\t\tself::ARTICLE\t=> 'articles',\n\t\t\tself::NEWS\t\t=> 'news',\n\t\t);\n\t}", "public static function gettype(){\n \n //连贯方法\n $type=DB::table('type')->select(DB::raw('*,concat(type_path,\",\",type_id) as paths'))->orderBy('paths')->get();\n //遍历\n foreach($type as $key=>$value){\n // 转换为数组\n $arr = explode(\",\",$value->type_path);\n // 获取逗号个数\n $len = count($arr)-1;\n // 字符串重复函数\n $type[$key]->type_name=str_repeat(\"--|\",$len).$value->type_name;\n }\n return $type;\n }", "public function getTypes() {\n return $this->types;\n }", "public function getTypes()\n {\n return $this->types;\n }", "public function getTypes()\n {\n return $this->types;\n }", "public function getTypes()\n {\n return $this->types;\n }", "public function getTypes()\n {\n return $this->types;\n }", "public function getTypes()\n {\n return $this->types;\n }", "public function registerPaths($paths, $type, $options = array() ){\r\n\t\tif( !is_array( $options ) ) {\r\n\t\t\t$options = array( $options );\r\n\t\t}\r\n\t\t\r\n\t\tif( !isset($options['priority'] ) ) {\r\n\t\t\t$options['priority'] = 1;\r\n\t\t}\r\n\t\tif( !isset($options['collection'] ) ) {\r\n\t\t\t$options['collection'] = '_all';\r\n\t\t}\r\n\t\t\r\n\t\t$current_paths = $this->_di['session']->get( 'minify.paths' );\r\n\t\t$type = strtolower($type);\r\n\t\tif( !isset( $current_paths[$type] ) ) {\r\n\t\t\t$current_paths[$type] = array( '_all' => array() );\r\n\t\t}\r\n\r\n\t\tif( !isset( $current_paths[$type][$options['collection']] ) ) {\r\n\t\t\t$current_paths[$type][$options['collection']] = array();\r\n\t\t}\r\n\t\t\r\n\t\tif( !is_array($paths)) {\r\n\t\t\t$paths = array($paths);\r\n\t\t}\r\n\t\t$cleared_paths = array();\r\n\t\tforeach( $paths as $p ){\r\n\t\t\tif( file_exists(PATH_ROOT.$p)){ // check if the directory exists\t\t\t\r\n\t\t\t\tif( array_search($p, $current_paths[$type][$options['collection']]) === false ){ // keep the paths unique\r\n\t\t\t\t\t$cleared_paths []= $p;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$current_paths[$type][$options['collection']] = array_merge($current_paths[$type][$options['collection']], $cleared_paths );\r\n\t\t$this->_di['session']->set( 'minify.paths', $current_paths );\r\n\t\tprint_r( $current_paths );\r\n\t}", "public function getTypes()\r\n {\r\n return (Directory::ENTRY_TYPE_LISTING * $this instanceof IListingProvider)\r\n | (Directory::ENTRY_TYPE_MOVIE * $this instanceof IMovieProvider);\r\n }", "function pathinfo($path)\n{\n\treturn array();\n}", "private static function getImageTypes()\n {\n $im = new \\Imagick();\n\n\n return $im->queryFormats();\n }", "public static function getFileTypes()\n {\n if (static::$types === null) {\n $upload = config('varbox.bindings.services.upload_service', UploadService::class);\n\n static::$types = [\n $upload::getImageType() => 'Image',\n $upload::getVideoType() => 'Video',\n $upload::getAudioType() => 'Audio',\n $upload::getFileType() => 'File',\n ];\n }\n\n return static::$types;\n }" ]
[ "0.7204925", "0.6742663", "0.6692958", "0.6535382", "0.63917834", "0.6376375", "0.62360764", "0.6186167", "0.6158472", "0.608946", "0.60644925", "0.6048447", "0.59949857", "0.5978546", "0.58252764", "0.5792025", "0.5778825", "0.57776946", "0.57728803", "0.5771233", "0.5763377", "0.5763377", "0.5756362", "0.5754828", "0.57349145", "0.5721826", "0.5714512", "0.57084596", "0.57084596", "0.57084596", "0.57084596", "0.57084596", "0.5697588", "0.5686552", "0.56846106", "0.56843716", "0.56816983", "0.5652663", "0.5637331", "0.5636661", "0.5628288", "0.56167966", "0.5603463", "0.5601965", "0.5600272", "0.5588528", "0.558465", "0.5575399", "0.5570956", "0.55653566", "0.5565201", "0.5556522", "0.55471057", "0.55452806", "0.554347", "0.55381143", "0.5536394", "0.55134654", "0.5507605", "0.55055505", "0.5500692", "0.54994637", "0.54933494", "0.54835564", "0.54774344", "0.546342", "0.546342", "0.5462795", "0.5462374", "0.5460378", "0.5458567", "0.5450402", "0.5443115", "0.54367894", "0.5420358", "0.5419258", "0.541575", "0.5413031", "0.54121655", "0.5399217", "0.53929776", "0.53877324", "0.53796625", "0.53748065", "0.53743047", "0.5374138", "0.53729105", "0.5369661", "0.53680027", "0.5366643", "0.53647614", "0.53647614", "0.53647614", "0.53647614", "0.53647614", "0.5363466", "0.53622335", "0.53590655", "0.53584945", "0.53525615" ]
0.7016299
1
Loads the message translation for the specified language and category.
Загружает перевод сообщения для указанного языка и категории.
protected function loadMessages ($category, $language) { if ($this->cachingDuration > 0 && $this->cacheID !== false && ($cache = Yii::app()->getComponent( $this->cacheID )) !== null) { $key = self::CACHE_KEY_PREFIX . '.messages.' . $category . '.' . $language; if (($data = $cache->get( $key )) !== false) return unserialize( $data ); } $sql = <<<EOD SELECT t1.message AS message, t2.translation AS translation FROM {$this->sourceMessageTable} t1, {$this->translatedMessageTable} t2 WHERE t1.id=t2.id AND t1.category=:category AND t2.language=:language EOD; $command = $this->_db ->createCommand( $sql ); $command->bindValue( ':category' , $category ); $command->bindValue( ':language' , $language ); $rows = $command->queryAll(); $messages = array(); foreach ($rows as $row) $messages[$row['message']] = $row['translation']; if (isset( $cache )) $cache->set( $key , serialize( $messages ) , $this->cachingDuration ); return $messages; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function loadMessages($category, $language) {\n\t\t$messageFile = $this->getMessageFile($category,$language);\n\t\tif ($this->cachingDuration > 0 && $this->cacheID!==false && ($cache=\\Yii::app()->getComponent($this->cacheID))!==null) {\n\t\t\t$key = self::CACHE_KEY_PREFIX . $messageFile;\n\t\t\tif (($data=$cache->get($key)) !== false)\n\t\t\t\treturn unserialize($data);\n\t\t}\n\t\tif (is_file($messageFile) === true) {\n\t\t\tif($this->useMoFile)\n\t\t\t\t$file = new \\CGettextMoFile($this->useBigEndian);\n\t\t\telse\n\t\t\t\t$file = new \\CGettextPoFile();\n\t\t\t$messages = $file->load($messageFile,$category);\n\t\t\tif(isset($cache) === true) {\n\t\t\t\t$dependency = new \\CFileCacheDependency($messageFile);\n\t\t\t\t$cache->set($key,serialize($messages),$this->cachingDuration,$dependency);\n\t\t\t}\n\t\t\treturn $messages;\n\t\t}\n\t\telse\n\t\t\treturn [];\n\t}", "protected function loadMessages($category,$language)\n\t{\n\t\t$messageFile=$this->basePath.DIRECTORY_SEPARATOR.$language.DIRECTORY_SEPARATOR.$category.'.php';\n\n\t\tif($this->cachingDuration>0 && ($cache=Yii::app()->getCache())!==null)\n\t\t{\n\t\t\t$key=self::CACHE_KEY_PREFIX . $messageFile;\n\t\t\tif(($data=$cache->get($key))!==false)\n\t\t\t\treturn unserialize($data);\n\t\t}\n\n\t\tif(is_file($messageFile))\n\t\t{\n\t\t\t$messages=include($messageFile);\n\t\t\tif(!is_array($messages))\n\t\t\t\t$messages=array();\n\t\t\tif(isset($cache))\n\t\t\t{\n\t\t\t\t$dependency=new CFileCacheDependency($messageFile);\n\t\t\t\t$cache->set($key,serialize($messages),$this->cachingDuration,$dependency);\n\t\t\t}\n\t\t\treturn $messages;\n\t\t}\n\t\telse\n\t\t\treturn array();\n\t}", "protected function loadMessages($category,$language)\n {\n $messageFile=$this->getMessageFile($category,$language);\n\n if($this->cachingDuration>0 && $this->cacheID!==false && ($cache=Yii::app()->getComponent($this->cacheID))!==null)\n {\n $key=self::CACHE_KEY_PREFIX . $messageFile;\n if(($data=$cache->get($key))!==false)\n return unserialize($data);\n }\n\n if(is_file($messageFile))\n {\n $messages=include($messageFile);\n if(!is_array($messages))\n $messages=array();\n if(isset($cache))\n {\n $dependency=new CFileCacheDependency($messageFile);\n $cache->set($key,serialize($messages),$this->cachingDuration,$dependency);\n }\n return $messages;\n }\n else\n return array();\n }", "protected function loadMessages($category, $language)\n {\n if ($this->enableCaching) {\n $key = [\n __CLASS__,\n $category,\n $language,\n ];\n $messages = $this->cache->get($key);\n if ($messages === false) {\n $messages = $this->loadMessagesFromDb($category, $language);\n $this->cache->set($key, $messages, $this->cachingDuration);\n }\n\n return $messages;\n }\n\n return $this->loadMessagesFromDb($category, $language);\n }", "protected function loadMessagesFromDb($category, $language)\n {\n $fallbackLanguage = substr($language, 0, 2);\n $fallbackSourceLanguage = substr($this->sourceLanguage, 0, 2);\n\n $languages = [\n $language,\n $fallbackLanguage,\n $fallbackSourceLanguage,\n ];\n\n $rows = (new Query())\n ->select(['language', 'messages'])\n ->from($this->collection)\n ->andWhere(['category' => $category])\n ->andWhere(['language' => array_unique($languages)])\n ->all($this->db);\n\n if (count($rows) > 1) {\n $languagePriorities = [\n $language => 1,\n ];\n $languagePriorities[$fallbackLanguage] = 2; // language key may be already taken\n $languagePriorities[$fallbackSourceLanguage] = 3; // language key may be already taken\n\n usort($rows, function ($a, $b) use ($languagePriorities) {\n $languageA = $a['language'];\n $languageB = $b['language'];\n\n if ($languageA === $languageB) {\n return 0;\n }\n if ($languagePriorities[$languageA] < $languagePriorities[$languageB]) {\n return +1;\n }\n return -1;\n });\n }\n\n $messages = [];\n foreach ($rows as $row) {\n foreach ($row['messages'] as $key => $value) {\n // @todo drop message as key specification at 2.2\n if (is_array($value)) {\n $messages[$value['message']] = $value['translation'];\n } else {\n $messages[$key] = $value;\n }\n }\n }\n\n return $messages;\n }", "protected function loadMessages($category, $language)\n {\n $message_resource = array();\n $messageFiles = [\n $this->getMessageFilePath($category, $language),\n $this->getTargetMessageFilePath($category, $language)\n ];\n foreach ($messageFiles as $messageFile) {\n $messages = $this->loadMessagesFromFile($messageFile);\n \n $fallbackLanguage = substr($language, 0, 2);\n $fallbackSourceLanguage = substr($this->sourceLanguage, 0, 2);\n \n if ($language !== $fallbackLanguage) {\n $messages = $this->loadFallbackMessages($category, $fallbackLanguage, $messages, $messageFile);\n } elseif ($language === $fallbackSourceLanguage) {\n $messages = $this->loadFallbackMessages($category, $this->sourceLanguage, $messages, $messageFile);\n } else {\n if ($messages === null) {\n Yii::error(\"The message file for category '$category' does not exist: $messageFile\", __METHOD__);\n }\n }\n if (! empty($messages) && is_array($messages)) {\n $message_resource = array_merge($message_resource, $messages);\n }\n }\n return (array) $message_resource;\n }", "public function loadCatalogue(string $locale): MessageCatalogueInterface;", "public function load_translation() {\n\n\t\tload_plugin_textdomain( 'woocommerce-gateway-authorize-net-cim', false, dirname( plugin_basename( $this->get_file() ) ) . '/i18n/languages' );\n\t}", "public function translate(string $category, string $message, array $params = [], string $language = null)\n {\n return $this->translator->translate($category, $message, $params, $language ?: (string)$this->locale);\n }", "public function translate($category, $message, $params, $language)\n\t{\n\t\t$message = $this->getMessageSource($category)->translate($category, $message, $language);\n\t\treturn $this->format($message, $params, $language);\n\t}", "public function translate($category, $message, $params, $language)\n {\n $messageSource = $this->getMessageSource($category);\n $translation = $messageSource->translate($category, $message, $language);\n if ($translation === false) {\n return $this->format($message, $params, $messageSource->sourceLanguage);\n }\n\n return $this->format($translation, $params, $language);\n }", "public static function t($message, $category = 'admin', $langfile = 'main', array $params = array(), $language = null) {\r\r\n $langfile = $category . '_' . $langfile;\r\r\n\r\r\n if ($language === null)\r\r\n $language = MY_Controller::getCurrentLocale();\r\r\n\r\r\n switch ($category) {\r\r\n case 'front':\r\r\n $filePath = self::$template_path;\r\r\n break;\r\r\n default:\r\r\n //TODO: translating admin messages\r\r\n return $message;\r\r\n break;\r\r\n }\r\r\n\r\r\n if (!in_array($langfile . EXT, self::$ci->lang->is_loaded, TRUE)) {\r\r\n ShopCore::$ci->lang->load($langfile, $language, FALSE, null, TRUE, $filePath);\r\r\n }\r\r\n\r\r\n //if translating doesnt exist - return original message\r\r\n $message = lang($message) ? lang($message) : $message;\r\r\n\r\r\n if ($params === array())\r\r\n return $message;\r\r\n\r\r\n if (!is_array($params))\r\r\n $params = array($params);\r\r\n\r\r\n foreach ($params as $key => $value) {\r\r\n $params[\"%$key%\"] = $value;\r\r\n unset($array[$key]);\r\r\n }\r\r\n\r\r\n return strtr($message, $params);\r\r\n }", "private static function loadLanguage()\n {\n // Load translations\n $basePath = dirname(__FILE__);\n $jlang = JFactory::getLanguage();\n $jlang->load('compojoomcontrolcenter', $basePath, 'en-GB', true); // Load English (British)\n $jlang->load('compojoomcontrolcenter', $basePath, $jlang->getDefault(), true); // Load the site's eventlist language\n $jlang->load('compojoomcontrolcenter', $basePath, null, true); // Load the currently selected language\n }", "public function loadTranslations() {\n }", "private function load_messages(){\n if($this->messages == NULL || $this->locale != $this->messagesLocale){\n if($this->locale != NULL){\n if(file_exists(realpath(dirname(__FILE__)). '/' . $this->dir_content . \"_$this->locale\" . '.txt')){\n $this->messages= file(realpath(dirname(__FILE__)). '/' . $this->dir_content . \"_$this->locale\" . '.txt');\n $this->messages= $this->parse_properties($this->messages);\n $this->messagesLocale= $this->locale;\n }\n }\n if($this->messages == NULL){\n $this->messages= file(realpath(dirname(__FILE__)). '/' . $this->dir_content . '.txt');\n $this->messages= $this->parse_properties($this->messages);\n $this->messagesLocale= NULL;\n }\n }\n }", "private function loadMessages(): void\n {\n $this->messages = [\n 'de_DE' => [\n // The rest of other keywords ...\n Keyword::MIN_LENGTH => 'Die Attributlänge sollte mindestens betragen: min: Zeichen.'\n // ...\n ],\n 'ru_RU' => [\n // ...\n Keyword::ENUM => 'Длина атрибута должна быть минимум :min: символов.'\n // ....\n ]\n ];\n }", "public function load_translation() {\n\t\t// we can find the translation in the assets/langs/{plugin-name} folder\n\t\tload_plugin_textdomain( $this->get_textdomain(), false, $this->get_plugin_name_sanitized() . '/assets/langs/' );\n\t}", "private function loadTranslation()\r\n {\r\n $lines = file($this->basedir.DIRECTORY_SEPARATOR.$this->language_cntry2.\"_\".$this->language_iso2.DIRECTORY_SEPARATOR.\"admin.properties\");\r\n foreach($lines as $line)\r\n {\r\n // $this->log->log('TRL: '.$line );\r\n if( substr($line, 0, 1) != \"#\" && stripos($line,\"=\") > 0 ) {\r\n $pieces = explode(\"=\", $line);\r\n $this->translations[trim($pieces[0])] = $pieces[1];\r\n }\r\n }\r\n }", "private function _load()\r\n {\r\n if (file_exists( $filepath = make_path(array(APPPATH, 'ln', $this->language . '.php' )) )) {\r\n require $filepath;\r\n if (isset($lang) && is_array($lang)) {\r\n $this->langfile = $lang;\r\n unset($lang);\r\n trigger_event_callbacks('lang', 'change', array($this->language));\r\n }\r\n else {\r\n show_error(\"The language file \\\"{$this->language}.php\\\" doesn't contain the variable \\\"\\$lang\\\".\");\r\n }\r\n }\r\n else {\r\n show_error(\"The language file \\\"{$this->language}.php\\\" can't be located in \\\"\".APPPATH.\"ln/\\\".\");\r\n }\r\n }", "public static /*void*/ function load(/*String*/$language='en')\r\n\t{\r\n\t\t$file = __DIR__.'/lang/'.$language.'.php';\r\n\r\n\t\tif(!file_exists($file))\r\n\t\t\tthrow new InvalidArgumentException();\r\n\r\n\t\tself::$language = $langauge;\r\n\t\tself::$strings = require(__DIR__.'/lang/'.$language.'.php');\r\n\t}", "public function load_translation() {\n\t\tload_plugin_textdomain( 'woocommerce-gateway-elavon', false, dirname( plugin_basename( $this->get_file() ) ) . '/i18n/languages' );\n\t}", "protected function loadMessages($textDomain, $locale)\n {\n if (!isset($this->messages[$textDomain])) {\n $this->messages[$textDomain] = [];\n }\n \n // TODO: Load from cache\n \n // text domain to language folder name\n if (preg_match('/^iso\\-([0-9]+)(|\\-[0-9]+)$/', $textDomain, $matches)) {\n $filename = 'iso_' . $matches[1];\n if ((isset($matches[2]) && (!empty($matches[2])))) {\n $filename .= $matches[2];\n }\n } else {\n // Invalid ISO text domain.\n unset($this->messages[$textDomain]);\n return;\n }\n \n $baserDir = dirname(dirname(__DIR__)) . '/language/' . $filename;\n if (!is_dir($baserDir)) {\n // Invalid ISO text domain.\n unset($this->messages[$textDomain]);\n return;\n }\n \n $file = $baserDir . '/' . $locale . '.mo';\n if (!is_file($file)) {\n // Locale is not available\n // We don't unset the text domain as it exists, \n // it is only the locale which does not exist.\n return;\n }\n \n // Load the file\n $loader = new Loader\\Gettext();\n \n if (isset($this->messages[$textDomain][$locale])) {\n $this->messages[$textDomain][$locale]->merge($loader->load($locale, $file));\n } else {\n $this->messages[$textDomain][$locale] = $loader->load($locale, $file);\n }\n \n // TODO: Store in cache\n }", "public function getMessageSource($category)\n {\n if (isset($this->translations[$category])) {\n $source = $this->translations[$category];\n if ($source instanceof MessageSource) {\n return $source;\n }\n\n return $this->translations[$category] = Reaction::create($source);\n }\n // try wildcard matching\n foreach ($this->translations as $pattern => $source) {\n if (strpos($pattern, '*') > 0 && strpos($category, rtrim($pattern, '*')) === 0) {\n if ($source instanceof MessageSource) {\n return $source;\n }\n\n return $this->translations[$category] = $this->translations[$pattern] = Reaction::create($source);\n }\n }\n\n // match '*' in the last\n if (isset($this->translations['*'])) {\n $source = $this->translations['*'];\n if ($source instanceof MessageSource) {\n return $source;\n }\n\n return $this->translations[$category] = $this->translations['*'] = Reaction::create($source);\n }\n\n throw new InvalidConfigException(\"Unable to locate message source for category '$category'.\");\n }", "private function load_translations($locale)\n {\n }", "public function load($lang, array $messages = NULL)\n\t{\n\t\tif ($messages === NULL)\n\t\t{\n\t\t\t// Split the language: language, region, locale, etc\n\t\t\t$parts = explode('-', $lang);\n\n\t\t\t$table = array();\n\n\t\t\tdo\n\t\t\t{\n\t\t\t\t// Create a locale for this set of parts\n\t\t\t\t$locale = implode('-', $parts);\n\n\t\t\t\t$query = DB::select('key', 'value')\n\t\t\t\t\t\t->from($this->_database_table)\n\t\t\t\t\t\t->where('locale', '=', $locale)\n\t\t\t\t\t\t//->limit(1)\n\t\t\t\t\t\t->execute($this->_database_instance);\n\n\t\t\t\tif (count($query) > 0)\n\t\t\t\t{\n\t\t\t\t\t$table += $query->as_array('key', 'value');\n\t\t\t\t}\n\n\t\t\t\t// Remove the last part\n\t\t\t\tarray_pop($parts);\n\t\t\t}\n\t\t\twhile ($parts);\n\n\t\t\tif ( ! empty($table))\n\t\t\t{\n\t\t\t\t$messages = $table;\n\t\t\t}\n\t\t}\n\n\t\treturn parent::load($lang, $messages);\n\t}", "public function load_translation() {\n\n\t\tload_plugin_textdomain( self::TEXT_DOMAIN, false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\n\n\t}", "function loadLanguage() {\n\t\tstatic $loaded ;\n\t\tif (!$loaded) {\n\t\t\t$lang = & JFactory::getLanguage() ;\n\t\t\t$tag = $lang->getTag();\n\t\t\tif (!$tag)\n\t\t\t\t$tag = 'en-GB' ;\t\t\t\n\t\t\t$lang->load('com_eventbooking', JPATH_ROOT, $tag);\n\t\t\t$loaded = true ;\t\n\t\t}\t\t\n\t}", "public function getMessageSource($category)\n\t{\n\t\tif (isset($this->translations[$category])) {\n\t\t\t$source = $this->translations[$category];\n\t\t} else {\n\t\t\t// try wildcard matching\n\t\t\tforeach ($this->translations as $pattern => $config) {\n\t\t\t\tif ($pattern === '*' || substr($pattern, -1) === '*' && strpos($category, rtrim($pattern, '*')) === 0) {\n\t\t\t\t\t$source = $config;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($source)) {\n\t\t\treturn $source instanceof MessageSource ? $source : Yii::createObject($source);\n\t\t} else {\n\t\t\tthrow new InvalidConfigException(\"Unable to locate message source for category '$category'.\");\n\t\t}\n\t}", "public function loadTranslations($language)\n {\n if (! $language ) {$language = 'en';}\n global $bb_translations;\n $bb_translations = require dirname(__DIR__) . '/lang/' . $language . '.php';\n }", "private static function _loadTranslations($language) {\n // no time strings loaded? load them and store it all in static variables\n if (self::$timeAgoStrings == NULL || self::$language != $language) {\n include(__DIR__ . '/translations/' . $language . '.php');\n\n // storing the time strings in the current object\n self::$timeAgoStrings = $timeAgoStrings;\n\n // loads the language files\n if (self::$timeAgoStrings == NULL) {\n error_log('Could not load language file for language ' . $language .'. Please ensure that the file exists in ' . __DIR__ . 'translations/' . $language . '.php');\n }\n }\n\n // storing the language\n self::$language = $language;\n }", "public function load_localisation () {\r\n\t\tload_plugin_textdomain( $this->token, false, dirname( plugin_basename( $this->file ) ) . '/lang/' );\r\n\t}", "public function load_localisation () {\r\n\t\tload_plugin_textdomain( $this->token, false, dirname( plugin_basename( $this->file ) ) . '/lang/' );\r\n\t}", "public function _getTranslation()\n {\n $this->language = $language = 'en';\n \n //Check if we have a translation file for that lang\n if (file_exists(\"app/messages/\".$language.\".php\")) {\n require \"app/messages/\".$language.\".php\";\n } else {\n // fallback to some default\n require \"app/messages/en.php\";\n }\n \n //Return a translation object\n return new \\Phalcon\\Translate\\Adapter\\NativeArray(array(\n \"content\" => $messages\n ));\n }", "public function init($language = null)\n {\n if (!$language) {\n $language = $this->in('Please specify language code, e.g. `en`, `eng`, `en_US` etc.');\n }\n if (strlen($language) < 2) {\n return $this->error('Invalid language code. Valid is `en`, `eng`, `en_US` etc.');\n }\n\n $model = $this->param('model');\n if (empty($model)) {\n $model = 'I18nMessages';\n }\n\n $fields = ['domain', 'singular', 'plural', 'context'];\n\n $model = TableRegistry::get($model);\n $messages = $model->find()\n ->select($fields)\n ->distinct(['domain', 'singular', 'context'])\n ->enableHydration(false)\n ->toArray();\n\n $entities = $model->newEntities($messages);\n\n $return = $model->getConnection()->transactional(\n function () use ($model, $entities, $language) {\n $model->deleteAll([\n 'locale' => $language,\n ]);\n\n foreach ($entities as $entity) {\n $entity->set('locale', $language);\n if ($model->save($entity) === false) {\n return false;\n }\n }\n }\n );\n\n if ($return) {\n $this->out('Created ' . count($messages) . ' messages for \"' . $language . '\"');\n } else {\n $this->out('Unable to create messages for \"' . $language . '\"');\n }\n }", "protected function _getTranslation()\n\t{\n\t\t$language = $this->request->getBestLanguage();\n\t\t\n\t\t//Check if we have a translation file for that lang\n\t\tif (file_exists(realpath(dirname(__FILE__)).\"/messages/\".$language.\".php\")) {\n\t\t\trequire \"messages/\".$language.\".php\";\n\t\t} else {\n\t\t\t// fallback to some default\n\t\t\trequire \"messages/en.php\";\n\t\t}\n\t\t\n\t\t//Return a translation object\n\t\treturn new \\Phalcon\\Translate\\Adapter\\NativeArray(array(\n\t\t\t\"content\" => $messages\n\t\t));\n\t\n\t}", "function load_language() {\n\tglobal $_LANG;\n\t$dh = opendir( dirname( __FILE__ ) . '/lang/' );\n\n\t$arrayoflanguagefiles = array();\n\twhile( false !== $file2 = readdir( $dh ) ) {\n\t\tif( ! is_dir( '' . 'lang/' . $file2 ) ) {\n\t\t\t$pieces = explode( '.', $file2 );\n\t\t\tif( $pieces[ 1 ] == 'txt' ) {\n\t\t\t\t$arrayoflanguagefiles[ ] = $pieces[ 0 ];\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t}\n\n\tclosedir( $dh );\n\n\t$language = 'English';\n\n\tif( isset( $GLOBALS[ 'CONFIG' ][ 'Language' ] ) ) {\n\t\t$_SESSION[ 'Language' ] = ucfirst( $GLOBALS[ 'CONFIG' ][ 'Language' ] );\n\t}\n\n\tif( isset( $_SESSION[ 'Language' ] ) ) {\n\t\t$language = $_SESSION[ 'Language' ];\n\t}\n\n\tif( ! in_array( $language, $arrayoflanguagefiles ) ) {\n\t\t$language = \"English\";\n\t}\n\n\tif( file_exists( dirname( __FILE__ ) . \"/lang/$language.txt\" ) ) {\n\t\tob_start();\n\t\tinclude dirname( __FILE__ ) . \"/lang/$language.txt\";\n\t\t$templang = ob_get_contents();\n\t\tob_end_clean();\n\t\teval ( $templang );\n\t}\n}", "function i18n() {\n\t$locale = apply_filters( 'plugin_locale', get_locale(), 'wordpress-primary-category' );\n\tload_textdomain(\n\t\t'wordpress-primary-category',\n\t\tWP_LANG_DIR . '/wordpress-primary-category/wordpress-primary-category-' . $locale . '.mo'\n\t);\n\tload_plugin_textdomain(\n\t\t'wordpress-primary-category',\n\t\tfalse,\n\t\tplugin_basename( WORDPRESS_PRIMARY_CATEGORY_PATH ) . '/languages/'\n\t);\n}", "function i18n() {\n\t$locale = apply_filters( 'plugin_locale', get_locale(), 'tenup-primary-category' );\n\tload_textdomain( 'tenup-primary-category', WP_LANG_DIR . '/tenup-primary-category/tenup-primary-category-' . $locale . '.mo' );\n\tload_plugin_textdomain( 'tenup-primary-category', false, plugin_basename( TENUP_PRIMARY_CATEGORY_PATH ) . '/languages/' );\n}", "private function loadLanguage()\n\t{\n\t\tJFactory::getLanguage()->load( 'com_easyblog' , JPATH_ROOT );\n\t\tJFactory::getLanguage()->load( 'com_easyblog' , JPATH_ROOT . '/administrator' );\n\t}", "protected function load($lang)\n\t{\n\t\tif (isset($this->_cache[$lang]))\n\t\t{\n\t\t\treturn $this->_cache[$lang];\n\t\t}\n\n\t\t// New translation table\n\t\t$table = array();\n\n\t\t// Split the language: language, region, locale, etc\n\t\t$parts = explode('-', $lang);\n\n\t\tdo\n\t\t{\n\t\t\t// Create a path for this set of parts\n\t\t\t$lang_path = implode(DIRECTORY_SEPARATOR, $parts);\n\t\t\t\n\t\t\t$t = array();\n\t\t\t\n\t\t\t$files = $this->app->find_files(\"lang\", $lang_path, \"php\");\n\n\t\t\tforeach($files as $file)\n\t\t\t{\n\t\t\t\t$t = array_merge($t, self::load_file($file));\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$table += $t;\n\t\t\t\n\t\t\t// Append the sub table, preventing less specific language\n\t\t\t// files from overloading more specific files\n\t\t\t\n\n\t\t\t// Remove the last part\n\t\t\tarray_pop($parts);\n\t\t}\n\t\twhile ($parts);\n\t\t\n\t\t// Cache the translation table locally\n\t\treturn $this->_cache[$lang] = $table;\n\t}", "function load ()\n {\n if (file_exists ( $this->path . '/config.php' ))\n {\n include FileLoader::validateFilePath($this->path . '/config.php');\n $this->config = $config ;\n $this->normalizeConfig();\n }\n $label = (!empty ($this->config ['label'])) ? $this->config ['label'] : $this->name;\n $label_singular = !empty($this->config['label_singular']) ? $this->config['label_singular'] : $label;\n $this->mblanguage = new MBLanguage ($this->name, $this->path, $label, $this->key_name, $label_singular);\n foreach ( $this->iTemplate as $temp )\n {\n if (! empty ( $this->config [ $temp ] ))\n {\n $this->mbvardefs->iTemplates [ $temp ] = 1 ;\n $this->mblanguage->iTemplates [ $temp ] = $temp ;\n }\n }\n $this->mbvardefs->templates = $this->config [ 'templates' ] ;\n $this->mblanguage->templates = $this->config [ 'templates' ] ;\n $this->mbvardefs->load () ;\n $this->mblanguage->load () ;\n\n $this->verifyMetadata();\n\n }", "public function load_localisation() {\n load_plugin_textdomain( 'ujipopup', false, dirname( plugin_basename( $this->file ) ) . '/lang/' );\n }", "public function load_localisation () {\n\t\t\n\t\tload_plugin_textdomain( $this->settings->plugin->slug, false, dirname( plugin_basename( $this->file ) ) . '/lang/' );\n\t}", "public function load_localisation () {\n\t\t\n\t\tload_plugin_textdomain( $this->settings->plugin->slug, false, dirname( plugin_basename( $this->file ) ) . '/lang/' );\n\t}", "public function load($category);", "public function load_localisation() {\n\t\tload_plugin_textdomain( $this->plugin_slug, false, dirname( plugin_basename( $this->file ) ) . '/lang/' );\n\t}", "function load_language($language, $class) {\n\n\t}", "public static function t($category, $message, $params = [], $language = null)\n {\n $category = static::$messagesCategory === $category ? $category : static::$messagesCategory . '/' . $category;\n\n return Yii::t(static::$messagesCategory . '/' . $category, $message, $params, $language);\n }", "function _dcgettext($domain, $msgid, $category)\n{\n return ZGettext::getReader($domain, $category)->translate($msgid);\n}", "static private function _loadTranslation()\n\t{\n\t\tstatic $translations;\n\t\t\n\t\tif (!is_array($translations)) {\n\t\t\t$translations\t= array();\n\t\t\t\n\t\t\t// get current lang code from current session\n\t\t\t$sess_lang_code\t= self::getCurrentLanguage(true);\n\t\t\t\n\t\t\tif (empty($sess_lang_code)) {\n\t\t\t\t// get from storage\n\t\t\t\t$default_lang_o\t= self::_getDefault();\n\t\t\t\tif ($default_lang_o) {\n\t\t\t\t\t$sess_lang_code\t= $default_lang_o->lang_code;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$sess_lang_code\t= 'en';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// check if active. if not, use default\n\t\t\t$is_active\t= self::_isActive($sess_lang_code);\n\t\t\tif (!$is_active) {\n\t\t\t\t$sess_lang_code\t= 'en';\n\t\t\t}\n\t\t\t\n\t\t\t// get translation files\n\t\t\t$files\t= Files::getFolderFiles(PATH_LANGUAGES .DS. $sess_lang_code, 'ini');\n\t\t\tif ($files && count($files)) {\n\t\t\t\tforeach ($files as $file) {\n\t\t\t\t\t$lang_file_path\t= PATH_LANGUAGES .DS. $sess_lang_code .DS. $file;\n\t\t\t\t\t\n\t\t\t\t\t// load file\n\t\t\t\t\t$data\t= Utility::parse_ini_file($lang_file_path, true);\n\t\t\t\t\tif (isset($data['translations'])) {\n\t\t\t\t\t\t$translation\t= $data['translations'];\n\t\t\t\t\t\tif (isset($translation['node'])) {\n\t\t\t\t\t\t\t// get nodes\n\t\t\t\t\t\t\t$items\t= array();\n\t\t\t\t\t\t\tforeach ($translation['node'] as $node) {\n\t\t\t\t\t\t\t\t$node_data\t= $data[$node];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// remove title\n\t\t\t\t\t\t\t\tunset($node_data['title']);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$items\t= array_merge($items, $node_data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$translation\t= $items;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// add to list\n\t\t\t\t\t\t$translations\t= array_merge($translations, $translation);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $translations;\n\t}", "private function loadLanguageFile() {\n // else, we use default configuration var\n if(isset($this->params['langCode'])) $lang = $this->params['langCode'];\n else $lang = $this->config['culture'];\n\n if(file_exists($this->root. 'scripts/languages/'.$lang.'.js')) {\n $stream =file_get_contents($this->root. 'scripts/languages/'.$lang.'.js');\n $this->language = json_decode($stream, true);\n } else {\n $this->error($this->lang('LANGUAGE_FILE_NOT_FOUND'));\n }\n }", "function load_langfile($campaign_name)\n\t{\n\t\t//allready loaded\n\t\n\t\tif (isset($this->EE->lang->language[$campaign_name.'_campaign_name']))\n\t\t{\n\t\t\treturn '';\n\t\t}\t\n\t\t\n\t\t//load from directories\n\t\n\t\t$campaign_lang_custom \t\t= PATH_THIRD.'promotions/campaigns/'.$campaign_name.'/language/'.$this->EE->session->userdata[\"language\"].'/lang.'.$campaign_name.'.php';\n\t\t$campaign_lang_default \t= PATH_THIRD.'promotions/campaigns/'.$campaign_name.'/language/english/lang.'.$campaign_name.'.php';\n\t\t\n\t\tif (is_file($campaign_lang_custom))\n\t\t{\n\t\t\trequire($campaign_lang_custom);\n\t\t}\n\t\telseif (is_file($campaign_lang_default))\n\t\t{\n\t\t\trequire($campaign_lang_default);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//no language?\n\t\t\n\t\t\tdie('File '.basename($campaign_lang_custom).' not found');\n\t\t}\n\t\t\n\t\t//merge to EE\n\t\t\n\t\t$this->EE->lang->language = array_merge($this->EE->lang->language, $lang);\n\t}", "public function loadLocale()\n {\n\n $user = User::getCurrentUser();\n\n if (!$user)\n {\n $locale = Request::header('Locale');\n\n \\Config::set('translatable.locale', $locale);\n }\n else\n {\n if(Request::hasHeader('Locale'))\n {\n $locale = Request::header('Locale');\n }\n else\n {\n $lang = UserLang::Where('user_id', $user->id)->first();\n\n if ($lang) {\n $locale = $lang->lang ? $lang->lang : config('translatable.locale');\n }\n }\n \\Config::set('translatable.locale', @$locale);\n }\n }", "private function loadLanguageTexts($language, $languagePath)\n {\n $this->languagePath = empty($languagePath) ? dirname(__FILE__, 2) . '/locale/' . $language . '/lang.php' : $language;\n\n if (file_exists($this->languagePath)) {\n $this->languageTexts = include($this->languagePath);\n }\n }", "public function load_gettext($user_lang = false) {\n\t\tif ($user_lang) {\n\t\t\t$this->_gettext_language = $user_lang;\n\t\t} else {\n\t\t\t$this->_gettext_language = 'en_US';\n\t\t}\n\t\tlog_message('debug', 'The gettext language was set by parameter: ' . $this->_gettext_language);\n\n\t\tputenv(\"LC_ALL=$this->_gettext_language\");\n\t\tsetlocale(LC_ALL, $this->_gettext_language . \".utf8\");\n\n\t\t// set the path of .po files\n\t\t$this->_gettext_path = APPPATH . 'language/locale';\n\t\tlog_message('debug', 'Gettext Class path chosen is: ' . $this->_gettext_path);\n\n\t\t$filename = $this->_gettext_path . '/' . $this->_gettext_language . '/LC_MESSAGES/' . $this->_gettext_domain . '.mo';\n\n\t\t// if there is no language file, we can't load anything\n\t\tif (file_exists($filename)) {\n\t\t\t$mtime = filemtime($filename);\n\n\t\t\t$newFilename = $this->_gettext_path . '/' . $this->_gettext_language . '/LC_MESSAGES/' . $this->_gettext_domain . '_' . $mtime . '.mo';\n\n\t\t\tif (!file_exists($newFilename)) {\n\t\t\t\t$dir = scandir(dirname($filename));\n\t\t\t\tforeach ($dir as $file) {\n\t\t\t\t\t// remove all the old files\n\t\t\t\t\tif (!in_array($file, array('.', '..', $this->_gettext_domain . '.po', $this->_gettext_domain . '.mo'))) {\n\t\t\t\t\t\t@unlink(dirname($filename) . '/' . $file);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t@copy($filename, $newFilename);\n\t\t\t}\n\n\t\t\t$newDomain = $this->_gettext_domain . '_' . $mtime;\n\n\t\t\tbindtextdomain($newDomain, $this->_gettext_path);\n\t\t\tbind_textdomain_codeset($newDomain, \"UTF-8\");\n\t\t\ttextdomain($newDomain);\n\t\t}\n\n\t\tlog_message('debug', 'The gettext domain chosen is: '. $this->_gettext_domain);\n\n\t\treturn true;\n\t}", "private function loadTranslations()\n {\n if (\n !file_exists($this->translationFile) ||\n !file_exists($this->defaultTranslationFile)) {\n throw new Error('File does not exist');\n }\n $this->translation = json_decode(file_get_contents($this->translationFile), true);\n $this->defaultTranslation = json_decode(file_get_contents($this->defaultTranslationFile), true);\n }", "function loadTranslationTable($locale, $path) {\n// This method is only a placeholder and wants to be overwritten by YOU! ;-)\n// Here's a example how it could look:\nif (empty($locale)) {\n// Load default locale of no one has been specified\n$locale = $this->getDefaultLocale();\n}\n// Select corresponding language\n$language = $this->_languageTable[$locale];\n// Set path and filename of the language file\n$path = \"languages/$language/$path.lng\";\n\n// _loadTranslationTable() does the rest\n$this->_loadTranslationTable($locale, $path);\n}", "protected function init()\n\t{\n\t\tCore::getLanguage()->load(array(\"Message\"));\n\t\treturn parent::init();\n\t}", "public function load_localisation () {\n\t\tload_plugin_textdomain( 'wp-amazon-shop', false, dirname( plugin_basename( $this->file ) ) . '/lang/' );\n\t}", "function loadLanguage() {\n\t\t$pluginName = $this->getName() ;\n\t\t$lang = & JFactory::getLanguage() ;\n\t\t$tag = $lang->getTag();\n\t\tif (!$tag)\n\t\t\t$tag = 'en-GB' ;\t\t\t\t\t\t\t\t\t\n\t\t$lang->load($pluginName, JPATH_ROOT, $tag);\t\t\n\t}", "public function load_localisation () {\n\t\tload_plugin_textdomain( 'canvas-advanced-addons-extended', false, dirname( plugin_basename( $this->file ) ) . '/lang/' );\n\t}", "function loadMultiLingualText($language) {\n $this->Stelle->language=$language;\n include(LAYOUTPATH.'languages/'.$this->user->rolle->language.'.php');\n }", "public static function t($category, $message, $params = [], $language = null)\n {\n static::registerTranslations(); ///[1.0.1 (i18n:public static function registerTranslation)]\n return Yii::t('extensions/yongtiger/yii2-setting/' . $category, $message, $params, $language);\n }", "public function loadMainTrans()\n {\n $translationPath = $this->_getTransPath();\n require $translationPath.\"/main.php\";\n\n //Retourne un objet de type Translate\n $mainTranslate = new Phalcon\\Translate\\Adapter\\NativeArray(array(\n \"content\" => $messages\n ));\n\n //Envoi vers la vue de l'objet Translate sous le nom $mt\n $this->view->setVar(\"mt\", $mainTranslate);\n }", "protected function _setupLanguage()\n\t{\n\t\t$Translation = ClassRegistry::init('Translations.Translation');\n\n\t\t// read active translation from cookies\n\t\t$translationId = $this->Cookie->read('Config.translation_id');\n\n\t\t// if we have not active translation read default translation from settings\n\t\tif (empty($translationId)) {\n\t\t\t$translationId = Configure::read('Eramba.Settings.DEFAULT_TRANSLATION');\n\t\t}\n\n\t\t$translation = $Translation->getTranslation($translationId);\n\n\t\tif (!empty($translation) && $translation['Translation']['status'] == Translation::STATUS_ENABLED) {\n\t\t\t$translation = $Translation->getItemDataEntity($translation);\n\n\t\t\t$translationId = $translation->getPrimary();\n\t\t\t$lang = $translation->getTranslationName();\n\t\t}\n\t\telse {\n\t\t\t// fallback\n\t\t\t$translationId = Translation::DEFAULT_TRANSLATION_ID;\n\t\t\t$lang = Translation::DEFAULT_TRANSLATION_NAME;\n\t\t}\n\n\t\t// extend translation cookie if its not an api request\n\t\tif (!$this->controller->request->is('api')) {\n\t\t\t$this->writeTranslationToCookies($translationId);\n\t\t}\n\n\t\tConfigure::write('Config.translation_id', $translationId);\n\t\tConfigure::write('Config.language', $lang);\n\n\t\t// translation is not in l10n catalog (i18n in using this l10n class) so we need to rewrite default fallback\n\t\tI18n::getInstance()->l10n->default = $lang;\n\t}", "private function loadLanguageFile() {\n\t// else, we use default configuration var\n\t$lang = $this->config['options']['culture'];\n\tif(isset($this->params['langCode']) && in_array($this->params['langCode'], $this->languages)) $lang = $this->params['langCode'];\n\tif(file_exists($this->root. 'filemanager/scripts/languages/'.$lang.'.js')) {\n\t\t$stream =file_get_contents($this->root. 'filemanager/scripts/languages/'.$lang.'.js');\n\t\t$this->language = json_decode($stream, true);\n\t} else {\n\t\t$stream =file_get_contents($this->root. 'filemanager/scripts/languages/'.$lang.'.js');\n\t\t$this->language = json_decode($stream, true);\n\t}\n}", "public function loadMessages()\n {\n\n }", "static function load($directory = '')\n\t{\n\t\tif (self::$gettext === NULL)\n\t\t{\n\t\t\tself::$gettext = extension_loaded('gettext');\n\t\t}\n\n\t\tif (!$directory && self::$gettext && is_file('./locale/'.self::$locale.'/LC_MESSAGES/estats.mo'))\n\t\t{\n\t\t\tbindtextdomain('estats', './locale/');\n\t\t\ttextdomain('estats');\n\t\t\tbind_textdomain_codeset('estats', 'UTF-8');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (self::$locale == 'en')\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$path = $directory.($directory?'':'./locale/').self::$locale.($directory?'':'/locale').'.dat';\n\n\t\t\tif (!is_file($path))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$translation = unserialize(file_get_contents($path));\n\n\t\t\tif (self::$translation !== NULL)\n\t\t\t{\n\t\t\t\tself::$translation = array_merge($translation, self::$translation);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tself::$translation = $translation;\n\t\t\t}\n\t\t}\n\t}", "public function load($locale, $group, $namespace = null)\n {\n $namespace = $namespace ?: '*';\n\n return $this->messages[$namespace][$locale][$group] ?? [];\n }", "function load_language($mod_language_name) {\n global $THIS_BASEPATH, $USERLANG, $language;\n\n if (@file_exists($USERLANG.'/'.$mod_language_name)) {\n if ($USERLANG != $THIS_BASEPATH.'/language/english')\n include $THIS_BASEPATH.'/language/english/'.$mod_language_name;\n return $USERLANG.'/'.$mod_language_name;\n }\n return $THIS_BASEPATH.'/language/english/'.$mod_language_name;\n}", "public function load($locale, $textDomain) {\n\n $this->getLogger()->debug(\"Locale: $locale\");\n $localeColumn = Language::getLanguageFullNameForLocale($locale);\n $this->getLogger()->debug(\"Locale column: $localeColumn\");\n\n $sql = new Sql($this->getDbAdapter());\n $select = $sql->select();\n $schema = $this->getDbSchema();\n if (isset($schema))\n $select->from(new TableIdentifier('app_dictionary', $schema));\n else\n $select->from('app_dictionary');\n $select->columns(array('code_desc', \"$localeColumn\"), false);\n $messages =\n $this->dbAdapter->query(\n $sql->getSqlStringForSqlObject($select),\n DbAdapter::QUERY_MODE_EXECUTE);\n\n $textDomain = new TextDomain();\n foreach ($messages as $message) {\n $textDomain[$message['code_desc']] = $message[\"$localeColumn\"];\n }\n\n return $textDomain;\n\n }", "function _load_language($lang)\n{\n if (!isset($lang))\n $lang = 'en';\n require \"./_lang/$lang.php\";\n require \"./_lang/$lang\" . \"_mimes.php\";\n}", "public function load_translations() {\n load_plugin_textdomain('clipe', false, dirname(plugin_basename(__FILE__)) . '/languages');\n }", "function _loadTranslationTable($locale, $path='') {\nif (empty($locale))\n$locale = $this->getDefaultLocale();\n$language = $this->_languageTable[$locale];\nif (empty($language)) {\ndie (\"LANGUAGE Error: Unsupported locale '$locale'\");\n}\nif (!is_array($this->_translationTable[$language])) {\ndie (\"LANGUAGE Error: Language '$language' not available\");\n}\n\nif(empty($path))\n$path = FILE_PATH.'protected/vendors/Smarty/languages/'.$this->_languageTable[$locale].'/global.lng';\nif(!file_exists($path))\n{\n\t\n\t$path = FILE_PATH.'protected/vendors/Smarty/languages/'.DEFAULT_LANGUAGE.'/global.lng';\n}\n\nif (isset($this->_loadedTranslationTables[$language])) {\nif (in_array($path, $this->_loadedTranslationTables[$language])) {\n// Translation table was already loaded\nreturn true;\n}\n}\nif (file_exists($path)) {\necho \"\";\n$entries = file($path);\n$this->_translationTable[$language][$path] = Array();\n$this->_loadedTranslationTables[$language][] = $path;\nforeach ($entries as $row) {\nif (substr(ltrim($row),0,2) == '//') // ignore comments\ncontinue;\n$keyValuePair = explode('=',$row);\n// multiline values: the first line with an equal sign '=' will start a new key=value pair\nif(sizeof($keyValuePair) == 1) {\n\tif(isset($key))\n\t{\n\t\t$this->_translationTable[$language][$path][$key] .= ' ' . chop($keyValuePair[0]);\n\t}\ncontinue;\n}\n$key = trim($keyValuePair[0]);\n$value = $keyValuePair[1];\nif (!empty($key)) {\n$this->_translationTable[$language][$path][$key] = chop($value);\n}\n}\nreturn true;\n}\nreturn false;\n}", "protected function loadModLanguageFile(){\n $dir = _SITE_MOD_DIR.$this->module.'/Lang/';\n $lang = $dir.'fr.php';\n if(is_dir($dir) && file_exists($lang)){\n $this->tabLang[] = $lang;\n }\n }", "function getMessage($messageKey) {\n\t$lang = loadLanguage();\n\tif (array_key_exists($messageKey, $lang)) {\n\t\treturn $lang[$messageKey];\n\t} else {\n\t\treturn $messageKey;\n\t}\n}", "public function pi_loadLL() {\n\t\tif (!$this->LOCAL_LANG_loaded && $this->scriptRelPath) {\n\t\t\t$basePath = 'EXT:' . $this->extKey . '/Resources/Private/Language/locallang.xlf';\n\t\t\t// Read the strings in the required charset (since TYPO3 4.2)\n\t\t\t$this->LOCAL_LANG = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::readLLfile($basePath, $this->LLkey, $this->frontendController->renderCharset);\n\t\t\t$alternativeLanguageKeys = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::trimExplode(',', $this->altLLkey, TRUE);\n\t\t\tforeach ($alternativeLanguageKeys as $languageKey) {\n\t\t\t\t$tempLL = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::readLLfile($basePath, $languageKey);\n\t\t\t\tif ($this->LLkey !== 'default' && isset($tempLL[$languageKey])) {\n\t\t\t\t\t$this->LOCAL_LANG[$languageKey] = $tempLL[$languageKey];\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Overlaying labels from TypoScript (including fictitious language keys for non-system languages!):\n\t\t\tif (isset($this->conf['_LOCAL_LANG.'])) {\n\t\t\t\t// Clear the \"unset memory\"\n\t\t\t\t$this->LOCAL_LANG_UNSET = array();\n\t\t\t\tforeach ($this->conf['_LOCAL_LANG.'] as $languageKey => $languageArray) {\n\t\t\t\t\t// Remove the dot after the language key\n\t\t\t\t\t$languageKey = substr($languageKey, 0, -1);\n\t\t\t\t\t// Don't process label if the language is not loaded\n\t\t\t\t\tif (is_array($languageArray) && isset($this->LOCAL_LANG[$languageKey])) {\n\t\t\t\t\t\tforeach ($languageArray as $labelKey => $labelValue) {\n\t\t\t\t\t\t\tif (!is_array($labelValue)) {\n\t\t\t\t\t\t\t\t$this->LOCAL_LANG[$languageKey][$labelKey][0]['target'] = $labelValue;\n\t\t\t\t\t\t\t\tif ($labelValue === '') {\n\t\t\t\t\t\t\t\t\t$this->LOCAL_LANG_UNSET[$languageKey][$labelKey] = '';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$this->LOCAL_LANG_charset[$languageKey][$labelKey] = 'utf-8';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->LOCAL_LANG_loaded = 1;\n\t}", "public static function t($category, $message, $params = array())\n {\n Fly::app()->getLocale()->load($category);\n $message = Fly::app()->getLocale()->line($message);\n if (empty($params)) {\n return $message;\n }\n\n $keys = array_keys($params);\n $values = array_values($params);\n $message = str_replace($keys, $values, $message);\n return $message;\n }", "public function get($group,$key){\n\t\t__debug(\"I18n::get() - group=$group, key=$key\");\n\t\tif(isset(self::$_language[$group]) && isset(self::$_language[$group][$key])){\n\t\t\treturn self::$_language[$group][$key];\n\t\t}else{\n\t\t\treturn \"message not defined in \".self::$_langkey;\n\t\t}\n\t}", "public function load_localisation ()\n\t\t{\n\t\t\tload_plugin_textdomain( 'dot_cfi', false, basename( dirname( __FILE__ ) ) . '/languages' );\n\n\t\t}", "public function load($resource, $locale, $messageDomain = 'messages')\n {\n // get our translations, obviously\n $translationsArray = $this->translationManager\n ->findTranslationsByLocaleAndDomain($locale, $messageDomain);\n\n $catalogue = new MessageCatalogue($locale);\n\n foreach ($translationsArray as $labelObject) {\n $catalogue->set($labelObject->getTransKey()->getTransKey(), $labelObject->getLabel(), $messageDomain);\n }\n\n return $catalogue;\n }", "public function load_language($lang = null, $add = array(), $merge = array())\n {\n $lang = $this->language_prop($lang ?: $_SESSION['language']);\n\n // load localized texts\n if (empty($this->texts) || $lang != $_SESSION['language']) {\n $this->texts = array();\n\n // handle empty lines after closing PHP tag in localization files\n ob_start();\n\n // get english labels (these should be complete)\n @include(RCUBE_LOCALIZATION_DIR . 'en_US/labels.inc');\n @include(RCUBE_LOCALIZATION_DIR . 'en_US/messages.inc');\n\n if (is_array($labels))\n $this->texts = $labels;\n if (is_array($messages))\n $this->texts = array_merge($this->texts, $messages);\n\n // include user language files\n if ($lang != 'en' && $lang != 'en_US' && is_dir(RCUBE_LOCALIZATION_DIR . $lang)) {\n include_once(RCUBE_LOCALIZATION_DIR . $lang . '/labels.inc');\n include_once(RCUBE_LOCALIZATION_DIR . $lang . '/messages.inc');\n\n if (is_array($labels))\n $this->texts = array_merge($this->texts, $labels);\n if (is_array($messages))\n $this->texts = array_merge($this->texts, $messages);\n }\n\n ob_end_clean();\n\n $_SESSION['language'] = $lang;\n }\n\n // append additional texts (from plugin)\n if (is_array($add) && !empty($add)) {\n $this->texts += $add;\n }\n\n // merge additional texts (from plugin)\n if (is_array($merge) && !empty($merge)) {\n $this->texts = array_merge($this->texts, $merge);\n }\n }", "public function load(string $namespace, string $group, string $locale)\n {\n if ($this->isLoaded($namespace, $group, $locale)) {\n return;\n }\n\n // The loader is responsible for returning the array of language lines for the\n // given namespace, group, and locale. We'll set the lines in this array of\n // lines that have already been loaded so that we can easily access them.\n $lines = $this->loader->load($locale, $group, $namespace);\n\n $this->loaded[$namespace][$group][$locale] = $lines;\n }", "function _dcgettext($domain, $msgid, $category)\n{\n $l10n = _get_reader($domain, $category);\n return _encode($l10n->translate($msgid));\n}", "function sms_loadLanguageById($id, &$language, &$error)\n{\n\t// first, does the id exist?\n\tif ($id) {\n\t\t$sql = \"SELECT COUNT(*) FROM languages WHERE id='\". addslashes($id) . \"'\";\n\t\tif (!db_db_getone($sql, $exists, $error)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!$exists) {\n\t\t\t$id = 1; // default to the first language\n\t\t}\n\t} else {\n\t\t$id = 1;\n\t}\n\n\t// now load the record\n\t$sql = \"SELECT * FROM languages WHERE id='\". addslashes($id) . \"'\";\n\tif (!db_db_getrow($sql, $language, $error)) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}", "public function load($locale, $textDomain);", "public function load_i18n() {\n\t\tload_plugin_textdomain( 'dotadata', false, basename( dirname( __FILE__ ) ) . '/languages/' );\n\t}", "function load_textdomain() {\n\t\t$locale = apply_filters( 'buddybooth_load_textdomain_get_locale', get_locale() );\n\n\t\t// if we found a locale, try to load .mo file\n\t\tif ( !empty( $locale ) ) {\n\t\t\t// default .mo file path\n\t\t\t$mofile_default = sprintf( '%s/languages/%s-%s.mo', $this->plugin_dir, $this->domain, $locale );\n\t\t\t// final filtered file path\n\t\t\t$mofile = apply_filters( 'buddybooth_textdomain_mofile', $mofile_default );\n\t\t\t// make sure file exists, and load it\n\t\t\tif ( file_exists( $mofile ) ) {\n\t\t\t\tload_textdomain( $this->domain, $mofile );\n\t\t\t}\n\t\t}\n\t}", "function translation_editor_load_translations($current_language = \"\") {\n\t$site = elgg_get_site_entity();\n\t\n\tif (empty($current_language)) {\n\t\t$current_language = get_current_language();\n\t}\n\t\n\t// check if update is needed\n\t$main_ts = (int) datalist_get(\"te_last_update_{$current_language}\");\n\t$site_ts = (int) get_private_setting($site->getGUID(), \"te_last_update_{$current_language}\");\n\t\n\tif (!empty($main_ts)) {\n\t\tif (empty($site_ts) || ($main_ts > $site_ts)) {\n\t\t\tif (translation_editor_merge_translations($current_language)) {\n\t\t\t\tset_private_setting($site->getGUID(), \"te_last_update_{$current_language}\", time());\n\t\t\t}\n\t\t}\n\t} else {\n\t\ttranslation_editor_merge_translations($current_language, true);\n\t}\n\t\n\t// load translations\n\t$translations = translation_editor_read_translation($current_language, \"translation_editor_merged_{$site->getGUID()}\");\n\tif (!empty($translations)) {\n\t\tadd_translation($current_language, $translations);\n\t}\n}", "public function loadTranslations(string $locale, string $group, string $namespace = '*'): array;", "function language($file = '', $lang = '')\n\t{\n\t\tcall('lang', 'load', array($file, $lang));\n\t}", "protected function loadTranslations()\n {\n foreach (app('lit.translator')->getPaths() as $path) {\n foreach (config('lit.translatable.locales') as $locale) {\n $dir = realpath($path.DIRECTORY_SEPARATOR.$locale);\n $this->getTranslationsFromPath($locale, $dir);\n }\n }\n }", "public function loadApplicationLang(){\n \n // init needed libs\n $nedded_libs = array( \n 'models' => array(array('sys_modulelist_model', 'sys_modulelist_model'))\n );\n\n // load needed libs\n SHIN_Core::postInit($nedded_libs);\n \n $result = SHIN_Core::$_models['sys_modulelist_model']->getApplicationList();\n \n foreach($result as $application) {\n $path = str_replace(SHIN_Core::$_config['core']['shinfw_folder'] . '\\\\', '', BASEPATH) . strtolower($application['applicationFolder']) . '\\\\lang\\\\' . SHIN_Core::$_current_lang . '\\\\main_menu.php';\n if(is_file($path)) {\n SHIN_Core::$_language->directLoad($path);\n }\n }\n }", "function au_load_language($language = '') {\n\t\n\tglobal $aulis, $setting;\n\n\t// So did we actually provide ourselves with a language? If the language is empty... it doesn't work, like at all\n\tif(empty($language))\n\t\treturn false;\n\n\t// Let's create a variable to make things a little more readable\n\t$language_main_path = au_get_path_from_root('languages/' . $language . '.php');\n\n\t// Does this language exist?\n\tif(!file_exists($language_main_path))\n\t\treturn au_fatal_error(4, \"Language files were not found.\");\n\n\t// It does exists, let's load the main file\n\tinclude_once $language_main_path;\n\n\t// Now all other files\n\tforeach($setting['sub_files'] as $filename)\n\t\tinclude au_get_path_from_root('languages/' . $language . '.' . $filename . '.php');\n\t\t\n\t// We might need this\n\t$setting['lang_current'] = $language;\n\n\treturn true;\n\n}", "protected function getTargetMessageFilePath($category, $language)\n {\n $messageFile = Yii::getAlias($this->translatedPath) . \"/$language/\";\n if (isset($this->fileMap[$category])) {\n $messageFile .= $this->fileMap[$category];\n } else {\n $messageFile .= str_replace('\\\\', '/', $category) . '.php';\n }\n \n return $messageFile;\n }", "function load_textdomain() {\n $locale = apply_filters( 'bcg_load_textdomain_get_locale', get_locale() );\n // if load .mo file\n if ( !empty( $locale ) ) {\n $mofile_default = sprintf( '%s/languages/%s.mo',BCG_PLUGIN_DIR, $locale );\n $mofile = apply_filters( 'bcg_load_mofile', $mofile_default );\n // make sure file exists, and load it\n if ( file_exists( $mofile ) ) {\n load_textdomain( 'bcg', $mofile );\n }\n }\n }", "public static function load($namespace, $group, $locale)\n {\n /** @var \\Illuminate\\Translation\\Translator $instance */\n $instance->load($namespace, $group, $locale);\n }", "private function createMessageFile($language)\n\t{\n\t\tglobal $opt;\n\n\t\t$language_upper = mb_strtoupper($language);\n\t\t$language_lower = mb_strtolower($language);\n\t\tif (!isset($opt['locale'][$language_upper]))\n\t\t\treturn;\n\n\t\tif (!is_dir($opt['rootpath'] . 'cache2/translate/' . $language_lower))\n\t\t\tmkdir($opt['rootpath'] . 'cache2/translate/' . $language_lower);\n\t\tif (!is_dir($opt['rootpath'] . 'cache2/translate/' . $language_lower . '/LC_MESSAGES'))\n\t\t\tmkdir($opt['rootpath'] . 'cache2/translate/' . $language_lower . '/LC_MESSAGES');\n\n\t\t$f = fopen($opt['rootpath'] . 'cache2/translate/' . $language_lower . '/LC_MESSAGES/messages.po', 'w');\n\n\t\tfwrite($f, 'msgid \"\"' . \"\\n\");\n\t\tfwrite($f, 'msgstr \"\"' . \"\\n\");\n\t\tfwrite($f, '\"MIME-Version: 1.0\\n\"' . \"\\n\");\n\t\tfwrite($f, '\"Content-Type: text/plain; charset=UTF-8\\n\"' . \"\\n\");\n\t\tfwrite($f, '\"Content-Transfer-Encoding: 8bit\\n\"' . \"\\n\");\n\t\tfwrite($f, \"\\n\");\n\n\t\t$rs = sqlf(\"SELECT `sys_trans`.`text` AS `text`, `sys_trans_text`.`text` AS `trans` FROM `sys_trans` INNER JOIN `sys_trans_text` ON `sys_trans`.`id`=`sys_trans_text`.`trans_id` AND `sys_trans_text`.`lang`='&1' WHERE `sys_trans`.`text`!=''\", $language_upper);\n\n\t\t$variables = array();\n\t\t$this->loadNodeTextFile($variables, $opt['logic']['node']['id'].'.txt', $language_lower);\n\t\t$this->loadNodeTextFile($variables, $opt['logic']['node']['id'].'-'.$language_lower.'.txt', $language_lower);\n\n\t\twhile ($r = sql_fetch_assoc($rs))\n\t\t{\n\t\t\t$trans = $r['trans'];\n\t\t\t$trans = $this->substitueVariables($variables, $language_lower, $trans);\n\n\t\t\tfwrite($f, 'msgid \"' . $this->escape_text($r['text']) . '\"' . \"\\n\");\n\t\t\tfwrite($f, 'msgstr \"' . $this->escape_text($trans) . '\"' . \"\\n\");\n\t\t\tfwrite($f, \"\\n\");\n\t\t}\n\t\tsql_free_result($rs);\n\n\t\tfclose($f);\n\n\t\t@exec('msgfmt -o ' . escapeshellcmd($opt['rootpath'] . 'cache2/translate/' . $language_lower . '/LC_MESSAGES/messages.mo') . ' ' . escapeshellcmd($opt['rootpath'] . 'cache2/translate/' . $language_lower . '/LC_MESSAGES/messages.po'));\n\t}", "public function load_textdomain() {\n\t\t\tload_plugin_textdomain( 'tista-crud', false, TISTA_CRUD_PATH . 'languages/' );\n\t\t}", "public function initI18N($dir = '', $cat = '')\n {\n if (empty($cat) && empty($this->_msgCat)) {\n return;\n }\n if (empty($cat)) {\n $cat = $this->_msgCat;\n }\n if (empty($dir)) {\n $class = get_class($this);\n $reflector = new ReflectionClass($class);\n $dir = dirname($reflector->getFileName());\n }\n Yii::setAlias(\"@{$cat}\", $dir);\n $config = [\n 'class' => 'yii\\i18n\\PhpMessageSource',\n 'basePath' => \"@{$cat}/messages\",\n 'forceTranslation' => true,\n ];\n $globalConfig = ArrayHelper::getValue(Yii::$app->i18n->translations, \"{$cat}*\", []);\n if (!empty($globalConfig)) {\n $config = array_merge($config, is_array($globalConfig) ? $globalConfig : (array)$globalConfig);\n }\n if (!empty($this->i18n) && is_array($this->i18n)) {\n $config = array_merge($config, $this->i18n);\n }\n Yii::$app->i18n->translations[\"{$cat}*\"] = $config;\n }" ]
[ "0.73019", "0.720615", "0.71369624", "0.7008276", "0.6987644", "0.68739974", "0.6763349", "0.6474515", "0.64684784", "0.6439958", "0.64379686", "0.6326886", "0.62441796", "0.6221019", "0.621766", "0.62149334", "0.6213974", "0.61928767", "0.6184335", "0.6125615", "0.61176324", "0.60873836", "0.60804194", "0.60725254", "0.6054909", "0.6054127", "0.6033447", "0.60297525", "0.60085344", "0.59969175", "0.5972211", "0.5972211", "0.59586257", "0.595755", "0.5930403", "0.5896113", "0.58830416", "0.5855115", "0.583138", "0.58265287", "0.58233595", "0.5820927", "0.5807292", "0.5807292", "0.5803442", "0.57761467", "0.5763272", "0.5755052", "0.57519215", "0.5736992", "0.57272106", "0.57237095", "0.57220024", "0.5709308", "0.57080436", "0.5706629", "0.57024795", "0.5701337", "0.5697087", "0.56730914", "0.56728566", "0.56723094", "0.56714725", "0.56549716", "0.5650544", "0.56420475", "0.5622488", "0.5619193", "0.56127274", "0.5608785", "0.56052315", "0.5579096", "0.55695575", "0.5567107", "0.5556419", "0.55558586", "0.5553818", "0.5548795", "0.5548659", "0.5544804", "0.5537908", "0.5523914", "0.5514682", "0.5508848", "0.55015224", "0.5500215", "0.54957104", "0.5490019", "0.5485899", "0.54844964", "0.5481691", "0.54815876", "0.5473836", "0.5473097", "0.5468861", "0.5462557", "0.54609394", "0.54607934", "0.5460298", "0.54564065" ]
0.768986
0
Get the allowed roles.
Получить разрешенные роли.
public function getAllowedRoles();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _getAllowedRoles()\n {\n return $this->roles;\n }", "public static function getRoles(){\n return self::$acceptable_roles;\n }", "public function getAllowedRoles()\n {\n return $this->allowedRoles;\n }", "public function getRequiredRoles();", "public function getRolesAllow() {\n return $this->getData('rolesAllow');\n }", "private function get_roles() {\n return $this->user->roles;\n }", "public function getRoles();", "public function getRoles();", "public function getRoles();", "public function getRoles();", "public function getRoles();", "public function getRoles();", "public function getRoles();", "public function getRoles();", "public function getRoles();", "public function getRoles();", "private static function getAllowedRoles()\n {\n $roles = [];\n $allRoles = ['admin', 'librarian'];\n\n $key = static::getKey();\n //Get a list of all roles that are allowed access to the particular controller\n foreach($allRoles as $role)\n {\n $permissions = self::getPermissionsByRole($role);\n\n if (in_array($key, $permissions))\n array_push($roles, $role);\n }\n //Return the array of allowed roles\n return implode(\" \", $roles);\n }", "public static function getRolesList() {\n return self::$available_roles;\n }", "public function getRoles() {\n return DB::getAll(\n DB::T(DB::ROLE),\n new DBCondIn(\n 'id',\n DB::prepGetAll(\n DB::T(DB::ROLE_PERMISSION),\n new DBCond('permission', $this),\n array('role')\n )));\n }", "public function get_roles()\n {\n // TODO Revisit sales rep & sales manager caps...\n\n return apply_filters('bliksem/roles/get_roles', [\n [\n 'role' => 'partner',\n 'name' => _x('Partner', 'role', 'bliksem'),\n 'caps' => [\n 'read' => true,\n 'edit_posts' => false,\n 'upload_files' => false,\n 'delete_posts' => false\n ]\n ],\n [\n 'role' => 'agent',\n 'name' => _x('Agent', 'role', 'bliksem'),\n 'caps' => [\n 'read' => true,\n 'edit_posts' => false,\n 'upload_files' => false,\n 'delete_posts' => false\n ]\n ],\n [\n 'role' => 'legal',\n 'name' => _x('Legal', 'role', 'bliksem'),\n 'caps' => [\n 'read' => true,\n 'edit_posts' => false,\n 'upload_files' => false,\n 'delete_posts' => false\n ]\n ],\n [\n 'role' => 'client',\n 'name' => _x('Client', 'role', 'bliksem'),\n 'caps' => [\n 'read' => true,\n 'edit_posts' => false,\n 'upload_files' => false,\n 'delete_posts' => false\n ]\n ]\n ]);\n }", "public function availableRoles()\n {\n return Role::all();\n }", "public function getRoles(){\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "public function getRoles()\n {\n return $this->roles;\n }", "private function get_roles() {\n\t\tif ( ! function_exists( 'wp_roles' ) ) {\n\t\t\tglobal $wp_roles;\n\n\t\t\tif ( ! isset( $wp_roles ) ) {\n\t\t\t\t$wp_roles = new WP_Roles();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$wp_roles = wp_roles();\n\t\t}\n\n\t\treturn $wp_roles->roles;\n\t}", "public function getRoles()\n {\n if (is_null($this->roles)) {\n /** @psalm-var ?list<mixed> $data */\n $data = $this->raw(self::FIELD_ROLES);\n if (is_null($data)) {\n return null;\n }\n $this->roles = $data;\n }\n\n return $this->roles;\n }", "public function getRoles() {\n\n if( empty( $this->roles ) ) {\n\n $this->setSecurityRolesAndTools();\n\n }\n\n return $this->roles;\n\n }", "public function getRoles()\n {\n return $this->getValueForPath('roles');\n }", "public function getRoles()\n {\n return $this->roles()->visible()->get();\n }", "public function getRolePermissions();", "public function getRoles() {\n return $this->_roles;\n }", "public function getRoles()\n {\n return $this->_roles;\n }", "public function getRoles()\n {\n return $this->_roles;\n }", "public function getUserRoles()\n {\n return $this->roles;\n }", "public function getRoles(): array\n {\n return $this->roles;\n }", "public function getRoles(){\n $params = json_decode($this->parameters, true);\n\n if(!empty($params['roles'])) {\n return $params['roles'];\n }\n\n return array();\n }", "public function getRoles()\n {\n return [$this->getRol()];\n }", "public function getRoles()\n {\n //return $this->roles;\n return array('ROLE_ADMIN', 'ROLE_SUPER_ADMIN');\n }", "public function getRoles()\n {\n return (!$this->roles) ? $this->roles = $this->roles()->get() : $this->roles;\n }", "public function getRoles()\r\n\t{\r\n\t\treturn (!$this->roles) ? $this->roles = $this->roles()->get() : $this->roles;\r\n\t}", "public function getRoles()\n {\n return isset($this->payload['roles']) ? $this->payload['roles'] : null;\n }", "public function getRoles(): array;", "public function getRoles(): array;", "public function getRoles(): array;", "public function getRoles() {\n\t\t$roles = array_keys((array) Config::get()->permissions);\n\n\t\tif (!in_array(Auth::ROLE_GUEST, $roles)) {\n\t\t\t$roles[] = Auth::ROLE_GUEST;\n\t\t}\n\n\t\treturn $roles;\n\t}", "public function getRoles()\n {\n return array($this->getRole());\n }", "public function roles(): array {\n\t\treturn $this->user->roles ?? [];\n\t}", "public function roles()\n {\n return Role::where('name', '!=', 'Super Admin')->get();\n }", "public function getRoleList()\n {\n return $this->_roleList;\n }", "function members_get_roles() {\n\n\treturn members_role_registry()->get_collection();\n}", "protected function getRoles()\n {\n return $this->getRoleService()->getRoles(\n $this->getCondition(), \n 100, \n $this->ajaxResultGenerator->getOffset(), \n array(new OrderBy(new PropertyConditionVariable(Role::class_name(), Role::PROPERTY_ROLE))));\n }", "public function getRoles()\n {\n return array_filter(array_map('trim', explode(',', $this->roles)));\n }", "public function getRoles()\n {\n return $this->myRoles->toArray();\n }", "public function getRoles(): array {\n\t\treturn $this->m_roles;\n\t}", "public function getRoles()\n {\n return $this->getUserRoles()->toArray();\n }", "public function getUserRoles()\n {\n if ($this->user_roles)\n return $this->user_roles;\n else {\n\n $roles = [];\n\n if (auth()->check()) {\n\n\n // TODO: If user have multiple role then logic can be changed here\n // App should support single role\n // If a user have multiple role then, user must select a single role before accessing\n // admin section\n\n foreach (auth()->user()->roles()->exclude()->select('name')->where('enabled', 1)->get() as $role) {\n $roles[] = $role->name;\n }\n\n }\n\n $this->user_roles = $roles;\n\n return $roles;\n\n }\n }", "public function getRoles()\n {\n }", "public function getRoles()\n {\n }", "public function getRoles()\n {\n if (null === $this->roles) {\n\n $sql = sprintf(\"SELECT *\n FROM `security_role`\n WHERE `id` IN\n (SELECT `id`\n FROM `security_role_user`\n WHERE `user_id` = '%d' )\"\n ,$this->id);\n\n $roles = RoleUser::factory()->raw_query($sql);\n\n $this->roles = array();\n foreach ($roles as $role) {\n $this->roles[] = $role->name;\n }\n\n }\n\n return $this->roles;\n }", "public function getRoles() : array\n {\n return $this->roles;\n }", "public function getRoles()\n {\n $roles = [];\n if ($this->roles()) {\n $roles = $this->roles()->get();\n }\n return $roles;\n }", "public function get_user_roles() {\n\t\t\treturn \\Jet_Engine_Tools::get_user_roles();\n\t\t}", "function getRoles () {\n return array(\"user.profile.edit\",\"user.profile.view\",\"user.profile.owner\",\"user.profile.privateDetails\");\n }", "public static function getRoles()\n {\n $roles = wp_roles()->get_names();\n $current_roles = get_option('gwapi_security_required_roles') ?: [];\n\n $out = [];\n foreach ($roles as $k => $t) {\n $enabled = in_array($k, $current_roles);\n $out[$k] = [$t, $enabled];\n }\n\n return $out;\n }", "public function getRoles()\n {\n if ($this->_roles === null) {\n $manager = Yii::$app->getAuthManager();\n $this->_roles = array_keys($manager->getAssignments($this->id));\n }\n return $this->_roles;\n }", "public function getRoles()\n {\n switch ($this->getUsername()){\n case \"normal user\" : $roles = ['ROLE_USER']; break;\n case \"admin user\" :$roles = ['ROLE_ADMIN']; break;\n default: $roles = [];\n }\n return $roles;\n }", "public function getRoles()\n {\n return $this->roles->toArray();\n }", "public function getRoles()\n {\n return $this->roles->toArray();\n }", "function roles()\n {\n return shield()->roles();\n }", "public function getRoles(): array\n {\n return is_array($this->roles) ? $this->roles : [];\n }", "public function getRolesPermissions()\n {\n return $this->builderRoles->get()->getResult();\n }", "public static function roles()\n {\n return ['Default', 'Editor'];\n }", "public function getRoles()\n {\n return $this->level_administration;\n }", "function auth_role_list(){\n\treturn [\n\t\t'admin',\n\t\t'user',\n\t\t'superadmin'\n\t];\n}", "public function getListAvailableAssign()\n {\n if (empty($this->_available_roles)) {\n $this->_available_roles = Yii::$app->authManager->getRoles();\n $this->_available_roles = ArrayHelper::map($this->_available_roles, 'name', 'name');\n }\n\n return $this->_available_roles;\n }", "public function getRoles()\n {\n // Check if the roles have already been set.\n if ($this->roles) {\n return $this->roles;\n }\n\n // Get the roles.\n $roles = DB::table('core.party_roles as pr')\n ->select('r.name', 'r.permissions')\n ->join('core.roles as r', 'r.id', '=', 'pr.role_id')\n ->where([['pr.party_id', $this->party_id]])\n ->pluck('permissions', 'name')\n ->toArray();\n\n if ($roles) {\n // Decode the permissions.\n $roles = array_map(function($permission) {\n return json_decode($permission);\n }, $roles);\n } else {\n $roles = [];\n }\n\n // Set the roles.\n $this->roles = $roles;\n return $roles;\n }", "public function getRoles(): array {\r\n $this->roleList = array_unique(explode(\",\", $this->roles));\r\n\r\n // guarantees that a user always has at least one role for security\r\n if (!$this->roleList) {\r\n $this->roleList = ['ROLE_USER'];\r\n }\r\n\r\n return $this->roleList;\r\n }", "public function roles(): Roles\n {\n return $this->roles;\n }", "public function getRolesList(){\n return $this->_get(1);\n }", "protected function getUserRoles()\n {\n return $this->getToken()->getUser()->getRoles();\n }", "public function getAvailableRoles()\n {\n $auth = Yii::$app->getAuthManager();\n\n $items = $auth->getRoles();\n unset($items['author']);\n\n return array_map(create_function('$v', 'return $v->name;'), $items);\n }", "public function getRoles()\n {\n $roles = $this->roles;\n $roles[] = 'ROLE_USER';\n\n \n return array_unique($roles);\n }", "public function getRoles()\n {\n $roles = $this->roles;\n\n // we need to make sure to have at least one role\n $roles[] = static::ROLE_DEFAULT;\n\n return array_unique($roles);\n }", "function getRoles ();", "public function getRoles()\n {\n \t$roles = $this->roles;\n \n \tforeach ($this->getGroups() as $group) {\n \t\t$roles = array_merge($roles, $group->getRoles());\n \t}\n \t\n \t// we need to make sure to have at least one role\n \t$roles[] = static::ROLE_DEFAULT;\n \t\n \treturn array_unique($roles);\n }", "public function getUserRoles() {\n return $this->userRoles;\n }", "public function getRoles(): array\r\n {\r\n return [$this->getRole()->getRoleName()];\r\n }", "function getRoles () {\n return array(\"user.profile.edit\",\"user.profile.view\",\"user.profile.owner\");\n }", "public function getRoles()\n {\n\treturn array('ROLE_USER');\n }", "public function getAllowedRoles()\n {\n $userRole = $this->getRole();\n if ($userRole === 'master') {\n $output = $this->acl->getRoles();\n return array_combine($output, $output);\n }\n\n $output = array($userRole => $userRole);\n foreach ($this->acl->getRoles() as $role) {\n if (! $this->acl->inheritsRole($role, $userRole, true)) {\n $output[$role] = $role;\n }\n }\n unset($output['master']);\n return $output;\n }", "public function getRoles($exclude_locked_roles = FALSE);", "public function getRolesCollection() {\n return $this->user_roles;\n }", "public function getRoles() {\n $roles[] = 'ROLE_USER,ROLE_PRESTATAIRE,ROLE_ADMIN';\n return $roles;\n }", "public function getRoles () {\n\t\treturn $this->Roles[0];\n\t}", "public function getRoles():array\n {\n $roles = $this->roles;\n $roles[] = 'ROLE_USER';\n\n return array_unique($roles);\n }" ]
[ "0.83051324", "0.8203473", "0.8183528", "0.7879538", "0.7787929", "0.7624995", "0.756968", "0.756968", "0.756968", "0.756968", "0.756968", "0.756968", "0.756968", "0.756968", "0.756968", "0.756968", "0.75418407", "0.75233257", "0.74979", "0.74828255", "0.74305683", "0.7335978", "0.7335631", "0.7335631", "0.7335631", "0.7335631", "0.7335631", "0.7335631", "0.7335631", "0.7322057", "0.7287939", "0.728151", "0.7278502", "0.7252022", "0.7247621", "0.7247091", "0.72464454", "0.72464454", "0.7205857", "0.7203371", "0.7203243", "0.7199704", "0.71837157", "0.71759194", "0.71743023", "0.71656305", "0.7161621", "0.7161621", "0.7161621", "0.7143933", "0.7142113", "0.71338063", "0.7128883", "0.71170616", "0.71156627", "0.7106358", "0.7102992", "0.70978963", "0.7096837", "0.70873666", "0.70661265", "0.70543367", "0.70543367", "0.70475024", "0.70364434", "0.7031582", "0.7031291", "0.70274943", "0.70223856", "0.7008716", "0.7005934", "0.70048034", "0.70048034", "0.70043397", "0.7000066", "0.6996009", "0.6992005", "0.6987807", "0.69742745", "0.6968998", "0.6967163", "0.6957438", "0.69523317", "0.6945118", "0.6944635", "0.69424313", "0.694217", "0.6931866", "0.6922199", "0.6921181", "0.69201094", "0.6917252", "0.69152975", "0.6909927", "0.6907147", "0.6896019", "0.68933225", "0.689137", "0.68827903", "0.6878773" ]
0.8517717
0
Get the related widgets.
Получить связанные виджеты.
public function getWidgets();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function widgets()\n {\n return $this->widgets;\n }", "public function getWidgets()\n {\n return $this->widgets;\n }", "public function getWidgets() {\n\t\t// Mystery stuff\n\t}", "private function getWidgets(){\n\t\t$q = \"SELECT w.content, w.title, w.settings, t.template_file, p.position, i.order, i.index_id\n\t\t\t\tFROM item_to_widget i, widgets w, widget_types t, positions p, types y\n\t\t\t\tWHERE \n\t\t\t\tw.type_id = t.type_id\n\t\t\t\tAND\n\t\t\t\ti.widget_id = w.widget_id\n\t\t\t\tAND\n\t\t\t\tp.position_id = i.position_id\n\t\t\t\tAND\n\t\t\t\ti.type_id = y.type_id\n\t\t\t\tAND\n\t\t\t\ti.publish = 1\n\t\t\t\tAND\n\t\t\t\t(\n\t\t\t\t\t(y.type = 'global')\n\t\t\t\t\tOR \n\t\t\t\t\t(y.type = 'page' AND i.item_id = '\" . $this->page_id . \"')\n\t\t\t\t\tOR \n\t\t\t\t\t(y.type = 'template' AND i.item_id = '\" . $this->template_id . \"')\n\t\t\t\t\n\t\t\t\t\";\n\t\t//if user can edit then show user widgets\n\t\tif( $this->editable ){\n\t\t\t$q .=\t\" OR (y.type = 'editable') \";\n\t\t}\t\t\n\t\t$q .=\t\"\n\t\t\t\t)\n\t\t\t\tORDER BY i.position_id ASC, i.order ASC \n\t\t\t\t\";\n\t\t//echo $q;\n\t\t$rows = Common::getRows($q);\n\t\t// re-key for fetching - so can request widgets per position\n\t\tforeach($rows as $key => $row){\n\t\t\t//$this->widgets[ $row['position'] ][] = $row;\n\t\t\t$this->cacheData['widgets'][ $row['position'] ][] = $row;\n\t\t}\n\t\tunset($rows);\n\t}", "public function get_available_widgets()\n {\n }", "public function getWidgets() {\n $widgets = array();\n\n foreach ($this->widgets as $namespace => $widgetClasses) {\n $widgets[$namespace] = array();\n\n foreach ($widgetClasses as $name => $widgetClass) {\n $widgets[$namespace][$name] = $this->objectFactory->create($widgetClass, self::INTERFACE_WIDGET);\n }\n }\n\n return $this->orderWidgets($widgets);\n }", "public function widgets()\n {\n return $this->belongsTo('App\\Models\\Widget', 'widget_id', 'id');\n }", "static function getUsedWidgets() {\n return self::$used_widgets;\n }", "public function getChildWidgets();", "public function get_widgets()\n\t{\n\t\t$areas = $this->db\n\t\t\t\t\t\t->where('theme_id', $this->_theme->id)\n\t\t\t\t\t\t->get($this->_table['widget_areas'])\n\t\t\t\t\t\t->result();\n\n\t\tforeach ($areas as &$area)\n\t\t{\n\t\t\t$area->instances = $this->db\n\t\t\t\t\t\t\t\t\t->select($this->_table['widget_instances']. '.*, ' . $this->_table['widgets'] . '.slug')\n\t\t\t\t\t\t\t\t\t->where($this->_table['widget_instances'] . '.widget_area_id', $area->id)\n\t\t\t\t\t\t\t\t\t->where($this->_table['widget_instances'] . '.active', '1')\n\t\t\t\t\t\t\t\t\t->order_by($this->_table['widget_instances'] . '.order')\n\t\t\t\t\t\t\t\t\t->join($this->_table['widgets'], $this->_table['widgets'] . '.id = ' . $this->_table['widget_instances'] . '.widget_id')\n\t\t\t\t\t\t\t\t\t->get($this->_table['widget_instances'])\n\t\t\t\t\t\t\t\t\t->result();\n\n\t\t\tforeach ($area->instances as $i_key => $i_val)\n\t\t\t{\n\t\t\t\t$i_opts = unserialize($i_val->options);\n\n\t\t\t\tif ($i_opts)\n\t\t\t\t{\n\t\t\t\t\tforeach ($i_opts as $w_key => $w_val)\n\t\t\t\t\t{\n\t\t\t\t\t\t//$area->instances->$i_val = new stdClass;\n\t\t\t\t\t\t$area->instances[$i_key]->$w_key = $w_val['default'];\n\t\t\t\t\t}\n\n\t\t\t\t\tunset($area->instances[$i_key]->widget_area_id);\n\t\t\t\t\tunset($area->instances[$i_key]->widget_id);\n\t\t\t\t\tunset($area->instances[$i_key]->order);\n\t\t\t\t\tunset($area->instances[$i_key]->active);\n\t\t\t\t\tunset($area->instances[$i_key]->options);\n\n\t\t\t\t\t$this->_slug = $area->instances[$i_key]->slug;\n\n\n\t\t\t\t\tif ($class = $this->spawn_class($this->_widgets_path, $i_val->slug, $area->instances[$i_key]))\n\t\t\t\t\t{\n\n\t\t\t\t\t\t$area->instances[$i_key]->rendered = $class->run($area->instances[$i_key]);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$area->instances[$i_key]->rendered = false;\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ($class = $this->spawn_class($this->_widgets_path, $i_val->slug, $area->instances[$i_key]))\n\t\t\t\t\t{\n\t\t\t\t\t\t\t// no options, just run it\n\t\t\t\t\t\tunset($area->instances[$i_key]->widget_area_id);\n\t\t\t\t\t\tunset($area->instances[$i_key]->widget_id);\n\t\t\t\t\t\tunset($area->instances[$i_key]->order);\n\t\t\t\t\t\tunset($area->instances[$i_key]->active);\n\t\t\t\t\t\tunset($area->instances[$i_key]->options);\n\n\t\t\t\t\t\t$area->instances[$i_key]->rendered = $class->run($area->instances[$i_key]);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$area->instances[$i_key]->rendered = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// send it back to the public controller\n\t\treturn $this->format_widgets($areas);\n\t}", "public function getWidget()\n {\n return $this->hasOne(Widgets::className(), ['id' => 'widgetId']);\n }", "protected function getWidgets()\n {\n return array(\n $this->getSelectorViewClass(),\n '\\XLite\\Module\\ProaxIT\\RequestPriceQuote\\Form\\RequestPriceQuote',\n );\n }", "public function getWidget();", "static function get_widgets()\n {\n global $db;\n\n // grab the entries and push them into an array\n $result = array();\n $query = mysqli_query($db, \"SELECT * FROM `widgets`\");\n while ($cur = mysqli_fetch_assoc($query)) {\n $result[] = $cur;\n }\n\n return (count($result) === 0) ? null : $result;\n }", "public function getWidgets() {\n return [\n 'api_requests' => [\n 'icon' => 'leaf',\n 'widget' => 'PhpDebugBar.Widgets.ListWidget',\n 'map' => 'api_requests.requests',\n 'default' => '[]'\n ],\n 'api_requests:badge' => [\n 'map' => 'api_requests.num_requests',\n 'default' => 0\n ]\n ];\n }", "public function getBackendWidgets()\n {\n return $this->backendWidgets;\n }", "protected function getWidgets(): array {\n return [\n 'ctx_module_container' => [\n 'name' => $this->t('Contextly module container'),\n 'tag' => [\n '#type' => 'html_tag',\n '#tag' => 'div',\n '#attributes' => [\n 'class' => [\n 'ctx-module-container',\n 'ctx-clearfix',\n ],\n ],\n ],\n ],\n 'ctx_siderail_container' => [\n 'name' => $this->t('Contextly siderail container'),\n 'tag' => [\n '#type' => 'html_tag',\n '#tag' => 'div',\n '#attributes' => [\n 'class' => [\n 'ctx-siderail-container',\n ],\n ],\n ],\n ],\n 'ctx_autosidebar_container' => [\n 'name' => $this->t('Contextly autosidebar container'),\n 'tag' => [\n '#type' => 'html_tag',\n '#tag' => 'div',\n '#attributes' => [\n 'class' => [\n 'ctx-autosidebar-container',\n 'ctx-clearfix',\n ],\n ],\n ],\n ],\n // @todo found out what these doing.\n 'ctx_subscribe_container' => [\n 'name' => $this->t('*** Contextly subscribe container'),\n 'tag' => [\n '#type' => 'html_tag',\n '#tag' => 'div',\n '#attributes' => [\n 'class' => [\n 'ctx-subscribe-container',\n 'ctx-clearfix',\n ],\n ],\n ],\n ],\n 'ctx_personalization_container' => [\n 'name' => $this->t('*** Contextly personalization container'),\n 'tag' => [\n '#type' => 'html_tag',\n '#tag' => 'div',\n '#attributes' => [\n 'class' => [\n 'ctx-personalization-container',\n 'ctx-clearfix',\n ],\n ],\n ],\n ],\n 'ctx_channel_container' => [\n 'name' => $this->t('*** Contextly channel container'),\n 'tag' => [\n '#type' => 'html_tag',\n '#tag' => 'div',\n '#attributes' => [\n 'class' => [\n 'ctx-channel-container',\n 'ctx-clearfix',\n ],\n ],\n ],\n ],\n 'ctx_social_container' => [\n 'name' => $this->t('*** Contextly social container'),\n 'tag' => [\n '#type' => 'html_tag',\n '#tag' => 'div',\n '#attributes' => [\n 'class' => [\n 'ctx-social-container',\n 'ctx-clearfix',\n ],\n ],\n ],\n ],\n 'ctx_home_personalized_container' => [\n 'name' => $this->t('*** Contextly home personalized container'),\n 'tag' => [\n '#type' => 'html_tag',\n '#tag' => 'div',\n '#attributes' => [\n 'class' => [\n 'ctx-home-personalized-container',\n 'ctx-clearfix',\n ],\n ],\n ],\n ],\n ];\n }", "public function getAllWidgets(): Collection;", "public function widgets();", "public function showWidgets()\n {\n $usersWidgets = Widgets::get()->where('disabled',0)->all();\n $widgetContent = $this->getWidgetPlaces();\n \n foreach($usersWidgets as $w) {\n if (isset($this->widgets[$w->name])) {\n $obj = App::make($this->widgets[$w->name]);\n $method = $w->method && method_exists($obj, $w->method) ?\n $w->method : 'execute';\n if (!isset($widgetContent[$w->place])) {\n $widgetContent[$w->place] = ''; \n } \n $widgetContent[$w->place] .= $obj->{$method}($w->object_id);\n }\n }\n\n foreach($widgetContent as $place => $content) {\n View::share($place, $content);\n }\n }", "public function getConsequentWidget();", "public function getRepoertToWidgets(){\n $widgets = array();\n \n //creating widgets\n $widgets['type_flag'] = new sfWidgetFormChoice(array('expanded' => true, 'choices' => array(\n ReportTo::SUPERVISOR => __('Supervisor'), ReportTo::SUBORDINATE => __('Subordinate')), 'default' => ReportTo::SUPERVISOR)); \n $widgets['supervisorName'] = new ohrmWidgetEmployeeNameAutoFill(array('employeeList' => $this->getEmployeeListForSupervisor()));\n $widgets['subordinateName'] = new ohrmWidgetEmployeeNameAutoFill(array('employeeList' => $this->getEmployeeListForSubordinate())); \n $widgets['previousRecord'] = new sfWidgetFormInputHidden();\n $widgets['reportingMethodType'] = new sfWidgetFormSelect(array('choices' => $this->reportingMethodType));\n $widgets['reportingMethod'] = new sfWidgetFormInputText();\n \n return $widgets;\n }", "function slcr_widgets() {\n\treturn Slcr_Widgets::slcr_instance();\n}", "public function widgetLoad(){\n $widgets = array();\n foreach(asset_get_plugin('widget') as $widget_id => $widget){\n $settings = $this->widgetLoad_settings($widget_id);\n $widgets[$widget_id] = asset_get_handler('widget', $widget_id, $settings);\n }\n return !empty($widgets) ? $widgets : array();\n }", "public function getFrontendWidgets()\n {\n return $this->frontendWidgets;\n }", "public function sectionwidgets()\n {\n return $this->hasMany('App\\Models\\PageSectionWidget', 'template_section_id', 'template_section_id')->orderBy('order');\n }", "public static function get_available_widgets()\n\t{\n\t\t$widgets = array();\n\t\tforeach(Kohana::include_paths() as $path) {\n\t\t\tif(is_dir($path . 'widgets')) {\n\t\t\t\tforeach(scandir($path . 'widgets') as $widget_name) {\n\t\t\t\t\tif(substr($widget_name, 0, 1) == '.')\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tif(!is_dir($path . 'widgets/' . $widget_name))\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\tif(!is_file($path . 'widgets/' . $widget_name . '/' . $widget_name . '.php'))\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t$widget_model = new Ninja_Widget_Model();\n\t\t\t\t\t$widget_model->set_name($widget_name);\n\t\t\t\t\t$widget = $widget_model->build();\n\t\t\t\t\t$metadata = $widget->get_metadata();\n\t\t\t\t\tif(!$metadata['instanceable'])\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t$metadata['path'] = $widget_model->widget_path();\n\t\t\t\t\t$widgets[$widget_name] = $metadata;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tuasort($widgets, function($a, $b) {\n\t\t\tif($a['friendly_name'] < $b['friendly_name'])\n\t\t\t\treturn -1;\n\t\t\tif($a['friendly_name'] > $b['friendly_name'])\n\t\t\t\treturn 1;\n\t\t\treturn 0;\n\t\t});\n\t\treturn $widgets;\n\t}", "function widgets( $module = false )\n\t{\n\t\t$ci =& get_instance();\n\t\t$ci->db->from( 'widgets as c' );\n\t\t$ci->db->join( 'widget_structure as s', 's.widget_id = c.widget_id','left' );\n\t\t$query = $ci->db->get();\n\t\treturn $query->result_array();\n\t}", "protected function get_sidebar_widgets() {\n\n\t\t$sidebar_id = $this->current_schema_attribute_parents[0];\n\n\t\treturn array_keys( $this->sidebars[ $sidebar_id ] );\n\t}", "public function getWidget($widget);", "public function getWidgets()\n {\n return [\n 'api' => [\n 'icon' => 'server',\n 'widget' => 'PhpDebugBar.Widgets.VariableListWidget',\n 'map' => 'api.requests',\n 'default' => \"{}\"\n ],\n 'api:badge' => [\n 'map' => 'api.nb_requests',\n 'default' => 0\n ]\n ];\n }", "function &getWidget()\n {\n return $this->widget();\n }", "public function getAvailableWidgets() {\n\t\t$widgets = array();\n\t\ttry {\n\t\t\t$request = $this->getConnection()->getURL().'widgets?all=true';\n\t\t\tif($locale = $this->getLocale()) {\n\t\t\t\t$request .= '&locale='.$locale;\n\t\t\t}\n\t\t\tif(!$this->checkURL($request)) {\n\t\t\t\tthrow new Exception\\WookieConnectorException(\"URL for Wookie is malformed\");\n\t\t\t}\n\n\t\t\t$response = new HttpResponse(@file_get_contents($request, false, $this->getHttpStreamContext()), $http_response_header);\n\t\t\t$xmlObj = @simplexml_load_string($response->getResponseText());\n\n\t\t\tif($xmlObj instanceof \\SimpleXMLElement) {\n\t\t\t\tforeach($xmlObj->children() as /* @var $widget \\SimpleXMLElement */ $widget) {\n $id = (string) $widget->attributes()->id;\n $title = (string) $widget->name;\n $description = (string) $widget->description;\n $iconURL = '';\n if($widget->icon) {\n $iconURL = (string)$widget->icon->attributes()->src;\n }\n if($iconURL == '') {\n $iconURL = (string) 'http://www.oss-watch.ac.uk/images/logo2.gif';\n }\n $Widget = new Widget($id, $title, $description, $iconURL);\n $widgets[$id] = $Widget;\n }\n\t\t\t} else {\n\t\t\t\tthrow new Exception\\WookieConnectorException('Problem getting available widgets');\n\t\t\t}\n\n\t } catch(WookieConnectorException $e) {\n\t\t\t$this->getLogger()->write($e->toString());\n\t\t}\n\t\treturn $widgets;\n\t}", "public function getAlternateWidget();", "public function get_widgets() {\n\n\t\t\tglobal $wp_widget_factory;\n\n\t\t\tif ( empty( $wp_widget_factory->widgets ) ) {\n\t\t\t\treturn array();\n\t\t\t}\n\n\t\t\t$result = array();\n\n\t\t\tforeach ( $wp_widget_factory->widgets as $widget ) {\n\n\t\t\t\tif ( ! isset( $widget->widget_id ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( false === strpos( $widget->widget_id, '__tm' ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$result[] = $widget->widget_id;\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t}", "public function getAvailableWidgets()\n\t{\n\t\t$this->lockDeclarations();\n\n\t\t$instances = [];\n\n\t\t$userWidgetTypeIds = $this->getUserWidgetTypeIds();\n\n\t\t$declarations = $this->filterDeclarations($this->widgetDeclarations);\n\n\t\tforeach($declarations as $widgetDeclaration) {\n\t\t\tif($widgetDeclaration->isUnique() && in_array($widgetDeclaration->getWidgetTypeId(), $userWidgetTypeIds)) {\n\t\t\t\t// skip already used unique widget\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$instances[$widgetDeclaration->getWidgetTypeId()] = $widgetDeclaration->createInstance();\n\t\t}\n\n\t\treturn $instances;\n\t}", "protected function getWidgetsToDisplay()\n {\n // Note:\n // This widget has menu_assignment global scope attached in the query.\n $widgets = Widget::with('permissions')->published()->orderBy('order', 'asc')->get();\n\n return $widgets->groupBy('position');\n }", "protected function themeWidgets()\n {\n return array();\n }", "public function getControls();", "public function getWidgetManager() {\n $container = \\Drupal::getContainer();\n\n return $this->widget_plugin_manager ?: $container->get('plugin.manager.facets.widget');\n }", "public function getWidgetsIndex()\n\t{\n\t\t$hardcodedWidgets = SidebarWidget::where('type', '=', 'hardcoded')\n\t\t\t->orderBy('label', 'ASC')\n\t\t\t->get();\n\n\t\t$monetizationWidgets = SidebarWidget::where('type', '!=', 'hardcoded')\n\t\t\t->orderBy('type', 'DESC')\n\t\t\t->orderBy('label', 'ASC')\n\t\t\t->get();\n\n\t\t$newWidget = new SidebarWidget;\n\n\t\t// Show the page\n\t\treturn View::make('backend.appearance.widgets', compact('hardcodedWidgets', 'monetizationWidgets', 'newWidget'));\n\t}", "public function getWidgets()\n\t{\n\t\t$table = new Zend_Db_Table(array('name'=>PrecurioTableConstants::USER_SETTING));\n\t\t$settings = $table->fetchRow($table->select()->where('user_id= ? ',$this->user_id));\n\t\tif($settings == null)\n\t\t{\n\t\t\t$widgets = Bootstrap::getWidgets(true);\n\t\t}\n\t\telse\n\t\t\t$widgets = unserialize($settings->widgets);\n\n\t\tif(!count($widgets))return array();//not necessary, but so that the next line will never fail\n\t\t\n\t\t// check if the array contains Precurio_Widget objects, \n\t\t//if it doesn't, then convert.This isfor backward compatibility with earlier versions,\n\t\t$widget = $widgets[array_rand($widgets)];\n\t\tif(!is_a($widget,'Precurio_Widget'))\n\t\t{\n\t\t\t$config = Zend_Registry::get('config');\n \t\t\t$arr = $config->widget->toArray();//$arr = Array([wgt_poll] => 1,[wgt_link] => 1,....\n\t\t\t$temp = array();\n\t\t\tforeach($widgets as $key=>$value)\n\t\t\t{\n\t\t\t\tif($key == 'employee')$key = 'featured-employee';\n\t\t\t\tif($key == 'news')$key = 'recent-content';\n\t\t\t\tif($key == 'links')$key = 'link';\n\t\t\t\tif(isset($arr['wgt_'.$key]) && $value)\n\t\t\t\t{\n\t\t\t\t\t$widget = new Precurio_Widget($key,$value);\n \t\t\t\t\t$temp[] = $widget;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//now add the others that were there before. Note, this is for backward compatible\n\t\t\t//so that upgrading users will not see an empty homepage\n\t\t\t$widgets = Bootstrap::getWidgets(true);\n\t\t\tforeach($widgets as $aWidget)\n\t\t\t{\n\t\t\t\t$key = $aWidget->getName(); \n\t\t\t\tif($key == 'suggested-content' || $key == 'my-profile' || $key == 'featured-article' || $key =='portal-update' || $key == 'reminder' || $key == 'ads' || $key == 'group-resource')\n\t\t\t\t{\n \t\t\t\t\t$temp[] = $aWidget;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$widgets = $temp;\n\t\t}\n\t\treturn $widgets;\n\t}", "public function load_widget_config()\n {\n global $g_comp_session;\n\n $l_dao = isys_dashboard_dao::instance($this->m_database_component);\n $l_widgets = [];\n\n $this->set_ajax_url(\n [\n C__GET__AJAX => 1,\n C__GET__AJAX_CALL => 'dashboard'\n ]\n );\n\n // At first we load all available widgets for the dialog-field.\n $l_res = $l_dao->get_data();\n\n while ($l_row = $l_res->get_row())\n {\n $l_classname = 'isys_dashboard_widgets_' . $l_row['isys_widgets__identifier'];\n\n if (class_exists($l_classname))\n {\n $l_widgets[$l_row['isys_widgets__const']] = _L($l_row['isys_widgets__title']);\n } // if\n\n if (!class_exists($l_classname))\n {\n // Use registered class which has been registered by the specified module\n $l_classname = isys_register::factory('widget-register')\n ->get($l_row['isys_widgets__identifier']);\n } // if\n\n if (class_exists($l_classname))\n {\n $l_widgets[$l_row['isys_widgets__const']] = _L($l_row['isys_widgets__title']);\n } // if\n else\n {\n continue;\n } // if\n } // while\n\n // Now we load the selected widgets to display them for manipulation (removing, sorting).\n $l_res = $l_dao->get_widgets_by_user($g_comp_session->get_user_id());\n\n if (count($l_res) > 0)\n {\n while ($l_row = $l_res->get_row())\n {\n if (class_exists('isys_dashboard_widgets_' . $l_row['isys_widgets__identifier']) || isset($l_widgets[$l_row['isys_widgets__const']]))\n {\n // Add widget to selection if class exists or is registered by the module\n $l_widget_list[] = [\n 'row_id' => $l_row['isys_widgets_config__id'],\n 'title' => _L($l_row['isys_widgets__title'])\n ];\n }\n } // while\n }\n else\n {\n // We have defined no dashboard - So we load the default.\n $l_default_res = $l_dao->get_widgets_by_default();\n\n if (count($l_default_res) > 0)\n {\n while ($l_row = $l_default_res->get_row())\n {\n if (class_exists('isys_dashboard_widgets_' . $l_row['isys_widgets__identifier']))\n {\n $l_widget_list[] = [\n 'row_id' => $l_row['isys_widgets__const'],\n 'title' => _L($l_row['isys_widgets__title'])\n ];\n }\n } // while\n } // if\n } // if\n\n $l_ajax_url = isys_helper_link::create_url($this->get_ajax_url() + ['func' => 'save_dashboard_config']);\n $l_define_default_ajax_url = isys_helper_link::create_url($this->get_ajax_url() + ['func' => 'define_dashboard_default']);\n $l_overwrite_dashboard_ajax_url = isys_helper_link::create_url($this->get_ajax_url() + ['func' => 'overwrite_user_dashboard']);\n\n return $this->m_tpl->activate_editmode()\n ->assign('title', _L('LC__MODULE__DASHBOARD__WIDGET_CONFIGURATION__TITLE'))\n ->assign('description', _L('LC__MODULE__DASHBOARD__WIDGET_CONFIGURATION__TITLE_DESCRIPTION'))\n ->assign('widget_selection', serialize($l_widgets))\n ->assign('widget_list', $l_widget_list)\n ->assign('ajax_url', $l_ajax_url)\n ->assign('define_default_ajax_url', $l_define_default_ajax_url)\n ->assign('overwrite_dashboard_ajax_url', $l_overwrite_dashboard_ajax_url)\n ->assign(\n 'is_allowed_to_administrate_dashboard',\n isys_auth_dashboard::instance()\n ->is_allowed_to(isys_auth::SUPERVISOR, 'CONFIGURE_OTHER_DASHBOARDS')\n )\n ->fetch(isys_module_dashboard::get_tpl_dir() . 'widget-config.tpl');\n }", "static public function get_sidebar_widgets() {\n\t\treturn get_option( 'sidebars_widgets', array() );\n\t}", "public function index()\n {\n $widget = DB::table('widgets')->where('user_id', '' . auth()->id() . '')->get();\n return $widget;\n }", "private function discoverWidgets(): array\n {\n $aWidgets = [];\n foreach (Components::available() as $oComponent) {\n\n $aClasses = $oComponent\n ->findClasses('Admin\\\\Dashboard\\\\Widget')\n ->whichImplement(Interfaces\\Dashboard\\Widget::class)\n ->whichCanBeInstantiated();\n\n foreach ($aClasses as $sClass) {\n $aWidgets[] = $sClass;\n }\n }\n\n return $aWidgets;\n }", "function getAllWidgets($p_slide_id) {\n\t\t$wid_array = array();\t\t//widget array\n\t\t\n\t\t$con = open_connection();\n\t\t\n\t\t$media_wid = getMediaWidgetArray($p_slide_id);\n\t\t$text_wid = getTextWidgetArray($p_slide_id);\n\t\t$image_wid = getImageWidgetArray($p_slide_id);\n\t\t\n\t\tarray_push($wid_array, array_merge($media_wid, $text_wid, $image_wid));\n\t\t\n\t\treturn $wid_array;\n\t}", "public function widgetAreas() {\n return Config::get($this->package_prefix.'bones.widget_areas');\n }", "public static function widgets(): array\n {\n //====================================================================//\n // Check if Widget Manager has Overrides\n if (self::local() instanceof WidgetsProviderInterface) {\n return self::local()->widgets();\n }\n $widgetTypes = array();\n //====================================================================//\n // Safety Check => Verify Objects Folder Exists\n $path = self::getLocalPath().'/Widgets';\n if (!is_dir($path)) {\n return $widgetTypes;\n }\n //====================================================================//\n // Scan Local Objects Folder\n $scan = scandir($path, 1);\n if (false == $scan) {\n return $widgetTypes;\n }\n //====================================================================//\n // Scan Each File in Folder\n $files = array_diff($scan, array('..', '.', 'index.php', 'index.html'));\n foreach ($files as $filename) {\n $className = pathinfo($path.'/'.$filename, PATHINFO_FILENAME);\n //====================================================================//\n // Verify ClassName is a Valid Object File\n if (false == self::validate()->isValidWidget($className)) {\n continue;\n }\n $widgetTypes[] = $className;\n }\n\n return $widgetTypes;\n }", "protected function get_widget_data() {\n\n\t\t$sidebar_id = $this->current_schema_attribute_parents[0];\n\t\t$widget_id = $this->current_schema_attribute_parents[1];\n\t\treturn $this->sidebars[ $sidebar_id ][ $widget_id ];\n\t}", "public static function index()\n\t{\n\t\t//\n\t\t$widgets = DB::table('widgets');\n\t\t\n\t\tforeach ($widgets as $widget) {\n\t\t\tif(is_object($widget) && !empty($widget))\n\t\t\t\t$widget->body = WidgetController::parse($widget);\n\t\t}\n\n\t\treturn $widgets;\n\t}", "function fusion_get_available_widgets() {\n\t$widgets = [];\n\t$widgets['default'] = __( 'Select a widget', 'fusion-builder' );\n\t$widget_data = fusion_get_widget_data( false );\n\n\tforeach ( $widget_data as $widget ) {\n\t\t$widgets[ $widget['title'] ] = $widget['name'];\n\t}\n\n\treturn $widgets;\n}", "public function getAvailableWidgets(): array\n {\n $availableWidgets = $this->getDefaultWidgets();\n $modules = $this->getActivatedModules();\n\n foreach ($modules as $module) {\n $object = new $module();\n // Keep only bundles that are plugin bundles\n if ($object instanceof DashboardWidgetsProviderInterface) {\n $availableWidgets = array_merge(\n $availableWidgets,\n $object->getDashboardWidgets($this->apiClientService)\n );\n }\n }\n\n return $availableWidgets;\n }", "public function widgetsAction(){\n\t\t$auth = Zend_Auth::getInstance ();\n\t\t$translator = Shineisp_Registry::getInstance ()->Zend_Translate;\r\n\t\t$auth->setStorage ( new Zend_Auth_Storage_Session ( 'admin' ) );\n\t\t\n\t\t$id = $this->getRequest()->getParam('id', 'widget_' . rand());\n\t\t$icon = $this->getRequest()->getParam('icon', 'fa fa-file');\n\t\t$type = $this->getRequest()->getParam('type');\n\t\t$title = $this->getRequest()->getParam('title');\n\t\t$buttons = array();\n\t\t\n\t\tif(!empty($id)){\n\t\t\t$widget = new Shineisp_Commons_Widgets();\n\t\t\t$widget->setId($id);\n\t\t\t\n\t\t\t// Ajax load of the widgets\n\n\t\t\t// Get only the new orders\n\t\t\tif($type == \"new_order_widget\"){\n\t\t\t\n\t\t\t\t$records = Orders::Last(array(Statuses::id(\"tobepaid\", \"orders\")));\n\t\t\t\t$buttons = array('edit' => array('label' => $translator->translate ( 'Edit' ), 'cssicon' => 'glyphicon glyphicon-pencil', 'action' => \"/admin/orders/edit/id/%d\"));\n\t\t\t\t$widget->setBasepath('/admin/orders/')->setIdxfield($records['index'])->setButtons($buttons);\n\t\t\t\t\n\t\t\t// Get all the pending, processing, and paid orders to be complete \n\t\t\t}elseif($type == 'processing_order_widget'){\n\t\t\t\n\t\t\t\t$statuses = array(Statuses::id(\"processing\", \"orders\"), Statuses::id(\"pending\", \"orders\"), Statuses::id(\"paid\", \"orders\"));\n\t\t\t\t$buttons = array('edit' => array('label' => $translator->translate ( 'Edit' ), 'cssicon' => 'glyphicon glyphicon-pencil', 'action' => \"/admin/orders/edit/id/%d\"));\n\t\t\t\t$records = Orders::Last($statuses);\n\t\t\t\t\n\t\t\t\t$widget->setBasepath('/admin/orders/')->setIdxfield($records['index'])->setButtons($buttons);\n\n\t\t\t// Get all the services / order items next to the expiration date from -10 days to 30 days\n\t\t\t}elseif($type == 'recurring_services_widget'){\n\t\t\t\n\t\t\t\t$records = OrdersItems::getServices();\n\t\t\t\t$buttons = array('edit' => array('label' => $translator->translate ( 'Edit' ), 'cssicon' => 'glyphicon glyphicon-pencil', 'action' => \"/admin/ordersitems/edit/id/%d\"));\n\t\t\t\t$widget->setBasepath('/admin/ordersitems/')->setIdxfield($records['index'])->setButtons($buttons);\n\t\t\t\n\t\t\t// Get the last 5 tickets opened by the customers\n\t\t\t}elseif($type == 'last_tickets_widget'){\n\t\t\t\n\t\t\t\t$records = Tickets::Last(null, 5);\n\t\t\t\t$buttons = array('edit' => array('label' => $translator->translate ( 'Edit' ), 'cssicon' => 'glyphicon glyphicon-pencil', 'action' => \"/admin/tickets/edit/id/%d\"));\n\t\t\t\t$widget->setBasepath('/admin/tickets/')->setIdxfield($records['index'])->setButtons($buttons);;\n\t\t\t\n\t\t\t// get the last domain tasks to be executed\n\t\t\t}elseif($type == 'last_domain_tasks_widget'){\n\t\t\t\n\t\t\t\t$records = DomainsTasks::Last();\n\t\t\t\t$buttons = array('edit' => array('label' => $translator->translate ( 'Edit' ), 'cssicon' => 'glyphicon glyphicon-pencil', 'action' => \"/admin/domainstasks/edit/id/%d\"));\n\t\t\t\t$widget->setBasepath('/admin/domainstasks/')->setIdxfield($records['index'])->setButtons($buttons);;\n\t\t\t\t\n\t\t\t// get the last ISP panel tasks to be executed \n\t\t\t}elseif($type == 'last_panel_tasks_widget'){\n\t\t\t\n\t\t\t\t$records = PanelsActions::Last();\n\t\t\t\t$buttons = array('edit' => array('label' => $translator->translate ( 'Edit' ), 'cssicon' => 'glyphicon glyphicon-pencil', 'action' => \"/admin/panelsactions/edit/id/%d\"));\n\t\t\t\t$widget->setBasepath('/admin/panelsactions/')->setIdxfield($records['index'])->setButtons($buttons);;\n\t\t\t\n\t\t\t// get the domains next the expiration date\n\t\t\t}elseif($type == 'expiring_domain_widget'){\n\t\t\t\t\r\n\t\t\t\t// Create the header table columns\r\n\t\t\t\t$records['fields'] = array('expiringdate' => array('label' => $translator->translate('Expiry Date')),\r\n\t\t\t\t\t\t\t\t\t\t 'domains' => array('label' => $translator->translate('Domain')),\n\t\t\t\t\t\t\t\t\t\t 'days' => array('label' => $translator->translate('Days left')));\n\t\t\t\t\n\t\t\t\t$buttons = array('edit' => array('label' => $translator->translate ( 'Edit' ), 'cssicon' => 'glyphicon glyphicon-pencil', 'action' => \"/admin/domains/edit/id/%d\"));\n\t\t\t\t$records['data'] = Domains::getExpiringDomains(null, 107, -1, 5);\n\t\t\t\t\n\t\t\t\t$records['index'] = \"domain_id\";\n\t\t\t\t$widget->setBasepath('/admin/domains/')->setIdxfield($records['index'])->setButtons($buttons);;\n\t\t\t\t\n\t\t\t// get the messages/notes posted by the customers within the orders\r\n\t\t\t}elseif($type == 'order_messages_widget'){\n\t\t\t\n\t\t\t\t$records = Messages::Last('orders');\n\t\t\t\t$buttons = array('edit' => array('label' => $translator->translate ( 'Edit' ), 'cssicon' => 'glyphicon glyphicon-pencil', 'action' => \"/admin/orders/edit/id/%d\"));\n\t\t\t\t$widget->setBasepath('/admin/orders/')->setIdxfield($records['index'])->setButtons($buttons);;\n\t\t\t\t\r\n\t\t\t// get the messages/notes posted by the customers within the domain \n\t\t\t}elseif($type == 'domain_messages_widget'){\n\t\t\t\n\t\t\t\t$records = Messages::Last('domains');\n\t\t\t\t$buttons = array('edit' => array('label' => $translator->translate ( 'Edit' ), 'cssicon' => 'glyphicon glyphicon-pencil', 'action' => \"/admin/domains/edit/id/%d\"));\n\t\t\t\t$widget->setBasepath('/admin/domains/')->setIdxfield($records['index'])->setButtons($buttons);;\n\t\t\t\t\n\t\t\t// get the list of your best customers \r\n\t\t\t}elseif($type == 'customers_parade_widget'){\n\t\t\t\n\t\t\t\t$buttons = array('edit' => array('label' => $translator->translate ( 'Show' ), 'cssicon' => 'glyphicon glyphicon-pencil', 'action' => \"/admin/customers/edit/id/%d\"));\r\n\t\t\t\t\n\t\t\t\t$records = Customers::Hitparade();\n\t\t\t\t$widget->setBasepath('/admin/customers/')->setIdxfield($records['index'])->setButtons($buttons);;\n\t\t\t\n\t\t\t// get the customer status summary\n\t\t\t}elseif($type == 'customer_summary_widget'){\n\t\t\t\n\t\t\t\t$records = Customers::summary();\n\t\t\t\n\t\t\t// get the tickets summary\n\t\t\t}elseif($type == 'ticket_summary_widget'){\n\t\t\t\n\t\t\t\t$records = Tickets::summary();\n\t\t\t\t\n\t\t\t// get the domains summary\n\t\t\t}elseif($type == 'summary_domains_widget'){\n\t\t\t\n\t\t\t\t$records = Domains::summary();\n\t\t\t\t\n\t\t\t// get the product reviews stats\n\t\t\t}elseif($type == 'product_reviews_widget'){\n\t\t\t\n\t\t\t\t$records = Reviews::summary();\n\t\t\t\t\n\t\t\t// get the bestseller product stats\n\t\t\t}elseif($type == 'bestseller_widget'){\n\t\t\t\t\n\t\t\t\t$buttons = array('edit' => array('label' => $translator->translate ( 'Show' ), 'cssicon' => 'glyphicon glyphicon-pencil', 'action' => \"/admin/products/edit/id/%d\"));\r\n\t\t\t\t\n\t\t\t\t$records = Products::summary();\n\t\t\t\t$widget->setBasepath('/admin/products/')->setIdxfield($records['index'])->setButtons($buttons);;\n\t\t\t\t\n\t\t\t// get the last ISP notes\n\t\t\t}elseif($type == 'notes_widget'){\n\t\t\t\t$user = $auth->getIdentity();\n\t\t\t\t$records = Notes::summary($user['user_id']);\n\t\t\t\t$widget->setBasepath('/admin/notes/');\n\t\t\t\t\r\n\t\t\t}else{\n\t\t\t\tdie('No widget type has been selected: ' . $type);\n\t\t\t}\n\t\t\t\n\t\t\t\r\n\t\t\t// Records Builtin columns. The code get the field names as header column name\r\n\t\t\tif(!empty($records['fields'])){\r\n\t\t\t\tforeach ($records['fields'] as $field => $column) {\n\t\t\t\t\t$column['alias'] = !empty($column['alias']) ? $column['alias'] : $field;\n\t\t\t\t\t$widget->setColumn($field, $column);\r\n\t\t\t\t}\r\n\t\t\t}\n\t\t\t\n\t\t\tif(!empty($records['data'])){\n\t\t\t\t\n\t\t\t\t$widget->setIcon($icon)->setLabel($title)->setRecords($records['data']);\r\n\t\t\t\tdie($widget->create());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tdie();\n\t}", "function getWidgets()\n {\n return [\n 'vardump' => [\n 'widget' => 'PhpDebugBar.Widgets.TYPO3GenericWidget',\n 'map' => 'vardump',\n 'default' => '',\n ],\n ];\n }", "protected function _getAvailableWidgets()\n {\n $result = array();\n $allWidgets = Mage::getModel('widget/widget')->getWidgetsArray();\n\n $skipped = $this->_getSkippedWidgets();\n foreach ($allWidgets as $widget) {\n if (is_array($skipped) && in_array($widget['type'], $skipped)) {\n continue;\n }\n $result[] = $widget;\n }\n\n return $result;\n }", "public function get_widget()\n {\n \tif ($this->options['widget_class']) {\n \t $widgetCls = $this->options['widget_class'];\n \t return new $widgetCls($this->choices);\n \t}\n else return new MultiSelectWidget($this->choices);\n }", "public function getWidgetData()\n {\n $widgets = array();\n foreach ($this->getModel()->Widget->fetch(0, 0, 'plugin', 'ASC') as $widget) {\n // skip if plugin of the widget is not enabled\n if (!$widget_plugin = $this->_application->getPlugin($widget->plugin)) continue;\n if (!$widget_plugin instanceof Plugg_User_Widget) continue;\n\n $widgets[$widget->id] = array(\n 'id' => $widget->id,\n 'name' => $widget->name,\n 'title' => $widget_plugin->userWidgetGetTitle($widget->name),\n 'summary' => $widget_plugin->userWidgetGetSummary($widget->name),\n 'settings' => $widget_plugin->userWidgetGetSettings($widget->name),\n 'plugin' => $widget_plugin->nicename,\n 'is_private' => $widget->isType(self::WIDGET_TYPE_PRIVATE),\n );\n }\n\n return $widgets;\n }", "public function widgets_registered() {\n if( defined('ELEMENTOR_PATH') && class_exists('Elementor\\Widget_Base') ){\n $path = <%= plugin_prefix %>_PLUGIN_PLUGIN_PATH.'modules/*/widgets';\n $module_name = glob($path.'/widget-*.php');\n foreach ( $module_name as $widget ) {\n require_once( $widget );\n }\n }\n }", "private function readWidgets() {\n $this->widgets = array();\n\n $widgets = Zibo::getInstance()->getConfigValue(self::CONFIG_WIDGETS);\n foreach ($widgets as $namespace => $widgetClasses) {\n if (!array_key_exists($namespace, $this->widgets)) {\n $this->widgets[$namespace] = array();\n }\n\n if (!is_array($widgetClasses)) {\n throw new ZiboException('Invalid widget configuration for namespace ' . $namespace . '. A widget class is defined by the widget.<namespace>.<name> configuration key.');\n }\n\n foreach ($widgetClasses as $name => $widgetClass) {\n $this->widgets[$namespace][$name] = $widgetClass;\n }\n }\n }", "public function buildWidgets()\n\t{\n\t\tglobal $venus;\n\t\t$widgets_count = $this->app->db->count('venus_widgets', 'WHERE status = 1');\n\n\t\t$this->update('widgets_count', $widgets_count, 'frontend');\n\n\t\treturn $this;\n\t}", "function _mw_adminimize_get_dashboard_widgets() {\n\n\tglobal $wp_meta_boxes;\n\n\t$widgets = array();\n\tif ( ! isset( $wp_meta_boxes[ 'dashboard' ] ) ) {\n\t\treturn $widgets;\n\t}\n\n\tforeach ( $wp_meta_boxes[ 'dashboard' ] as $context => $datas ) {\n\t\tforeach ( $datas as $priority => $data ) {\n\t\t\tforeach ( $data as $widget => $value ) {\n\t\t\t\t$widgets[ $widget ] = array(\n\t\t\t\t\t'id' => $widget,\n\t\t\t\t\t'title' => strip_tags(\n\t\t\t\t\t\tpreg_replace( '/( |)<span.*span>/im', '', $value[ 'title' ] )\n\t\t\t\t\t),\n\t\t\t\t\t'context' => $context,\n\t\t\t\t\t'priority' => $priority\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $widgets;\n}", "function aton_qodef_load_widgets() {\n\t\t\n foreach(glob(QODE_FRAMEWORK_ROOT_DIR.'/modules/widgets/*/load.php') as $widget_load) {\n include_once $widget_load;\n }\n\n include_once QODE_FRAMEWORK_MODULES_ROOT_DIR.'/widgets/lib/widget-loader.php';\n }", "function wp_list_widgets()\n{\n}", "protected function getInstalledWidgets()\n {\n $installedWidgets = [];\n $widgetManager = Artificer::widgetManager();\n $widgets = $this->getOption('widgets', []);\n\n foreach ($widgets as $widget) {\n if ($widgetManager->isInstalled($widget)) {\n $installedWidgets[] = $widget;\n }\n }\n\n return $installedWidgets;\n }", "private function _check_widgets_for_clients() {\n\n $widget = array();\n\n $options = array(\"id\" => $this->login_user->client_id);\n $client_info = $this->Clients_model->get_details($options)->row();\n $hidden_menu = explode(\",\", get_setting(\"hidden_client_menus\"));\n\n $show_invoice_info = get_setting(\"module_invoice\");\n $show_events = get_setting(\"module_event\");\n\n $widget['show_invoice_info'] = $show_invoice_info;\n $widget['hidden_menu'] = $hidden_menu;\n $widget['client_info'] = $client_info;\n $widget['client_id'] = $client_info->id;\n $widget['page_type'] = \"dashboard\";\n\n if ($show_invoice_info) {\n if (!in_array(\"projects\", $hidden_menu)) {\n $widget[\"total_projects\"] = true;\n }\n if (!in_array(\"invoices\", $hidden_menu)) {\n $widget[\"total_invoices\"] = true;\n }\n if (!in_array(\"payments\", $hidden_menu)) {\n $widget[\"total_payments\"] = true;\n $widget[\"total_due\"] = true;\n }\n }\n\n if (!in_array(\"projects\", $hidden_menu)) {\n $widget[\"open_projects_list\"] = true;\n }\n\n if ($show_events && !in_array(\"events\", $hidden_menu)) {\n $widget[\"events\"] = true;\n }\n\n if ($show_invoice_info && !in_array(\"invoices\", $hidden_menu)) {\n $widget[\"invoice_statistics\"] = true;\n }\n\n if ($show_events && !in_array(\"events\", $hidden_menu)) {\n $widget[\"events_today\"] = true;\n }\n\n if (get_setting(\"module_todo\")) {\n $widget[\"todo_list\"] = true;\n }\n\n if (!in_array(\"tickets\", $hidden_menu) && get_setting(\"module_ticket\") && $this->access_only_allowed_members_or_client_contact($this->login_user->client_id)) {\n $widget[\"new_tickets\"] = true;\n $widget[\"open_tickets\"] = true;\n $widget[\"closed_tickets\"] = true;\n }\n\n //universal widgets\n $widget[\"sticky_note\"] = true;\n\n return $widget;\n }", "private function findModuleWidgets()\n {\n $yicmsModules = [];\n\n foreach (Yii::$app->modules as $module) {\n if (!$module instanceof YicmsModuleInterface) continue;\n $yicmsModules[] = $module;\n }\n\n $resultClasses = [];\n\n /** @var AbstractConfigurableModule $yicmsModule */\n foreach ($yicmsModules as $yicmsModule) {\n if ($this->getMode() == self::DEV_MODE) {\n $class = $yicmsModule->getNameSpace() . '\\Widgets\\ModuleDevMenuWidget';\n } else {\n $class = CommonModule::getInstance()->yicmsNamespace . '\\\\' .\n $yicmsModule->getModuleName() . '\\Widgets\\ModuleMenuWidget';\n }\n\n if (class_exists($class)) {\n /** @var $class AbstractModuleMenuWidget */\n $resultClasses[strtolower($yicmsModule::getModuleName())] = $class;\n }\n }\n\n return $resultClasses;\n }", "public function widgetsGetWidgetNames()\n {\n return array(\n 'user_menu' => Plugg_Widgets_Plugin::WIDGET_TYPE_REQUIRE_AUTHENTICATED,\n 'login' => Plugg_Widgets_Plugin::WIDGET_TYPE_CACHEABLE | Plugg_Widgets_Plugin::WIDGET_TYPE_REQUIRE_ANONYMOUS\n );\n }", "public static function load_widgets() {\r\n\t register_widget('DHL_Widget');\r\n\t}", "function WidgetGetWidgetWithWID ($wid) {\n global $XCOW_B;\n\n $widget = array();\n\n $result = mysql_query(\"SELECT AuthWidget.AuthWidgetId, AuthWidget.AuthWidgetWID, AuthWidget.AuthWidgetOwner, AuthWidget.AuthWidgetName, AuthWidget.AuthWidgetKey, AuthWidget.AuthWidgetNetwork, AuthWidget.AuthWidgetLanguage From AuthWidget WHERE AuthWidgetWID = '$wid'\", $XCOW_B['mysql_link']);\n\n if ($result) {\n if (mysql_num_rows($result) == 1 ) {\n\t\t\t\t$result_row = mysql_fetch_row($result);\n\t\t\t\t$widget['id'] = $result_row[0];\n \t\t\t\t$widget['wid'] = $result_row[1];\n \t\t\t\t$widget['owner'] = $result_row[2];\n \t\t\t\t$widget['name'] = $result_row[3];\n \t\t\t\t$widget['key'] = $result_row[4];\n \t\t\t\t$widget['network'] = $result_row[5];\n \t\t\t\t$widget['language'] = $result_row[6];\n }\n }\n\t\telse {\n\t\t\tcatchMysqlError(\"WidgetGetWidgetWithWID\", $XCOW_B['mysql_link']);\n\t\t}\n\n return $widget;\n}", "function related_posts_Widget() {\n\n /* Widget settings. */\n $widget_ops = array('classname' => 'related_posts_widget', 'description' => __('Show Related Posts By Tags', 'kino'));\n\n /* Widget control settings. */\n $control_ops = array('width' => 300, 'height' => 350, 'id_base' => 'related_posts_widget');\n\n /* Create the widget. */\n $this->WP_Widget('related_posts_widget', __('Related Posts By Tags', 'kino'), $widget_ops, $control_ops);\n }", "function get_widgets($widget_folder = '') {\n get_plugins();\n\n $tp_widgets = array();\n $widget_root = $this->transposh->transposh_plugin_dir . \"widgets\";\n if (!empty($widget_folder))\n $widget_root = $widget_folder;\n\n // Files in wp-content/widgets directory\n $widgets_dir = @opendir($widget_root);\n $widget_files = array();\n if ($widgets_dir) {\n while (($file = readdir($widgets_dir) ) !== false) {\n if (substr($file, 0, 1) == '.')\n continue;\n if (is_dir($widget_root . '/' . $file)) {\n $widgets_subdir = @ opendir($widget_root . '/' . $file);\n if ($widgets_subdir) {\n while (($subfile = readdir($widgets_subdir) ) !== false) {\n if (substr($subfile, 0, 1) == '.')\n continue;\n if (substr($subfile, 0, 4) == TRANSPOSH_WIDGET_PREFIX && substr($subfile, -4) == '.php')\n $widget_files[] = \"$file/$subfile\";\n }\n }\n }\n if (substr($file, 0, 4) == TRANSPOSH_WIDGET_PREFIX && substr($file, -4) == '.php')\n $widget_files[] = $file;\n }\n } else {\n return $tp_widgets;\n }\n\n @closedir($widgets_dir);\n @closedir($widgets_subdir);\n\n if (empty($widget_files))\n return $tp_widgets;\n\n foreach ($widget_files as $widget_file) {\n if (!is_readable(\"$widget_root/$widget_file\"))\n continue;\n\n $widget_data = get_plugin_data(\"$widget_root/$widget_file\", false, false); //Do not apply markup/translate as it'll be cached.\n\n if (empty($widget_data['Name']))\n continue;\n\n $tp_widgets[plugin_basename($widget_file)] = $widget_data;\n }\n\n uasort($tp_widgets, create_function('$a, $b', 'return strnatcasecmp( $a[\"Name\"], $b[\"Name\"] );'));\n\n return $tp_widgets;\n }", "public function getWidgetData ();", "function getWidgetType() {\n return $this->widgetType;\n }", "function getWidgets($canbeempty = false, $user_id = null) {\n global $DB;\n\n if (!isset($user_id)) {\n $user_id = $this->user_id;\n }\n $query = \"SELECT `name` FROM `\" . $this->getTable() . \"` \"\n . \"LEFT JOIN `glpi_plugin_mydashboard_widgets` \"\n . \"ON `\" . $this->getTable() . \"`.`widgets_id` = `glpi_plugin_mydashboard_widgets`.`id` \"\n . \"WHERE `\" . $this->getTable() . \"`.`users_id` = '\" . $user_id . \"' \"\n . \"AND `profiles_id` = '$this->profile_id' \";\n $result = $DB->query($query);\n\n $tab = [];\n while ($row = $DB->fetchArray($result)) {\n array_push($tab, $row['name']);\n }\n if (!$canbeempty && count($tab) == 0) {\n return $this->getWidgets(true, 0);\n }\n return $tab;\n }", "public function getWidget(){\n\t\t//require\n\t\trequire_once(DIR_WIDGET.'pagination/model/pagination.php');\n\t\t$oModel = new widgetPaginationModel($this->total, $this->start, $this->max, $this->linkId);\n\t\t//get the data\n\t\t$this->data = $oModel->getData();\n\t\tif(!$this->data){\n\t\t\treturn false;\n\t\t\t}\n\t\treturn true; \n\t\t}", "function kmr_get_all_widgets() {\n $widgets = kmr_get_data('widget');\n wp_send_json( $widgets );\n}", "public static function get_saved_global_widgets() {\r\n\r\n $widgets = get_posts(\r\n [\r\n 'post_type' => 'elementor_library',\r\n 'posts_per_page' => -1,\r\n 'tax_query' => array(\r\n array(\r\n 'taxonomy' => 'elementor_library_type',\r\n 'field' => 'name',\r\n 'terms' => 'widget',\r\n )\r\n )\r\n ]\r\n );\r\n\r\n $options = [];\r\n\r\n if ( ! empty( $widgets ) && ! is_wp_error( $widgets ) ) {\r\n foreach ( $widgets as $w ) {\r\n $options[$w->ID] = $w->post_title;\r\n }\r\n }\r\n\r\n return $options;\r\n\r\n }", "private function customWidgets()\n {\n return [\n 'parent_slug' => 'alecaddd_plugin',\n 'page_title' => 'Custom Widgets',\n 'menu_title' => 'Widgets',\n 'capability' => 'manage_options',\n 'menu_slug' => 'alecaddd_widgets',\n 'callback' => function(){echo '<h1>Widgets</h1>';},\n ];\n }", "public function widgets_init() {\n global $wp_properties;\n\n // Load and register widgets\n Utility::maybe_load_widgets( $this->get( '_computed.path.root' ) . '/lib/widgets' );\n\n //** Register a sidebar for each property type */\n if( $wp_properties[ 'configuration' ][ 'do_not_register_sidebars' ] != 'true' ) {\n foreach( (array) $wp_properties[ 'property_types' ] as $property_slug => $property_title ) {\n register_sidebar( array(\n 'name' => sprintf( __( 'Property: %s', $this->text_domain ), $property_title ),\n 'id' => \"wpp_sidebar_{$property_slug}\",\n 'description' => sprintf( __( 'Sidebar located on the %s page.', $this->text_domain ), $property_title ),\n 'before_widget' => '<li id=\"%1$s\" class=\"wpp_widget %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ));\n }\n }\n\n }", "function get_registered_widgets()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $cache = new File(CLEAROS_CACHE_DIR . '/' . Dashboard_Helper::FILE_CACHE_USER_DASHBOARD_WIDGETS);\n\n if ($cache->exists())\n $lastmod = $cache->last_modified();\n else\n $lastmod = 0;\n\n if ($lastmod && (time() - $lastmod < Dashboard_Helper::CACHE_TIME_SECONDS)) {\n $raw_list = $cache->get_contents_as_array();\n\n // Don't return empty line as widget entry\n if (empty($raw_list[0]))\n return [];\n else\n return $raw_list;\n }\n\n $app_list = clearos_get_apps();\n $widget_list = [];\n\n foreach ($app_list as $meta) {\n unset($app);\n $info_file = clearos_app_base($meta['basename']) . '/deploy/info.php';\n if (!file_exists($info_file))\n continue;\n\n include($info_file);\n\n // Re-init array\n if (!isset($app['user_dashboard_widgets']))\n continue;\n\n // Check that the UI package is installed (containing widget controller)\n $software = new Software(\"app-\" . preg_replace(\"/_/\", \"-\", $app['basename']));\n\n if (!$software->is_installed())\n continue;\n\n $widget_list = array_merge_recursive($widget_list, $app['user_dashboard_widgets']);\n }\n\n if (!$cache->exists())\n $cache->create('webconfig', 'webconfig', 644);\n\n $cache->dump_contents_from_array($widget_list);\n\n return $widget_list;\n }", "public function GetAllWidgetDefinitions() {\r\n\r\n $response = $this->portal->GetAllWidgetDefinitionsRequest($this->accesskeyId, $this->associationId, $this->secretaccessId\r\n );\r\n return $response;\r\n }", "protected function _getSkippedWidgets()\n {\n \t$registry = ObjectManager::getInstance()->get(\\Magento\\Framework\\Registry::class);\n return $registry->registry('skip_widgets');\n }", "public function render_widgets() {\n\t\t\tinclude $this->find_html_file( 'widgets.php' );\n\t\t}", "public function setWidgets() {\n\t\t/*\n\t\t * $widgets = unserialize($this->o_control->o_config->getParam('widgets'));\n\t\t * if(is_array($widgets))\n\t\t * {\n\t\t * foreach ($widgets as $value)\n\t\t * {\n\t\t * $o_widget = new stdClass();\n\t\t * $path = \"sistema/widgets/\".$value.\".php\";\n\t\t * if(file_exists($path))\n\t\t * {\n\t\t * var_dump($this);\n\t\t * $o_widget->name = $value;\n\t\t * $o_widget->view = $path;\n\t\t * ob_start();\n\t\t * require_once $o_widget->view;\n\t\t * $o_widget->stream = ob_get_clean();\n\t\t * $this->v_widgets[$o_widget->name] = $o_widget;\n\t\t * }\n\t\t * else\n\t\t * throw new DException('arquivo '.$value.' não encontrado');\n\t\t *\n\t\t * }\n\t\t * }\n\t\t */\n\t}", "public function get_all_widgets()\n {\n global $engine;\n // Set dirs\n $dir = array(\n 'mobile' => $engine->path . 'mobile/widgets',\n 'admin' => $engine->path . 'admin/widgets',\n 'standard' => $engine->path . 'widgets'\n );\n // Go through dirs\n foreach ($dir as $key => $val) {\n // Open dir\n $handle = opendir($val);\n // Precreate array\n $found[$key] = array();\n if ($handle) {\n /* This is the correct way to loop over the directory. */\n while (false !== ($file = readdir($handle))) {\n // Go through dir\n if ($file != \".\" && $file != \"..\") {\n // Add founded in to array\n if (is_dir($val . \"/\" . $file)) {\n $found[$key][] = $file;\n }\n }\n }\n sort($found[$key]);\n // Close handler\n closedir($handle);\n }\n }\n return $found;\n }", "public function widgets( ) {\n $sidebar_config = array(\n 'name' => __('Sidebar', 'hoverboard'),\n 'id' => 'main-sidebar',\n 'description' => __('The primary widget area', 'hoverboard'),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n );\n register_sidebar($sidebar_config);\n\n do_action('hoverboard/widgets');\n }", "function user_widgets( $ui=false )\n\t{\n\t\t$ci =& get_instance();\n\t\tif ( !$ui ) {\n\t\t\treturn false;\n\t\t}\n\t\t$module = $ui['module'];\n\t\t$module_id = $ui['module_id'];\n\t\t$user_widgets = array();\n\t\t$ci->db->from ( 'widgets as w' );\n\t\t$ci->db->join( 'user_widgets as u', 'w.widget_id = u.widget_id','left' );\n\t\t$ci->db->join( 'widget_structure as s', 'w.widget_id = s.widget_id','left' );\n\t\t$ci->db->where( 's.module_id', $module_id );\n\t\tif ( $ui['group_id'] == GROUP_CUSTOM ) {\n\t\t\t$ci->db->where( 'u.user_id', $ui['id'] );\n\t\t}\n\t\telse {\n\t\t\t$ci->db->where( 'u.user_id', $ui['group_id'] );\n\t\t}\n\t\t$query = $ci->db->get();\n\t\t$results = $query->result_array();\n\t\t$user_widgets = array();\n\t\tforeach ( $results as $widget ) {\n\t\t\t$user_widgets[$widget['widget_id']] = $widget;\n\t\t}\n\t\treturn $user_widgets;\n\t}", "private function get_widget_obj( $id_base ) {\n\t\tglobal $wp_widget_factory;\n\n\t\t$widget = wp_filter_object_list( $wp_widget_factory->widgets, array( 'id_base' => $id_base ) );\n\t\tif ( empty( $widget ) ) {\n\t\t\tfalse;\n\t\t}\n\n\t\treturn array_pop( $widget );\n\t}", "public function getWidgetConfig(): array\n {\n return $this->contentRunner->getWidgetConfig();\n }", "public function getWidget(){\n\t\t//require\n\t\trequire_once(DIR_WIDGET.'module/model/module.php');\n\t\t$oModel = new widgetModuleModel($this->reg, $this->glob, $this->wname);\n\t\t//get the data\n\t\t$this->data = $oModel->getData();\n\t\t//si pas bon ou pas la\t\n\t\tif(!count($this->data)){\n\t\t\treturn false;\n\t\t\t}\n\t\t//ok\n\t\treturn true; \n\t\t}", "static function get_widget_instances_by_widgetid($widgetid)\n {\n global $db;\n\n // check the widget\n if ($w = widgets::get_widget_by_id($widgetid)) {\n // grab the entries and push them into an array\n $result = array();\n $sql = sprintf(\"SELECT * FROM `%s`\", api::cleanse($w['table']));\n $query = mysqli_query($db, $sql);\n while ($cur = mysqli_fetch_assoc($query)) {\n $result[] = $cur;\n }\n return (count($result) === 0) ? null : $result;\n }\n\n // none found\n return null;\n }", "function theme_load_widgets() {\r\n\tregister_widget ( 'Related_Content' );\r\n}", "function cms_load_widget_admin()\n {\n // get list widget admin status = 1\n $listWidget = Cache::remember('list_widget_admin', 30, function () {\n return AdminWidget::where('status', 1)->get();\n });\n\n if ($listWidget) {\n foreach ($listWidget as $widget) {\n $widget['config'] = json_decode($widget['config'] ? $widget['config'] : '[]', true);\n // add widget to group\n Widget::group($widget['group'])->position($widget['order'])->addWidget($widget['module'] . '::' . $widget['name'], $widget);\n }\n }\n }", "function jetpack_load_widgets() {\n\t$widgets_include = array();\n\n\tforeach ( Jetpack::glob_php( dirname( __FILE__ ) . '/widgets' ) as $file ) {\n\t\t$widgets_include[] = $file;\n\t}\n\t/**\n\t * Modify which Jetpack Widgets to register.\n\t *\n\t * @module widgets\n\t *\n\t * @since 2.2.1\n\t *\n\t * @param array $widgets_include An array of widgets to be registered.\n\t */\n\t$widgets_include = apply_filters( 'jetpack_widgets_to_include', $widgets_include );\n\n\tforeach( $widgets_include as $include ) {\n\t\tinclude_once $include;\n\t}\n\n\tinclude_once dirname( __FILE__ ) . '/widgets/migrate-to-core/image-widget.php';\n\tinclude_once dirname( __FILE__ ) . '/widgets/migrate-to-core/gallery-widget.php';\n}", "public function getWidget (S $objWidgetTitle = NULL) {\n // If NULL, return the array;\n if ($objWidgetTitle == NULL) return $this->objWidgets;\n\n // Foreach\n foreach ($this->objWidgets as $objK => $objV) {\n // Check\n if ($objV['title'] == $objWidgetTitle) {\n return $this->objWidgets[$objK];\n break;\n }\n }\n }", "function get_widgets_supporting_partial_refresh() {\r\n\t\t$supporting_id_bases = array();\r\n\t\tforeach ( $this->get_all_widget_id_bases() as $id_base ) {\r\n\t\t\tif ( $this->is_widget_partial_refreshable( $id_base ) ) {\r\n\t\t\t\t$supporting_id_bases[] = $id_base;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $supporting_id_bases;\r\n\t}", "public function getDefaultWidgets(): array\n {\n return [\n new ChatWidget(),\n new DefaultWidget(),\n new CustomCallWidget(),\n new StreamViewWidget()\n ];\n }", "public function getWidgetType();" ]
[ "0.7970795", "0.7870028", "0.7433518", "0.70230496", "0.69990826", "0.688616", "0.6818183", "0.6805564", "0.67649734", "0.671094", "0.66766655", "0.6614714", "0.65879047", "0.6585971", "0.65469575", "0.65462846", "0.65003264", "0.6449036", "0.6380786", "0.6374876", "0.63687986", "0.6361574", "0.6336027", "0.63318413", "0.6326376", "0.6263956", "0.6193038", "0.6176934", "0.61209005", "0.61012405", "0.6067645", "0.6057012", "0.6037145", "0.6014818", "0.60085344", "0.59881955", "0.5972998", "0.59617424", "0.5956868", "0.5947376", "0.5931399", "0.59070486", "0.58805233", "0.588015", "0.58415323", "0.58404964", "0.5839211", "0.5831732", "0.5819958", "0.5809975", "0.5797129", "0.5774471", "0.5751842", "0.5736416", "0.56845576", "0.56707555", "0.5631137", "0.5606123", "0.5586651", "0.55848753", "0.5577092", "0.55770165", "0.5565133", "0.55610865", "0.5555572", "0.5555481", "0.5535844", "0.5519582", "0.5511897", "0.55083233", "0.55069333", "0.55017996", "0.5493521", "0.5485996", "0.5484261", "0.5476092", "0.54759246", "0.5467735", "0.54649645", "0.5434552", "0.5433481", "0.5429962", "0.54279274", "0.5422415", "0.5421209", "0.5415635", "0.5401767", "0.54016984", "0.5398404", "0.5396033", "0.53915286", "0.5387476", "0.5383506", "0.5369388", "0.53597337", "0.53475356", "0.5344452", "0.5338746", "0.5321785" ]
0.80992025
0
Render the content on the theme customizer page
Отобразить содержимое на странице настроек темы
public function render_content() { ?> <label> <span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span> <?php $settings = array( 'media_buttons' => false, 'quicktags' => false ); $this->filter_editor_setting_link(); wp_editor($this->value(), $this->id, $settings ); ?> </label> <?php do_action('admin_footer'); do_action('admin_print_footer_scripts'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render_content() {\n?>\n\t <label>\n\t <span class=\"customize-control-title\"><?php echo esc_html($this->label); ?></span>\n<?php\n\t $settings = array('media_buttons' => true, 'drag_drop_upload' => true);\n\t $this->filter_editor_setting_link();\n\t wp_editor($this->value(), $this->id, $settings);\n?>\n\t </label>\n<?php\n do_action('admin_footer');\n do_action('admin_print_footer_scripts');\n }", "public function render_content() {\r\n\t\t?>\r\n\t <span class=\"customize-control-title\">\r\n\t\t\t<?php echo esc_html($this->label); ?>\r\n\t\t</span>\r\n\r\n\t\t<?php if ($this->description) {?>\r\n\t\t\t<span class=\"description customize-control-description\">\r\n\t\t\t<?php echo wp_kses_post($this->description); ?>\r\n\t\t\t</span>\r\n\t\t<?php }\r\n\r\n\t\techo $this->create_plugin_install_button($this->slug);\r\n\t}", "public function render_content() {\n\n\t \techo '<br />';\n\t echo '<span class=\"customize-control-title\">' . esc_html( $this->label ) . '</span>';\n\t echo '<p class=\"description\">' . $this->description . '</p>';\n\t echo '<hr />';\n\n\t }", "protected function render() {\n\t\twoodmart_elementor_infobox_carousel_template( $this->get_settings_for_display() );\n\t}", "protected function render() {\n $settings = $this->get_settings_for_display();\n //echo '<pre>'; var_dump($settings['gallery_group_1']);\n ?>\n <!--CTA Section-->\n <section class=\"cta-overflow-hidden\">\n <div class=\"banner\">\n <div class=\"img-wrapper\">\n <img src=\"<?= $settings['image']['url'] ?>\" alt=\"\">\n </div>\n <div class=\"card-wrapper\">\n <div class=\"spin\">\n <span><?= $settings['section_title'] ?></span>\n <p><?= $settings['section_description'] ?></p>\n <a class=\"get-started button\" href=\"<?= $settings['cta_link'] ?>\"><?= $settings['cta_text'] ?></a>\n </div>\n </div>\n </div>\n </section>\n <?php\n }", "public function render_content() {\n\tif ( empty( $this->choices ) )\n\treturn;\n\n\t$setting = $this->choices;\n\n\t?>\n\t<label>\n\t\t<div class=\"customize-control-<?php echo esc_html( $this->type ); ?> \">\n\t \t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t<label>\n\t\t\t\t<div class=\"wide-slider-range\" data-max=\"<?php echo esc_attr( $setting['max'] );?>\" data-min=\"<?php echo esc_attr( $setting['min'] );?>\" data-step=\"<?php echo esc_attr( $setting['step'] );?>\"></div>\n\t\t\t\t<input type=\"text\" class=\"wide-slider-range-input\" name=\"wide_<?php echo esc_attr( $this->type ); ?>\" value=\"<?php echo esc_attr( intval($this->value()) ); ?>\" data-id=\"<?php echo esc_attr($this->id); ?>\" />\n\t\t\t</label>\n\t\t</div>\n\t</label>\n\t<?php }", "public function render_content() { ?>\n\t\t<label>\n\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t<?php $settings = array(\n\t\t\t\t'textarea_name'\t=> $this->id,\n\t\t\t\t'media_buttons'\t=> false,\n\t\t\t\t'teeny'\t\t\t=> true,\n\t\t\t);\n\t\t\twp_editor($this->value(), $this->id, $settings ); ?>\n\t\t</label>\n\t<?php\n\t}", "public function render_content()\n {\n $name = '_customize-modal-' . $this->id;\n\n $default = isset($this->setting->default) ? $this->setting->default : array();\n\n $value_array = $this->value();\n\n if (!is_array($value_array)) {\n\n $value_array = $default;\n }\n $json_value = yatri_maybe_json_encode($value_array);\n\n $added_sections = wp_list_pluck($value_array, 'section');\n\n ?>\n <div class=\"yatri-builder-control\">\n <?php\n $this->field_header();\n ?>\n <div class=\"yatri-builder-content-wrap\">\n <input type=\"hidden\"\n name=\"<?php echo esc_attr($name); ?>\"\n id=\"<?php echo esc_attr($this->id) ?>\"\n data-default='{}'\n value='<?php echo $json_value; ?>'\n data-customize-setting-link=\"<?php echo esc_attr($this->id); ?>\"\n class=\"yatri_customizer_builder_minified_results\"/>\n <div class=\"yatri-builder-sections\">\n\n <?php\n foreach ($this->fields as $section_key => $section) {\n\n $title = isset($section['title']) ? $section['title'] : '';\n\n if (!in_array($section_key, $added_sections)) {\n\n $this->get_section_item_html($section_key, $title);\n }\n }\n ?>\n </div>\n <p class=\"yatri-drag-drop-notice\"><?php echo esc_html__('Drag & drop above item here', 'yatri'); ?> </p>\n <div class=\"yatri-builder-dropper\">\n <?php\n $number_of_grid = 3;\n ?>\n <div class=\"yatri-builder-drop-area\">\n <?php for ($grid_num = 0; $grid_num < $number_of_grid; $grid_num++) { ?>\n <div class=\"grid grid-<?php echo absint($grid_num); ?>\"\n data-column=\"<?php echo 'col_' . ($grid_num) ?>\">\n <p><?php echo sprintf(esc_html__('Grid %d Width', 'yatri'), absint($grid_num + 1)); ?></p>\n <?php\n $grid_content = isset($value_array[$grid_num]) ? $value_array[$grid_num] : array();\n\n $section_id = isset($grid_content['section']) ? $grid_content['section'] : '';\n\n $width = isset($grid_content['width']) ? $grid_content['width'] : '';\n ?>\n <div class=\"grid-width\">\n <input type=\"text\" class=\"column-width\" value=\"<?php echo esc_attr($width); ?>\"\n />\n <span>%</span>\n </div>\n <div class=\"grid-content\">\n <?php\n if (!empty($section_id) && isset($this->fields[$section_id])) {\n\n $grid_section_title = isset($this->fields[$section_id]['title']) ? $this->fields[$section_id]['title'] : '';\n\n $this->get_section_item_html($section_id, $grid_section_title);\n\n }\n ?>\n </div>\n </div>\n <?php } ?>\n </div>\n </div>\n </div>\n\n\n </div>\n <?php\n }", "function ju_misc_customizer_section( $wp_customize ){\n\n //Database settings\n $wp_customize->add_setting('ju_header_show_search', [\n 'default' => 'yes',\n 'transport' => 'postMessage'\n ]);\n\n $wp_customize->add_setting('ju_header_show_cart', [\n 'default' => 'yes',\n 'transport' => 'postMessage'\n ]);\n\n $wp_customize->add_setting('ju_footer_copyright_text', [\n 'default' => 'Copyrights &copy; 2019 All Rights Reserved.',\n ]);\n\n $wp_customize->add_setting('ju_footer_tos_page', [\n 'default' => 0,\n ]);\n\n $wp_customize->add_setting('ju_footer_privacy_page', [\n 'default' => 0,\n ]);\n\n $wp_customize->add_setting('ju_read_more_color', [\n 'default' => '#1ABC9C'\n ]);\n\n $wp_customize->add_setting('ju_report_file', [\n 'default' => ''\n ]);\n $wp_customize->add_setting('ju_show_header_popular_posts',[\n 'default' => false\n ]);\n $wp_customize->add_setting('ju_popular_posts_widget_title',[\n 'default' => 'Braking News'\n ]);\n //section\n $wp_customize->add_section('ju_misc_section', [\n 'title' => __('Misc Settings', 'foreach'),\n 'priority' => 30,\n 'panel' => 'foreach'\n ]);\n\n //Creating the controlors for each setting\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize, 'ju_header_show_search_input', \n array(\n 'label' => __('Show Search Button in Header', 'foreach'),\n 'section' => 'ju_misc_section',\n 'settings' => 'ju_header_show_search',\n 'type' => 'checkbox',\n 'choices' => [\n 'yes' => 'Yes'\n ]\n )\n ));\n\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize, 'ju_header_show_cart_button', \n array(\n 'label' => __('Show Cart Button in Header', 'foreach'),\n 'section' => 'ju_misc_section',\n 'settings' => 'ju_header_show_cart',\n 'type' => 'checkbox',\n 'choices' => [\n 'yes' => 'Yes'\n ]\n )\n ));\n\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize, 'ju_footer_copyright', \n array(\n 'label' => __('Show Cart Button in Header', 'foreach'),\n 'section' => 'ju_misc_section',\n 'settings' => 'ju_footer_copyright_text',\n \n )\n ));\n\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize, 'ju_footer_tos_page_input', \n array(\n 'label' => __('Footer TOS page', 'foreach'),\n 'section' => 'ju_misc_section',\n 'settings' => 'ju_footer_tos_page',\n 'type' => 'dropdown-pages'\n \n )\n ));\n\n $wp_customize->add_control(new WP_Customize_Control(\n $wp_customize, 'ju_footer_privacy_policy', \n array(\n 'label' => __('Privacy policy', 'foreach'),\n 'section' => 'ju_misc_section',\n 'settings' => 'ju_footer_privacy_page',\n 'type' => 'dropdown-pages'\n \n )\n ));\n\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n 'ju_read_more_color_input',\n array(\n 'label' => __('Read more link color', 'foreach'),\n 'section' => 'ju_misc_section',\n 'settings' => 'ju_read_more_color',\n )\n )\n );\n\n \n $wp_customize->add_control(\n new WP_Customize_Image_Control(\n $wp_customize,\n 'ju_report_file_input',\n array(\n 'label' => __( 'File Report', 'foreach' ),\n 'section' => 'ju_misc_section',\n 'settings' => 'ju_report_file',\n \n )\n )\n);\n\n$wp_customize->add_control(\n new WP_Customize_Image_Control(\n $wp_customize,\n 'ju_show_popular_posts_widget_input',\n array(\n 'label' => __( 'Show Header Popular Posts Widget', 'foreach' ),\n 'section' => 'ju_misc_section',\n 'settings' => 'ju_show_header_popular_posts',\n 'type' => 'checkbox',\n 'choices' => [\n 'yes' => __('yes', 'foreach')\n ]\n \n )\n )\n);\n\n$wp_customize->add_control(\n new WP_Customize_Image_Control(\n $wp_customize,\n 'ju_popupar_post_input',\n array(\n 'label' => __( 'Popular posts widget Title', 'foreach' ),\n 'section' => 'ju_misc_section',\n 'settings' => 'ju_popular_posts_widget_title',\n 'type' => 'text'\n \n \n )\n )\n);\n\n\n}", "function my_customizer_styles() { ?>\n <style>\n \n li#customize-control-themesimages_backgroundonesize, li#customize-control-themesimages_backgroundoneopacity,\n li#customize-control-themesimages_backgroundtwosize, li#customize-control-themesimages_backgroundtwoopacity\n {\n margin: -20px 0px 20px 20px;\n padding: 0px 0px 0px 10px;\n border-left: 5px solid #008ec2;\n }\n li#customize-control-themesimages_backgroundtwoopacity {\n padding-top: 10px;\n }\n \n li#customize-control-themescolors_primaryfont, li#customize-control-themescolors_secondaryfont, li#customize-control-themescolors_tertiaryfont {\n margin: 0px 0px 20px 20px;\n padding: 0px 0px 0px 10px;\n border-left: 5px solid #008ec2;\n }\n li#customize-control-themessettings_maintenancemode label {\n font-weight: bold;\n color: red;\n }\n \n li#customize-control-themessettings_maintenancemode label span {\n font-weight: normal;\n }\n \n li#customize-control-archive_html textarea {\n font-family: Courier;\n background-color: #393939 ;\n border-color: #ebccd1 ;\n color: #c99455;\n margin: 10px;\n width: 95%;\n border-radius: 5px 5px 5px 5px;\n -moz-border-radius: 5px 5px 5px 5px;\n -webkit-border-radius: 5px 5px 5px 5px;\n box-shadow: none;\n border-color: #000;\n font-style: italic;\n padding: 15px;\n height: 350px;\n }\n \n </style>\n <?php\n\n}", "function photography_blog_customize_register($wp_customize) {\n\n\t// Load custom controls.\n\trequire get_template_directory().'/inc/customizer/customizer-function.php';\n\n\t$wp_customize->get_setting('blogname')->transport = 'postMessage';\n\t$wp_customize->get_setting('blogdescription')->transport = 'postMessage';\n\n\tif (isset($wp_customize->selective_refresh)) {\n\t\t$wp_customize->selective_refresh->add_partial('blogname', array(\n\t\t\t\t'selector' => '.site-title a',\n\t\t\t\t'render_callback' => 'photography_blog_customize_partial_blogname',\n\t\t\t));\n\t\t$wp_customize->selective_refresh->add_partial('blogdescription', array(\n\t\t\t\t'selector' => '.site-description',\n\t\t\t\t'render_callback' => 'photography_blog_customize_partial_blogdescription',\n\t\t\t));\n\t}\n\t/*theme option panel details*/\n\trequire get_template_directory().'/inc/customizer/theme-option.php';\n // Register custom section types.\n $wp_customize->register_section_type( 'Photography_Blog_Customize_Section_Upsell' );\n\n// Register sections.\n $wp_customize->add_section(new Photography_Blog_Customize_Section_Upsell(\n $wp_customize,\n 'theme_upsell',\n array(\n 'title' => esc_html__( 'Photography Blog Plus', 'photography-blog' ),\n 'pro_text' => esc_html__( 'Buy Pro', 'photography-blog' ),\n 'pro_url' => 'https://unitedtheme.com/themes/photography-blog-plus/',\n 'priority' => 1,\n )\n )\n );\n\n}", "function sp_customizer_output() {\n\n\t// Set in customizer-settings.php.\n\tglobal $sp_colors;\n\n\t// Shorten the name for legibility.\n\t$color = $sp_colors;\n\n\t/**\n\t * Loop though each color in the global array of theme colors\n\t * and create a new variable for each.\n\t *\n\t * @var array $sp_colors See customizer-settings.php\n\t */\n\tforeach ( $color as $id => $hex ) {\n\t\t${\"$id\"} = get_theme_mod( \"sp_{$id}_color\", $hex );\n\t}\n\n\t// Start building CSS.\n\t$css = '';\n\n\t$css .= ( $color['accent'] !== $accent ) ? sprintf( '\n\n\t\ta:hover,\n\t\t.entry-title a:hover,\n\t\t.site-title a:hover,\n\t\t.breadcrumb a:hover,\n\t\t.site-footer a:hover,\n\t\t.site-footer .back-to-top:hover,\n\t\t.genesis-nav-menu .mega-menu .menu-description span:hover,\n\t\t.woocommerce div.product p.price,\n\t\t.woocommerce div.product span.price,\n\t\t.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover,\n\t\t.woocommerce ul.products li.product h3:hover,\n\t\t.woocommerce ul.products li.product .price,\n\t\t.woocommerce .woocommerce-breadcrumb a:hover,\n\t\t.woocommerce .widget_layered_nav ul li.chosen a::before,\n\t\t.woocommerce .widget_layered_nav_filters ul li a::before,\n\t\t.woocommerce .widget_rating_filter ul li.chosen a::before,\n\t\t.woocommerce-error::before,\n\t\t.woocommerce-info::before,\n\t\t.woocommerce-message::before {\n\t\t\tcolor: %1$s;\n\t\t}\n\n\t\tbutton,\n\t\tinput[type=\"button\"],\n\t\tinput[type=\"reset\"],\n\t\tinput[type=\"submit\"],\n\t\t.button,\n\t\t.archive-pagination a:hover,\n\t\t.archive-pagination .active a,\n\t\t.before-header,\n\t\t.before-header .fa-close,\n\t\t.cart-count,\n\t\t.woocommerce a.button:hover,\n\t\t.woocommerce a.button,\n\t\t.woocommerce button.button:hover,\n\t\t.woocommerce button.button,\n\t\t.woocommerce input.button:hover,\n\t\t.woocommerce input.button,\n\t\t.woocommerce input[type=\"submit\"]:hover,\n\t\t.woocommerce input[type=\"submit\"],\n\t\t.woocommerce span.onsale,\n\t\t.woocommerce #respond input#submit:hover,\n\t\t.woocommerce #respond input#submit,\n\t\t.woocommerce input.button[type=submit],\n\t\t.woocommerce input.button[type=submit]:hover,\n\t\t.woocommerce.widget_price_filter .ui-slider .ui-slider-handle,\n\t\t.woocommerce.widget_price_filter .ui-slider .ui-slider-range,\n\t\t.woocommerce .woocommerce-pagination .page-numbers .active a,\n\t\t.woocommerce .woocommerce-pagination .page-numbers a:hover {\n\t\t\tbackground-color: %1$s;\n\t\t\tcolor: %2$s;\n\t\t}\n\n\t\t@media (min-width: 768px) {\n\n\t\t\t.genesis-nav-menu .current-menu-item>a,\n\t\t\t.genesis-nav-menu .sub-menu .current-menu-item>a:hover,\n\t\t\t.genesis-nav-menu a:hover,\n\t\t\t.nav-primary .menu-item a:hover {\n\t\t\t\tcolor: %1$s;\n\t\t\t}\n\t\t}\n\n\t\t', $accent, sp_color_contrast( $accent ) ) : '';\n\n\t$css .= ( $color['links'] !== $links ) ? sprintf( '\n\n\t\ta,\n\t\t.breadcrumb a,\n\t\t.site-footer a,\n\t\t.archive-pagination a {\n\t\t\tcolor: %s;\n\t\t}\n\n\t\t', $links ) : '';\n\n\t$css .= ( $color['body'] !== $body ) ? sprintf( '\n\n\t\tbody,\n\t\tinput,\n\t\tselect,\n\t\ttextarea,\n\t\tbutton:disabled,\n\t\tinput[type=\"button\"]:disabled,\n\t\tinput[type=\"reset\"]:disabled,\n\t\tinput[type=\"submit\"]:disabled,\n\t\t.button:disabled,\n\t\t.breadcrumb,\n\t\t.search-form:before,\n\t\t.search-toggle,\n\t\t.search-toggle:hover,\n\t\t.site-header .fa-shopping-cart,\n\t\t.genesis-nav-menu .mega-menu .menu-description p,\n\t\t.genesis-nav-menu .mega-menu .menu-description span,\n\t\t.woocommerce ul.products li.product .price {\n\t\t\tcolor: %1$s;\n\t\t}\n\n\t\t::-moz-placeholder {\n\t\t\tcolor: %1$s;\n\t\t}\n\n\t\t::-webkit-input-placeholder {\n\t\t\tcolor: %1$s;\n\t\t}\n\n\t\t@media (min-width: 768px) {\n\n\t\t\t.genesis-nav-menu a,\n\t\t\t.nav-primary .menu-item a {\n\t\t\t\tcolor: %1$s;\n\t\t\t}\n\t\t}\n\n\t\tbutton.secondary,\n\t\t.button.secondary,\n\t\tbutton.secondary:hover,\n\t\t.button.secondary:hover,\n\t\t.woocommerce #respond input#submit.alt,\n\t\t.woocommerce #respond input#submit.alt:hover,\n\t\t.woocommerce a.button.alt,\n\t\t.woocommerce a.button.alt:hover,\n\t\t.woocommerce button.button.alt,\n\t\t.woocommerce button.button.alt:hover,\n\t\t.woocommerce input.button.alt,\n\t\t.woocommerce input.button.alt:hover,\n\t\t.woocommerce input.button[type=submit].alt,\n\t\t.woocommerce input.button[type=submit].alt:hover,\n\t\t.menu-toggle .hamburger,\n\t\t.menu-toggle .hamburger:after,\n\t\t.menu-toggle .hamburger:before {\n\t\t\tbackground-color: %1$s;\n\t\t\tcolor: %2$s;\n\t\t}\n\n\t\t', $body, sp_color_contrast( $body ) ) : '';\n\n\t$css .= ( $color['headings'] !== $headings ) ? sprintf( '\n\n\t\th1,\n\t\th2,\n\t\th3,\n\t\th4,\n\t\th5,\n\t\th6,\n\t\t.site-title a,\n\t\t.entry-title a,\n\t\t.widget-title {\n\t\t\tcolor: %1$s;\n\t\t}\n\n\t\t.pricing-table>div.featured h2,\n\t\t.pricing-table>div.featured h3,\n\t\t.pricing-table>div.featured h4,\n\t\t.pricing-table>div.featured h5,\n\t\t.pricing-table>div.featured h6 {\n\t\t\tbackground-color: %1$s;\n\t\t}\n\n\t\t', $headings ) : '';\n\n\t$css .= ( $color['light'] !== $light ) ? sprintf( '\n\n\t\t.nav-secondary,\n\t\t.before-footer,\n\t\t.pricing-table>div ul li:nth-of-type(2n),\n\t\t.pricing-table>div h2,\n\t\t.pricing-table>div h3,\n\t\t.pricing-table>div h4,\n\t\t.pricing-table>div h5,\n\t\t.pricing-table>div h6 {\n\t\t\tbackground-color: %s;\n\t\t}\n\n\t\t', $light ) : '';\n\n\t// Inline CSS handle.\n\t$handle = defined( 'CHILD_THEME_NAME' ) && CHILD_THEME_NAME ? sanitize_title_with_dashes( CHILD_THEME_NAME ) : 'child-theme';\n\n\t// Only output CSS if not empty.\n\tif ( $css ) {\n\t\twp_add_inline_style( $handle, sp_minify_css( $css ) );\n\t}\n\n}", "function mars_customizer_settings( $wp_customize ) {\n\n // Used for information boxes used in the customizer.\n $mars_info_text_style = 'style=\"padding: 15px; background-color: #fbffdb; border: solid 1px #CCC; border-radius: 5px;\"';\n $custom_homepage_description = __('<div ' . $mars_info_text_style . '>Please visit the <a href=\"https://www.unlv.edu/style-guide/wp-documentation\" target=\"_blank\">Custom Homepage Setup Instructions</a> page before using any features within this section.</div>', 'mars');\n\n // Create homepage panel.\n $wp_customize->add_panel( 'panel_front_page', array(\n 'priority' => 100,\n 'capability' => 'edit_theme_options',\n 'theme_supports' => '',\n 'title' => __('Custom Homepage Template', 'mars'),\n 'description' => __('<p>Included with this theme is a custom homepage you can use.</p>' . $custom_homepage_description, 'mars'),\n ) );\n\n // Move \"Homepage Settings\" section into the \"Homepage Settings\" (panel_front_page) panel.\n // Customize section title and priority.\n\n $wp_customize->get_section( 'static_front_page' )->priority = 20;\n /*\n $wp_customize->get_section( 'static_front_page' )->panel = 'panel_front_page';\n $wp_customize->get_section( 'static_front_page' )->title = __( 'Homepage Display Options' );\n */\n\n // Get Tag Line control, we use it as the Short Title.\n $wp_customize->get_control( 'blogdescription' )->description = __( 'This is used for the menu heading and also replaces your \"Site Title\" when your website is displayed on a mobile device or tablet.<br><strong>25 character max.</strong>' );\n\n $wp_customize->get_control( 'blogdescription' )->input_attrs = array( 'maxlength' => 25);\n\n $wp_customize->get_control( 'site_icon' )->description .= '<p><strong>If you do not specify a Site Icon, then a UNLV Site Icon will be used.</strong></p>';\n\n\n // Hero Image Options\n // ##############################################\n\n // Create section Front Page options.\n $wp_customize->add_section( 'mars_frontpage_hero_image' , array(\n 'title' => 'Hero Image Settings',\n 'priority' => 30,\n 'panel' => 'panel_front_page',\n 'description' => $custom_homepage_description,\n ) );\n\n // Create hero image display toggle.\n $wp_customize->add_setting( 'hero_toggle_display' , array(\n 'default' => 'show',\n 'transport' => 'refresh',\n ) );\n\n $wp_customize->add_control( 'hero_toggle_display', array(\n 'label' => 'Toggle Hero Display',\n 'section' => 'mars_frontpage_hero_image',\n 'settings' => 'hero_toggle_display',\n 'description' => __( 'Show or hide the Hero Image?'),\n 'type' => 'radio',\n 'choices' => array(\n 'show' => 'Show',\n 'hide' => 'Hide',\n ),\n ) );\n\n // Create hero image upload form control.\n $wp_customize->add_setting( 'hero_image' , array(\n 'transport' => 'refresh',\n 'default' => get_template_directory_uri() . '/assets/images/D65847_18.jpg',\n ) );\n\n $wp_customize->add_control(\n new WP_Customize_Image_Control(\n $wp_customize,\n 'hero_image',\n array(\n 'label' => __( 'Hero Image', 'mars' ),\n /*'description' => __( 'When no image selected, a default campus image is used.' ),*/\n 'section' => 'mars_frontpage_hero_image',\n 'settings' => 'hero_image',\n )\n )\n );\n\n // Create hero text heading field.\n $wp_customize->add_setting( 'hero_image_heading' , array(\n 'transport' => 'refresh',\n ) );\n\n $wp_customize->add_control( 'hero_image_heading', array(\n 'label' => 'Hero Image Heading',\n 'section' => 'mars_frontpage_hero_image',\n 'type' => 'text',\n ) );\n\n // Create hero description field.\n $wp_customize->add_setting( 'hero_image_description' , array(\n 'transport' => 'refresh',\n ) );\n\n $wp_customize->add_control( 'hero_image_description', array(\n 'label' => 'Hero Image Description (HTML allowed)',\n 'section' => 'mars_frontpage_hero_image',\n 'type' => 'textarea',\n ) );\n\n // Create hero alt text field.\n $wp_customize->add_setting( 'hero_image_alt' , array(\n 'transport' => 'refresh',\n ) );\n\n $wp_customize->add_control( 'hero_image_alt', array(\n 'label' => 'Hero Image Alt Text',\n 'section' => 'mars_frontpage_hero_image',\n 'type' => 'textarea',\n ) );\n\n // Section One Options\n // ##############################################\n\n $wp_customize->add_section( 'mars_frontpage_section_one' , array(\n 'title' => 'Section One Options',\n 'priority' => 30,\n 'panel' => 'panel_front_page',\n 'description' => $custom_homepage_description,\n ) );\n\n $wp_customize->add_setting( 'section_one_toggle_display' , array(\n 'default' => 'show',\n 'transport' => 'refresh',\n ) );\n\n $wp_customize->add_control( 'section_one_toggle_display', array(\n 'label' => 'Toggle Section Display',\n 'section' => 'mars_frontpage_section_one',\n 'description' => __( 'You will need to refresh the page after you publish when showing a section.' ),\n 'settings' => 'section_one_toggle_display',\n 'type' => 'radio',\n 'choices' => array(\n 'show' => 'Show',\n 'hide' => 'Hide',\n ),\n ) );\n\n // Create card text heading field.\n $wp_customize->add_setting( 'section_one_card_heading' , array(\n 'transport' => 'refresh',\n ) );\n\n $wp_customize->add_control( 'section_one_card_heading', array(\n 'label' => 'Card Heading',\n 'section' => 'mars_frontpage_section_one',\n 'type' => 'text',\n ) );\n\n // Create card text.\n $wp_customize->add_setting( 'section_one_card_text' , array(\n 'transport' => 'refresh',\n ) );\n\n $wp_customize->add_control( 'section_one_card_text', array(\n 'label' => 'Card Text (HTML Allowed)',\n 'section' => 'mars_frontpage_section_one',\n 'type' => 'textarea',\n ) );\n\n // Right column text.\n $wp_customize->add_setting( 'section_one_right_column_text' , array(\n 'transport' => 'refresh',\n ) );\n\n $wp_customize->add_control( 'section_one_right_column_text', array(\n 'label' => 'Right Column Text (HTML Allowed)',\n 'section' => 'mars_frontpage_section_one',\n 'type' => 'textarea',\n ) );\n\n // Section Two Options\n // ##############################################\n\n // Create section for second section options.\n $wp_customize->add_section( 'mars_frontpage_section_two' , array(\n 'title' => 'Section Two Options',\n 'priority' => 30,\n 'panel' => 'panel_front_page',\n 'description' => $custom_homepage_description,\n ) );\n\n $wp_customize->add_setting( 'section_two_toggle_display' , array(\n 'default' => 'show',\n 'transport' => 'refresh',\n ) );\n\n $wp_customize->add_control( 'section_two_toggle_display', array(\n 'label' => 'Toggle Section Display',\n 'section' => 'mars_frontpage_section_two',\n 'settings' => 'section_two_toggle_display',\n 'description' => __( 'You will need to refresh the page after you publish when showing a section.' ),\n 'type' => 'radio',\n 'choices' => array(\n 'show' => 'Show',\n 'hide' => 'Hide',\n ),\n ) );\n\n // Create section two image upload form control.\n $wp_customize->add_setting( 'section_two_image' , array(\n 'transport' => 'refresh',\n 'default' => get_template_directory_uri() . '/assets/images/D67387_23-1.jpg',\n ) );\n\n $wp_customize->add_control(\n new WP_Customize_Image_Control(\n $wp_customize,\n 'logo',\n array(\n 'label' => __( 'Section Image', 'mars' ),\n 'section' => 'mars_frontpage_section_two',\n 'settings' => 'section_two_image',\n )\n )\n );\n\n // Create second image caption text field.\n $wp_customize->add_setting( 'section_two_image_caption' , array(\n 'transport' => 'refresh',\n ) );\n\n $wp_customize->add_control( 'section_two_image_caption', array(\n 'label' => 'Section Image Caption Text',\n 'section' => 'mars_frontpage_section_two',\n 'type' => 'textarea',\n ) );\n\n // Create second image alt text field.\n $wp_customize->add_setting( 'section_two_image_alt' , array(\n 'transport' => 'refresh',\n ) );\n\n $wp_customize->add_control( 'section_two_image_alt', array(\n 'label' => 'Section Image Alt Text',\n 'section' => 'mars_frontpage_section_two',\n 'type' => 'textarea',\n ) );\n\n // Right column text.\n $wp_customize->add_setting( 'section_two_right_column_text' , array(\n 'transport' => 'refresh',\n ) );\n\n $wp_customize->add_control( 'section_two_right_column_text', array(\n 'label' => 'Right Column Text (HTML Allowed)',\n 'section' => 'mars_frontpage_section_two',\n 'type' => 'textarea',\n ) );\n\n // Advanced Options\n // ##############################################\n\n // Create section for advanced options.\n $wp_customize->add_section( 'mars_frontpage_advanced' , array(\n 'title' => 'Advanced Options',\n 'priority' => 30,\n 'panel' => 'panel_front_page',\n 'description' => $custom_homepage_description,\n ) );\n\n // Create second image caption text field.\n $wp_customize->add_setting( 'frontpage_advanced_content' , array(\n 'transport' => 'refresh',\n ) );\n\n $wp_customize->add_control( 'frontpage_advanced_content', array(\n 'label' => 'Custom Code (HTML Allowed)',\n 'section' => 'mars_frontpage_advanced',\n 'type' => 'textarea',\n 'description' => __( '<strong>Content will appear at bottom of page.</strong>' ),\n ) );\n\n // Pass to customizer.js for real-time updates during theme customization.\n\n // Hero image settings.\n $wp_customize->get_setting( 'hero_toggle_display' )->transport = 'postMessage';\n $wp_customize->get_setting( 'hero_image_description' )->transport = 'postMessage';\n $wp_customize->get_setting( 'hero_image_heading' )->transport = 'postMessage';\n\n // Section one settings.\n $wp_customize->get_setting( 'section_one_toggle_display' )->transport = 'postMessage';\n $wp_customize->get_setting( 'section_one_card_heading' )->transport = 'postMessage';\n $wp_customize->get_setting( 'section_one_card_text' )->transport = 'postMessage';\n $wp_customize->get_setting( 'section_one_right_column_text' )->transport = 'postMessage';\n\n // Section two settings.\n $wp_customize->get_setting( 'section_two_toggle_display' )->transport = 'postMessage';\n $wp_customize->get_setting( 'section_two_right_column_text' )->transport = 'postMessage';\n $wp_customize->get_setting( 'section_two_image_caption' )->transport = 'postMessage';\n\n // Advanced settings.\n $wp_customize->get_setting( 'frontpage_advanced_content' )->transport = 'postMessage';\n\n // Header settings.\n $wp_customize->get_setting( 'blogname' )->transport = 'postMessage';\n $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';\n\n}", "function ki_customize_register($wp_customize)\n{\n\n $wp_customize->add_panel(\n 'kinotiwp',\n [\n 'title' => __('Prof Theme customizer settings', 'kinotiwp'),\n 'description' => '<p>Prof Theme Customizer Settings</p>',\n 'priority' => 160\n ]\n );\n ki_intro_customize_section($wp_customize);\n ki_site_preview_intro_customize_section($wp_customize);\n ki_site_preview_choices_customize_section($wp_customize);\n ki_site_resources($wp_customize);\n ki_site_blog_gallery_customize_section($wp_customize);\n\n \n \n}", "function wpb_ichcha_customizer($wp_customize){\n//Customize showcase\n\t$wp_customize->add_section('showcase',[\n\t\t'title' => __('Showcase', 'ichcha'),\n\t\t'description' => sprintf(__('Options for showcase', 'ichcha')),\n\t\t'priority' => 130\n\t]);\n\n\t$wp_customize->add_setting('showcase_heading', [\n\t\t'default' => _x('Ichcha', 'ichcha'),\n\t\t'type' => 'theme_mod'\n\t]);\n\n\t//Add control\n\t$wp_customize->add_control('showcase_heading', [\n\t\t'label' => __('Heading', 'ichcha'),\n\t\t'section' => 'showcase',\n\t\t'priority' => 1\n\t]);\n\n\t$wp_customize->add_setting('showcase_text', [\n\t\t'default' => _x('A subtle Bootstrap 4 Wordpress theme.', 'ichcha'),\n\t\t'type' => 'theme_mod'\n\t]);\n\n\t$wp_customize->add_control('showcase_text', [\n\t\t'label' => __('Text', 'ichcha'),\n\t\t'section' => 'showcase',\n\t\t'priority' => 2\n\t]);\n\n\t$wp_customize->add_setting('btn_txt', [\n\t\t'default' => _x('Download', 'ichcha'),\n\t\t'type' => 'theme_mod'\n\t]);\n\n\t$wp_customize->add_control('btn_txt', [\n\t\t'label' => __('Button text', 'ichcha'),\n\t\t'section' => 'showcase',\n\t\t'priority' => 3\n\t]);\n\n\t$wp_customize->add_setting('btn_url', [\n\t\t'default' => _x('http://ichcha.ga', 'ichcha'),\n\t\t'type' => 'theme_mod'\n\t]);\n\n\t$wp_customize->add_control('btn_url', [\n\t\t'label' => __('Button URL', 'ichcha'),\n\t\t'section' => 'showcase',\n\t\t'priority' => 4\n\t]);\n\n\t$wp_customize->add_setting('showcase_image', [\n\t\t'default' => get_bloginfo('template_directory').'/imgs/showcase_header.jpg',\n\t\t'type' => 'theme_mod'\n\t]);\n\n\t$wp_customize->add_control(new WP_Customize_Image_Control(\n\t\t$wp_customize, 'showcase_image', [\n\t\t\t'label' => __('Showcase image', 'ichcha'),\n\t\t\t'section' => 'showcase',\n\t\t\t'settings' => 'showcase_image',\n\t\t\t'priority' => 5\n\t\t]\n\t));\n\n\t// Color picker setting - heading\n\t$wp_customize->add_setting( 'heading_color', [\n\t\t'default' => '#2a2a2a'\n\t] );\n\n\t// Color picker control - text color\n\t$wp_customize->add_control( new WP_Customize_Color_Control(\n\t\t$wp_customize, 'heading_color', [\n\t\t'label' => 'Heading Color',\n\t\t'section' => 'showcase',\n\t\t'settings' => 'heading_color',\n\t\t'priority' => 6\n\t]));\n\n\t// Color picker setting - text color\n\t$wp_customize->add_setting( 'text_color', [\n\t\t'default' => '#f0f0f0'\n\t] );\n\n\t// Color picker control - text color\n\t$wp_customize->add_control( new WP_Customize_Color_Control(\n\t\t$wp_customize, 'text_color', [\n\t\t'label' => 'Text Color',\n\t\t'section' => 'showcase',\n\t\t'settings' => 'text_color',\n\t\t'priority' => 7\n\t]));\n\n\n\n}", "public function display_customization()\n {\n do_action('zoom_customizer_display_customization_css', $this->get_css_rules());\n\n $css = zoom_customizer_get_css()->build();\n\n if (!empty($css)) {\n echo \"\\n<!-- Begin Theme Custom CSS -->\\n<style type=\\\"text/css\\\" id=\\\"\" . WPZOOM::$theme_raw_name . \"-custom-css\\\">\\n\";\n echo $css;\n echo \"\\n</style>\\n<!-- End Theme Custom CSS -->\\n\";\n }\n }", "public function render_content() {\n\t\t?>\n\t\t<label>\n\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t<textarea rows=\"<?php echo absint( $this->rows ); ?>\" <?php $this->link(); ?> style=\"width: 98%\"><?php echo esc_textarea( $this->value() ); ?></textarea>\n\t\t</label>\n\t\t<?php\n\t}", "function jf_customize_register( $wp_customize ) {\n //$wp_customize->get_section( 'title_tagline' )->title = 'General';\n $wp_customize->add_panel( 'jf', [\n 'title' => __( 'MyTheme Settings', 'jf' ),\n 'description' => '<p>' . __( 'MyTheme Options Settings', 'jf' ) . '</p>',\n 'priority' => 160 \n ] );\n jf_social_customizer_section( $wp_customize );\n jf_misc_customizer_section( $wp_customize );\n}", "protected function _content_template() {\n ?>\n <section class=\"cta-overflow-hidden\">\n <div class=\"banner\">\n <div class=\"img-wrapper\">\n <img src=\"{{ settings.image.url }}\" alt=\"\">\n </div>\n <div class=\"card-wrapper\">\n <div class=\"spin\">\n <span>{{ settings.section_title }}</span>\n <p>{{ settings.section_description }}</p>\n <a class=\"get-started button\" href=\"{{ settings.cta_link }}\">{{ settings.cta_text }}</a>\n </div>\n </div>\n </div>\n </section>\n <?php\n }", "function seasaltpress_customize_register( $wp_customize ) {\n\t$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';\n\t\n\t//$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';\n\n\t$wp_customize->selective_refresh->add_partial( 'blogname', array(\n\t\t'selector' => '.site-title a',\n\t\t'render_callback' => 'seasaltpress_customize_partial_blogname',\n\t) );\n\t\n\t$wp_customize->selective_refresh->add_partial( 'blogdescription', array(\n\t\t'selector' => '.site-description',\n\t\t'render_callback' => 'seasaltpress_customize_partial_blogdescription',\n\t) );\n\n\n\n/**\n * Theme options.\n */\n$wp_customize->add_section( 'theme_options', array(\n\t'title' => __( 'Theme Options', 'seasaltpress' ),\n\t'priority' => 130, // Before Additional CSS.\n) );\n\n$wp_customize->add_section( 'post_types', array(\n\t'title' => __( 'Post Type Archives', 'seasaltpress' ),\n\t'priority' => 130, // Before Additional CSS.\n) );\n\n\n/**\n * Layout of Site top\n */\n$wp_customize->add_setting('site_top_use_customizer',\n \tarray(\n\t \t'default' => 'yes'\n \t));\n\t\n\t// Add a control to upload the logo\n\t$wp_customize->add_control('site_top_use_customizer',\n\tarray(\n\t'label' => __('Use the customizer?'),\n\t'section' => 'theme_options',\n\t'type' => 'radio',\n\t'description' => 'You can make your own layout in php in header.php and ignore presets and manual settings.',\n\t\t'choices' => array(\n\t\t\t'yes' => 'yes',\n\t\t\t'no' => 'no'\n\t\t)\n\t) );\n\n\n/**\n * Nav Menu and Logo Options\n */\n$wp_customize->add_setting('site_top_wrap',\n \tarray(\n\t \t'default' => 'yes',\n\t \t'transport' => 'postMessage',\n \t));\n\t\n\n\t$wp_customize->add_control('site_top_wrap',\n\tarray(\n\t\t'label' => __('contain the site top in .wrap'),\n\t\t'section' => 'theme_options',\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\t'wrap' => 'yes',\n\t\t\t'' => 'no'\n\t\t),\n\t\t'description' => 'You can set wrap size via variables in scss'\n\t) );\n\t\n/*\n$wp_customize->selective_refresh->add_partial( 'site_top_wrap', array(\n\t'selector' => '.site-top-inner-container',\n\t'render_callback' => 'seasaltpress_customize_partial_site_top_wrap',\n) );\n*/\n\n\n\n\n/**\n * Layout of Site top\n */\n$wp_customize->add_setting('site_top_layout',\n \tarray(\n\t \t'default' => 'logo-left',\n\t \t'transport' => 'postMessage'\n \t));\n\t\n\t// Add a control to upload the logo\n\t$wp_customize->add_control('site_top_layout',\n\tarray(\n\t'label' => __('Logo Position'),\n\t'section' => 'theme_options',\n\t'type' => 'select',\n\t'description' => 'You can make your own layout in php in header.php and ignore presets and manual settings.',\n\t\t'choices' => array(\n\t\t\t'logo-left' => 'logo-left',\n\t\t\t'logo-right' => 'logo-right',\n\t\t\t'logo-center' => 'logo-center',\n\t\t\t'logo-center-under' => 'logo-center-under',\n\t\t\t'logo-in-middle' => 'logo-in-middle',\n\t\t\t'no-logo' => 'no-logo'\n\t\t)\n\t) );\n\n\n/*\n $wp_customize->selective_refresh->add_partial( 'site_top_layout', array(\n\t'selector' => '.site-top-inner-container',\n) );\n*/\n\n\n/**\n * Add cool menu capability. app like menu on mobile\n *\n */\n$wp_customize->add_setting( 'cool_menu',\n\tarray(\n\t\t'default'=> false,\n\t));\n$wp_customize->add_control( 'cool_menu', \n\tarray(\n\t\t'label' => __('Enable Cool Mobile Menu'),\n\t\t'section' => 'theme_options',\n\t\t'type' => 'checkbox'\n\t));\t\n\t\n\n/**\n * Add cool sidebar capability. \n *\n */\n$wp_customize->add_setting( 'cool_sidebar',\n\tarray(\n\t\t'default'=> false,\n\t));\n$wp_customize->add_control( 'cool_sidebar', \n\tarray(\n\t\t'label' => __('Enable Cool Sidebar'),\n\t\t'section' => 'theme_options',\n\t\t'type' => 'checkbox'\n\t));\t\n\t\n\t\n//add post type descriptions\n$seasaltpress_post_types = get_post_types(array('_builtin'=>false, 'has_archive'=>true), 'objects');\n$seasaltpress_post_types[] = get_post_type_object('post');\nforeach( $seasaltpress_post_types as $post_type ){\n\t\n$wp_customize->add_setting( 'seasaltpress_archive_header_' . $post_type->name,\n\tarray(\n\t\t'default'=> '',\n));\n\t\n$wp_customize->add_control( 'seasaltpress_archive_header_' . $post_type->name, array(\n 'label' => __( 'Archive Header For ', 'seasaltpress' ) . ucwords($post_type->labels->singular_name),\n 'type' => 'dropdown-pages',\n// 'allow_addition' => true,\n 'section' => 'post_types',\n 'description' => __('Set a page to be used to display the header for this archive. Note: Post type must have an archive page.', 'seasaltpress'),\n) );\n\n\n}\n\n\n \n}", "public function render(){\n\t\t\t\n\t\t\tif( !is_user_logged_in() && !current_user_can( 'edit_themes' ) ){\n\t\t\t\twp_die(\n\t\t\t\t\t'<section>\n\t\t\t\t\t\t<header>' . $this->logo() . $this->title() . '</header>\n\t\t\t\t\t\t<div>' . $this->content() . $this->social() . '</div>\n\t\t\t\t\t\t<footer>' . $this->fonts() . $this->styles() . '</footer>\n\t\t\t\t\t</section>\n\t\t\t\t');\n\t\t\t}\n\t\t}", "function _n_customizer_menu() {\n add_theme_page( 'Customize', 'Customize', 'edit_theme_options', 'customize.php' );\n}", "public function render_content() {\n\t\t\t?>\n\t\t\t<div class=\"tinymce-control\">\n\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) { ?>\n\t\t\t\t\t<span class=\"customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php } ?>\n\t\t\t\t<textarea id=\"<?php echo esc_attr( $this->id ); ?>\" class=\"customize-control-tinymce-editor\" <?php $this->link(); ?>><?php echo esc_attr( $this->value() ); ?></textarea>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "public function setSections() {\n // Background Patterns Reader\n $sample_patterns_path = ReduxFramework::$_dir . '../sample/patterns/';\n $sample_patterns_url = ReduxFramework::$_url . '../sample/patterns/';\n $sample_patterns = array();\n\n if (is_dir($sample_patterns_path)) :\n\n if ($sample_patterns_dir = opendir($sample_patterns_path)) :\n $sample_patterns = array();\n\n while (( $sample_patterns_file = readdir($sample_patterns_dir) ) !== false) {\n\n if (stristr($sample_patterns_file, '.png') !== false || stristr($sample_patterns_file, '.jpg') !== false) {\n $name = explode('.', $sample_patterns_file);\n $name = str_replace('.' . end($name), '', $sample_patterns_file);\n $sample_patterns[] = array('alt' => $name, 'img' => $sample_patterns_url . $sample_patterns_file);\n }\n }\n endif;\n endif;\n\n ob_start();\n\n $ct = wp_get_theme();\n $this->theme = $ct;\n $item_name = $this->theme->get('Name');\n $tags = $this->theme->Tags;\n $screenshot = $this->theme->get_screenshot();\n $class = $screenshot ? 'has-screenshot' : '';\n\n $customize_title = sprintf(__('Customize &#8220;%s&#8221;', 'redux-framework-demo'), $this->theme->display('Name'));\n \n ?>\n <div id=\"current-theme\" class=\"<?php echo esc_attr($class); ?>\">\n <?php if ($screenshot) : ?>\n <?php if (current_user_can('edit_theme_options')) : ?>\n <a href=\"<?php echo wp_customize_url(); ?>\" class=\"load-customize hide-if-no-customize\" title=\"<?php echo esc_attr($customize_title); ?>\">\n <img src=\"<?php echo esc_url($screenshot); ?>\" alt=\"<?php esc_attr_e('Current theme preview'); ?>\" />\n </a>\n <?php endif; ?>\n <img class=\"hide-if-customize\" src=\"<?php echo esc_url($screenshot); ?>\" alt=\"<?php esc_attr_e('Current theme preview'); ?>\" />\n <?php endif; ?>\n\n <h4><?php echo $this->theme->display('Name'); ?></h4>\n\n <div>\n <ul class=\"theme-info\">\n <li><?php printf(__('By %s', 'redux-framework-demo'), $this->theme->display('Author')); ?></li>\n <li><?php printf(__('Version %s', 'redux-framework-demo'), $this->theme->display('Version')); ?></li>\n <li><?php echo '<strong>' . __('Tags', 'redux-framework-demo') . ':</strong> '; ?><?php printf($this->theme->display('Tags')); ?></li>\n </ul>\n <p class=\"theme-description\"><?php echo $this->theme->display('Description'); ?></p>\n <?php\n if ($this->theme->parent()) {\n printf(' <p class=\"howto\">' . __('This <a href=\"%1$s\">child theme</a> requires its parent theme, %2$s.') . '</p>', __('http://codex.wordpress.org/Child_Themes', 'redux-framework-demo'), $this->theme->parent()->display('Name'));\n }\n ?>\n\n </div>\n </div>\n\n <?php\n $item_info = ob_get_contents();\n\n ob_end_clean();\n\n $sampleHTML = '';\n if (file_exists(dirname(__FILE__) . '/info-html.html')) {\n /** @global WP_Filesystem_Direct $wp_filesystem */\n global $wp_filesystem;\n if (empty($wp_filesystem)) {\n require_once(ABSPATH . '/wp-admin/includes/file.php');\n WP_Filesystem();\n }\n $sampleHTML = $wp_filesystem->get_contents(dirname(__FILE__) . '/info-html.html');\n }\n\n\n\n\n /**\n * DECLARATION OF SECTIONS\n **/\n\n\n // General Settings\n $this->sections[] = array(\n 'title' => __('General Settings', 'redux-framework-demo'),\n 'icon' => 'el-icon-cogs',\n 'fields' => array(\n array(\n 'id' => 'site_favicon',\n 'type' => 'media',\n 'title' => __('Favicon', 'redux-framework-demo'),\n 'subtitle' => __('Upload your site favicon in .ico format. Default favicon will be used unless you upload your own', 'redux-framework-demo'),\n 'default' => array('url' => get_template_directory_uri() .'/images/favicon.ico'), \n ),\n array(\n 'id' => 'site_retina_favicon',\n 'type' => 'media',\n 'title' => __('Retina Favicon', 'redux-framework-demo'),\n 'subtitle' => __('The Retina version of your Favicon: 144x144px .png file required. Default favicon will be used unless you upload your own', 'redux-framework-demo'),\n 'default' => array('url' => get_template_directory_uri() .'/images/retina-favicon.png'), \n ),\n array(\n 'id' => 'site_sidebar_fixed',\n 'type' => 'switch',\n 'title' => __('Fixed Sidebar', 'redux-framework-demo'),\n 'subtitle' => __('Make sidebar fixed site wide', 'redux-framework-demo'),\n 'default' => false,\n ),\n array(\n 'id' => 'site_custom_gallery',\n 'type' => 'switch',\n 'title' => __('Custom Gallery', 'redux-framework-demo'),\n 'subtitle' => __('Enable or Disable theme custom WordPress gallery', 'redux-framework-demo'),\n 'default' => false,\n ),\n\t\t\t\t\tarray(\n 'id' => 'site_carousel_height',\n 'type' => 'text',\n 'title' => __('Gallery Carousel Height', 'redux-framework-demo'),\n 'subtitle' => __('Set the height of the gallery carousel. Applies to Posts Carousel section and Gallery Format post.', 'redux-framework-demo'),\n 'desc' => __('After changing the height you need to run the Force Regenerate Thumbnails plugin.', 'redux-framework-demo'),\n 'validate' => 'numeric',\n 'default' => '580',\n ),\n array(\n 'id' => 'site_page_comments',\n 'type' => 'switch',\n 'title' => __('Comments in static pages', 'redux-framework-demo'),\n 'subtitle' => __('Enable or Disable comments in all static pages.', 'redux-framework-demo'),\n 'default' => false,\n ),\n array(\n 'id' => 'copyright_text',\n 'type' => 'textarea',\n 'title' => __('Footer Text', 'redux-framework-demo'),\n 'subtitle' => __('Your site footer copyright text', 'redux-framework-demo'),\n 'default' => 'Powered by WordPress. <a href=\"http://www.themesindep.com\">Created by ThemesIndep</a>',\n ),\n ),\n );\n\n \n // Header\n $this->sections[] = array(\n 'icon' => 'el-icon-eye-open',\n 'title' => __('Header', 'redux-framework-demo'),\n 'heading' => __('Site Header Otions', 'redux-framework-demo'),\n 'fields' => array(\n array(\n 'id' => 'site_logo',\n 'type' => 'media',\n 'title' => __('Site Logo', 'redux-framework-demo'),\n 'subtitle' => __('Upload your site logo. Default logo will be used unless you upload your own', 'redux-framework-demo'),\n 'default' => array(\n 'url' => get_template_directory_uri() .'/images/logo.png',\n 'width' => '237',\n 'height' => '60',\n )\n ),\n array(\n 'id' => 'site_tagline',\n 'type' => 'switch',\n 'title' => __('Site Tagline', 'redux-framework-demo'),\n 'subtitle' => __('Enable or Disable the tagline under the logo', 'redux-framework-demo'),\n 'default' => true,\n ),\n array(\n 'id' => 'site_top_strip',\n 'type' => 'switch',\n 'title' => __('Top Strip', 'redux-framework-demo'),\n 'subtitle' => __('Enable or Disable the top strip', 'redux-framework-demo'),\n 'default' => 1,\n ),\n array(\n 'id' => 'site_main_menu',\n 'type' => 'switch',\n 'title' => __('Main Menu', 'redux-framework-demo'),\n 'subtitle' => __('Enable or Disable the main menu', 'redux-framework-demo'),\n 'default' => 1,\n ),\n array(\n 'id' => 'site_mega_menu',\n 'type' => 'switch',\n 'title' => __('Mega Menu', 'redux-framework-demo'),\n 'subtitle' => __('Enable or Disable the mega menu', 'redux-framework-demo'),\n 'default' => 1,\n ),\n array(\n 'id' => 'site_fixed_menu',\n 'type' => 'image_select',\n 'title' => __('Fixed Element', 'redux-framework-demo'),\n 'subtitle' => __('Select header fixed element:<br />None, Top Strip, Main Menu', 'redux-framework-demo'),\n 'options' => array(\n '1' => array('img' => get_template_directory_uri() .'/admin/images/to-icon-fixed-none.png'),\n '2' => array('img' => get_template_directory_uri() .'/admin/images/to-icon-fixed-top-menu.png'),\n '3' => array('img' => get_template_directory_uri() .'/admin/images/to-icon-fixed-main-menu.png'),\n ), \n 'default' => '1'\n ),\n array(\n 'id' => 'site_header',\n 'type' => 'image_select',\n 'title' => __('Header Type', 'redux-framework-demo'),\n 'subtitle' => __('Select header type:<br />Logo<br />Logo, social profiles and search<br /> Logo and Ad Unit', 'redux-framework-demo'),\n 'desc' => __('To add the ad unit click on the Ad Units tab', 'redux-framework-demo'),\n 'options' => array(\n 'header_default' => array('img' => get_template_directory_uri() .'/admin/images/to-icon-logo-centered.png'),\n 'header_search' => array('img' => get_template_directory_uri() .'/admin/images/to-icon-logo-social-search.png'),\n 'header_banner' => array('img' => get_template_directory_uri() .'/admin/images/to-icon-logo-ad.png'),\n ), \n 'default' => 'header_default'\n ),\n \n array(\n 'id' => 'top_social_profiles',\n 'type' => 'switch',\n 'title' => __('Top Strip Social Profiles', 'redux-framework-demo'),\n 'subtitle' => __('Enable or Disable top strip socical profiles', 'redux-framework-demo'),\n ),\n array(\n 'id' => 'social_profile_url',\n 'title' => __('Social Profiles URLs', 'redux-framework-demo'),\n 'subtitle' => __('Enter full URLs of your social profiles', 'redux-framework-demo'),\n 'required' => array('top_social_profiles', '=', '1'),\n 'type' => 'text',\n\t\t\t\t\t\t'placeholder' => '',\n 'options' => array(\n 'feed' => 'RSS Feed',\n 'facebook' => 'Facebook',\n 'twitter' => 'Twitter',\n 'google-plus' => 'Google+',\n 'linkedin' => 'LinkedIn',\n 'pinterest' => 'Pinterest',\n 'bloglovin' => 'Bloglovin',\n 'tumblr' => 'Tumblr',\n 'instagram' => 'Instagram', \n 'flickr' => 'Flickr',\n 'vimeo' => 'Vimeo',\n 'youtube' => 'Youtube',\n 'behance' => 'Behance',\n 'dribbble' => 'Dribbble',\n 'soundcloud' => 'Soundcloud',\n 'lastfm' => 'LastFM'\n ),\n 'default' => array(\n 'feed' => '',\n 'facebook' => '',\n 'twitter' => '',\n 'google-plus' => '',\n 'linkedin' => '', \n 'pinterest' => '',\n 'bloglovin' => '',\n 'tumblr' => '',\n 'instagram' => '', \n 'flickr' => '',\n 'vimeo' => '',\n 'youtube' => '',\n 'behance' => '',\n 'dribbble' => '',\n 'soundcloud' => '',\n 'lastfm' => ''\n ),\n )\n\n )\n );\n\n \n // Typography\n $this->sections[] = array(\n 'icon' => 'el-icon-font',\n 'title' => __('Typography', 'redux-framework-demo'),\n 'fields' => array(\n array(\n 'id' => 'typography_info',\n 'type' => 'info',\n 'desc' => __('Standard System Fonts and Google Webfonts are avaialble in each Font Family dropdown', 'redux-framework-demo')\n ),\n array(\n 'id' => 'font_titles',\n 'type' => 'typography',\n 'title' => __('Titles &amp; Menus', 'redux-framework-demo'),\n 'subtitle' => __('Specify titles &amp; menus font properties', 'redux-framework-demo'),\n 'google' => true,\n 'color' => false,\n 'text-align' => false,\n 'line-height' => false,\n 'font-size' => false,\n 'default' => array(\n 'font-family' => 'Oswald',\n 'font-weight' => 'normal',\n ),\n 'output' => array('h1, h2, h3, h4, h5, h6, .main-menu a, .secondary-menu a, .widget_pages, .widget_categories, .widget_nav_menu, .tagline, .sub-title, .entry-meta, .entry-note, .read-more, #submit, .ltr .single .entry-content > p:first-of-type:first-letter, input#s, .single-author-box .vcard, .comment-author, .comment-meta, .comment-reply-link, #respond label, .copyright, #wp-calendar tbody, .latest-reviews i, .score-box .total'),\n ),\n array(\n 'id' => 'titles_size',\n 'type' => 'typography',\n 'title' => __('Titles Size', 'redux-framework-demo'),\n 'subtitle' => __('Type titles &amp; headings font size', 'redux-framework-demo'),\n 'google' => false,\n 'font-family' => false,\n 'font-style' => false,\n 'color' => false,\n 'text-align' => false,\n 'line-height' => false,\n 'font-weight' => false,\n 'default' => array(\n 'font-size' => '48px',\n ),\n\t\t\t\t\t\t'output' => array('.title-with-sep, .title-with-bg, .classic-layout .entry-title, .posts-slider .entry-title')\n ),\n array(\n 'id' => 'main_menu_font_size',\n 'type' => 'typography',\n 'title' => __('Main Menu Font Size', 'redux-framework-demo'),\n 'subtitle' => __('Type main menu font size', 'redux-framework-demo'),\n 'google' => false,\n 'font-family' => false,\n 'font-style' => false,\n 'color' => false,\n 'text-align' => false,\n 'line-height' => false,\n 'font-weight' => false,\n 'default' => array(\n 'font-size' => '18px'\n ),\n 'output' => array('.main-menu > ul > li')\n ),\n\n array(\n 'id' => 'font_text',\n 'type' => 'typography',\n 'title' => __('Body Text Font', 'redux-framework-demo'),\n 'subtitle' => __('Specify body text font properties.', 'redux-framework-demo'),\n 'google' => true,\n 'color' => false,\n 'text-align' => false,\n 'line-height' => false,\n 'default' => array(\n 'font-size' => '16px',\n 'font-family' => 'Lato',\n 'font-weight' => 'normal',\n ),\n 'output' => array('body'),\n ),\n\n )\n );\n\n\n // Design Options\n $this->sections[] = array(\n 'icon' => 'el-icon-magic',\n 'title' => __('Design Options', 'redux-framework-demo'),\n 'fields' => array(\n /* Text Alignment */\n array(\n 'id' => 'text_alignment',\n 'type' => 'image_select',\n 'title' => __('Text alignment', 'redux-framework-demo'),\n 'subtitle' => __('Select your site text alignment. Centered or Left.', 'redux-framework-demo'),\n 'options' => array(\n '1' => array('img' => get_template_directory_uri() .'/admin/images/to-icon-align-center.png'),\n '2' => array('img' => get_template_directory_uri() .'/admin/images/to-icon-align-left.png'),\n ), \n 'default' => '1'\n ),\n\n /* Site Layout */\n array(\n 'id' => 'site_layout',\n 'type' => 'image_select',\n 'title' => __('Site Layout', 'redux-framework-demo'),\n 'subtitle' => __('Select site layout. Fullwidth or Boxed.', 'redux-framework-demo'),\n 'options' => array(\n '1' => array('img' => get_template_directory_uri() .'/admin/images/to-icon-layout-full.png'),\n '2' => array('img' => get_template_directory_uri() .'/admin/images/to-icon-layout-boxed.png'),\n ), \n 'default' => '1'\n ),\n\n /* Body Background */\n array(\n 'id' => 'site_body_bg',\n 'type' => 'background',\n 'title' => __('Body Background', 'redux-framework-demo'),\n 'subtitle' => __('Pick a body background color or upload an image', 'redux-framework-demo'),\n 'default' => array('background-color' => '#fff'),\n 'output' => array('background-color' => 'body, .site-content, .layout-full .title-with-sep .title, .layout-full .title-with-sep .entry-title'),\n ),\n\n /* Main Colors */ \n array(\n 'id' => 'main_colors_start',\n 'type' => 'section',\n 'title' => __('Main Colors', 'redux-framework-demo'),\n 'indent' => false,\n ),\n array(\n 'id' => 'main_site_color',\n 'type' => 'color',\n 'title' => __('Main Color', 'redux-framework-demo'),\n 'subtitle' => __('Pick the main (accent) color for your site', 'redux-framework-demo'),\n 'default' => '#ffcc0d',\n 'output' => array( 'background-color' => '.entry-image, .paging-navigation .current, .link-pages span, .score-line span, .entry-breakdown .item .score-line, .widget_ti_most_commented span, .all-news-link .read-more' ),\n ),\n array(\n 'id' => 'secondary_site_color',\n 'type' => 'color',\n 'title' => __('Secondary Color', 'redux-framework-demo'),\n 'subtitle' => __('Pick the secondary color for your site (pagination numbers, most commented widget numbers, etc.)', 'redux-framework-demo'),\n 'default' => '#000',\n 'output' => array( 'color' => '.paging-navigation .current, .widget span i, .score-line span i, .all-news-link .read-more' ),\n ),\n array(\n 'id' => 'main_colors_end',\n 'type' => 'section',\n 'indent' => false,\n ),\n\n /* Header */ \n array(\n 'id' => 'header_colors_start',\n 'type' => 'section',\n 'title' => __('Header', 'redux-framework-demo'),\n 'indent' => false,\n ),\n array(\n 'id' => 'header_site_color',\n 'type' => 'color',\n 'title' => __('Header Background', 'redux-framework-demo'),\n 'subtitle' => __('Pick the header background color', 'redux-framework-demo'),\n 'default' => '#ffffff',\n 'output' => array( 'background-color' => '#masthead, .main-menu-fixed' ),\n ),\n array(\n 'id' => 'header_colors_end',\n 'type' => 'section',\n 'indent' => false,\n ),\n\n /* Top Strip */\n array(\n 'id' => 'top_strip_start',\n 'type' => 'section',\n 'title' => __('Top Strip', 'redux-framework-demo'),\n 'indent' => false,\n ),\n array(\n 'id' => 'site_top_strip_bg',\n 'type' => 'color',\n 'title' => __('Background', 'redux-framework-demo'),\n 'subtitle' => __('Top strip background color.', 'redux-framework-demo'),\n 'default' => '#000',\n 'output' => array( 'background-color' => '.top-strip, .secondary-menu .sub-menu, .top-strip #searchform input[type=\"text\"], .top-strip .social li ul' ),\n ),\n array(\n 'id' => 'site_top_strip_bottom_border',\n 'type' => 'border',\n 'title' => __('Bottom Border', 'redux-framework-demo'),\n 'subtitle' => __('Bottom border color', 'redux-framework-demo'),\n 'output' => array('.top-strip'),\n 'all' => false,\n 'right' => false,\n 'top' => false,\n 'left' => false,\n 'default' => array(\n 'border-color' => '#000',\n 'border-style' => 'solid', \n 'border-bottom' => '0px',\n )\n ),\n array(\n 'id' => 'site_top_strip_links',\n 'type' => 'link_color',\n 'title' => __('Menu Links', 'redux-framework-demo'),\n 'subtitle' => __('Menu links color', 'redux-framework-demo'),\n 'output' => array('.secondary-menu a'),\n 'active' => false,\n 'default' => array(\n 'regular' => '#ffffff',\n 'hover' => '#ffcc0d'\n )\n ),\n array(\n 'id' => 'site_top_strip_border',\n 'type' => 'color',\n 'title' => __('Separators', 'redux-framework-demo'),\n 'subtitle' => __('Menu items separators', 'redux-framework-demo'),\n 'default' => '#333',\n 'output' => array( 'border-color' => '.secondary-menu li, .top-strip #searchform input[type=\"text\"]' ),\n ),\n array(\n 'id' => 'site_top_strip_social',\n 'type' => 'color',\n 'title' => __('Social Icons', 'redux-framework-demo'),\n 'subtitle' => __('Social icons styling', 'redux-framework-demo'),\n 'default' => '#8c919b',\n 'output' => array( 'color' => '.top-strip .social li a' ),\n ),\n \n array(\n 'id' => 'top_strip_end',\n 'type' => 'section',\n 'indent' => false,\n ),\n \n /* Main Menu */\n array(\n 'id' => 'main_menu_start',\n 'type' => 'section',\n 'title' => __('Main Menu', 'redux-framework-demo'),\n 'indent' => false,\n ),\n array(\n 'id' => 'main_menu_color',\n 'type' => 'color',\n 'title' => __('Background', 'redux-framework-demo'),\n 'subtitle' => __('Main menu background color', 'redux-framework-demo'),\n 'default' => '#fff',\n 'output' => array( 'background-color' => '.main-menu,.sticky-active .main-menu-fixed' ),\n ),\n array(\n 'id' => 'main_menu_links_color',\n 'type' => 'link_color',\n 'title' => __('Menu Links', 'redux-framework-demo'),\n 'subtitle' => __('Main menu links color', 'redux-framework-demo'),\n 'output' => array('.main-menu > ul > li > a'),\n 'active' => false,\n 'default' => array(\n 'regular' => '#000',\n 'hover' => '#333'\n )\n ),\n array(\n 'id' => 'main_menu_separator',\n 'type' => 'color',\n 'title' => __('Links Separator', 'redux-framework-demo'),\n 'subtitle' => __('Links seprator color', 'redux-framework-demo'),\n 'default' => '#eee',\n 'output' => array( 'color' => '.main-menu > ul > li:after' ),\n ),\n array(\n 'id' => 'main_menu_top_border',\n 'type' => 'border',\n 'title' => __('Top Border', 'redux-framework-demo'),\n 'subtitle' => __('Main Menu top border', 'redux-framework-demo'),\n 'output' => array('.main-menu'),\n 'all' => false,\n 'right' => false,\n 'bottom' => false,\n 'left' => false,\n 'default' => array(\n 'border-color' => '#000', \n 'border-style' => 'solid', \n 'border-top' => '1px',\n )\n ),\n array(\n 'id' => 'main_menu_bottom_border',\n 'type' => 'border',\n 'title' => __('Bottom Border', 'redux-framework-demo'),\n 'subtitle' => __('Main Menu bottom border', 'redux-framework-demo'),\n 'output' => array('.main-menu'),\n 'all' => false,\n 'right' => false,\n 'top' => false,\n 'left' => false,\n 'default' => array(\n 'border-color' => '#000', \n 'border-style' => 'solid', \n 'border-bottom' => '3px',\n )\n ),\n array(\n 'id' => 'main_menu_end',\n 'type' => 'section',\n 'indent' => false,\n ),\n\n /* Main Menu Dropdown */\n array(\n 'id' => 'main_dropdown_start',\n 'type' => 'section',\n 'title' => __('Main Menu Dropdown', 'redux-framework-demo'),\n 'indent' => false,\n ),\n // General Settings\n array(\n 'id' => 'main_sub_menu_pointer',\n 'type' => 'color',\n 'title' => __('Pointer &amp; Top Border', 'redux-framework-demo'),\n 'subtitle' => __('Pointer and top border color', 'redux-framework-demo'),\n 'default' => '#ffcc0d',\n ),\n array(\n 'id' => 'main_sub_border',\n 'type' => 'border',\n 'title' => __('Border', 'redux-framework-demo'),\n 'subtitle' => __('Select the border styling', 'redux-framework-demo'),\n 'default' => array(\n 'border-color' => '#000',\n 'border-style' => 'solid',\n 'border-top' => '0px', \n 'border-right' => '0px', \n 'border-bottom' => '0px', \n 'border-left' => '0px'\n ),\n 'output' => array( 'border' => '.main-menu .sub-menu' ),\n ),\n\n // Left Column\n array(\n 'id' => 'main_sub_bg_left',\n 'type' => 'color',\n 'title' => __('Left Background', 'redux-framework-demo'),\n 'subtitle' => __('Left column background color', 'redux-framework-demo'),\n 'default' => '#000',\n 'output' => array( 'background-color' => '.main-menu .sub-menu,.main-menu .sub-menu-two-columns .sub-menu:before' ),\n ),\n array(\n 'id' => 'main_sub_links_left',\n 'type' => 'link_color',\n 'title' => __('Left Links Color', 'redux-framework-demo'),\n 'subtitle' => __('Left Column links color', 'redux-framework-demo'),\n 'output' => array('.sub-links li a'),\n 'active' => false,\n 'default' => array(\n 'regular' => '#ffffff',\n 'hover' => '#ffcc0d'\n )\n ),\n array(\n 'id' => 'main_sub_bg_sep',\n 'type' => 'color',\n 'title' => __('Separator Color', 'redux-framework-demo'),\n 'subtitle' => __('Pick a color for links separator', 'redux-framework-demo'),\n 'default' => '#1e1e1e',\n 'output' => array( 'background-color' => '.main-menu .sub-menu .sub-links a:after' ),\n ),\n\n // Right Column\n array(\n 'id' => 'main_sub_bg_right',\n 'type' => 'color',\n 'title' => __('Right Background', 'redux-framework-demo'),\n 'subtitle' => __('Right Column background color', 'redux-framework-demo'),\n 'default' => '#242628',\n 'output' => array( 'background-color' => '.main-menu .sub-menu:after' ),\n ),\n array(\n 'id' => 'main_sub_links_right',\n 'type' => 'link_color',\n 'title' => __('Right Links Color', 'redux-framework-demo'),\n 'subtitle' => __('Right Column links color', 'redux-framework-demo'),\n 'output' => array('.sub-posts li a'),\n 'active' => false,\n 'default' => array(\n 'regular' => '#ffffff',\n 'hover' => '#ffcc0d'\n )\n ),\n array(\n 'id' => 'main_dropdown_end',\n 'type' => 'section',\n 'indent' => false,\n ),\n\n /* Titles Background */\n array(\n 'id' => 'titles_bg_start',\n 'type' => 'section',\n 'title' => __('Titles Background', 'redux-framework-demo'),\n 'indent' => false,\n ),\n\n array(\n 'id' => 'titles_background_switch',\n 'type' => 'switch',\n 'title' => __('On/Off', 'redux-framework-demo'),\n 'subtitle' => __('Turn the background image on or off', 'redux-framework-demo'),\n 'default' => '1',\n ),\n\n array(\n 'id' => 'titles_background_image',\n 'type' => 'switch',\n 'title' => __('Background Type', 'redux-framework-demo'),\n 'subtitle' => __('Use deafult background or upload custom', 'redux-framework-demo'),\n 'required' => array('titles_background_switch', '=', '1'),\n 'default' => '1',\n 'on' => 'Use Default',\n 'off' => 'Upload Custom'\n \n ),\n array(\n 'id' => 'titles_background_upload',\n 'type' => 'media',\n 'url' => true,\n 'required' => array('titles_background_image', '=', '0'),\n 'title' => __('Upload Custom', 'redux-framework-demo'),\n 'subtitle' => __('Upload custom background', 'redux-framework-demo'),\n 'default' => '', \n ),\n\n array(\n 'id' => 'titles_bg_end',\n 'type' => 'section',\n 'indent' => false,\n ),\n\n /* Slider Tint */\n array(\n 'id' => 'slider_tint_start',\n 'type' => 'section',\n 'title' => __('Slider', 'redux-framework-demo'),\n 'indent' => false,\n ),\n array(\n 'id' => 'slider_tint',\n 'type' => 'color',\n 'title' => __('Background', 'redux-framework-demo'),\n 'subtitle' => __('Slider background color', 'redux-framework-demo'),\n 'default' => '#000',\n 'output' => array( 'background-color' => '.modern .content-over-image figure:before' ),\n ),\n array(\n 'id' => 'slider_tint_strength',\n 'type' => 'slider',\n 'title' => __('Tint strength', 'redux-framework-demo'),\n 'subtitle' => __('Slider tint regular strength', 'redux-framework-demo'),\n 'default' => .1,\n 'min' => 0,\n 'step' => .1,\n 'max' => 0,\n 'resolution' => 0.1,\n 'display_value' => 'text',\n ),\n array(\n 'id' => 'slider_tint_strength_hover',\n 'type' => 'slider',\n 'title' => __('Tint strength hover', 'redux-framework-demo'),\n 'subtitle' => __('Slider tint regular strength mouse over', 'redux-framework-demo'),\n 'default' => .7,\n 'min' => 0,\n 'step' => .1,\n 'max' => 0,\n 'resolution' => 0.1,\n 'display_value' => 'text',\n ),\n array(\n 'id' => 'slider_tint_end',\n 'type' => 'section',\n 'indent' => false,\n ),\n\n /* Sidebar */\n array(\n 'id' => 'sidebar_border_start',\n 'type' => 'section',\n 'title' => __('Sidebar', 'redux-framework-demo'),\n 'indent' => false,\n ),\n array(\n 'id' => 'sidebar_border',\n 'type' => 'border',\n 'title' => __('Sidebar Border', 'redux-framework-demo'),\n 'subtitle' => __('Select sidebar border styling', 'redux-framework-demo'),\n 'default' => array(\n 'border-color' => '#000',\n 'border-style' => 'solid',\n 'border-top' => '1px', \n 'border-right' => '1px',\n 'border-bottom' => '1px', \n 'border-left' => '1px'\n ),\n 'output' => array( 'border' => '.sidebar' ),\n ),\n array(\n 'id' => 'sidebar_border_end',\n 'type' => 'section',\n 'indent' => false,\n ),\n\n /* Slide Dock */\n array(\n 'id' => 'slide_dock_start',\n 'type' => 'section',\n 'title' => __('Single Post Slide Dock', 'redux-framework-demo'),\n 'indent' => false,\n ),\n array(\n 'id' => 'slide_dock_color',\n 'type' => 'color',\n 'title' => __('Background', 'redux-framework-demo'),\n 'subtitle' => __('Pick a color for the backgound', 'redux-framework-demo'),\n 'default' => '#ffffff',\n 'output' => array( 'background-color' => '.slide-dock' ),\n ),\n array(\n 'id' => 'slide_dock_text',\n 'type' => 'color',\n 'title' => __('Titles, Text and Links', 'redux-framework-demo'),\n 'subtitle' => __('Pick a color for titles, text and links', 'redux-framework-demo'),\n 'default' => '#000000',\n 'output' => array( 'color' => '.slide-dock h3, .slide-dock a, .slide-dock p' ),\n ),\n array(\n 'id' => 'slide_dock_end',\n 'type' => 'section',\n 'indent' => false,\n ),\n\n /* Widgetized Footer */\n array(\n 'id' => 'widgets_footer_start',\n 'type' => 'section',\n 'title' => __('Widgetized Footer', 'redux-framework-demo'),\n 'indent' => false,\n ),\n array(\n 'id' => 'footer_color',\n 'type' => 'color',\n 'title' => __('Background', 'redux-framework-demo'),\n 'subtitle' => __('Pick a color for the backgound', 'redux-framework-demo'),\n 'default' => '#242628',\n 'output' => array( 'background-color' => '.footer-sidebar, .widget_ti_most_commented li a' ),\n ),\n array(\n 'id' => 'footer_titles',\n 'type' => 'color',\n 'title' => __('Titles', 'redux-framework-demo'),\n 'subtitle' => __('Pick a color for widget titles', 'redux-framework-demo'),\n 'default' => '#ffcc0d',\n 'output' => array( 'color' => '.footer-sidebar .widget h3' ),\n ),\n array(\n 'id' => 'footer_text',\n 'type' => 'color',\n 'title' => __('Text', 'redux-framework-demo'),\n 'subtitle' => __('Pick a color for widget text', 'redux-framework-demo'),\n 'default' => '#8c919b',\n 'output' => array( 'color' => '.footer-sidebar' ),\n ),\n array(\n 'id' => 'footer_links',\n 'type' => 'link_color',\n 'title' => __('Links Color', 'redux-framework-demo'),\n 'subtitle' => __('Pick a color for widget links', 'redux-framework-demo'),\n 'output' => array('.footer-sidebar .widget a'),\n 'active' => false,\n 'default' => array(\n 'regular' => '#8c919b',\n 'hover' => '#ffcc0d'\n )\n ),\n array(\n 'id' => 'footer_border',\n 'type' => 'border',\n 'title' => __('Borders Color', 'redux-framework-demo'),\n 'subtitle' => __('Pick a color for borders', 'redux-framework-demo'),\n 'default' => array(\n 'border-color' => '#585b61',\n 'border-style' => 'dotted',\n 'border-top' => '1px',\n 'border-right' => '1px',\n 'border-bottom' => '1px',\n 'border-left' => '1px'\n ),\n 'output' => array( 'border' => '.widget-area-2, .widget-area-3, .footer-sidebar .widget' ),\n ),\n array(\n 'id' => 'widgets_footer_end',\n 'type' => 'section',\n 'indent' => false,\n ),\n\n /* Footer */\n array(\n 'id' => 'site_footer_start',\n 'type' => 'section',\n 'title' => __('Footer', 'redux-framework-demo'),\n 'indent' => false,\n ),\n array(\n 'id' => 'site_footer_bg',\n 'type' => 'color',\n 'title' => __('Background', 'redux-framework-demo'),\n 'subtitle' => __('Pick a color for the backgound', 'redux-framework-demo'),\n 'default' => '#222',\n 'output' => array( 'background-color' => '.copyright' ),\n ),\n array(\n 'id' => 'site_footer_text',\n 'type' => 'color',\n 'title' => __('Text and Links', 'redux-framework-demo'),\n 'subtitle' => __('Pick a color for text and links', 'redux-framework-demo'),\n 'default' => '#8c919b',\n 'output' => array( 'color' => '.copyright, .copyright a' ),\n ),\n array(\n 'id' => 'site_footer_end',\n 'type' => 'section',\n 'indent' => false,\n ),\n \n )\n );\n\n \n // Post Item\n $this->sections[] = array(\n 'icon' => 'el-icon-file-new',\n 'title' => __('Post Item', 'redux-framework-demo'),\n 'fields' => array(\n array(\n 'id' => 'post_item_info',\n 'type' => 'info',\n 'desc' => __('All options for a post item on Homepage and Categories', 'redux-framework-demo')\n ),\n array(\n 'id' => 'home_post_date',\n 'type' => 'switch',\n 'title' => __('Homepage Post Date', 'redux-framework-demo'),\n 'subtitle' => __('Enable or Disable homepage post date', 'redux-framework-demo'),\n 'default' => 1,\n ),\n array(\n 'id' => 'archive_post_date',\n 'type' => 'switch',\n 'title' => __('Categories Post Date', 'redux-framework-demo'),\n 'subtitle' => __('Enable or Disable categories post date', 'redux-framework-demo'),\n 'default' => 1,\n ),\n array(\n 'id' => 'site_author_name',\n 'type' => 'switch',\n 'title' => __('Author name', 'redux-framework-demo'),\n 'subtitle' => __('Post author name in all posts site wide', 'redux-framework-demo'),\n 'default' => 1,\n ),\n array(\n 'id' => 'site_wide_excerpt',\n 'type' => 'switch',\n 'title' => __('Exceprt Site Wide', 'redux-framework-demo'),\n 'subtitle' => __('Excerpt of all posts in all categories and Latest Posts section of Page Composer.', 'redux-framework-demo'),\n 'default' => 1,\n ),\n array(\n 'id' => 'site_wide_excerpt_length',\n 'type' => 'text',\n 'title' => __('Excerpt Length', 'redux-framework-demo'),\n 'subtitle' => __('Enter a number of words to limit the exceprt site wide', 'redux-framework-demo'),\n 'validate' => 'numeric',\n 'default' => '24',\n ),\n array(\n 'id' => 'read_more_link',\n 'type' => 'switch',\n 'title' => __('Read More Link', 'redux-framework-demo'),\n 'subtitle' => __('Enable or Disable the Read More link in every post', 'redux-framework-demo'),\n 'default' => 1,\n ),\n )\n );\n \n \n // Single Post\n $this->sections[] = array(\n 'icon' => 'el-icon-file-edit',\n 'title' => __('Single Post', 'redux-framework-demo'),\n 'fields' => array(\n array(\n 'id' => 'single_media_position',\n 'type' => 'button_set',\n 'title' => __('Media Position', 'redux-framework-demo'),\n 'subtitle' => __('Select the media position.', 'redux-framework-demo'),\n 'desc' => __('\"Full Width\" and \"Above the Content\" will work site wide. \"Define Per Post\" enables the \"Media Position\" option in \"Post Options\" box in each post. \"Above the Content\" option does not support Gallery post format.', 'redux-framework-demo'),\n 'options' => array(\n 'fullwidth' => 'Full Width', \n 'abovecontent' => 'Above the Content',\n 'useperpost' => 'Define Per Post'\n ), \n 'default' => 'fullwidth'\n ),\n array(\n 'id' => 'single_featured_image',\n 'type' => 'switch',\n 'title' => __('Featured Image', 'redux-framework-demo'),\n 'subtitle' => __('Enable or Disable featured image', 'redux-framework-demo'),\n 'default' => 1,\n ),\n array(\n 'id' => 'single_rating_box',\n 'type' => 'button_set',\n 'title' => __('Rating Box Position', 'redux-framework-demo'),\n 'subtitle' => __('Specify where to show the rating box', 'redux-framework-demo'),\n 'options' => array(\n 'rating_top' => 'Post Content Top', \n 'rating_bottom' => 'Post Content Bottom',\n ), \n 'default' => 'rating_top'\n ),\n array(\n 'id' => 'single_author_name',\n 'type' => 'switch',\n 'title' => __('Author name', 'redux-framework-demo'),\n 'subtitle' => __('Enable or Disable post author name', 'redux-framework-demo'),\n 'default' => 1,\n ),\n array(\n 'id' => 'single_post_cat_name',\n 'type' => 'switch',\n 'title' => __('Category name', 'redux-framework-demo'),\n 'subtitle' => __('Enable or Disable the post category name', 'redux-framework-demo'),\n 'default' => 1,\n ),\n array(\n 'id' => 'single_post_date',\n 'type' => 'switch',\n 'title' => __('Post Date', 'redux-framework-demo'),\n 'subtitle' => __('Enable or Disable the post date', 'redux-framework-demo'),\n 'default' => 1,\n ),\n array(\n 'id' => 'single_tags_list',\n 'type' => 'switch',\n 'title' => __('Tags', 'redux-framework-demo'),\n 'subtitle' => __('Enable or Disable the tags list', 'redux-framework-demo'),\n 'default' => 1,\n ),\n array(\n 'id' => 'single_social',\n 'type' => 'switch',\n 'title' => __('Social Share Links', 'redux-framework-demo'),\n 'subtitle' => __('Enable or Disable social share links panel', 'redux-framework-demo'),\n 'default' => 1,\n ),\n array(\n 'id' => 'single_social_style',\n 'type' => 'button_set',\n 'title' => __('Social Share Link Style', 'redux-framework-demo'),\n 'subtitle' => __('Specify social share links panel styling', 'redux-framework-demo'),\n 'options' => array(\n 'social_default' => 'Minimal',\n 'social_colors' => 'Colorful',\n ), \n 'default' => 'social_default'\n ),\n array(\n 'id' => 'single_twitter_user',\n 'type' => 'text',\n 'title' => __('Twitter Username', 'redux-framework-demo'),\n 'subtitle' => __('Type your Twitter username for Twitter share link, without the at sign', 'redux-framework-demo'),\n ),\n array(\n 'id' => 'single_author',\n 'type' => 'switch',\n 'title' => __('Author Box', 'redux-framework-demo'),\n 'subtitle' => __('Enable or Disable the author box', 'redux-framework-demo'),\n 'default' => 1,\n ),\n array(\n 'id' => 'single_nav_arrows',\n 'type' => 'switch',\n 'title' => __('Previous Post / Next Post', 'redux-framework-demo'),\n 'subtitle' => __('Enable or Disable Previous Post/Next Post navigation in single post page', 'redux-framework-demo'),\n 'default' => 1,\n ),\n array(\n 'id' => 'single_slide_dock',\n 'type' => 'switch',\n 'title' => __('Slide Dock', 'redux-framework-demo'),\n 'subtitle' => __('Enable or Disable the slide dock in the bottom right corner', 'redux-framework-demo'),\n 'default' => 1,\n ),\n array(\n 'id' => 'single_related',\n 'type' => 'switch',\n 'title' => __('Related Posts', 'redux-framework-demo'),\n 'subtitle' => __('Enable or Disable the Related Posts box', 'redux-framework-demo'),\n 'default' => 1,\n ),\n array(\n 'id' => 'single_related_posts_show_by',\n 'type' => 'button_set',\n 'title' => __('Show Related Posts By', 'redux-framework-demo'),\n 'subtitle' => __('Specify the Related Posts output', 'redux-framework-demo'),\n 'options' => array(\n 'related_cat' => 'Category', \n 'related_tag' => 'Tag',\n ), \n 'default' => 'related_cat'\n ),\n array(\n 'id' => 'single_related_posts_to_show',\n 'type' => 'button_set',\n 'title' => __('Number of Related Posts', 'redux-framework-demo'),\n 'subtitle' => __('Specify the number Related Posts to output', 'redux-framework-demo'),\n 'options' => array(\n '3' => '3', \n '6' => '6',\n '9' => '9',\n ), \n 'default' => '3'\n ),\n )\n );\n\n \n // Posts Page\n $this->sections[] = array(\n 'icon' => 'el-icon-file',\n 'title' => __('Posts Page', 'redux-framework-demo'),\n 'fields' => array(\n array(\n 'id' => 'posts_page_info',\n 'type' => 'info',\n 'desc' => __('Posts Page is created under Settings &rarr; Reading', 'redux-framework-demo')\n ),\n array(\n 'id' => 'posts_page_title',\n 'type' => 'button_set',\n 'title' => __('Page Title', 'redux-framework-demo'),\n 'subtitle' => __('Specify the page title behavior', 'redux-framework-demo'),\n 'options' => array(\n 'no_title' => 'No Title',\n 'full_width_title' => 'Full Width',\n 'above_content_title' => 'Above The Content'\n ),\n 'default' => 'no_title'\n ),\n array(\n 'id' => 'posts_page_layout',\n 'type' => 'image_select',\n 'title' => __('Posts Layout', 'redux-framework-demo'),\n 'subtitle' => __('Select the page layout', 'redux-framework-demo'),\n 'options' => array(\n 'masonry-layout' => array('img' => get_template_directory_uri() . '/admin/images/to-icon-post-masonry.png'),\n 'grid-layout' => array('img' => get_template_directory_uri() . '/admin/images/to-icon-post-grid.png'),\n 'list-layout' => array('img' => get_template_directory_uri() . '/admin/images/to-icon-post-list.png'),\n 'classic-layout' => array('img' => get_template_directory_uri() . '/admin/images/to-icon-post-classic.png'),\n ), \n 'default' => 'masonry-layout'\n ),\n )\n );\n\n \n // Custom Code\n $this->sections[] = array(\n 'icon' => 'el-icon-glasses',\n 'title' => __('Custom Code', 'redux-framework-demo'),\n 'fields' => array(\n array(\n 'id' => 'custom_css',\n 'type' => 'textarea',\n 'title' => __('Custom CSS', 'redux-framework-demo'),\n 'subtitle' => __('Quickly add some CSS by adding it to this block.', 'redux-framework-demo'),\n 'rows' => 20\n ),\n array(\n 'id' => 'custom_js_header',\n 'type' => 'textarea',\n 'title' => __('Custom JavaScript/Analytics Header', 'redux-framework-demo'),\n 'subtitle' => __('Paste here JavaScript and/or Analytics code wich will appear in the Header of your site. DO NOT include opening and closing script tags.', 'redux-framework-demo'),\n 'rows' => 12\n ),\n array(\n 'id' => 'custom_js_footer',\n 'type' => 'textarea',\n 'title' => __('Custom JavaScript/Analytics Footer', 'redux-framework-demo'),\n 'subtitle' => __('Paste JavaScript and/or Analytics code wich will appear in the Footer of your site. DO NOT include opening and closing script tags.', 'redux-framework-demo'),\n 'rows' => 12\n ),\n )\n );\n\n\n // Ad Units\n $this->sections[] = array(\n 'icon' => 'el-icon-bullhorn',\n 'title' => __('Ad Units', 'redux-framework-demo'),\n 'fields' => array(\n array(\n 'id' => 'ad_units_info',\n 'type' => 'info',\n 'desc' => __('Add ads in one of the two formats: Image Ad or Code Generated Ad', 'redux-framework-demo')\n ),\n // Header Ads\n array(\n 'id' => 'ad_header_start',\n 'type' => 'section',\n 'title' => __('Header Ad', 'redux-framework-demo'),\n 'indent' => false,\n ),\n\n array(\n 'id' => 'header_image_ad',\n 'type' => 'media',\n 'url' => true,\n 'placeholder' => __('Click the Upload button to upload the ad image', 'redux-framework-demo'),\n 'title' => __('Ad Image', 'redux-framework-demo'),\n 'subtitle' => __('Best size for header ad image is 728x90', 'redux-framework-demo'),\n 'default' => array(\n 'url' => '',\n ),\n ),\n\n array(\n 'id' => 'header_image_ad_url',\n 'type' => 'text',\n 'title' => __('Ad link', 'redux-framework-demo'),\n 'subtitle' => __('Enter a full URL of ad link', 'redux-framework-demo'),\n 'placeholder' => 'http://'\n ),\n \n \n array(\n 'id' => 'header_code_ad',\n 'type' => 'textarea',\n 'title' => __('Ad Code', 'redux-framework-demo'),\n 'subtitle' => __('Paste the code generated ad. Best size is 728x90', 'redux-framework-demo')\n ),\n\n array(\n 'id' => 'ad_header_end',\n 'type' => 'section',\n 'indent' => false,\n ),\n \n\n // Single above the content\n array(\n 'id' => 'ad_single1_start',\n 'type' => 'section',\n 'title' => __('Single Post - Above the content', 'redux-framework-demo'),\n 'indent' => false,\n ),\n\n array(\n 'id' => 'single_image_top_ad',\n 'type' => 'media',\n 'url' => true,\n 'placeholder' => __('Click the Upload button to upload the ad image', 'redux-framework-demo'),\n 'title' => __('Ad Image', 'redux-framework-demo'),\n 'subtitle' => __('Width limit is 1050 pixels', 'redux-framework-demo'),\n 'default' => array(\n 'url' => '',\n ),\n ),\n\n array(\n 'id' => 'single_image_top_ad_url',\n 'type' => 'text',\n 'title' => __('Ad link', 'redux-framework-demo'),\n 'subtitle' => __('Enter a full URL of ad link', 'redux-framework-demo'),\n 'placeholder' => 'http://'\n ),\n \n array(\n 'id' => 'single_code_top_ad',\n 'type' => 'textarea',\n 'title' => __('Ad Code', 'redux-framework-demo'),\n 'subtitle' => __('Width limit is 1050 pixels.', 'redux-framework-demo')\n ),\n\n array(\n 'id' => 'ad_single1_end',\n 'type' => 'section',\n 'indent' => false,\n ),\n\n\n // Single under the content\n array(\n 'id' => 'ad_single2_start',\n 'type' => 'section',\n 'title' => __('Single Post - Under the content', 'redux-framework-demo'),\n 'indent' => false,\n ),\n\n array(\n 'id' => 'single_image_bottom_ad',\n 'type' => 'media',\n 'url' => true,\n 'placeholder' => __('Click the Upload button to upload the ad image', 'redux-framework-demo'),\n 'title' => __('Ad Image', 'redux-framework-demo'),\n 'subtitle' => __('Width limit is 1050 pixels', 'redux-framework-demo'),\n 'default' => array(\n 'url' => '',\n ),\n ),\n\n array(\n 'id' => 'single_image_bottom_ad_url',\n 'type' => 'text',\n 'title' => __('Ad link', 'redux-framework-demo'),\n 'subtitle' => __('Enter a full URL of ad link', 'redux-framework-demo'),\n 'placeholder' => 'http://'\n ),\n \n array(\n 'id' => 'single_code_bottom_ad',\n 'type' => 'textarea',\n 'title' => __('Ad Code', 'redux-framework-demo'),\n 'subtitle' => __('Width limit is 1050 pixels.', 'redux-framework-demo')\n ),\n\n array(\n 'id' => 'ad_single2_end',\n 'type' => 'section',\n 'indent' => false,\n ),\n\n\n // Footer\n array(\n 'id' => 'ad_footer_start',\n 'type' => 'section',\n 'title' => __('Footer', 'redux-framework-demo'),\n 'indent' => false,\n ),\n\n array(\n 'id' => 'footer_image_ad',\n 'type' => 'media',\n 'url' => true,\n 'placeholder' => __('Click the Upload button to upload the ad image', 'redux-framework-demo'),\n 'title' => __('Ad Image', 'redux-framework-demo'),\n 'subtitle' => __('Width limit is 1050 pixels', 'redux-framework-demo'),\n 'default' => array(\n 'url' => '',\n ),\n ),\n\n array(\n 'id' => 'footer_image_ad_url',\n 'type' => 'text',\n 'title' => __('Ad link', 'redux-framework-demo'),\n 'subtitle' => __('Enter a full URL of ad link', 'redux-framework-demo'),\n 'placeholder' => 'http://'\n ),\n \n array(\n 'id' => 'footer_code_ad',\n 'type' => 'textarea',\n 'title' => __('Ad Code', 'redux-framework-demo'),\n 'subtitle' => __('Width limit is 1050 pixels.', 'redux-framework-demo')\n ),\n\n array(\n 'id' => 'ad_footer_end',\n 'type' => 'section',\n 'indent' => false,\n ),\n )\n );\n\n \n // 404 Error Page\n $this->sections[] = array(\n 'icon' => 'el-icon-warning-sign',\n 'title' => __('Page 404', 'redux-framework-demo'),\n 'fields' => array(\n array(\n 'id' => 'error_image',\n 'type' => 'media',\n 'url' => true,\n 'placeholder' => __('Click the Upload button to upload the image', 'redux-framework-demo'),\n 'title' => __('Upload Image', 'redux-framework-demo'),\n 'subtitle' => __('Upload an image for the 404 error page', 'redux-framework-demo'),\n 'default' => array(\n 'url' => get_template_directory_uri() . '/images/error-page.png',\n 'width' => '402',\n 'height' => '402',\n ),\n ),\n )\n );\n\n\n // Import/Export\n $this->sections[] = array(\n 'title' => __('Import / Export', 'redux-framework-demo'),\n 'desc' => __('Import and Export your settings from file, text or URL.', 'redux-framework-demo'),\n 'icon' => 'el-icon-refresh',\n 'fields' => array(\n array(\n 'id' => 'opt-import-export',\n 'type' => 'import_export',\n 'title' => 'Import Export',\n 'subtitle' => 'Save and restore your Redux options',\n 'full_width' => false,\n ),\n ),\n ); \n }", "public function contentOptiontCallback()\n { ?>\n <p>\n <?php\n esc_html_e(\n 'All settings related to the content of knowledgebase pages.',\n 'reference'\n );\n ?>\n </p>\n\n <?php\n return;\n }", "public static function live_preview() {\r\n wp_enqueue_script( \r\n 'mytheme-themecustomizer', // Give the script a unique ID\r\n get_template_directory_uri() . '/frontend/js/theme-customizer.js', // Define the path to the JS file\r\n array( 'jquery', 'customize-preview' ), // Define dependencies\r\n '', // Define a version (optional) \r\n true // Specify whether to put in footer (leave this true)\r\n );\r\n }", "public function render_content() {\n\tif ( empty( $this->choices ) ) {\n\t\treturn;\n\t}\n\t$this_val = $this->value(); ?>\n\t\t<label>\n\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t<?php if ( '' != $this->description ) { ?>\n\t\t\t\t<span class=\"description customize-control-description\"><?php echo $this->description; ?></span>\n\t\t\t<?php } ?>\n\t\t\t<select <?php $this->link(); ?> multiple=\"multiple\" style=\"height:120px;\">\n\t\t\t\t<?php foreach ( $this->choices as $value => $label ) {\n\t\t\t\t\t$selected = ( in_array( $value, $this_val ) ) ? selected( 1, 1, false ) : '';\n\t\t\t\t\techo '<option value=\"' . esc_attr( $value ) . '\"' . $selected . '>' . $label . '</option>';\n\t\t\t\t} ?>\n\t\t\t</select>\n\t\t</label>\n\t<?php }", "function example_customizer_menu() {\n add_theme_page( 'Customize', 'Customize', 'edit_theme_options', 'customize.php' );\n}", "function ivan_vc_customizer_output() {\r\n\r\n\tglobal $elite_addons_vc_support;\r\n\r\n\tif( $elite_addons_vc_support == true )\r\n\t\treturn;\r\n\r\n\t$output = '';\r\n\r\n\tob_start();\r\n\r\n\t//\r\n\t// Primary Color\r\n\t//\r\n\t$accentBG = ivan_vc_get_option('ivan_vc_primary_bg');\r\n\t$accentColor = '#fff'; // Default\r\n\tif( '' != ivan_vc_get_option('ivan_vc_primary_color') && null != ivan_vc_get_option('ivan_vc_primary_color') )\r\n\t\t$accentColor = ivan_vc_get_option('ivan_vc_primary_color');\r\n\r\n\tif($accentBG != '' && $accentBG != null) :\r\n\r\n\t\t// Adjusted Accent Bg\r\n\t\t$darkenAccentBG = iv_vc_adjustColor($accentBG, -13);\r\n\t?>\r\n\t\t.ivan-staff-wrapper .social-icons a:hover,\r\n\t\t.ivan-call-action.primary-bg.with-icon .call-action-icon i,\r\n\t\t.ivan-button.outline:hover,\r\n\t\t.ivan-pricing-table.default.dark-bg .signup:hover,\r\n\t\t.ivan-pricing-table.default.black-bg .signup:hover,\r\n\t\t.ivan-pricing-table.big-price .top-section .adquire-plan .signup:hover,\r\n\t\t.ivan-pricing-table.description-support .bottom-section .signup:hover,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .signup:hover,\r\n\t\t.ivan-pricing-table.subtitle.black-bg .signup:hover,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .signup:hover,\r\n\t\t.ivan-pricing-table.small-desc.black-bg .signup:hover,\r\n\t\t.marker-icon.ivan-gmap-marker,\r\n\t\t.ivan-title-wrapper.primary-bg .icon-above i,\r\n\t\t.ivan-title-wrapper.primary-bg strong,\r\n\t\t.ivan-title-wrapper.primary-bg a,\r\n\t\t.ivan-title-wrapper.primary-bg a:hover,\r\n\t\t.ivan-service .main-icon,\r\n\t\t.ivan-service.primary-bg .fa-stack .main-icon,\r\n\t\t.ivan-icon-box.primary-bg .icon-box-holder .main-icon,\r\n\t\t.ivan-icon-wrapper .primary-bg .ivan-icon,\r\n\t\t.ivan-icon-wrapper .primary-bg a:hover,\r\n\t\t.ivan-icon-wrapper .primary-bg .ivan-font-stack .stack-holder,\r\n\t\t.ivan-icon-wrapper .primary-bg .ivan-font-stack.with-link:hover .stack-holder,\r\n\t\t.ivan-icon-list.primary-bg i,\r\n\t\t.ivan-list.primary-bg.number ul > li:before {\r\n\t\t\tcolor: <?php echo $accentBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button:hover,\r\n\t\t.ivan-button.outline:hover hr,\r\n\t\t.ivan-button.no-border:hover,\r\n\t\t.ivan-button.primary-bg,\r\n\t\t.ivan-projects .ivan-project.hide-entry .entry,\r\n\t\t.ivan-projects .ivan-project.outer-square .entry,\r\n\t\t.ivan-projects .ivan-project.lateral-cover .entry,\r\n\t\t.ivan-projects .ivan-project.smooth-cover .entry,\r\n\t\t.ivan-testimonial.primary-bg.boxed-left .testimonial-content,\r\n\t\t.ivan-service .fa-stack,\r\n\t\t.ivan-service.primary-bg,\r\n\t\t.ivan-progress.primary-bg .ivan-progress-inner,\r\n\t\t.ivan-icon-box.primary-bg .icon-box-holder .fa-stack,\r\n\t\t.ivan-icon-boxed-holder.primary-bg .ivan-icon-boxed-icon-inner .fa-stack,\r\n\t\t.ivan-icon-wrapper .primary-bg .ivan-font-stack-square,\r\n\t\t.ivan-icon-list.primary-bg.circle i,\r\n\t\t.ivan-list.primary-bg.number.circle-in ul > li:before,\r\n\t\t.ivan-list.primary-bg.circle ul > li:before,\r\n\t\t.ivan-quote.primary-bg blockquote,\r\n\t\t.ivan-tabs-wrap .wpb_tour_tabs_wrapper.iv-tabs.iv-boxed .wpb_tabs_nav li.ui-tabs-active a,\r\n\t\t.ivan-vc-separator.primary-bg,\r\n\t\t.ivan-pricing-table.default.primary-bg,\r\n\t\t.ivan-pricing-table.subtitle .featured-table-text,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg,\r\n\t\t.ivan-pricing-table.small-desc .featured-table-text,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg,\r\n\t\t.ivan-projects .ivan-project.cover-entry .entry .read-more a:hover,\r\n\t\t.ivan-projects .ivan-project.soft-cover .entry .read-more a:hover,\r\n\t\t.ivan-icon-wrapper .primary-bg .ivan-font-stack-square.with-link:hover,\r\n\t\t.wpb_toggle.iv-toggle.boxed-arrow.wpb_toggle_title_active,\r\n\t\t.ivan_acc_holder.iv-accordion.with-arrow .ui-state-active {\r\n\t\t\tbackground-color: <?php echo $accentBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button:hover,\r\n\t\t.ivan-button.outline:hover,\r\n\t\t.ivan-button.no-border:hover,\r\n\t\t.ivan-button.primary-bg,\r\n\t\t.ivan-button.primary-bg.outline.text-separator.with-icon .text-btn,\r\n\t\t.ivan-pricing-table.default.dark-bg .signup:hover,\r\n\t\t.ivan-pricing-table.default.black-bg .signup:hover,\r\n\t\t.ivan-pricing-table.big-price .top-section .adquire-plan .signup:hover,\r\n\t\t.ivan-pricing-table.description-support .bottom-section .signup:hover,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .signup:hover,\r\n\t\t.ivan-pricing-table.subtitle.black-bg .signup:hover,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .signup:hover,\r\n\t\t.ivan-pricing-table.small-desc.black-bg .signup:hover,\r\n\t\t.ivan-projects .ivan-project.cover-entry .entry .read-more a:hover,\r\n\t\t.ivan-projects .ivan-project.soft-cover .entry .read-more a:hover,\r\n\t\t.ivan-service .fa-stack,\r\n\t\t.ivan-icon-box.primary-bg .icon-box-holder .fa-stack,\r\n\t\t.ivan-icon-boxed-holder.primary-bg .ivan-icon-boxed-icon-inner .fa-stack,\r\n\t\t.ivan-tabs-wrap .wpb_tour_tabs_wrapper.iv-tabs.iv-boxed .wpb_tabs_nav li.ui-tabs-active a,\r\n\t\t.ivan-tabs-wrap .wpb_tour_tabs_wrapper.iv-tabs.iv-boxed .wpb_tab {\r\n\t\t\tborder-color: <?php echo $accentBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button:hover,\r\n\t\t.ivan-button.primary-bg,\r\n\t\t.ivan-button.primary-bg:hover,\r\n\t\t.ivan-button.primary-bg.with-icon.icon-cover .icon-simple,\r\n\t\t.ivan-pricing-table.default.primary-bg h3,\r\n\t\t.ivan-pricing-table.default.primary-bg li,\r\n\t\t.ivan-pricing-table.default.primary-bg .plan-infos,\r\n\t\t.ivan-pricing-table.default.primary-bg li a,\r\n\t\t.ivan-pricing-table.default.primary-bg li a:hover,\r\n\t\t.ivan-pricing-table.default.primary-bg .signup,\r\n\t\t.ivan-pricing-table.default.primary-bg .signup:hover,\r\n\t\t.ivan-pricing-table.default.primary-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.subtitle .featured-table-text,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg h3,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg li,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .plan-infos,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .plan-subtitle,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg li a,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg li a:hover,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .signup,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .signup:hover,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.small-desc .featured-table-text,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg h3,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg li,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .plan-infos,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .plan-subtitle,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg li a,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg li a:hover,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .signup,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .signup:hover,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .featured-table-text,\r\n\t\t.ivan-projects .ivan-project.cover-entry .entry .read-more a:hover,\r\n\t\t.ivan-projects .ivan-project.soft-cover .entry .read-more a:hover,\r\n\t\t.ivan-testimonial.primary-bg.boxed-left .testimonial-content,\r\n\t\t.ivan-testimonial.primary-bg.boxed-left .testimonial-content a,\r\n\t\t.ivan-testimonial.primary-bg.boxed-left .testimonial-content a:hover,\r\n\t\t.ivan-service .fa-stack .main-icon,\r\n\t\t.ivan-service.primary-bg .service-title,\r\n\t\t.ivan-service.primary-bg .main-icon,\r\n\t\t.ivan-icon-box.primary-bg .icon-box-holder .fa-stack .main-icon,\r\n\t\t.ivan-icon-boxed-holder.primary-bg .ivan-icon-boxed-icon-inner .fa-stack .main-icon,\r\n\t\t.ivan-icon-wrapper .primary-bg a,\r\n\t\t.ivan-icon-wrapper .primary-bg .ivan-font-stack .main-icon,\r\n\t\t.ivan-icon-wrapper .primary-bg .ivan-font-stack-square i,\r\n\t\t.ivan-icon-list.primary-bg.circle i,\r\n\t\t.ivan-list.primary-bg.number.circle-in ul > li:before,\r\n\t\t.ivan-quote.primary-bg blockquote h5,\r\n\t\t.ivan-quote.primary-bg blockquote .author,\r\n\t\t.ivan-quote.primary-bg blockquote .pull-left,\r\n\t\t.ivan-tabs-wrap .wpb_tour_tabs_wrapper.iv-tabs.iv-boxed .wpb_tabs_nav li.ui-tabs-active a,\r\n\t\t.wpb_toggle.iv-toggle.boxed-arrow.wpb_toggle_title_active,\r\n\t\t.wpb_toggle.iv-toggle.boxed-arrow.wpb_toggle_title_active .toggle-mark .toggle-mark-icon,\r\n\t\t.ivan_acc_holder.iv-accordion.with-arrow .ui-state-active a,\r\n\t\t.ivan_acc_holder.iv-accordion.with-arrow .ui-state-active .accordion-mark .accordion-mark-icon {\r\n\t\t\tcolor: <?php echo $accentColor; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button:hover hr,\r\n\t\t.ivan-button.primary-bg hr,\r\n\t\t.ivan-button.primary-bg:hover hr,\r\n\t\t.ivan-service.primary-bg .fa-stack {\r\n\t\t\tbackground-color: <?php echo $accentColor; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-pricing-table.default.primary-bg .signup,\r\n\t\t.ivan-pricing-table.default.primary-bg .signup:hover,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .signup,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .signup:hover,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .signup,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .signup:hover,\r\n\t\t.ivan-service.primary-bg .fa-stack {\r\n\t\t\tborder-color: <?php echo $accentColor; ?>;\r\n\t\t}\r\n\r\n\t\t// Darken Accent Bg\r\n\t\t.ivan-button.primary-bg:hover,\r\n\t\t.ivan-button.primary-bg.outline hr,\r\n\t\t.ivan-button.primary-bg.outline:hover hr,\r\n\t\t.ivan-button.primary-bg.outline.icon-cover.with-icon .icon-simple,\r\n\t\t.ivan-pricing-table.default.primary-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.subtitle.primary-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.small-desc.primary-bg .featured-table-text {\r\n\t\t\tbackground-color: <?php echo $darkenAccentBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button.primary-bg:hover {\r\n\t\t\tborder-color: <?php echo $darkenAccentBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button.primary-bg.outline,\r\n\t\t.ivan-button.primary-bg.outline:hover {\r\n\t\t\tcolor: <?php echo $darkenAccentBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-service.primary-bg .content-section-holder li,\r\n\t\t.ivan-service.primary-bg .content-section-holder p {\r\n\t\t border-color: <?php echo iv_vc_adjustColor($accentBG, -7); ?>;\r\n\t\t}\r\n\r\n\t<?php\r\n\tendif;\r\n\r\n\t//\r\n\t// Dark Color\r\n\t//\r\n\t$darkBG = ivan_vc_get_option('ivan_vc_dark_bg');\r\n\t$darkColor = '#fff'; // Default\r\n\tif( '' != ivan_vc_get_option('ivan_vc_dark_color') && null != ivan_vc_get_option('ivan_vc_dark_color') )\r\n\t\t$darkColor = ivan_vc_get_option('ivan_vc_dark_color');\r\n\r\n\tif($darkBG != '' && $darkBG != null) :\r\n\t\t// Adjusted Dark Bg\r\n\t\t$darkenDarkBG = iv_vc_adjustColor($darkBG, -13);\r\n\t?>\r\n\r\n\t\t.ivan-call-action.dark-bg.boxed,\r\n\t\t.ivan-button.dark-bg,\r\n\t\t.ivan-testimonial.dark-bg.boxed-left .testimonial-content,\r\n\t\t.ivan-title-wrapper.dark-bg .ivan-vc-separator.small,\r\n\t\t.ivan-pie-chart-holder.dark-bg .ivan-pie-chart-content .ivan-vc-separator,\r\n\t\t.ivan-service.dark-bg,\r\n\t\t.ivan-progress.dark-bg .ivan-progress-outer,\r\n\t\t.ivan-icon-box.dark-bg .icon-box-holder .fa-stack,\r\n\t\t.ivan-icon-boxed-holder.dark-bg,\r\n\t\t.ivan-icon-wrapper .dark-bg .ivan-font-stack-square,\r\n\t\t.ivan-icon-list.dark-bg.circle i,\r\n\t\t.ivan-list.dark-bg.number.circle-in ul > li:before,\r\n\t\t.ivan-list.dark-bg.circle ul > li:before,\r\n\t\t.ivan-quote.dark-bg blockquote,\r\n\t\t.ivan-vc-separator.dark-bg,\r\n\t\t.ivan-pricing-table.default.dark-bg,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg,\r\n\t\t.ivan-icon-wrapper .dark-bg .ivan-font-stack-square.with-link:hover {\r\n\t\t\tbackground-color: <?php echo $darkBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-call-action.dark-bg.opaque.with-icon .call-action-icon i,\r\n\t\t.ivan-call-action.dark-bg.opaque .call-action-text-inner .call-action-heading-text,\r\n\t\t.ivan-call-action.dark-bg.opaque .call-action-text-inner .call-action-text,\r\n\t\t.ivan-testimonial.dark-bg .testimonial-content,\r\n\t\t.ivan-testimonial.dark-bg .testimonial-content a,\r\n\t\t.ivan-testimonial.dark-bg .testimonial-content a:hover,\r\n\t\t.ivan-testimonial.dark-bg .author-name,\r\n\t\t.ivan-testimonial.dark-bg .author-desc,\r\n\t\t.ivan-title-wrapper.dark-bg .title-heading,\r\n\t\t.ivan-title-wrapper.dark-bg .sub,\r\n\t\t.ivan-title-wrapper.dark-bg i,\r\n\t\t.ivan-title-wrapper.dark-bg strong,\r\n\t\t.ivan-title-wrapper.dark-bg a,\r\n\t\t.ivan-title-wrapper.dark-bg a:hover,\r\n\t\t.ivan-pie-chart-holder.dark-bg .ivan-pie-chart,\r\n\t\t.ivan-pie-chart-holder.dark-bg .ivan-pie-chart-content .pie-chart-heading,\r\n\t\t.ivan-pie-chart-holder.dark-bg .pie-chart-content-inner,\r\n\t\t.ivan-service.dark-bg .fa-stack .main-icon,\r\n\t\t.ivan-progress.dark-bg .progress-title-holder,\r\n\t\t.ivan-icon-box.dark-bg .icon-box-text-holder .icon-box-title,\r\n\t\t.ivan-icon-box.dark-bg .icon-box-content,\r\n\t\t.ivan-icon-box.dark-bg .icon-box-holder .main-icon,\r\n\t\t.ivan-icon-box.dark-bg a,\r\n\t\t.ivan-icon-box.dark-bg a:hover,\r\n\t\t.ivan-icon-boxed-holder.dark-bg .ivan-icon-boxed-icon-inner .fa-stack .main-icon,\r\n\t\t.ivan-icon-wrapper .dark-bg .ivan-icon,\r\n\t\t.ivan-icon-wrapper .dark-bg a,\r\n\t\t.ivan-icon-wrapper .dark-bg a:hover,\r\n\t\t.ivan-icon-wrapper .dark-bg .ivan-font-stack .stack-holder,\r\n\t\t.ivan-icon-wrapper .dark-bg .ivan-font-stack.with-link:hover .stack-holder,\r\n\t\t.ivan-icon-list.dark-bg p,\r\n\t\t.ivan-icon-list.dark-bg i,\r\n\t\t.ivan-list.dark-bg li,\r\n\t\t.ivan-list.dark-bg.number ul > li:before {\r\n\t\t\tcolor: <?php echo $darkBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-progress.dark-bg .ivan-progress-outer,\r\n\t\t.ivan-icon-box.dark-bg .icon-box-holder .fa-stack,\r\n\t\t.ivan-icon-box.dark-bg hr,\r\n\t\t.ivan-icon-boxed-holder.dark-bg {\r\n\t\t\tborder-color: <?php echo $darkBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-call-action.dark-bg.boxed.with-icon .call-action-icon i,\r\n\t\t.ivan-call-action.dark-bg.boxed .call-action-text-inner .call-action-heading-text,\r\n\t\t.ivan-call-action.dark-bg.boxed .call-action-text-inner .call-action-text,\r\n\t\t.ivan-dual-button .dark-bg .middle-text,\r\n\t\t.ivan-button.dark-bg,\r\n\t\t.ivan-button.dark-bg:hover,\r\n\t\t.ivan-button.dark-bg.with-icon.icon-cover .icon-simple,\r\n\t\t.ivan-pricing-table.default.dark-bg h3,\r\n\t\t.ivan-pricing-table.default.dark-bg li,\r\n\t\t.ivan-pricing-table.default.dark-bg .plan-infos,\r\n\t\t.ivan-pricing-table.default.dark-bg li a,\r\n\t\t.ivan-pricing-table.default.dark-bg li a:hover,\r\n\t\t.ivan-pricing-table.default.dark-bg .signup,\r\n\t\t.ivan-pricing-table.default.dark-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg h3,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg li,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .plan-infos,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .plan-subtitle,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg li a,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg li a:hover,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .signup,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg h3,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg li,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .plan-infos,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .plan-subtitle,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg li a,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg li a:hover,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .signup,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .featured-table-text,\r\n\t\t.ivan-testimonial.dark-bg.boxed-left .testimonial-content,\r\n\t\t.ivan-testimonial.dark-bg.boxed-left .testimonial-content a,\r\n\t\t.ivan-testimonial.dark-bg.boxed-left .testimonial-content a:hover,\r\n\t\t.ivan-service.dark-bg .content-section-holder li,\r\n\t\t.ivan-service.dark-bg .content-section-holder p,\r\n\t\t.ivan-service.dark-bg .content-section-holder a,\r\n\t\t.ivan-service.dark-bg .content-section-holder a:hover,\r\n\t\t.ivan-service.dark-bg .service-title,\r\n\t\t.ivan-service.dark-bg .main-icon,\r\n\t\t.ivan-service.primary-bg .content-section-holder li,\r\n\t\t.ivan-service.primary-bg .content-section-holder p,\r\n\t\t.ivan-service.primary-bg .content-section-holder a,\r\n\t\t.ivan-service.primary-bg .content-section-holder a:hover,\r\n\t\t.ivan-icon-box.dark-bg .icon-box-holder .fa-stack .main-icon,\r\n\t\t.ivan-icon-boxed-holder.dark-bg .icon-box-title,\r\n\t\t.ivan-icon-boxed-holder.dark-bg .icon-box-content,\r\n\t\t.ivan-icon-boxed-holder.dark-bg a,\r\n\t\t.ivan-icon-boxed-holder.dark-bg a:hover,\r\n\t\t.ivan-icon-wrapper .dark-bg .ivan-font-stack .main-icon,\r\n\t\t.ivan-icon-wrapper .dark-bg .ivan-font-stack-square i,\r\n\t\t.ivan-icon-list.dark-bg.circle i,\r\n\t\t.ivan-list.dark-bg.number.circle-in ul > li:before,\r\n\t\t.ivan-quote.dark-bg blockquote h5,\r\n\t\t.ivan-quote.dark-bg blockquote .author,\r\n\t\t.ivan-quote.dark-bg blockquote .pull-left {\r\n\t\t\tcolor: <?php echo $darkColor; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button.dark-bg hr,\r\n\t\t.ivan-button.dark-bg:hover hr,\r\n\t\t.ivan-service.dark-bg .fa-stack,\r\n\t\t.ivan-progress.dark-bg .ivan-progress-inner,\r\n\t\t.ivan-icon-boxed-holder.dark-bg .ivan-icon-boxed-icon-inner .fa-stack {\r\n\t\t\tbackground-color: <?php echo $darkColor; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-pricing-table.default.dark-bg .signup,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .signup,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .signup,\r\n\t\t.ivan-service.dark-bg .fa-stack,\r\n\t\t.ivan-icon-boxed-holder.dark-bg .ivan-icon-boxed-icon-inner .fa-stack {\r\n\t\t\tborder-color: <?php echo $darkColor; ?>;\r\n\t\t}\r\n\r\n\t\t// Darken Dark Bg\r\n\t\t.ivan-dual-button .dark-bg .middle-text,\r\n\t\t.ivan-button.dark-bg,\r\n\t\t.ivan-button.dark-bg:hover {\r\n\t\t\tborder-color: <?php echo $darkenDarkBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-dual-button .dark-bg .middle-text,\r\n\t\t.ivan-pricing-table.default.dark-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.subtitle.dark-bg .featured-table-text,\r\n\t\t.ivan-pricing-table.small-desc.dark-bg .featured-table-text,\r\n\t\t.ivan-button.dark-bg:hover,\r\n\t\t.ivan-button.dark-bg.outline hr,\r\n\t\t.ivan-button.dark-bg.outline:hover hr,\r\n\t\t.ivan-button.dark-bg.outline.icon-cover.with-icon .icon-simple {\r\n\t\t\tbackground: <?php echo $darkenDarkBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-button.dark-bg.outline,\r\n\t\t.ivan-button.dark-bg.outline:hover {\r\n\t\t\tcolor: <?php echo $darkenDarkBG; ?>;\r\n\t\t}\r\n\r\n\t\t.ivan-service.dark-bg .content-section-holder li,\r\n\t\t.ivan-service.dark-bg .content-section-holder p {\r\n\t\t border-color: <?php echo iv_vc_adjustColor($darkBG, -7); ?>;\r\n\t\t}\r\n\t\t\t\r\n\t<?php\r\n\tendif;\r\n\r\n\t$output = ob_get_contents();\r\n\tob_end_clean();\r\n\t// Check if can print something...\r\n\tif('' != $output) :\r\n\t\techo '<style type=\"text/css\">' . $output . '</style>';\r\n\tendif;// end main check\r\n\r\n}", "public function render_content() {\n\n\t\tswitch ( $this->type ) {\n\n\t\t\tcase 'content' :\n\n\t\t\t\tif ( ! empty( $this->label ) ) : ?>\n\t\t\t\t\t<span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n\t\t\t\t<?php endif;\n\n\t\t\t\tif ( ! empty( $this->description ) ) : ?>\n\t\t\t\t\t<span class=\"description customize-control-description\"><?php echo wp_kses_post( $this->description ); ?></span>\n\t\t\t\t<?php endif;\n\n\t\t\t\tif ( ! empty( $this->sublabel ) ) : ?>\n\t\t\t\t\t<span class=\"description customize-control-sublabel\"><?php echo wp_kses_post( $this->sublabel ); ?></span>\n\t\t\t\t<?php endif;\n\n\t\t\t\tif ( ! empty( $this->content ) ) : ?>\n\t\t\t\t\t<span class=\"hoot-customize-control-content-text\"><?php echo wp_kses_post( $this->content ); ?></span>\n\t\t\t\t<?php endif;\n\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}", "public function render_content()\n {\n if(!empty($this->fonts))\n {\n ?>\n <label>\n <span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n <select <?php $this->link(); ?>>\n <?php\n foreach ( $this->fonts as $k => $v )\n {\n printf('<option value=\"%s\" %s>%s</option>', $v->family, selected($this->value(), $v->family, false), $v->family);\n }\n ?>\n </select>\n </label>\n <?php\n }\n }", "function hc_hook_custom_css_preview() {\n\n wp_enqueue_script(\n 'hc-theme-mods',\n get_template_directory_uri() . '/js/theme-customizer.js',\n array( 'customize-preview', 'jquery' )\n );\n}", "function the_bootstrap_theme_options_render_page() {\n\t?>\n\t<div class=\"wrap\">\n\t\t<?php screen_icon(); ?>\n\t\t<h2><?php esc_html_e( 'The Bootstrap Theme Options', 'the-bootstrap' ); ?></h2>\n\t\t<?php settings_errors(); ?>\n\n\t\t<div id=\"poststuff\">\n\t\t\t<div id=\"post-body\" class=\"obenland-wp columns-2\">\n\t\t\t\t<div id=\"post-body-content\">\n\t\t\t\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tsettings_fields( 'the_bootstrap_options' );\n\t\t\t\t\t\tdo_settings_sections( 'theme_options' );\n\t\t\t\t\t\tsubmit_button(); ?>\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t\t<div id=\"postbox-container-1\">\n\t\t\t\t\t<div id=\"side-info-column\">\n\t\t\t\t\t\t<?php do_action( 'the_bootstrap_side_info_column' ); ?>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<?php\n}", "function customizer_live_preview() {\n\n wp_enqueue_script(\n 'airgame-theme-customizer',\n get_template_directory_uri() . '/scripts/airgame-theme-customizer.js',\n array( 'jquery', 'customize-preview' ),\n '0.3.0',\n true\n );\n\n}", "protected function render() {\n global $ele_settings;\n $settings = $this->get_settings_for_display();\n $ele_settings = $settings;\n\n $args['grid_style'] = $settings['grid_style'];\n $args['category_id'] = $settings['category_id'];\n $args['posts_limit'] = $settings['posts_limit'];\n $args['offset'] = $settings['offset'];\n \n if( function_exists( 'houzez_blog_posts_carousel' ) ) {\n echo houzez_blog_posts_carousel( $args );\n }\n\n if ( Plugin::$instance->editor->is_edit_mode() ) : \n $token = wp_generate_password(5, false, false);\n if (is_rtl()) {\n $houzez_rtl = \"true\";\n } else {\n $houzez_rtl = \"false\";\n }\n ?>\n\n <style>\n .slide-animated {\n opacity: 1;\n }\n </style>\n <script>\n var owl_post_card = jQuery('#carousel-post-card-<?php echo esc_attr( $token ); ?>');\n\n owl_post_card.slick({\n rtl: <?php echo esc_attr($houzez_rtl); ?>,\n lazyLoad: 'ondemand',\n infinite: true,\n speed: 300,\n slidesToShow: 4,\n arrows: true,\n adaptiveHeight: true,\n dots: true,\n appendArrows: '.blog-posts-slider',\n prevArrow: jQuery('.blog-prev-js'),\n nextArrow: jQuery('.blog-next-js'),\n responsive: [{\n breakpoint: 992,\n settings: {\n slidesToShow: 2,\n slidesToScroll: 2\n }\n },\n {\n breakpoint: 769,\n settings: {\n slidesToShow: 1,\n slidesToScroll: 1\n }\n }\n ]\n });\n \n </script>\n \n <?php endif;\n }", "public function setSections() {\n // Background Patterns Reader\n $sample_patterns_path = ReduxFramework::$_dir . '../sample/patterns/';\n $sample_patterns_url = ReduxFramework::$_url . '../sample/patterns/';\n $sample_patterns = array();\n\n if (is_dir($sample_patterns_path)) :\n\n if ($sample_patterns_dir = opendir($sample_patterns_path)) :\n $sample_patterns = array();\n\n while (( $sample_patterns_file = readdir($sample_patterns_dir) ) !== false) {\n\n if (stristr($sample_patterns_file, '.png') !== false || stristr($sample_patterns_file, '.jpg') !== false) {\n $name = explode('.', $sample_patterns_file);\n $name = str_replace('.' . end($name), '', $sample_patterns_file);\n $sample_patterns[] = array('alt' => $name, 'img' => $sample_patterns_url . $sample_patterns_file);\n }\n }\n endif;\n endif;\n\n ob_start();\n\n $ct = wp_get_theme();\n $this->theme = $ct;\n $item_name = $this->theme->get('Name');\n $tags = $this->theme->Tags;\n $screenshot = $this->theme->get_screenshot();\n $class = $screenshot ? 'has-screenshot' : '';\n\n $customize_title = sprintf(__('Customize &#8220;%s&#8221;', 'framework'), $this->theme->display('Name'));\n \n ?>\n <div id=\"current-theme\" class=\"<?php echo esc_attr($class); ?>\">\n <?php if ($screenshot) : ?>\n <?php if (current_user_can('edit_theme_options')) : ?>\n <a href=\"<?php echo wp_customize_url(); ?>\" class=\"load-customize hide-if-no-customize\" title=\"<?php echo esc_attr($customize_title); ?>\">\n <img src=\"<?php echo esc_url($screenshot); ?>\" alt=\"<?php esc_attr_e('Current theme preview'); ?>\" />\n </a>\n <?php endif; ?>\n <img class=\"hide-if-customize\" src=\"<?php echo esc_url($screenshot); ?>\" alt=\"<?php esc_attr_e('Current theme preview'); ?>\" />\n <?php endif; ?>\n\n <h4><?php echo $this->theme->display('Name'); ?></h4>\n\n <div>\n <ul class=\"theme-info\">\n <li><?php printf(__('By %s', 'framework'), $this->theme->display('Author')); ?></li>\n <li><?php printf(__('Version %s', 'framework'), $this->theme->display('Version')); ?></li>\n <li><?php echo '<strong>' . __('Tags', 'framework') . ':</strong> '; ?><?php printf($this->theme->display('Tags')); ?></li>\n </ul>\n <p class=\"theme-description\"><?php echo $this->theme->display('Description'); ?></p>\n <?php\n if ($this->theme->parent()) {\n printf(' <p class=\"howto\">' . __('This <a href=\"%1$s\">child theme</a> requires its parent theme, %2$s.') . '</p>', __('http://codex.wordpress.org/Child_Themes', 'framework'), $this->theme->parent()->display('Name'));\n }\n ?>\n\n </div>\n </div>\n\n <?php\n $item_info = ob_get_contents();\n\n ob_end_clean();\n\n $sampleHTML = '';\n if (file_exists(dirname(__FILE__) . '/info-html.html')) {\n /** @global WP_Filesystem_Direct $wp_filesystem */\n global $wp_filesystem;\n if (empty($wp_filesystem)) {\n require_once(ABSPATH . '/wp-admin/includes/file.php');\n WP_Filesystem();\n }\n $sampleHTML = $wp_filesystem->get_contents(dirname(__FILE__) . '/info-html.html');\n }\n\n // ACTUAL DECLARATION OF SECTIONS\n\n /*----------------------------------------------------------------------*/\n /* Header Section\n /*----------------------------------------------------------------------*/\n $this->sections[] = array(\n 'title' => __('Header', 'framework'),\n 'desc' => __('This section contains options related to website header.', 'framework'),\n 'fields' => array(\n\n array(\n 'id' => 'theme_favicon',\n 'type' => 'media',\n 'url' => false,\n 'title' => __('Favicon', 'framework'),\n 'subtitle' => __('Upload a 16px by 16px PNG image that will represent your website favicon.', 'framework')\n ),\n array(\n 'id' => 'website_logo',\n 'type' => 'media',\n 'url' => false,\n 'title' => __('Logo', 'framework'),\n 'subtitle' => __('Upload logo image for your Website. Otherwise site title will be displayed in place of logo.', 'framework')\n ),\n array(\n 'id' => 'main_nav_top_margin',\n 'type' => 'spacing',\n 'output' => array( '#menu-main-menu' ), // An array of CSS selectors to apply this font style to\n 'mode' => 'margin', // absolute, padding, margin, defaults to padding\n 'all' => true, // Have one field that applies to all\n 'right' => false, // Disable the right\n 'bottom' => false, // Disable the bottom\n 'left' => false, // Disable the left\n 'units' => 'px', // You can specify a unit value. Possible: px, em, %\n 'title' => __('Top Margin for Main Menu', 'framework'),\n 'desc' => __('You can provide the top margin for main menu, To make it look well in the middle of your uploaded logo. Simply provide numeric value without px unit.', 'framework'),\n 'default' => array(\n 'margin-top' => '0'\n )\n ),\n array(\n 'id' => 'inspiry_header_search',\n 'type' => 'switch',\n 'title' => __('Product Search Form in Header', 'framework'),\n 'default' => 1,\n 'on' => __('Show','framework'),\n 'off' => __('Hide','framework')\n ),\n array(\n 'id' => 'default_page_banner',\n 'type' => 'media',\n 'url' => false,\n 'title' => __('Default Banner Image', 'framework'),\n 'desc' => __('Banner image should have minimum width of 2000px and minimum height of 190px.', 'framework'),\n 'subtitle' => __('Default banner image will be displayed on all the pages where banner image is not overridden by page specific banner settings.', 'framework')\n ),\n array(\n 'id' => 'display_wpml_flags',\n 'type' => 'switch',\n 'title' => __('WPML Language Switcher Flags', 'framework'),\n 'subtitle' => __('Do you want to display WPML language switcher flags in header top bar ?', 'framework'),\n 'desc' => __('This option only works if WPML plugin is installed.', 'framework'),\n 'default' => 1,\n 'on' => __('Show','framework'),\n 'off' => __('Hide','framework')\n ),\n array(\n 'id' => 'quick_js',\n 'type' => 'ace_editor',\n 'title' => __('Quick JavaScript', 'framework'),\n 'desc' => __('You can paste your JavaScript code here.', 'framework'),\n 'mode' => 'javascript',\n 'theme' => 'chrome'\n )\n )\n );\n\n\n /*----------------------------------------------------------------------*/\n /* Home Section - Slider & Appointment\n /*----------------------------------------------------------------------*/\n $this->sections[] = array(\n 'title' => __('Home', 'framework'),\n 'icon' => 'el-icon-home-alt',\n 'desc' => __('This section contains options related to website homepage.', 'framework'),\n 'fields' => array(\n\n /* Homepage Slider Section */\n array(\n 'id' => 'display_slider_on_home',\n 'type' => 'switch',\n 'title' => __('Homepage Slider', 'framework'),\n 'subtitle' => __('Do you want to display slider on homepage ?', 'framework'),\n 'desc' => __('Image banner will be displayed if slider is disabled', 'framework'),\n 'default' => '1',\n 'on' => __('Display','framework'),\n 'off' => __('Hide','framework')\n ),\n array(\n 'id' => 'slider_type',\n 'type' => 'button_set',\n 'title' => __('Slider Type', 'framework'),\n 'subtitle' => __('Select the type of slider that you want to use.', 'framework'),\n 'options' => array(\n '1' => __('Default Slider','framework'),\n '2' => __('Revolution Slider','framework')\n ),\n 'default' => '1',\n 'required' => array( 'display_slider_on_home', '=', '1' )\n ),\n array(\n 'id' => 'revolution_slider_alias',\n 'type' => 'text',\n 'title' => __('Revolution Slider Alias', 'framework'),\n 'subtitle' => __('If you want to use revolution slider then provide its alias here.', 'framework'),\n 'desc' => __('For more information consult documentation.', 'framework'),\n 'required' => array('slider_type', '=', '2')\n ),\n array(\n 'id' => 'slides',\n 'type' => 'slides',\n 'title' => __('Homepage Slider Slides', 'framework'),\n 'subtitle' => __('Add slides for homepage slider.', 'framework'),\n 'desc' => __('The recommended image size is 2000px by 800px. You can use bigger or smaller image size but try to keep the width to height ratio 100px to 40px and use the exactly same size images for all slides.', 'framework'),\n 'show' => array(\n 'title' => true,\n 'description' => true,\n 'url' => true\n ),\n 'placeholder' => array(\n 'title' => __('Slide title text', 'framework'),\n 'description' => __('Slide description text', 'framework'),\n 'url' => __('Provide URL for button', 'framework')\n ),\n 'required' => array('slider_type', '=', '1')\n ),\n array(\n 'id' => 'slide_desc_position',\n 'type' => 'select',\n 'title' => __('Slide contents position from top', 'framework'),\n 'subtitle' => __('Change the slide contents position from top in %age', 'framework'),\n 'options' => array(\n '30' => '30%',\n '40' => '40%',\n '50' => '50%',\n '60' => '60%',\n '70' => '70%',\n '80' => '80%'\n ),\n 'default' => '60',\n 'required' => array('slider_type', '=', '1')\n ),\n array(\n 'id' => 'display_slide_bg',\n 'type' => 'switch',\n 'title' => __('Slide Contents Background', 'framework'),\n 'subtitle' => __('Do you want to display a light background behind slide contents ?', 'framework'),\n 'default' => '0',\n 'on' => __('Display','framework'),\n 'off' => __('Hide','framework'),\n 'required' => array( 'slider_type', '=', '1' )\n ),\n array(\n 'id' => 'slide_heading_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array('.home-slider .slide-description h2'),\n 'title' => __('Slide Heading Color', 'framework'),\n 'desc' => 'default: #ffffff',\n 'default' => '#ffffff',\n 'validate' => 'color',\n 'required' => array('slider_type', '=', '1')\n ),\n array(\n 'id' => 'slide_desc_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array('.home-slider .slide-description p'),\n 'title' => __('Slide Description Color', 'framework'),\n 'desc' => 'default: #131313',\n 'default' => '#131313',\n 'validate' => 'color',\n 'required' => array('slider_type', '=', '1')\n ),\n array(\n 'id' => 'slide_button_color',\n 'type' => 'link_color',\n 'title' => __('Slide Button Text Color', 'framework'),\n 'active' => true,\n 'output' => array( '.home-slider .slide-description a' ),\n 'default' => array(\n 'regular' => '#ffffff',\n 'hover' => '#ffffff',\n 'active' => '#ffffff'\n ),\n 'required' => array('slider_type', '=', '1')\n ),\n // css generation code reside in css/dynamic-css.php\n array(\n 'id' => 'slide_button_bg',\n 'type' => 'link_color',\n 'title' => __('Slide Button Background Color', 'framework'),\n 'active' => true,\n 'default' => array(\n 'regular' => '#282424',\n 'hover' => '#66d9c1',\n 'active' => '#66d9c1'\n ),\n 'required' => array('slider_type', '=', '1')\n ),\n // css generation code reside in css/dynamic-css.php\n array(\n 'id' => 'slider_arrow_bg',\n 'type' => 'link_color',\n 'title' => __('Slider Arrows Background Color', 'framework'),\n 'active' => true,\n 'default' => array(\n 'regular' => '#282424',\n 'hover' => '#66d9c1',\n 'active' => '#66d9c1'\n ),\n 'required' => array('slider_type', '=', '1')\n ),\n array(\n 'id' => 'home_sections',\n 'type' => 'sorter',\n 'title' => __('Homepage Layout Manager', 'framework'),\n 'desc' => __('Organize homepage sections, The way you want them to appear.', 'framework'),\n 'options' => array(\n 'enabled' => array(\n 'features' => __('Features', 'framework'),\n 'content' => __('Content', 'framework'),\n 'portfolio' => __('Portfolio', 'framework'),\n 'testimonials' => __('Testimonials', 'framework'),\n 'services' => __('Services', 'framework'),\n 'news' => __('News', 'framework')\n ),\n 'disabled' => array(\n 'recent-products' => __('Recent Products', 'framework'),\n 'featured-products' => __('Feature Products', 'framework'),\n 'sale-products' => __('Sale Products', 'framework'),\n 'best-selling-products' => __('Best Selling Prod-', 'framework'),\n 'product-categories' => __('Product Categori-', 'framework')\n )\n )\n )\n\n )\n );\n\n\n /*----------------------------------------------------------------------*/\n /* Home Features Section\n /*----------------------------------------------------------------------*/\n $this->sections[] = array(\n 'title' => __('Home - Features', 'framework'),\n 'subsection' => true,\n 'fields' => array(\n\n array(\n 'id' => 'home_features_title',\n 'type' => 'text',\n 'title' => __('Features Title', 'framework'),\n 'default' => 'Business Features',\n 'subtitle' => __('Provide title to display above features section on homepage.', 'framework')\n ),\n array(\n 'id' => 'home_features_description',\n 'type' => 'textarea',\n 'title' => __('Features Description', 'framework'),\n 'default' => 'Some description text about features',\n 'subtitle' => __('Provide the text description to display below title in features section on homepage.', 'framework'),\n 'validate' => 'no_html'\n ),\n array(\n 'id' => 'features_variation',\n 'type' => 'image_select',\n 'title' => __('Features Section Design', 'framework'),\n 'subtitle' => __('Select the design variation that you want to use for features on homepage.', 'framework'),\n 'options' => array(\n '1' => array('title' => __('1st Variation', 'framework'), 'img' => get_template_directory_uri().'/images/theme-options/features_variation_1.png'),\n '2' => array('title' => __('2nd Variation', 'framework'), 'img' => get_template_directory_uri().'/images/theme-options/features_variation_2.png')\n ),\n 'default' => '1'\n ),\n array(\n 'id' => 'home_features',\n 'type' => 'slides',\n 'title' => __('Features', 'framework'),\n 'subtitle' => __('Keep the maximum height and maximum width of feature image below 120px', 'framework'),\n 'show' => array(\n 'title' => true,\n 'description' => true,\n 'url' => true\n ),\n 'placeholder' => array(\n 'title' => __('Feature Title', 'framework'),\n 'description' => __('Feature Description', 'framework'),\n 'url' => __('Feature link if any', 'framework')\n ),\n 'content_title' => 'Feature',\n 'required' => array( 'features_variation', '=', '1' )\n ),\n array(\n 'id' => 'home_features_2',\n 'type' => 'slides',\n 'title' => __('Features', 'framework'),\n 'subtitle' => __('Recommended size for feature image is 172px by 172px', 'framework'),\n 'show' => array(\n 'title' => true,\n 'description' => true,\n 'url' => true\n ),\n 'placeholder' => array(\n 'title' => __('Feature Title', 'framework'),\n 'description' => __('Feature Description', 'framework'),\n 'url' => __('Feature link if any', 'framework')\n ),\n 'content_title' => 'Feature',\n 'required' => array( 'features_variation', '=', '2' )\n ),\n array(\n 'id' => 'display_curve',\n 'type' => 'switch',\n 'title' => __('Curved Area', 'framework'),\n 'subtitle' => __('Do you want to display curved area above features section on homepage ?', 'framework'),\n 'default' => '1',\n 'on' => __('Display','framework'),\n 'off' => __('Hide','framework'),\n 'required' => array( 'features_variation', '=', '1' )\n ),\n $fields = array(\n 'id' => 'curve_height',\n 'type' => 'slider',\n 'title' => __('Curved Area Height', 'framework'),\n \"default\" => 110,\n \"min\" => 80,\n \"step\" => 1,\n \"max\" => 170,\n 'display_value' => 'label',\n 'required' => array( 'display_curve', '=', '1' )\n ),\n array(\n 'id' => 'features_background',\n 'type' => 'color',\n 'output' => array(\n 'background-color' => '.home-services-section .section-top'\n ),\n 'title' => __('Features Section Background Color', 'framework'),\n 'desc' => 'default: #66d9c1',\n 'default' => '#66d9c1',\n 'required' => array( 'features_variation', '=', '1' )\n ),\n array(\n 'id' => 'features_title_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array(\n 'color' => '.home-services-section .section-header .section-title'\n ),\n 'title' => __('Features Title Color', 'framework'),\n 'desc' => 'default: #ffffff',\n 'default' => '#ffffff',\n 'required' => array( 'features_variation', '=', '1' )\n ),\n array(\n 'id' => 'features_desc_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array(\n 'color' => '.home-services-section .section-header p'\n ),\n 'title' => __('Features Description Color', 'framework'),\n 'desc' => 'default: #357165',\n 'default' => '#357165',\n 'required' => array( 'features_variation', '=', '1' )\n )\n )\n );\n\n\n /*----------------------------------------------------------------------*/\n /* Home Portfolio Section\n /*----------------------------------------------------------------------*/\n $this->sections[] = array(\n 'title' => __('Home - Portfolio', 'framework'),\n 'subsection' => true,\n 'fields' => array(\n\n array(\n 'id' => 'home_portfolio_title',\n 'type' => 'text',\n 'title' => __('Portfolio Title', 'framework'),\n 'default' => 'Our Work',\n 'subtitle' => __('Provide title to display above portfolio section on homepage.', 'framework')\n ),\n array(\n 'id' => 'home_portfolio_description',\n 'type' => 'textarea',\n 'title' => __('Portfolio Description', 'framework'),\n 'default' => 'Some description text about work',\n 'subtitle' => __('Provide the text description to display below title in portfolio section on homepage.', 'framework'),\n 'validate' => 'no_html',\n ),\n array(\n 'id' => 'home_portfolio_rows',\n 'type' => 'select',\n 'title' => __('Portfolio Rows', 'framework'),\n 'subtitle' => __('Select the number of rows for portfolio items in portfolio section on homepage', 'framework'),\n 'options' => array(\n '1' => '1',\n '2' => '2',\n '3' => '3',\n '4' => '4'\n ),\n 'default' => '1',\n ),\n array(\n 'id' => 'home_portfolio_number_of_items',\n 'type' => 'select',\n 'title' => __('Number of Portfolio Items', 'framework'),\n 'subtitle' => __('Select the maximum number of portfolio items to display in portfolio section on homepage', 'framework'),\n 'options' => array(\n '-1' => 'All',\n '4' => '4',\n '6' => '6',\n '8' => '8',\n '10' => '10',\n '12' => '12',\n '14' => '14',\n '16' => '16',\n '18' => '18'\n ),\n 'default' => '-1',\n ),\n array(\n 'id' => 'home_portfolio_order_by',\n 'type' => 'select',\n 'title' => __('Order By', 'framework'),\n 'subtitle' => __('Select the sorting criteria for portfolio items.', 'framework'),\n 'options' => array(\n 'date' => 'Date',\n 'title' => 'Title',\n 'rand' => 'Random'\n ),\n 'default' => 'date'\n ),\n array(\n 'id' => 'home_portfolio_order',\n 'type' => 'select',\n 'title' => __('Order', 'framework'),\n 'subtitle' => __('Select the sort order for portfolio items.', 'framework'),\n 'options' => array(\n 'ASC' => 'Ascending',\n 'DESC' => 'Descending'\n ),\n 'default' => 'DESC'\n ),\n array(\n 'id' => 'portfolio_background',\n 'type' => 'color',\n 'output' => array(\n 'background-color' => '.home-work-section'\n ),\n 'title' => __('Portfolio Section Background Color', 'framework'),\n 'desc' => 'default: #faf8f4',\n 'default' => '#faf8f4'\n ),\n array(\n 'id' => 'portfolio_title_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array(\n 'color' => '.home-work-section .section-title'\n ),\n 'title' => __('Portfolio Title Color', 'framework'),\n 'desc' => 'default: #3a4543',\n 'default' => '#3a4543'\n ),\n array(\n 'id' => 'portfolio_desc_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array(\n 'color' => '.home-work-section .section-header p'\n ),\n 'title' => __('Portfolio Description Color', 'framework'),\n 'desc' => 'default: #969d9b',\n 'default' => '#969d9b'\n )\n )\n );\n\n /*----------------------------------------------------------------------*/\n /* Home Testimonials Section\n /*----------------------------------------------------------------------*/\n $this->sections[] = array(\n 'title' => __('Home - Testimonials', 'framework'),\n 'subsection' => true,\n 'fields' => array(\n\n array(\n 'id' => 'home_testimonials_title',\n 'type' => 'text',\n 'title' => __('Testimonials Title', 'framework'),\n 'default' => 'Client Testimonials',\n 'subtitle' => __('Provide the title text to display above testimonials on homepage.', 'framework')\n ),\n array(\n 'id' => 'home_testimonials_description',\n 'type' => 'textarea',\n 'title' => __('Testimonials Description', 'framework'),\n 'default' => 'Some description text about testimonials',\n 'subtitle' => __('Provide the text description to display below title in testimonials section on homepage.', 'framework'),\n 'validate' => 'no_html'\n ),\n array(\n 'id' => 'home_number_of_testimonials',\n 'type' => 'select',\n 'title' => __('Number of Testimonials', 'framework'),\n 'subtitle' => __('Select the maximum number of testimonials to display on homepage', 'framework'),\n 'options' => array(\n '-1' => 'All',\n '2' => '2',\n '3' => '3',\n '4' => '4',\n '5' => '5',\n '6' => '6',\n '7' => '7',\n '8' => '8',\n '9' => '9'\n ),\n 'default' => '-1'\n ),\n array(\n 'id' => 'home_testimonial_order_by',\n 'type' => 'select',\n 'title' => __('Order By', 'framework'),\n 'subtitle' => __('Select the sorting criteria for testimonials.', 'framework'),\n 'options' => array(\n 'date' => 'Date',\n 'rand' => 'Random'\n ),\n 'default' => 'date'\n ),\n array(\n 'id' => 'testimonial_background',\n 'type' => 'color',\n 'output' => array(\n 'background-color' => '.home-testimonial-section'\n ),\n 'title' => __('Testimonial Section Background Color', 'framework'),\n 'desc' => 'default: #ffffff',\n 'default' => '#ffffff'\n ),\n array(\n 'id' => 'testimonial_title_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array(\n 'color' => '.home-testimonial-section .section-title'\n ),\n 'title' => __('Testimonial Title Color', 'framework'),\n 'desc' => 'default: #3a4543',\n 'default' => '#3a4543'\n ),\n array(\n 'id' => 'testimonial_desc_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array(\n 'color' => '.home-testimonial-section .section-header p'\n ),\n 'title' => __('Testimonial Description Color', 'framework'),\n 'desc' => 'default: #969d9b',\n 'default' => '#969d9b'\n ),\n array(\n 'id' => 'testimonial_text_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array(\n 'color' => '.home-testimonial-section .testimonial-text p'\n ),\n 'title' => __('Testimonial Text Color', 'framework'),\n 'desc' => 'default: #7f8281',\n 'default' => '#7f8281'\n ),\n array(\n 'id' => 'testimonial_author_color',\n 'type' => 'link_color',\n 'title' => __('Testimonial Author Name Color', 'framework'),\n 'active' => true,\n 'output' => array( '.home-testimonial-section .testimonial-text a, .home-testimonial-section .testimonial-text cite' ),\n 'default' => array(\n 'regular' => '#66d9c1',\n 'hover' => '#3a4543',\n 'active' => '#3a4543'\n )\n ),\n array(\n 'id' => 'testimonial_arrow_bg',\n 'type' => 'link_color',\n 'title' => __('Testimonial Arrows Background Color', 'framework'),\n 'active' => true,\n 'default' => array(\n 'regular' => '#282424',\n 'hover' => '#66d9c1',\n 'active' => '#66d9c1'\n )\n ),\n array(\n 'id' => 'testimonial_border_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array(\n 'border-color' => '.home-testimonial-section .testimonial-carousel',\n 'background-color' => '.home-testimonial-section .vertical-line'\n ),\n 'title' => __('Testimonial Border Color', 'framework'),\n 'desc' => 'default: #f1f1f1',\n 'default' => '#f1f1f1'\n ),\n array(\n 'id' => 'testimonial_image_border_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array(\n 'border-color' => '.home-testimonial-section .img-frame'\n ),\n 'title' => __('Testimonial Image Border Color', 'framework'),\n 'desc' => 'default: #d6d6d6',\n 'default' => '#d6d6d6'\n ),\n array(\n 'id' => 'testimonial_image_bg',\n 'type' => 'link_color',\n 'title' => __('Testimonial Image Background Color', 'framework'),\n 'active' => false,\n 'default' => array(\n 'regular' => '#ddf5f1',\n 'hover' => '#fdeac2'\n )\n ),\n )\n );\n\n\n /*----------------------------------------------------------------------*/\n /* Home Services Section\n /*----------------------------------------------------------------------*/\n $this->sections[] = array(\n 'title' => __('Home - Services', 'framework'),\n 'subsection' => true,\n 'fields' => array(\n\n array(\n 'id' => 'home_services_title',\n 'type' => 'text',\n 'title' => __('Services Title', 'framework'),\n 'default' => 'Our Services',\n 'subtitle' => __('Provide the title to display above services section on homepage.', 'framework')\n ),\n array(\n 'id' => 'home_services_description',\n 'type' => 'textarea',\n 'title' => __('Services Description', 'framework'),\n 'default' => 'Some description text about services',\n 'subtitle' => __('Provide the text description to display below title in services section on homepage.', 'framework'),\n 'validate' => 'no_html'\n ),\n array(\n 'id' => 'home_services',\n 'type' => 'slides',\n 'title' => __('Services', 'framework'),\n 'subtitle' => __('You can upload image of any size. Recommended image size is 320px x 194px. Make sure to upload all images of same size.', 'framework'),\n 'show' => array(\n 'title' => true,\n 'description' => true,\n 'url' => true\n ),\n 'placeholder' => array(\n 'title' => __('Service Title', 'framework'),\n 'description' => __('Service Description', 'framework'),\n 'url' => __('Service link if any', 'framework')\n ),\n 'content_title' => 'Service'\n ),\n array(\n 'id' => 'services_background',\n 'type' => 'color',\n 'output' => array(\n 'background-color' => '.service-plans'\n ),\n 'title' => __('Services Section Background Color', 'framework'),\n 'desc' => 'default: #f9ca67',\n 'default' => '#f9ca67'\n ),\n array(\n 'id' => 'services_background_image',\n 'type' => 'switch',\n 'title' => __('Services Section Background Image', 'framework'),\n 'subtitle' => __('Do you want to display background images in services section. ?', 'framework'),\n 'default' => '1',\n 'on' => __('Display','framework'),\n 'off' => __('Hide','framework')\n ),\n array(\n 'id' => 'services_title_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array(\n 'color' => '.service-plans .section-title'\n ),\n 'title' => __('Services Title Color', 'framework'),\n 'desc' => 'default: #3a4543',\n 'default' => '#3a4543'\n ),\n array(\n 'id' => 'services_text_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array(\n 'color' => '.service-plans p'\n ),\n 'title' => __('Services Text Color', 'framework'),\n 'desc' => 'default: #ffffff',\n 'default' => '#ffffff'\n ),\n array(\n 'id' => 'services_heading_color',\n 'type' => 'link_color',\n 'title' => __('Services Heading Color', 'framework'),\n 'active' => true,\n 'output' => array( '.service-plans .title a' ),\n 'default' => array(\n 'regular' => '#3a4543',\n 'hover' => '#ffffff',\n 'active' => '#ffffff'\n )\n ),\n array(\n 'id' => 'services_image_bg',\n 'type' => 'link_color',\n 'title' => __('Services Image Background Color', 'framework'),\n 'active' => false,\n 'default' => array(\n 'regular' => '#fad382',\n 'hover' => '#fce3b0'\n )\n )\n\n )\n );\n\n\n /*----------------------------------------------------------------------*/\n /* Home News Section\n /*----------------------------------------------------------------------*/\n $this->sections[] = array(\n 'title' => __('Home - News', 'framework'),\n 'subsection' => true,\n 'fields' => array(\n\n array(\n 'id' => 'home_news_title',\n 'type' => 'text',\n 'title' => __('News Title', 'framework'),\n 'default' => 'Latest News',\n 'subtitle' => __('Provide title to display above news section on homepage.', 'framework')\n ),\n array(\n 'id' => 'home_news_description',\n 'type' => 'textarea',\n 'title' => __('News Description', 'framework'),\n 'default' => 'Some description text about latest news',\n 'subtitle' => __('Provide the text description to display below title in news section on homepage.', 'framework'),\n 'validate' => 'no_html'\n ),\n array(\n 'id' => 'home_number_of_news_items',\n 'type' => 'select',\n 'title' => __('Number of News Items', 'framework'),\n 'subtitle' => __('Select the maximum number of news items to display in news section on homepage', 'framework'),\n 'options' => array(\n '-1' => 'All',\n '3' => '3',\n '6' => '6',\n '9' => '9',\n '12' => '12',\n '15' => '15'\n ),\n 'default' => '6'\n ),\n array(\n 'id' => 'home_news_order_by',\n 'type' => 'select',\n 'title' => __('Order By', 'framework'),\n 'subtitle' => __('Select the sorting criteria for news items.', 'framework'),\n 'options' => array(\n 'date' => 'Date',\n 'title' => 'Title',\n 'rand' => 'Random'\n ),\n 'default' => 'date'\n ),\n array(\n 'id' => 'home_news_order',\n 'type' => 'select',\n 'title' => __('Order', 'framework'),\n 'subtitle' => __('Select the sort order for news items.', 'framework'),\n 'options' => array(\n 'ASC' => 'Ascending',\n 'DESC' => 'Descending'\n ),\n 'default' => 'DESC'\n ),\n array(\n 'id' => 'news_background',\n 'type' => 'color',\n 'output' => array(\n 'background-color' => '.home-blog-section'\n ),\n 'title' => __('News Section Background Color', 'framework'),\n 'desc' => 'default: #ffffff',\n 'default' => '#ffffff'\n ),\n array(\n 'id' => 'news_title_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array(\n 'color' => '.home-blog-section .section-title'\n ),\n 'title' => __('News Title Color', 'framework'),\n 'desc' => 'default: #3a4543',\n 'default' => '#3a4543'\n ),\n array(\n 'id' => 'news_desc_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array(\n 'color' => '.home-blog-section .section-header p'\n ),\n 'title' => __('News Description Color', 'framework'),\n 'desc' => 'default: #969d9b',\n 'default' => '#969d9b'\n )\n )\n );\n\n\n/*----------------------------------------------------------------------*/\n /* Home Flavours Section\n /*----------------------------------------------------------------------*/\n $this->sections[] = array(\n 'title' => __('Home - Flavours', 'framework'),\n 'subsection' => true,\n );\n\n /*----------------------------------------------------------------------*/\n /* Home News Section\n /*----------------------------------------------------------------------*/\n $this->sections[] = array(\n 'title' => __('Home - Shop', 'framework'),\n 'subsection' => true,\n 'fields' => array(\n\n /* Recent Products */\n array(\n 'id' => 'recent_products_title',\n 'type' => 'text',\n 'title' => __('Recent Products Title', 'framework'),\n 'default' => __('Recent Products', 'framework'),\n 'subtitle' => __('Provide the title for recent products section on homepage.', 'framework')\n ),\n array(\n 'id' => 'recent_columns',\n 'type' => 'select',\n 'title' => __('Recent Products Columns', 'framework'),\n 'subtitle' => __('Select the number of columns for recent products.', 'framework'),\n 'options' => array(\n '4' => '4',\n '6' => '6'\n ),\n 'default' => '4'\n ),\n array(\n 'id' => 'recent_rows',\n 'type' => 'select',\n 'title' => __('Recent Products Rows', 'framework'),\n 'subtitle' => __('Select the number of rows for recent products.', 'framework'),\n 'options' => array(\n '1' => '1',\n '2' => '2',\n '3' => '3',\n '4' => '4',\n ),\n 'default' => '1'\n ),\n\n /* Featured Products */\n array(\n 'id' => 'featured_products_title',\n 'type' => 'text',\n 'title' => __('Featured Products Title', 'framework'),\n 'default' => __('Featured Products', 'framework'),\n 'subtitle' => __('Provide the title for featured products section on homepage.', 'framework')\n ),\n array(\n 'id' => 'featured_columns',\n 'type' => 'select',\n 'title' => __('Featured Products Columns', 'framework'),\n 'subtitle' => __('Select the number of columns for featured products.', 'framework'),\n 'options' => array(\n '4' => '4',\n '6' => '6'\n ),\n 'default' => '4'\n ),\n array(\n 'id' => 'featured_rows',\n 'type' => 'select',\n 'title' => __('Featured Products Rows', 'framework'),\n 'subtitle' => __('Select the number of rows for featured products.', 'framework'),\n 'options' => array(\n '1' => '1',\n '2' => '2',\n '3' => '3',\n '4' => '4',\n ),\n 'default' => '1'\n ),\n\n /* Sale Products */\n array(\n 'id' => 'sale_products_title',\n 'type' => 'text',\n 'title' => __('Sale Products Title', 'framework'),\n 'default' => __('Sale Products', 'framework'),\n 'subtitle' => __('Provide the title for sale products section on homepage.', 'framework')\n ),\n array(\n 'id' => 'sale_columns',\n 'type' => 'select',\n 'title' => __('Sale Products Columns', 'framework'),\n 'subtitle' => __('Select the number of columns for sale products.', 'framework'),\n 'options' => array(\n '4' => '4',\n '6' => '6'\n ),\n 'default' => '4'\n ),\n array(\n 'id' => 'sale_rows',\n 'type' => 'select',\n 'title' => __('Sale Products Rows', 'framework'),\n 'subtitle' => __('Select the number of rows for sale products.', 'framework'),\n 'options' => array(\n '1' => '1',\n '2' => '2',\n '3' => '3',\n '4' => '4',\n ),\n 'default' => '1'\n ),\n\n /* Best Selling Products */\n array(\n 'id' => 'best_selling_products_title',\n 'type' => 'text',\n 'title' => __('Best Selling Products Title', 'framework'),\n 'default' => __('Best Selling Products', 'framework'),\n 'subtitle' => __('Provide the title for best selling products section on homepage.', 'framework')\n ),\n array(\n 'id' => 'best_selling_columns',\n 'type' => 'select',\n 'title' => __('Best Selling Products Columns', 'framework'),\n 'subtitle' => __('Select the number of columns for best selling products.', 'framework'),\n 'options' => array(\n '4' => '4',\n '6' => '6'\n ),\n 'default' => '4'\n ),\n array(\n 'id' => 'best_selling_rows',\n 'type' => 'select',\n 'title' => __('Best Selling Products Rows', 'framework'),\n 'subtitle' => __('Select the number of rows for best selling products.', 'framework'),\n 'options' => array(\n '1' => '1',\n '2' => '2',\n '3' => '3',\n '4' => '4',\n ),\n 'default' => '1'\n ),\n\n /* Product Categories */\n array(\n 'id' => 'product_categories_title',\n 'type' => 'text',\n 'title' => __('Product Categories Title', 'framework'),\n 'default' => __('Product Categories', 'framework'),\n 'subtitle' => __('Provide the title for product categories section on homepage.', 'framework')\n ),\n array(\n 'id' => 'number_of_categories',\n 'type' => 'select',\n 'title' => __('Number of Categories', 'framework'),\n 'subtitle' => __('Select the number of product categories to display on homepage.', 'framework'),\n 'options' => array(\n '4' => '4',\n '8' => '8',\n '12' => '12',\n '16' => '16',\n '20' => '20'\n ),\n 'default' => '4'\n )\n\n )\n );\n\n\n\n /*----------------------------------------------------------------------*/\n /* Shop related theme options\n /*----------------------------------------------------------------------*/\n $this->sections[] = array(\n 'title' => __('Shop', 'framework'),\n 'icon' => 'el-icon-shopping-cart-sign',\n 'heading' => __('Shop', 'framework'),\n 'desc' => __('This section contains theme options related to WooCommerce Shop.', 'framework'),\n 'fields' => array(\n array(\n 'id' => 'shop_layout',\n 'type' => 'button_set',\n 'title' => __('Shop Layout', 'framework'),\n 'subtitle' => __('Select the type of layout that you want to use for shop.', 'framework'),\n 'options' => array(\n 'right-sidebar' => __('Right Sidebar','framework'),\n 'full-width' => __('Full Width','framework'),\n 'left-sidebar' => __('Left Sidebar','framework')\n ),\n 'default' => 'right-sidebar'\n ),\n array(\n 'id' => 'products_per_page',\n 'type' => 'select',\n 'title' => __('Number of Products Per Page', 'framework'),\n 'subtitle' => __('Select the maximum number of products that you want to display on a shop page.', 'framework'),\n 'options' => array(\n '4' => '4',\n '6' => '6',\n '8' => '8',\n '9' => '9',\n '12' => '12',\n '15' => '15',\n '16' => '16',\n '18' => '18',\n '20' => '20',\n '21' => '21',\n ),\n 'default' => '12',\n ),\n array(\n 'id' => 'product_share_icons',\n 'type' => 'checkbox',\n 'title' => __( 'Product Social Share Icons', 'framework' ),\n 'subtitle' => __( 'Which social share icons you want to display on product detail page.', 'framework' ),\n 'options' => array(\n 'facebook' => 'Facebook',\n 'twitter' => 'Twitter',\n 'pinterest' => 'Pinterest',\n 'googleplus' => 'Google Plus'\n ),\n 'default' => array(\n 'facebook' => '1',\n 'twitter' => '1',\n 'pinterest' => '1',\n 'googleplus'=> '1'\n )\n ),\n array(\n 'id' => 'display_cart_in_header',\n 'type' => 'switch',\n 'title' => __('Quick View Cart Link', 'framework'),\n 'subtitle' => __('Do you want to display quick view cart link in header ?', 'framework'),\n 'default' => 1,\n 'on' => __('Display','framework'),\n 'off' => __('Hide','framework')\n ),\n )\n );\n\n\n /*----------------------------------------------------------------------*/\n /* Gallery Detail Page\n /*----------------------------------------------------------------------*/\n $this->sections[] = array(\n 'title' => __('Gallery Item', 'framework'),\n 'icon' => 'el-icon-photo-alt',\n 'heading' => __('Gallery Item Detail Page', 'framework'),\n 'desc' => __('This section contains options related to gallery detail page.', 'framework'),\n 'fields' => array(\n\n array(\n 'id' => 'display_related_gallery_items',\n 'type' => 'switch',\n 'title' => __('Related Gallery Items', 'framework'),\n 'subtitle' => __('Do you want to display related gallery items section on gallery detail page ?', 'framework'),\n 'default' => '1',\n 'on' => __('Display','framework'),\n 'off' => __('Hide','framework')\n ),\n array(\n 'id'=>'related_gallery_items_title',\n 'type' => 'text',\n 'title' => __('Related Gallery Items Title', 'framework'),\n 'subtitle' => __('Provide the title text to display above related gallery items section.', 'framework'),\n 'desc' => 'You can wrap few words in span tag to make them bold. Example: '.htmlentities('<span>Bold Words</span> Regular Words'),\n 'required' => array('display_related_gallery_items', '=', '1'),\n 'default' => __('Related Gallery Items', 'framework')\n ),\n array(\n 'id'=>'related_gallery_items_description',\n 'type' => 'textarea',\n 'title' => __(' Related Gallery Items Description', 'framework'),\n 'default' => 'Some description text about related gallery items',\n 'subtitle' => __('Provide the text description to display below title in related gallery items section.', 'framework'),\n 'required' => array('display_related_gallery_items', '=', '1'),\n 'validate' => 'no_html'\n )\n ),\n );\n\n\n /*----------------------------------------------------------------------*/\n /* Contact Section\n /*----------------------------------------------------------------------*/\n $this->sections[] = array(\n 'title' => __('Contact ', 'framework'),\n 'icon' => 'el-icon-envelope-alt',\n 'desc' => __('This section contains options related to contact page.', 'framework'),\n 'fields' => array(\n array(\n 'id' => 'display_contact_form',\n 'type' => 'switch',\n 'title' => __('Contact Form', 'framework'),\n 'subtitle' => __('Do you want to display contact form on contact page ?', 'framework'),\n 'default' => '1',\n 'on' => __('Display','framework'),\n 'off' => __('Hide','framework')\n ),\n array(\n 'id'=>'contact_form_title',\n 'type' => 'text',\n 'title' => __('Contact Form Title', 'framework'),\n 'default' => __('Send a Message', 'framework'),\n 'required' => array('display_contact_form', '=', '1')\n ),\n array(\n 'id' => 'contact_email',\n 'type' => 'text',\n 'title' => __('Contact Form Email', 'framework'),\n 'default' => get_option('admin_email'),\n 'subtitle' => __('Provide the email address where you want to receive contact form messages.', 'framework'),\n 'required' => array('display_contact_form', '=', '1'),\n 'validate' => 'email'\n ),\n array(\n 'id' => 'display_contact_details',\n 'type' => 'switch',\n 'title' => __('Other Contact Details', 'framework'),\n 'subtitle' => __('Do you want to display other contact details like address and phone numbers in sidebar ?', 'framework'),\n 'default' => '1',\n 'on' => __('Display','framework'),\n 'off' => __('Hide','framework')\n ),\n array(\n 'id'=>'contact_details_title',\n 'type' => 'text',\n 'default' => __('Address', 'framework'),\n 'required' => array('display_contact_details', '=', '1'),\n 'title' => __('Contact Details Title', 'framework')\n ),\n array(\n 'id'=>'contact_address',\n 'type' => 'textarea',\n 'title' => __('Address', 'framework'),\n 'desc' => __('HTML is allowed', 'framework'),\n 'required' => array('display_contact_details', '=', '1'),\n 'validate' => 'html'\n ),\n array(\n 'id'=>'contact_phone_01',\n 'type' => 'text',\n 'title' => __('1st Phone Number', 'framework'),\n 'required' => array('display_contact_details', '=', '1')\n ),\n array(\n 'id'=>'contact_phone_02',\n 'type' => 'text',\n 'title' => __('2nd Phone Number', 'framework'),\n 'required' => array('display_contact_details', '=', '1')\n ),\n array(\n 'id'=>'contact_fax',\n 'type' => 'text',\n 'title' => __('Fax Number', 'framework'),\n 'required' => array('display_contact_details', '=', '1')\n ),\n array(\n 'id' => 'display_google_map',\n 'type' => 'switch',\n 'title' => __('Google Map', 'framework'),\n 'subtitle' => __('Do you want to display google map on contact page ?', 'framework'),\n 'default' => '1',\n 'on' => __('Display','framework'),\n 'off' => __('Hide','framework')\n ),\n array(\n 'id'=>'google_map_latitude',\n 'type' => 'text',\n 'title' => __('Google Map Latitude', 'framework'),\n 'default' => '-37.817209',\n 'desc' => 'Latitude and longitude of a point can be obtained from <a target=\"_blank\" href=\"http://itouchmap.com/latlong.html\">following site</a>',\n 'required' => array('display_google_map', '=', '1')\n ),\n array(\n 'id'=>'google_map_longitude',\n 'type' => 'text',\n 'title' => __('Google Map Longitude', 'framework'),\n 'default' => '144.965108',\n 'required' => array('display_google_map', '=', '1')\n ),\n array(\n 'id'=>'google_map_zoom',\n 'type' => 'text',\n 'validate' => 'numeric',\n 'title' => __('Google Map Zoom', 'framework'),\n 'default' => '16',\n 'required' => array('display_google_map', '=', '1')\n )\n )\n );\n\n\n /*----------------------------------------------------------------------*/\n /* Footer Section\n /*----------------------------------------------------------------------*/\n $this->sections[] = array(\n 'title' => __('Footer', 'framework'),\n 'desc' => __('This section contains footer related options.', 'framework'),\n 'fields' => array(\n array(\n 'id' => 'display_tweet_above_footer',\n 'type' => 'switch',\n 'title' => __('Latest Tweet Above Footer', 'framework'),\n 'subtitle' => __('Do you want to display latest tweet above footer ?', 'framework'),\n 'default' => '1',\n 'on' => __('Display','framework'),\n 'off' => __('Hide','framework')\n ),\n array(\n 'id' => 'twitter_notice',\n 'type' => 'info',\n 'notice' => true,\n 'style' => 'info',\n 'icon' => '',\n 'title' => __('Note', 'framework'),\n 'desc' => 'Now, you need the twitter application consumer key, consumer secret, access token and access token secret for twitter authentication. To get all these keys, You need to register a new twitter app from <a target=\"_blank\" href=\"https://apps.twitter.com/app/new\">following url</a> After registering app and generating access token you will have api keys and access token as required below',\n 'required' => array( 'display_tweet_above_footer', '=', '1' )\n ),\n array(\n 'id'=>'twitter_username',\n 'type' => 'text',\n 'title' => __('Twitter Username', 'framework'),\n 'subtitle' => __('Provide twitter username', 'framework'),\n 'required' => array('display_tweet_above_footer', '=', '1')\n ),\n array(\n 'id'=>'consumer_key',\n 'type' => 'text',\n 'title' => __('Consumer Key', 'framework'),\n 'required' => array('display_tweet_above_footer', '=', '1')\n ),\n array(\n 'id'=>'consumer_secret',\n 'type' => 'text',\n 'title' => __('Consumer Secret', 'framework'),\n 'required' => array('display_tweet_above_footer', '=', '1')\n ),\n array(\n 'id'=>'access_token',\n 'type' => 'text',\n 'title' => __('Access Token', 'framework'),\n 'required' => array('display_tweet_above_footer', '=', '1')\n ),\n array(\n 'id'=>'access_token_secret',\n 'type' => 'text',\n 'title' => __('Access Token Secret', 'framework'),\n 'required' => array('display_tweet_above_footer', '=', '1')\n ),\n array(\n 'id' => 'display_footer_contact_info',\n 'type' => 'switch',\n 'title' => __('Contact Information in Footer', 'framework'),\n 'subtitle' => __('Do you want to display contact information in footer ?', 'framework'),\n 'default' => '1',\n 'on' => __('Display','framework'),\n 'off' => __('Hide','framework')\n ),\n array(\n 'id'=>'footer_address',\n 'type' => 'text',\n 'title' => __('Address', 'framework'),\n 'subtitle' => __('Address to display in footer ?', 'framework'),\n 'required' => array('display_footer_contact_info', '=', '1')\n ),\n array(\n 'id'=>'footer_phone',\n 'type' => 'text',\n 'title' => __('Phone Number', 'framework'),\n 'subtitle' => __('Phone number to display in footer ?', 'framework'),\n 'required' => array('display_footer_contact_info', '=', '1')\n ),\n array(\n 'id'=>'footer_email',\n 'type' => 'text',\n 'title' => __('Email', 'framework'),\n 'subtitle' => __('Email address to display in footer ?', 'framework'),\n 'required' => array('display_footer_contact_info', '=', '1')\n ),\n\n\n array(\n 'id' => 'display_footer_social_icons',\n 'type' => 'switch',\n 'title' => __('Social Icons', 'framework'),\n 'subtitle' => __('Do you want to display social icons in footer ?', 'framework'),\n 'default' => '1',\n 'on' => __('Display','framework'),\n 'off' => __('Hide','framework')\n ),\n array(\n 'id'=>'social_icons_title',\n 'type' => 'text',\n 'title' => __('Social Icons Title', 'framework'),\n 'default' => __('Get Social With Us', 'framework'),\n 'required' => array('display_footer_social_icons', '=', '1')\n ),\n array(\n 'id'=>'skype_username',\n 'type' => 'text',\n 'title' => __('Skype Username', 'framework'),\n 'subtitle' => __('Provide skype username to display its icon.', 'framework'),\n 'required' => array('display_footer_social_icons', '=', '1')\n ),\n array(\n 'id'=>'twitter_url',\n 'type' => 'text',\n 'title' => __('Twitter', 'framework'),\n 'subtitle' => __('Provide twitter url to display its icon.', 'framework'),\n 'required' => array('display_footer_social_icons', '=', '1')\n ),\n array(\n 'id'=>'facebook_url',\n 'type' => 'text',\n 'title' => __('Facebook', 'framework'),\n 'subtitle' => __('Provide facebook url to display its icon.', 'framework'),\n 'required' => array('display_footer_social_icons', '=', '1')\n ),\n array(\n 'id'=>'google_url',\n 'type' => 'text',\n 'title' => __('Google+', 'framework'),\n 'subtitle' => __('Provide google+ url to display its icon.', 'framework'),\n 'required' => array('display_footer_social_icons', '=', '1')\n ),\n array(\n 'id'=>'linkedin_url',\n 'type' => 'text',\n 'title' => __('LinkedIn', 'framework'),\n 'subtitle' => __('Provide LinkedIn url to display its icon.', 'framework'),\n 'required' => array('display_footer_social_icons', '=', '1')\n ),\n array(\n 'id'=>'instagram_url',\n 'type' => 'text',\n 'title' => __('Instagram', 'framework'),\n 'subtitle' => __('Provide Instagram url to display its icon.', 'framework'),\n 'required' => array('display_footer_social_icons', '=', '1')\n ),\n array(\n 'id'=>'youtube_url',\n 'type' => 'text',\n 'title' => __('YouTube', 'framework'),\n 'subtitle' => __('Provide YouTube url to display its icon.', 'framework'),\n 'required' => array('display_footer_social_icons', '=', '1')\n ),\n array(\n 'id'=>'rss_url',\n 'type' => 'text',\n 'title' => __('RSS', 'framework'),\n 'subtitle' => __('Provide RSS feed url to display its icon.', 'framework'),\n 'required' => array('display_footer_social_icons', '=', '1')\n ),\n array(\n 'id'=>'footer_copyright',\n 'type' => 'text',\n 'title' => __('Copyright Text', 'framework')\n ),\n array(\n 'id' => 'display_scroll_top',\n 'type' => 'switch',\n 'title' => __('Scroll Top', 'framework'),\n 'subtitle' => __('Do you want to display scroll top arrow in footer ?', 'framework'),\n 'default' => '1',\n 'on' => __('Display','framework'),\n 'off' => __('Hide','framework')\n )\n )\n\n );\n\n\n /*----------------------------------------------------------------------*/\n /* Styling Section\n /*----------------------------------------------------------------------*/\n $this->sections[] = array(\n 'title' => __('Styling', 'framework'),\n 'icon' => 'el-icon-website',\n 'desc' => __('This section contains styles related options.', 'framework'),\n 'fields' => array(\n array(\n 'id' => 'body_background',\n 'type' => 'background',\n 'output' => array( 'body' ),\n 'title' => __('Body Background', 'framework'),\n 'subtitle' => __('Configure body background of your choice. ( default:#ffffff )', 'framework'),\n 'default' => '#ffffff'\n ),\n array(\n 'id' => 'animation',\n 'type' => 'switch',\n 'title' => __('Animation?', 'framework'),\n 'subtitle' => __('Enable or Disable CSS3 animation on various components', 'framework'),\n 'default' => '1',\n 'on' => __('Enabled','framework'),\n 'off' => __('Disabled','framework')\n ),\n array(\n 'id' => 'want_to_change_fonts',\n 'type' => 'switch',\n 'title' => __('Do you want to change fonts?', 'framework'),\n 'default' => '0',\n 'on' => __('Yes','framework'),\n 'off' => __('No','framework')\n ),\n array(\n 'id' => 'headings_font',\n 'type' => 'typography',\n 'title' => __('Headings Font', 'framework'),\n 'subtitle' => __('Select the font for headings.', 'framework'),\n 'desc' => __('Lily Script One is default font.', 'framework'),\n 'required' => array('want_to_change_fonts', '=', '1'),\n 'google' => true,\n 'font-style' => false,\n 'font-weight' => false,\n 'font-size' => false,\n 'line-height' => false,\n 'color' => false,\n 'text-align' => false,\n 'output' => array( 'h1','h2','h3','h4','h5','h6', '.h1','.h2','.h3','.h4','.h5','.h6' ),\n 'default' => array(\n 'font-family' => 'Lily Script One',\n 'google' => true\n )\n ),\n array(\n 'id' => 'body_font',\n 'type' => 'typography',\n 'title' => __('Text Font', 'framework'),\n 'subtitle' => __('Select the font for body text.', 'framework'),\n 'desc' => __('Open Sans is default font.', 'framework'),\n 'required' => array('want_to_change_fonts', '=', '1'),\n 'google' => true,\n 'font-style' => false,\n 'font-weight' => false,\n 'font-size' => false,\n 'line-height' => false,\n 'color' => false,\n 'text-align' => false,\n 'output' => array( 'body' ),\n 'default' => array(\n 'font-family' => 'Open Sans',\n 'google' => true\n )\n ),\n array(\n 'id' => 'headings_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array('h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, h1 a, h2 a, h3 a, h4 a, h5 a, h6 a'),\n 'title' => __('Headings Color', 'framework'),\n 'desc' => 'default: #3a4543',\n 'default' => '#3a4543',\n 'validate' => 'color'\n ),\n array(\n 'id' => 'text_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array('body'),\n 'title' => __('Text Color', 'framework'),\n 'desc' => 'default: #7b7d85',\n 'default' => '#7b7d85',\n 'validate' => 'color'\n ),\n array(\n 'id' => 'quote_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array('.format-quote .quote p', 'blockquote p' ),\n 'title' => __('Quote Text Color', 'framework'),\n 'desc' => 'default: #3a4543',\n 'default' => '#3a4543',\n 'validate' => 'color'\n ),\n array(\n 'id' => 'link_color_contents',\n 'type' => 'link_color',\n 'title' => __('Link Color in Contents', 'framework'),\n 'active' => true,\n 'output' => array( 'a' ),\n 'default' => array(\n 'regular' => '#66d9c1',\n 'hover' => '#3a4543',\n 'active' => '#3a4543'\n )\n ),\n array(\n 'id' => 'link_color_sidebar',\n 'type' => 'link_color',\n 'title' => __('Link Color in Sidebar', 'framework'),\n 'active' => true,\n 'output' => array( '.widget ul li a' ),\n 'default' => array(\n 'regular' => '#969d9b',\n 'hover' => '#66d9c1',\n 'active' => '#66d9c1'\n )\n ),\n // css generation code reside in css/dynamic-css.php\n array(\n 'id' => 'default_btn_bg',\n 'type' => 'link_color',\n 'title' => __('Default Button Background Color', 'framework'),\n 'active' => true,\n 'default' => array(\n 'regular' => '#3a4543',\n 'hover' => '#66d9c1',\n 'active' => '#66d9c1'\n )\n ),\n // css generation code reside in css/dynamic-css.php\n array(\n 'id' => 'default_btn_text_color',\n 'type' => 'link_color',\n 'title' => __('Default Button Text Color', 'framework'),\n 'active' => true,\n 'default' => array(\n 'regular' => '#ffffff',\n 'hover' => '#ffffff',\n 'active' => '#ffffff'\n )\n ),\n // css generation code reside in css/dynamic-css.php\n array(\n 'id' => 'light_btn_bg',\n 'type' => 'link_color',\n 'title' => __('Light Button Background Color', 'framework'),\n 'active' => true,\n 'default' => array(\n 'regular' => '#66d9c1',\n 'hover' => '#3a4543',\n 'active' => '#3a4543'\n )\n ),\n // css generation code reside in css/dynamic-css.php\n array(\n 'id' => 'light_btn_text_color',\n 'type' => 'link_color',\n 'title' => __('Light Button Text Color', 'framework'),\n 'active' => true,\n 'default' => array(\n 'regular' => '#ffffff',\n 'hover' => '#ffffff',\n 'active' => '#ffffff'\n )\n ),\n array(\n 'id' => 'quick_css',\n 'type' => 'ace_editor',\n 'title' => __('Quick CSS', 'framework'),\n 'desc' => __('You can use this box for some quick css changes. For big changes, Use the custom.css file in css folder. In case of child theme please use style.css file in child theme.', 'framework'),\n 'mode' => 'css',\n 'theme' => 'monokai'\n )\n )\n );\n\n\n /*----------------------------------------------------------------------*/\n /* Header Styling Section\n /*----------------------------------------------------------------------*/\n $this->sections[] = array(\n 'title' => __('Header', 'framework'),\n 'subsection' => true,\n 'desc' => __('This section contains styling options for header', 'framework'),\n 'fields' => array(\n array(\n 'id' => 'sticky_header',\n 'type' => 'switch',\n 'title' => __('Sticky Header?', 'framework'),\n 'subtitle' => __('Enable or Disable sticky header', 'framework'),\n 'default' => '0',\n 'on' => __('Enabled','framework'),\n 'off' => __('Disabled','framework')\n ),\n array(\n 'id' => 'header_background',\n 'type' => 'color',\n 'mode' => 'background-color',\n 'output' => array('.header-wrapper'),\n 'title' => __('Header Background Color', 'framework'),\n 'desc' => 'default: #2c2725',\n 'default' => '#2c2725'\n ),\n array(\n 'id' => 'header_bottom_border_color',\n 'type' => 'color',\n 'mode' => 'border-color',\n 'transparent' => false,\n 'output' => array('.header-border-bottom'),\n 'title' => __('Header Bottom Border Color', 'framework'),\n 'desc' => 'default: #3f310a',\n 'default' => '#3f310a',\n 'validate' => 'color'\n ),\n array(\n 'id' => 'logo_color',\n 'type' => 'link_color',\n 'title' => __('Text Logo Color', 'framework'),\n 'active' => true,\n 'output' => array( '.logo a' ),\n 'default' => array(\n 'regular' => '#e5b65c',\n 'hover' => '#66d9c1',\n 'active' => '#66d9c1'\n )\n ),\n array(\n 'id' => 'header_tag_line_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array('.logo small'),\n 'title' => __('Tag Line Color', 'framework'),\n 'desc' => 'default: #959185',\n 'default' => '#959185',\n 'validate' => 'color'\n ),\n array(\n 'id' => 'top_menu_items_color',\n 'type' => 'link_color',\n 'title' => __('Top Menu Items Text Color', 'framework'),\n 'active' => true,\n 'output' => array( '.main-menu > ul > li a' ),\n 'default' => array(\n 'regular' => '#9a928f',\n 'hover' => '#ffffff',\n 'active' => '#ffffff'\n )\n ),\n array(\n 'id' => 'header_sub_menu_background',\n 'type' => 'color',\n 'mode' => 'background-color',\n 'transparent' => false,\n 'output' => array('.main-menu ul li > ul'),\n 'title' => __('Sub Menu Background', 'framework'),\n 'desc' => 'default: #2c2725',\n 'default' => '#2c2725'\n ),\n array(\n 'id' => 'sub_menu_bottom_border_color',\n 'type' => 'color',\n 'mode' => 'border-color',\n 'transparent' => false,\n 'output' => array('.main-menu ul li > ul'),\n 'title' => __('Sub Menu Bottom Border Color', 'framework'),\n 'desc' => 'default: #e5b65c',\n 'default' => '#e5b65c',\n 'validate' => 'color'\n ),\n array(\n 'id' => 'sub_menu_items_color',\n 'type' => 'link_color',\n 'title' => __('Sub Menu Items Text Color', 'framework'),\n 'active' => true,\n 'output' => array( '.main-menu ul li > ul li a' ),\n 'default' => array(\n 'regular' => '#7f7977',\n 'hover' => '#ffffff',\n 'active' => '#ffffff'\n )\n ),\n array(\n 'id' => 'sub_menu_items_border_color',\n 'type' => 'color',\n 'mode' => 'border-color',\n 'transparent' => false,\n 'output' => array('.main-menu ul li > ul li a'),\n 'title' => __('Sub Menu Items Border Color', 'framework'),\n 'desc' => 'default: #9b7c44',\n 'default' => '#9b7c44',\n 'validate' => 'color'\n ),\n array(\n 'id' => 'responsive_menu_text_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array(\n 'background-color' => '.mean-container a.meanmenu-reveal span',\n 'color' => '.mean-container .mean-nav ul li a, .mean-container a.meanmenu-reveal',\n ),\n 'title' => __('Responsive Menu Text Color', 'framework'),\n 'desc' => 'default: #ffffff',\n 'default' => '#ffffff'\n ),\n array(\n 'id' => 'responsive_menu_hover_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array(\n 'color' => '.mean-container .mean-nav ul li a:hover',\n ),\n 'title' => __('Responsive Menu Hover Color', 'framework'),\n 'desc' => 'default: #e5b65c',\n 'default' => '#e5b65c'\n ),\n array(\n 'id' => 'responsive_menu_border_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array(\n 'border-color' => '.mean-container .mean-nav ul li a, .mean-container .mean-nav ul li li a',\n ),\n 'title' => __('Responsive Menu Border Color', 'framework'),\n 'desc' => 'default: #9b7c44',\n 'default' => '#9b7c44'\n ),\n )\n );\n\n\n /*----------------------------------------------------------------------*/\n /* Header Styling Section\n /*----------------------------------------------------------------------*/\n $this->sections[] = array(\n 'title' => __('Twitter', 'framework'),\n 'subsection' => true,\n 'desc' => __('This section contains styling options for twitter section above footer.', 'framework'),\n 'fields' => array(\n array(\n 'id' => 'twitter_background',\n 'type' => 'color',\n 'output' => array(\n 'background-color' => '.twitter-feeds'\n ),\n 'title' => __('Twitter Section Background Color', 'framework'),\n 'desc' => 'default: #fbd27a',\n 'default' => '#fbd27a'\n ),\n array(\n 'id' => 'twitter_text_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array(\n 'color' => '.twitter-feeds .inline_tweet'\n ),\n 'title' => __('Tweet Text Color', 'framework'),\n 'desc' => 'default: #3a4543',\n 'default' => '#3a4543'\n ),\n array(\n 'id' => 'twitter_link_color',\n 'type' => 'link_color',\n 'title' => __('Tweet Link Color', 'framework'),\n 'active' => true,\n 'output' => array( '.twitter-feeds a' ),\n 'default' => array(\n 'regular' => '#ffffff',\n 'hover' => '#3a4543',\n 'active' => '#ffffff'\n )\n ),\n array(\n 'id' => 'twitter_sparrow_color',\n 'type' => 'link_color',\n 'title' => __('Twitter Sparrow Color', 'framework'),\n 'active' => false,\n 'output' => array( '.twitter-feeds .twitter-icon i' ),\n 'default' => array(\n 'regular' => '#3a4543',\n 'hover' => '#f1c76e'\n )\n ),\n array(\n 'id' => 'twitter_sparrow_bg_color',\n 'type' => 'link_color',\n 'title' => __('Twitter Sparrow Background Color', 'framework'),\n 'active' => false,\n 'default' => array(\n 'regular' => '#f1c76e',\n 'hover' => '#ffffff'\n )\n ),\n )\n );\n\n\n /*----------------------------------------------------------------------*/\n /* Footer Styling Section\n /*----------------------------------------------------------------------*/\n $this->sections[] = array(\n 'title' => __('Footer', 'framework'),\n 'subsection' => true,\n 'desc' => __('This section contains styling options for footer', 'framework'),\n 'fields' => array(\n array(\n 'id' => 'footer_background',\n 'type' => 'color',\n 'output' => array(\n 'background-color' => 'footer.footer'\n ),\n 'title' => __('Footer Background Color', 'framework'),\n 'desc' => 'default: #282424',\n 'default' => '#282424',\n 'validate' => 'color'\n ),\n array(\n 'id' => 'footer_text_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array( 'footer.footer' ),\n 'title' => __('Footer Text Color', 'framework'),\n 'desc' => 'default: #6e6d6d',\n 'default' => '#6e6d6d',\n 'validate' => 'color'\n ),\n array(\n 'id' => 'footer_link_color',\n 'type' => 'link_color',\n 'title' => __('Footer Link Color', 'framework'),\n 'output' => array( '.footer a' ),\n 'default' => array(\n 'regular' => '#6e6d6d',\n 'hover' => '#ffffff',\n 'active' => '#fbd27a'\n )\n ),\n array(\n 'id' => 'footer_border_color',\n 'type' => 'color',\n 'transparent' => false,\n 'title' => __('Borders Color in Footer', 'framework'),\n 'output' => array(\n 'border-color' =>'.footer .footer-menu-wrapper, .footer .invitation'\n ),\n 'desc' => 'default: #3a3a3a',\n 'default' => '#3a3a3a',\n 'validate' => 'color'\n ),\n array(\n 'id' => 'footer_social_icons_color',\n 'type' => 'link_color',\n 'title' => __('Footer Social Icons Color', 'framework'),\n 'output' => array('.social_networks li a'),\n 'default' => array(\n 'regular' => '#ffffff',\n 'hover' => '#66d9c1',\n 'active' => '#fbd27a'\n )\n ),\n array(\n 'id' => 'footer_bottom_background',\n 'type' => 'color',\n 'output' => array(\n 'background-color' => '.footer-bottom'\n ),\n 'title' => __('Footer Bottom Area Background Color', 'framework'),\n 'desc' => 'default: #181515',\n 'default' => '#181515',\n 'validate' => 'color'\n ),\n array(\n 'id' => 'footer_copyright_text_color',\n 'type' => 'color',\n 'transparent' => false,\n 'output' => array('.footer-bottom p'),\n 'title' => __('Footer Copyright Text Color', 'framework'),\n 'desc' => 'default: #6e6d6d',\n 'default' => '#6e6d6d',\n 'validate' => 'color'\n ),\n array(\n 'id' => 'footer_scroll_top_bg',\n 'type' => 'link_color',\n 'title' => __('Scroll Top Arrow Background Color', 'framework'),\n 'default' => array(\n 'regular' => '#3a3a3a',\n 'hover' => '#212121',\n 'active' => '#212121'\n )\n )\n )\n );\n\n\n if (file_exists(trailingslashit(dirname(__FILE__)) . 'README.html')) {\n $tabs['docs'] = array(\n 'icon' => 'el-icon-book',\n 'title' => __('Documentation', 'framework'),\n 'content' => nl2br(file_get_contents(trailingslashit(dirname(__FILE__)) . 'README.html'))\n );\n }\n }", "public function render_content() {\n\t\t\t$input_id = '_customize-input-' . $this->id;\n\t\t\t$description_id = '_customize-description-' . $this->id;\n\t\t\t$describedby_attr = ( ! empty( $this->description ) ) ? ' aria-describedby=\"' . esc_attr( $description_id ) . '\" ' : '';\n\t\t\t?>\n\n\t\t\t<?php if ( ! empty( $this->label ) ) : ?>\n\t\t\t\t<label for=\"<?php echo esc_attr( $input_id ); ?>\" class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></label>\n\t\t\t<?php endif; ?>\n\t\t\t<?php if ( ! empty( $this->description ) ) : ?>\n\t\t\t\t<span id=\"<?php echo esc_attr( $description_id ); ?>\" class=\"description customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t<?php endif; ?>\n\n\t\t\t<?php\n\t\t\t$dropdown_name = '_customize-dropdown-pages-' . $this->id;\n\t\t\t$show_option_none = __( '&mdash; Select &mdash;' );\n\t\t\t$option_none_value = '0';\n\t\t\t$dropdown = wp_dropdown_pages(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => esc_attr( $dropdown_name ),\n\t\t\t\t\t'echo' => 0,\n\t\t\t\t\t'show_option_none' => esc_html( $show_option_none ),\n\t\t\t\t\t'option_none_value' => esc_attr( $option_none_value ),\n\t\t\t\t\t'selected' => esc_attr( $this->value() ),\n\t\t\t\t\t'post_status' => 'private',\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tif ( empty( $dropdown ) ) {\n\t\t\t\t$dropdown = sprintf( '<select id=\"%1$s\" name=\"%1$s\">', esc_attr( $dropdown_name ) );\n\t\t\t\t$dropdown .= sprintf( '<option value=\"%1$s\">%2$s</option>', esc_attr( $option_none_value ), esc_html( $show_option_none ) );\n\t\t\t\t$dropdown .= '</select>';\n\t\t\t}\n\n\t\t\t// Hackily add in the data link parameter.\n\t\t\techo str_replace( '<select', '<select ' . $this->get_link() . ' id=\"' . esc_attr( $input_id ) . '\" ' . $describedby_attr, $dropdown ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t\t?>\n\t\t\t<?php\n\t\t}", "function bones_theme_customizer($wp_customize) {\n // $wp_customize calls go here.\n //\n // Uncomment the below lines to remove the default customize sections \n\n // $wp_customize->remove_section('title_tagline');\n // $wp_customize->remove_section('colors');\n // $wp_customize->remove_section('background_image');\n // $wp_customize->remove_section('static_front_page');\n // $wp_customize->remove_section('nav');\n\n // Uncomment the below lines to remove the default controls\n // $wp_customize->remove_control('blogdescription');\n \n // Uncomment the following to change the default section titles\n $wp_customize->get_section('colors')->title = __( 'Theme Background Color' );\n $wp_customize->get_section('background_image')->title = __( 'Theme Background Images' );\n}", "function inspiry_misc_customizer( WP_Customize_Manager $wp_customize ) {\n\t\t// todo: look into optimising this code\n\t\t$inspiry_pages = array( 0 => esc_html__( 'None', 'framework' ) );\n\t\t$raw_pages = get_pages();\n\t\tif ( 0 < count( $raw_pages ) ) {\n\t\t\tforeach ( $raw_pages as $single_page ) {\n\t\t\t\t$inspiry_pages[ $single_page->ID ] = $single_page->post_title;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/**\n\t\t * Misc Section\n\t\t */\n\t\t$wp_customize->add_section( 'inspiry_misc_section', array(\n\t\t\t'title' => esc_html__( 'Misc', 'framework' ),\n\t\t\t'priority' => 137,\n\t\t) );\n\n\n\t\tif ( 'modern' === INSPIRY_DESIGN_VARIATION ) {\n\t\t\t/* Change 'View Property' across the theme */\n\t\t\t$wp_customize->add_setting( 'inspiry_property_detail_page_link_text', array(\n\t\t\t\t'type' \t\t\t\t=> 'option',\n\t\t\t\t'transport'\t\t\t=> 'postMessage',\n\t\t\t\t'default'\t\t\t=> esc_html__( 'View Property', 'framework' ),\n\t\t\t\t'sanitize_callback'\t=> 'sanitize_text_field',\n\t\t\t) );\n\t\t\t$wp_customize->add_control( 'inspiry_property_detail_page_link_text', array(\n\t\t\t\t'label' \t => esc_html__( 'Property Detail Page Link Text', 'framework' ),\n\t\t\t\t'description' => esc_html__( 'You can change \"View Property\" button text ( appears on hovering over property card image ) with any other text across the theme here.', 'framework' ),\n\t\t\t\t'type' \t\t => 'text',\n\t\t\t\t'section' => 'inspiry_misc_section',\n\t\t\t) );\n\t\t}\n\n\t\tif ( 'classic' === INSPIRY_DESIGN_VARIATION ) {\n\t\t\t/* Change 'Know More' across theme */\n\t\t\t$wp_customize->add_setting( 'inspiry_string_know_more', array(\n\t\t\t\t'type' => 'option',\n\t\t\t\t'default' => esc_html__( 'Know More', 'framework' ),\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t) );\n\t\t\t$wp_customize->add_control( 'inspiry_string_know_more', array(\n\t\t\t\t'label' => esc_html__( 'Replace \"Know More\" Button Text', 'framework' ),\n\t\t\t\t'description' => esc_html__( 'You can change \"Know More\" button text with any other text across the theme here', 'framework' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'section' => 'inspiry_misc_section',\n\t\t\t) );\n\t\t}\n\n\t\t/* Light Box Plugin */\n\t\t$wp_customize->add_setting( 'theme_lightbox_plugin', array(\n\t\t\t'type' => 'option',\n\t\t\t'default' => 'venobox',\n\t\t\t'sanitize_callback' => 'inspiry_sanitize_select',\n\t\t) );\n\t\t$wp_customize->add_control( 'theme_lightbox_plugin', array(\n\t\t\t'label' => esc_html__( 'Lightbox Plugin', 'framework' ),\n\t\t\t'description' => esc_html__( 'Select the lightbox plugin that you want to use', 'framework' ),\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'inspiry_misc_section',\n\t\t\t'choices' => array(\n\t\t\t\t'venobox' => esc_html__( 'VenoBox Plugin', 'framework' ),\n\t\t\t\t'swipebox' => esc_html__( 'Swipebox Plugin', 'framework' ),\n\t\t\t\t'pretty-photo' => esc_html__( 'Pretty Photo Plugin', 'framework' ),\n\t\t\t),\n\t\t) );\n\n\t\t/* Optimise JS */\n\t\t$wp_customize->add_setting( 'inspiry_optimise_js', array(\n\t\t\t'type' => 'option',\n\t\t\t'default' => 'true',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'sanitize_callback' => 'inspiry_sanitize_radio',\n\t\t) );\n\t\t$wp_customize->add_control( 'inspiry_optimise_js', array(\n\t\t\t'label' => esc_html__( 'Optimise Scripts to Improve Performance', 'framework' ),\n\t\t\t'description' => esc_html__( 'Enabling this will reduce the number of scripts included on a page.', 'framework' ),\n\t\t\t'type' => 'radio',\n\t\t\t'section' => 'inspiry_misc_section',\n\t\t\t'choices' => array(\n\t\t\t\t'true' => esc_html__( 'Yes', 'framework' ),\n\t\t\t\t'false' => esc_html__( 'No', 'framework' ),\n\t\t\t),\n\t\t) );\n\t\t\n\t\t/* Optimise JS */\n\t\t$wp_customize->add_setting( 'inspiry_optimise_css', array(\n\t\t\t'type' => 'option',\n\t\t\t'default' => 'true',\n\t\t\t'transport' => 'postMessage',\n\t\t\t'sanitize_callback' => 'inspiry_sanitize_radio',\n\t\t) );\n\t\t$wp_customize->add_control( 'inspiry_optimise_css', array(\n\t\t\t'label' => esc_html__( 'Optimise Styles to Improve Performance', 'framework' ),\n\t\t\t'description' => esc_html__( 'Enabling this will include compressed version of few big css files.', 'framework' ),\n\t\t\t'type' => 'radio',\n\t\t\t'section' => 'inspiry_misc_section',\n\t\t\t'choices' => array(\n\t\t\t\t'true' => esc_html__( 'Yes', 'framework' ),\n\t\t\t\t'false' => esc_html__( 'No', 'framework' ),\n\t\t\t),\n\t\t) );\n\n\n\t\t$wp_customize->add_setting( 'inspiry_scroll_to_top', array(\n\t\t\t'type' => 'option',\n\t\t\t'default' => 'true',\n\t\t\t'sanitize_callback' => 'inspiry_sanitize_radio',\n\t\t) );\n\t\t$wp_customize->add_control( 'inspiry_scroll_to_top', array(\n\t\t\t'label' => esc_html__( 'Show Scroll To Top Button', 'framework' ),\n\t\t\t'type' => 'radio',\n\t\t\t'section' => 'inspiry_misc_section',\n\t\t\t'choices' => array(\n\t\t\t\t'true' => esc_html__( 'Yes', 'framework' ),\n\t\t\t\t'false' => esc_html__( 'No', 'framework' ),\n\t\t\t),\n\t\t) );\n\t\t\n\t}", "function sp_theme_customizer($wp_customize) {\n // $wp_customize calls go here.\n //\n // Uncomment the below lines to remove the default customize sections\n\n // $wp_customize->remove_section('title_tagline');\n // $wp_customize->remove_section('colors');\n // $wp_customize->remove_section('background_image');\n // $wp_customize->remove_section('static_front_page');\n // $wp_customize->remove_section('nav');\n\n // Uncomment the below lines to remove the default controls\n // $wp_customize->remove_control('blogdescription');\n\n // Uncomment the following to change the default section titles\n $wp_customize->get_section('colors')->title = __( 'Background Colors' );\n // $wp_customize->get_section('background_image')->title = __( 'Images' );\n\n /**** Welcome Section Settings ****/\n $wp_customize->add_section(\n 'welcome_section_settings',\n array(\n 'title' => 'Welcome Section Settings',\n 'description' => 'This is where you edit your welcome section settings.',\n 'priority' => 35,\n )\n );\n $wp_customize->add_setting(\n 'sp_welcome_title',\n array(\n 'default' => 'Welcome!',\n )\n );\n $wp_customize->add_control(\n 'sp_welcome_title',\n array(\n 'label' => 'Welcome Title',\n 'section' => 'welcome_section_settings',\n 'type' => 'text',\n )\n );\n $wp_customize->add_setting(\n 'sp_welcome_textbox',\n array(\n 'default' => 'Add your welome message here!',\n )\n );\n $wp_customize->add_control(\n 'sp_welcome_textbox',\n array(\n 'label' => 'Welcome Text',\n 'section' => 'welcome_section_settings',\n 'type' => 'textarea',\n )\n );\n $wp_customize->add_setting(\n 'sp_welcome_img',\n array(\n 'default' => '',\n )\n );\n $wp_customize->add_control(\n \tnew WP_Customize_Upload_Control(\n \t$wp_customize,\n \t'sp_welcome_img',\n \tarray(\n \t\t'label' => __( 'Welcome Image', sptheme ),\n \t\t'section' => 'welcome_section_settings',\n 'description' => 'Best image size is 150px X 150px.',\n \t\t'settings' => 'sp_welcome_img',\n \t) )\n );\n $wp_customize->add_setting(\n 'sp_welcome_url',\n array(\n 'default' => '',\n )\n );\n $wp_customize->add_control(\n 'sp_welcome_url',\n array(\n 'label' => 'Learn More URL',\n 'section' => 'welcome_section_settings',\n 'description' => 'A link to an about page for example. Leave blank for no link.',\n 'type' => 'url',\n )\n );\n\n /**** Theme Branding ****/\n $wp_customize->add_section(\n 'theme_branding',\n array(\n 'title' => 'Theme Branding',\n 'description' => 'This is where you edit your theme branding settings.',\n 'priority' => 35,\n )\n );\n $wp_customize->add_setting( 'sp_primary_color', array(\n 'default' => '#7BCFDF'\n ) );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sp_primary_color', array(\n \t'label' => __( 'Primary Color', sptheme ),\n \t'section' => 'theme_branding',\n \t'settings' => 'sp_primary_color',\n ) ) );\n $wp_customize->add_setting( 'sp_secondary_color', array(\n 'default' => '#6DAEB9'\n ) );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sp_secondary_color', array(\n \t'label' => __( 'Secondary Color', sptheme ),\n \t'section' => 'theme_branding',\n \t'settings' => 'sp_secondary_color',\n ) ) );\n $wp_customize->add_setting( 'sp_logo', array(\n 'default' => ''\n ) );\n $wp_customize->add_control(\n \tnew WP_Customize_Upload_Control(\n \t$wp_customize,\n \t'sp_logo',\n \tarray(\n \t\t'label' => __( 'Logo', sptheme ),\n \t\t'section' => 'theme_branding',\n 'description' => 'Best image size is 200px X 200px.',\n \t\t'settings' => 'sp_logo',\n \t) )\n );\n $wp_customize->add_setting( 'sp_read_more_img', array(\n 'default' => ''\n ) );\n $wp_customize->add_control(\n \tnew WP_Customize_Upload_Control(\n \t$wp_customize,\n \t'sp_read_more_img',\n \tarray(\n \t\t'label' => __( 'Read More Tag Image', sptheme ),\n \t\t'section' => 'theme_branding',\n 'description' => 'Best image size is 100px X 50px.',\n \t\t'settings' => 'sp_read_more_img',\n \t) )\n );\n $wp_customize->add_setting(\n 'sp_read_more_text',\n array(\n 'default' => '',\n )\n );\n $wp_customize->add_control(\n 'sp_read_more_text',\n array(\n 'label' => 'Read More Tag Text',\n 'section' => 'theme_branding',\n 'type' => 'text',\n )\n );\n $wp_customize->add_setting(\n 'sp_copyright_text',\n array(\n 'default' => '',\n )\n );\n $wp_customize->add_control(\n 'sp_copyright_text',\n array(\n 'label' => 'Copyright Text',\n 'description' => 'Change the text in the right hand section of the bottom bar.',\n 'section' => 'theme_branding',\n 'type' => 'text',\n )\n );\n\n /**** Slider Settings ****/\n $wp_customize->add_section(\n 'slider_settings',\n array(\n 'title' => 'Slider Settings',\n 'description' => 'This is where you edit the settings for the content slider on the main page.',\n 'priority' => 35,\n )\n );\n $wp_customize->add_setting(\n 'sp_slider_height',\n array(\n 'default' => 535,\n )\n );\n $wp_customize->add_control(\n 'sp_slider_height',\n array(\n 'label' => 'Slider Height',\n 'section' => 'slider_settings',\n 'type' => 'range',\n 'description' => '500px -> 900px, steps of 50px',\n 'input_attrs' => array(\n 'min' => 500,\n 'max' => 900,\n 'step' => 50,\n ),\n )\n );\n $wp_customize->add_setting(\n 'sp_slider_width',\n array(\n 'default' => 900,\n )\n );\n $wp_customize->add_control(\n 'sp_slider_width',\n array(\n 'label' => 'Slider Width',\n 'section' => 'slider_settings',\n 'type' => 'range',\n 'description' => '500px -> 900px, steps of 50px',\n 'input_attrs' => array(\n 'min' => 500,\n 'max' => 900,\n 'step' => 50,\n ),\n )\n );\n $wp_customize->add_setting(\n 'sp_img_adjust',\n array(\n 'default' => 0,\n )\n );\n $wp_customize->add_control(\n 'sp_img_adjust',\n array(\n 'label' => 'Image Adjust',\n 'section' => 'slider_settings',\n 'description' => '-500px <- 0 -> 500px, steps of 50px',\n 'type' => 'range',\n 'input_attrs' => array(\n 'min' => -500,\n 'max' => 500,\n 'step' => 50,\n ),\n )\n );\n $wp_customize->add_setting(\n 'sp_img_number',\n array(\n 'default' => 5,\n )\n );\n $wp_customize->add_control(\n 'sp_img_number',\n array(\n 'label' => 'Number of Slides',\n 'section' => 'slider_settings',\n 'description' => '2 -> 6, steps of 1',\n 'type' => 'range',\n 'input_attrs' => array(\n 'min' => 2,\n 'max' => 6,\n 'step' => 1,\n ),\n )\n );\n\n /**** Pinterest Settings ****/\n $wp_customize->add_section(\n 'pinterest_settings',\n array(\n 'title' => 'Pinterest Footer Settings',\n 'description' => 'This is where you edit the settings for the Pinterest footer area.',\n 'priority' => 35,\n )\n );\n $wp_customize->add_setting(\n 'sp_pinterest_title',\n array(\n 'default' => 'Pinterest Finds',\n )\n );\n $wp_customize->add_control(\n 'sp_pinterest_title',\n array(\n 'label' => 'Title',\n 'section' => 'pinterest_settings',\n 'type' => 'text',\n )\n );\n $wp_customize->add_setting(\n 'sp_pinterest_url',\n array(\n 'default' => 'https://www.pinterest.com/pinterest/',\n )\n );\n $wp_customize->add_control(\n 'sp_pinterest_url',\n array(\n 'label' => 'Pinterest User URL',\n 'section' => 'pinterest_settings',\n 'type' => 'text',\n )\n );\n\n /**** Nav Settings ****/\n /************************/\n\n /**** Main Nav ****/\n $wp_customize->add_section(\n 'nav_settings',\n array(\n 'title' => 'Main Nav Settings',\n 'description' => 'This is where you edit the settings for the main navigation.',\n 'priority' => 35,\n )\n );\n $wp_customize->add_setting(\n 'sp_center_nav',\n array(\n 'default' => '',\n )\n );\n $wp_customize->add_control(\n 'sp_center_nav',\n array(\n 'label' => 'Center',\n 'section' => 'nav_settings',\n 'description' => 'Check to center the navigation menu.',\n 'type' => 'checkbox',\n )\n );\n\n $wp_customize->add_setting( 'sp_nav_item_color', array(\n 'default' => '#000000'\n ) );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sp_nav_item_color', array(\n \t'label' => __( 'Nav Item Color', sptheme ),\n \t'section' => 'nav_settings',\n 'description' => 'This setting also applies to the footer nav area.',\n \t'settings' => 'sp_nav_item_color',\n ) ) );\n\n /**** Off-Nav Settings ****/\n $wp_customize->add_section(\n 'offcanvas_nav_settings',\n array(\n 'title' => 'Off-Canvas Nav Settings',\n 'description' => 'This is where you edit the settings for the off-canvas navigation.',\n 'priority' => 35,\n )\n );\n $wp_customize->add_setting(\n 'sp_oc_nav_background_color',\n array(\n 'default' => '#eee',\n )\n );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sp_oc_nav_background_color', array(\n 'label' => __( 'Off-Canvas Background Color', sptheme ),\n 'section' => 'offcanvas_nav_settings',\n 'settings' => 'sp_oc_nav_background_color',\n ) ) );\n\n $wp_customize->add_setting( 'sp_oc_nav_item_color', array(\n 'default' => '#000000'\n ) );\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'sp_oc_nav_item_color', array(\n 'label' => __( 'Off-Canvas Menu Item Color', sptheme ),\n 'section' => 'offcanvas_nav_settings',\n 'settings' => 'sp_oc_nav_item_color',\n ) ) );\n /********************************/\n\n /**** Google Settings ****/\n $wp_customize->add_section(\n 'google_settings',\n array(\n 'title' => 'Google Settings',\n 'description' => 'This is where you add the code for Google Analytics and Google AdSense.',\n 'priority' => 35,\n )\n );\n $wp_customize->add_setting(\n 'sp_google_analytics',\n array(\n 'default' => '',\n )\n );\n $wp_customize->add_control(\n 'sp_google_analytics',\n array(\n 'label' => 'Google Analytics',\n 'section' => 'google_settings',\n 'type' => 'textarea',\n )\n );\n $wp_customize->add_setting(\n 'sp_google_ad_header',\n array(\n 'default' => '',\n )\n );\n $wp_customize->add_control(\n 'sp_google_ad_header',\n array(\n 'label' => 'Google Ad Header',\n 'section' => 'google_settings',\n 'type' => 'textarea',\n )\n );\n $wp_customize->add_setting(\n 'sp_google_ad_side',\n array(\n 'default' => '',\n )\n );\n $wp_customize->add_control(\n 'sp_google_ad_side',\n array(\n 'label' => 'Google Ad Sidebar',\n 'section' => 'google_settings',\n 'type' => 'textarea',\n )\n );\n $wp_customize->add_setting(\n 'sp_google_ad_footer',\n array(\n 'default' => '',\n )\n );\n $wp_customize->add_control(\n 'sp_google_ad_footer',\n array(\n 'label' => 'Google Ad Footer',\n 'section' => 'google_settings',\n 'type' => 'textarea',\n )\n );\n\n /**** Social Media Settings ****/\n $wp_customize->add_section(\n 'social_settings',\n array(\n 'title' => 'Social Media Settings',\n 'description' => 'This is where you add the urls for your share buttons.',\n 'priority' => 35,\n )\n );\n $wp_customize->add_setting(\n 'sp_facebook_follow_url',\n array(\n 'default' => '',\n )\n );\n $wp_customize->add_control(\n 'sp_facebook_follow_url',\n array(\n 'label' => 'Facebook URL',\n 'section' => 'social_settings',\n 'type' => 'url',\n )\n );\n $wp_customize->add_setting(\n 'sp_twitter_follow_url',\n array(\n 'default' => '',\n )\n );\n $wp_customize->add_control(\n 'sp_twitter_follow_url',\n array(\n 'label' => 'Twitter URL',\n 'section' => 'social_settings',\n 'type' => 'url',\n )\n );\n $wp_customize->add_setting(\n 'sp_pinterest_follow_url',\n array(\n 'default' => '',\n )\n );\n $wp_customize->add_control(\n 'sp_pinterest_follow_url',\n array(\n 'label' => 'Pinterest URL',\n 'section' => 'social_settings',\n 'type' => 'url',\n )\n );\n $wp_customize->add_setting(\n 'sp_instagram_follow_url',\n array(\n 'default' => '',\n )\n );\n $wp_customize->add_control(\n 'sp_instagram_follow_url',\n array(\n 'label' => 'Instagram URL',\n 'section' => 'social_settings',\n 'type' => 'url',\n )\n );\n\n}", "function sapiat_theme_customizer( $wp_customize ) {\n\t\t// logo\n $wp_customize->add_section( 'sapiat_logo_section' , array(\n\t\t\t'title' => __( 'Logo', 'sapiat' ),\n\t\t\t'priority' => 30,\n\t\t\t'description' => 'Upload a logo to replace the default site name and description in the header',\n\t\t));\n\n\t\t$wp_customize->add_setting( 'sapiat_logo' );\n\n\t\t$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'sapiat_logo', array(\n\t\t 'label' => __( 'Logo', 'sapiat' ),\n\t\t 'section' => 'sapiat_logo_section',\n\t\t 'settings' => 'sapiat_logo',\n )));\n\n $wp_customize->remove_control(\"header_image\");\n\n // contact\n $wp_customize->add_section( 'sapiat_contact_section' , array(\n\t\t\t'title' => __( 'Contact', 'sapiat' ),\n\t\t\t'priority' => 30,\n\t\t\t'description' => 'Add the company contact details in here',\n\t\t));\n\n\t\t$wp_customize->add_setting( 'sapiat_phone' );\n\t\t$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'sapiat_phone', array(\n\t\t 'label' => __( 'Phone', 'sapiat' ),\n\t\t 'section' => 'sapiat_contact_section',\n\t\t 'settings' => 'sapiat_phone',\n 'type'\t\t\t => 'text'\n\t\t)));\n\n\t\t$wp_customize->add_setting( 'sapiat_email' );\n\t\t$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'sapiat_email', array(\n\t\t 'label' => __( 'Email', 'sapiat' ),\n\t\t 'section' => 'sapiat_contact_section',\n\t\t 'settings' => 'sapiat_email',\n 'type'\t\t\t => 'text'\n\t\t)));\n\n $wp_customize->add_setting( 'sapiat_address' );\n\t\t$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'sapiat_address', array(\n\t\t 'label' => __( 'Address', 'sapiat' ),\n\t\t 'section' => 'sapiat_contact_section',\n\t\t 'settings' => 'sapiat_address',\n 'type'\t\t\t => 'textarea'\n\t\t)));\n\n\t\t$wp_customize->add_setting( 'sapiat_twitter' );\n\t\t$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'sapiat_twitter', array(\n\t\t 'label' => __( 'Twitter', 'sapiat' ),\n\t\t 'section' => 'sapiat_contact_section',\n\t\t 'settings' => 'sapiat_twitter',\n 'type'\t\t\t => 'text'\n\t\t)));\n\n $wp_customize->add_section( 'sapiat_pages_section' , array(\n\t\t\t'title' => __( 'Page links', 'sapiat' ),\n\t\t\t'priority' => 30,\n\t\t\t'description' => 'Set links to pages here',\n\t\t));\n\n $wp_customize->add_setting( 'sapiat_pages_contact_link', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'sapiat_sanitize_dropdown_pages',\n ) );\n\n $wp_customize->add_control( 'sapiat_pages_contact_link', array(\n 'type' => 'dropdown-pages',\n 'section' => 'sapiat_pages_section',\n 'label' => __( 'Link Contact page' ),\n 'description' => __( 'Select a page to use as the contacts link.' ),\n ) );\n\n $wp_customize->add_setting( 'sapiat_pages_resourses_link', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'sapiat_sanitize_dropdown_pages',\n ) );\n\n $wp_customize->add_control( 'sapiat_pages_resourses_link', array(\n 'type' => 'dropdown-pages',\n 'section' => 'sapiat_pages_section',\n 'label' => __( 'Link Resourses page' ),\n 'description' => __( 'Select a page to use as the resourses link.' ),\n ) );\n\n $wp_customize->add_setting( 'sapiat_pages_account_link', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'sapiat_sanitize_dropdown_pages',\n ) );\n\n $wp_customize->add_control( 'sapiat_pages_account_link', array(\n 'type' => 'dropdown-pages',\n 'section' => 'sapiat_pages_section',\n 'label' => __( 'Link Account page' ),\n 'description' => __( 'Select a page to use as the account link.' ),\n ) );\n\n $wp_customize->add_setting( 'sapiat_pages_password_link', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'sapiat_sanitize_dropdown_pages',\n ) );\n\n $wp_customize->add_control( 'sapiat_pages_password_link', array(\n 'type' => 'dropdown-pages',\n 'section' => 'sapiat_pages_section',\n 'label' => __( 'Reset password page' ),\n 'description' => __( 'Select a page to use as the custom password reset page.' ),\n ) );\n\n function sapiat_sanitize_dropdown_pages( $page_id, $setting ) {\n // Ensure $input is an absolute integer.\n $page_id = absint( $page_id );\n\n // If $page_id is an ID of a published page, return it; otherwise, return the default.\n return ( 'publish' == get_post_status( $page_id ) ? $page_id : $setting->default );\n }\n\t}", "public static function live_preview() {\n wp_enqueue_script( \n 'mytheme-themecustomizer', // Give the script a unique ID\n get_template_directory_uri() . '/js/theme-customizer.js', // Define the path to the JS file\n array( 'jquery', 'customize-preview' ), // Define dependencies\n '', // Define a version (optional) \n true // Specify whether to put in footer (leave this true)\n );\n }", "public function kscv_options_page_render() {\n // check user capabilities\n if ( ! current_user_can( 'edit_posts' ) ) {\n return;\n }\n //include template part view\n require_once plugin_dir_path( __FILE__ ) . 'partials/settings/kscv_options_page_render.php';\n }", "public static function live_preview() {\r\n wp_enqueue_script( \r\n 'mytheme-themecustomizer', // Give the script a unique ID\r\n get_stylesheet_directory_uri() . '/assets/js/theme-customizer.js', // Define the path to the JS file\r\n array( 'jquery', 'customize-preview' ), // Define dependencies\r\n '', // Define a version (optional) \r\n true // Specify whether to put in footer (leave this true)\r\n );\r\n }", "protected function render() {\n\t\t$settings = $this->get_settings_for_display();\n\n\t\t ?>\n\t\t <div class=\"plan <?php if($settings['type'] == 'yes') { ?> featured <?php } ?> ?>\">\n\t\t <?php\n\t\tif($settings['type'] == 'yes') { ?>\n\t <div class=\"listing-badge\">\n\t <span class=\"featured\"><?php esc_html__('Featured','listeo-shortcodes') ?></span>\n\t </div>\n\t <?php } ?>\n\t \n\t <div class=\"plan-price\" style=\"background-color: <?php echo $settings['color'];?>;\">\n\t <h3><?php echo $settings['title']; ?></h3>\n\t <?php if(!empty($settings['discounted'])){ ?>\n\t <span class=\"value\"> <del><span class=\"woocommerce-Price-amount amount\"><bdi><?php echo $settings['price']; ?></bdi></span></del> <ins><span class=\"woocommerce-Price-amount amount\"><bdi><?php echo $settings['discounted']; ?></bdi></span></ins></span>\n\n\t <?php } else { ?>\n\t <div class=\"value\"><?php echo $settings['price'] ?></div>\n\t <?php }\n\t if(!empty($settings['per'])){ ?>\n\t <span class=\"period\"><?php echo $settings['per']; ?></span>\n\t <?php } ?>\n\t </div>\n\t <div class=\"plan-features\"><?php echo $settings['content']; ?>\n\t <?php if($settings['buttontext']) { ?>\n\t <a class=\"button\" style=\"background-color: <?php echo $settings['color'];?>\" href=\"<?php echo $settings['buttonlink'] ; ?>\"><i class=\"fa fa-shopping-cart\"></i> <?php echo $settings['buttontext']; ?></a>\n\t <?php } ?>\n\t \t</div>\n\t </div>\n\t<?php \n\t}", "function customize()\n {\n //Check if the user is logged in \n if (!$this->session->userdata('loggedin'))\n redirect('admin/login');\n\n // Pass the users info through\n $data = $this->data_model->getSiteData();\n\n $this->template->write('title', 'Customize');\n $this->template->write_view('contents', 'admin/customize', $data);\n $this->template->render();\n }", "public static function live_preview() {\r\n\t\t wp_enqueue_script( \r\n\t\t\t 'manual-themecustomizer', // Give the script a unique ID\r\n\t\t\t get_template_directory_uri() . '/js/customize-preview.js', // Define the path to the JS file\r\n\t\t\t array( 'jquery', 'customize-preview' ), // Define dependencies\r\n\t\t\t '', // Define a version (optional) \r\n\t\t\t true // Specify whether to put in footer (leave this true)\r\n\t\t );\r\n\t }", "function customizer_settings($wp_customize) {\n\n // Homepage layout customization API settings\n $wp_customize->add_section( 'homepage_layout', array(\n 'title' => __( 'Homepage Layout' ),\n 'description' => __( 'Add custom settings here' ),\n 'priority' => 160,\n 'capability' => 'edit_theme_options',\n ) );\n\n // Hero heading settings\n $wp_customize->add_setting( 'hero-heading', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'sanitize_textarea_field',\n ) );\n\n $wp_customize->add_control( 'hero-heading', array(\n 'type' => 'textarea',\n 'section' => 'homepage_layout',\n 'label' => __( 'Hero Heading' ),\n 'description' => __( 'Enter hero heading' ),\n ) );\n\n // Hero button 1 settings\n $wp_customize->add_setting( 'hero-button-1', array(\n 'capability' => 'edit_theme_options'\n ) );\n\n $wp_customize->add_control( 'hero-button-1', array(\n 'type' => 'text',\n 'section' => 'homepage_layout',\n 'label' => __( 'Button 1 Text' ),\n ) );\n\n $wp_customize->add_setting( 'hero-button-1-url', array(\n 'capability' => 'edit_theme_options'\n ) );\n\n $wp_customize->add_control( 'hero-button-1-url', array(\n 'type' => 'url',\n 'section' => 'homepage_layout',\n 'label' => __( 'Button 1 URL' ),\n ) );\n\n // Hero button 2 settings\n $wp_customize->add_setting( 'hero-button-2', array(\n 'capability' => 'edit_theme_options'\n ) );\n\n $wp_customize->add_control( 'hero-button-2', array(\n 'type' => 'text',\n 'section' => 'homepage_layout',\n 'label' => __( 'Button 2 Text' ),\n ) );\n\n $wp_customize->add_setting( 'hero-button-2-url', array(\n 'capability' => 'edit_theme_options'\n ) );\n\n $wp_customize->add_control( 'hero-button-2-url', array(\n 'type' => 'url',\n 'section' => 'homepage_layout',\n 'label' => __( 'Button 2 URL' ),\n ) );\n\n // About text settings\n $wp_customize->add_setting( 'about-text', array(\n 'capability' => 'edit_theme_options',\n // 'sanitize_callback' => 'sanitize_textarea_field',\n ) );\n\n $wp_customize->add_control( 'about-text', array(\n 'type' => 'textarea',\n 'section' => 'homepage_layout',\n 'label' => __( 'About Text' ),\n 'description' => __( 'Enter about text' ),\n ) );\n\n $wp_customize->add_setting( 'about-image', array(\n 'capability' => 'edit_theme_options',\n ) );\n\n $wp_customize->add_control( new WP_Customize_Cropped_Image_Control( $wp_customize, 'image_control', array(\n 'label' => __( 'About Image' ),\n 'section' => 'media',\n 'mime_type' => 'image',\n 'settings' => 'about-image',\n 'section' => 'homepage_layout',\n 'width' => 720\n ) )\n );\n\n // Additional site identity customization settings.\n $wp_customize->add_setting( 'facebook-url', array(\n 'capability' => 'edit_theme_options'\n ) );\n\n $wp_customize->add_control( 'facebook-url', array(\n 'type' => 'url',\n 'section' => 'title_tagline',\n 'label' => __( 'Facebook URL' ),\n ) );\n\n $wp_customize->add_setting( 'instagram-url', array(\n 'capability' => 'edit_theme_options'\n ) );\n\n $wp_customize->add_control( 'instagram-url', array(\n 'type' => 'url',\n 'section' => 'title_tagline',\n 'label' => __( 'Instagram URL' ),\n ) );\n\n $wp_customize->add_setting( 'twitter-url', array(\n 'capability' => 'edit_theme_options'\n ) );\n\n $wp_customize->add_control( 'twitter-url', array(\n 'type' => 'url',\n 'section' => 'title_tagline',\n 'label' => __( 'Twitter URL' ),\n ) );\n\n $wp_customize->add_setting( 'linkedin-url', array(\n 'capability' => 'edit_theme_options'\n ) );\n\n $wp_customize->add_control( 'linkedin-url', array(\n 'type' => 'url',\n 'section' => 'title_tagline',\n 'label' => __( 'Linkedin URL' ),\n ) );\n}", "function wcrichmond_theme_options_render_page() {\n\t?>\n\t<div class=\"wrap\">\n\t\t<?php screen_icon(); ?>\n\t\t<?php $theme_name = function_exists( 'wp_get_theme' ) ? wp_get_theme() : get_current_theme(); ?>\n\t\t<h2><?php printf( __( '%s Theme Options', 'wcrichmond' ), $theme_name ); ?></h2>\n\t\t<?php settings_errors(); ?>\n\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t <h1>Calendar Links</h1>\n\t\t\t<?php\n\t\t\t\tsettings_fields( 'wcrichmond_options' );\n\t\t\t\tdo_settings_sections( 'theme_options' );\n\t\t\t\tsubmit_button();\n\t\t\t?>\n\t\t</form>\n\t</div>\n\t<?php\n}", "public function renderModuleContent()\n {\n if ($this->MOD_SETTINGS['wiz_step']) { // Run wizard instead of showing overview.\n $this->renderNewSiteWizard_run();\n } else {\n $this->renderNewSiteWizard_overview();\n }\n }", "function nightlife_customizer_register( $wp_customize ) {\n\n // Theme Customizer -- Colors -------------------------------------------\n\n // Header Background Color Setting\n $wp_customize->add_setting( 'header_bg_color', array(\n 'default' => '#220033'\n ) );\n\n // Header Background Color Control -- This is a color picker control\n $wp_customize->add_control( \n new WP_Customize_Color_Control( $wp_customize, 'header_bg_color', \n array(\n 'label' => __('Header Background Color', 'nightlife'),\n 'section' => 'colors',\n 'settings' => 'header_bg_color',\n )\n ) );\n \n // Header Text Color Setting\n $wp_customize->get_setting( 'header_textcolor' )->default = '#ffcc78'; \n\n // Home Page Area Colors\n\n $wp_customize->add_setting('home_area_colors', array(\n 'default'=> 'value1',\n ));\n\n $wp_customize->add_control( 'home_area_colors', \n array(\n 'label'\t\t => __('Home Section Colors', 'nightlife' ),\n 'section' => 'colors',\n 'settings' => 'home_area_colors',\n 'type' => 'radio',\n 'choices' => array(\n 'value1' => __( 'Standard', 'nightlife' ),\n 'value2' => __( 'Ultra-Dark', 'nightlife' ),\n ),\n )\n );\n \n // Theme Customizer -- Site Identity Section --------------------------------\n $wp_customize->get_section( 'title_tagline')->priority = 1; //Set Section Priority\n \n // Site Identity : Site Title\n $wp_customize->get_control( 'blogname' )->priority = 10; \n \n // Site Identity : Checkbox to Display/Hide Site Title\n $wp_customize->get_control( 'display_header_text' )->priority = 20;\n $wp_customize->get_control( 'display_header_text' )->label = __('Display Site Title', 'nightlife');\n \n // Site Identity : Feature Text H1 Heading \n $wp_customize->add_setting('feature_text_title', array(\n 'default'=> 'Rock That Body',\n )); \n $wp_customize->add_control('feature_text_title', \n array(\n 'label'\t\t => __('Feature Text Title', 'nightlife' ),\n 'section' => 'title_tagline',\n 'type' => 'text',\n 'settings' => 'feature_text_title',\n 'priority' => 25,\n )\n );\n \n // Site Identity : Site Tag Line / Feature Text\n $wp_customize->get_control( 'blogdescription' )->label = __('Feature Text', 'nightlife');\n $wp_customize->get_control( 'blogdescription' )->priority = 30;\n \n // Site Identity : Site Icon\n $wp_customize->get_control( 'site_icon' )->label = __( 'Site Icon aka favicon', 'nightlife' ); \n $wp_customize->get_control( 'site_icon' )->priority = 40;\n \n // Theme Customizer -- Hero Jumbotron Background Section --------------------------- \n \n // Hero Jumbotron Background : Background Image CSS\n $wp_customize->add_section(\n 'homepage_jumbotron_bg',\n array(\n 'title' => __( 'Hero-Jumbotron Background', 'nightlife' ),\n 'priority' => 15,\n 'capability' => 'edit_theme_options',\n 'description' => __( 'Change the background image in header/jumbotron of the homepage.', 'nightlife' ),\n )\n );\n $wp_customize->add_setting('nightlife_jumbotron_bg_image',\n array()\n ); \n $wp_customize->add_control(\n new WP_Customize_Media_Control(\n $wp_customize,\n 'nightlife_jumbotron_bg_image',\n array(\n 'mime_type' => 'image',\n 'label' => __( 'Background Image', 'nightlife' ),\n 'settings' => 'nightlife_jumbotron_bg_image',\n 'section' => 'homepage_jumbotron_bg',\n 'description' => __( 'Remove selected image to restore default background.', 'nightlife' ),\n )\n )\n );\n \n // Hero Jumbotron Background : Background Image CSS Opacity Slider\n\n $wp_customize->add_setting('nightlife_image_opacity');\n\n $wp_customize->add_control( 'nightlife_image_opacity',\n array(\n 'type' => 'range',\n 'priority' => 20,\n 'section' => 'homepage_jumbotron_bg',\n 'label' => __( 'Set Background Image Opacity', 'nightlife' ),\n 'description' => '<span style=\"float: left; margin-top: 10px;\">' . __( '&larr; Less', 'nightlife' ) . '</span><span style=\"float: right; margin-top: 10px;\">' . __( 'More &rarr;', 'nightlife' ) . '</span>',\n 'input_attrs' => array(\n 'min' => .1,\n 'max' => 1,\n 'step' => .1,\n 'class' => 'image-opacity',\n 'style' => 'width: 60%; padding-top: 0; margin: 8px 0 0 10px;',\n ),\n )\n );\n \n // Theme Customizer -- Home Page Layout & Content Section ------------------------------------------- \n $wp_customize->add_section( 'layout_options_section', array(\n 'title' => __( 'Home Page Layout & Content', 'nightlife' ),\n 'description' => __( 'Add or remove and edit section(s) of the home page', 'nightlife' ),\n 'priority' => 20,\n ) );\n \n // Home Page Layout & Content : Checkbox to Display/Hide Schedule Section\n $wp_customize->add_setting( 'schedule_area' );\n\n $wp_customize->add_control( 'schedule_area', array(\n 'type' => 'checkbox',\n 'priority' => 10,\n 'section' => 'layout_options_section',\n 'label' => __( 'Check to Remove the Schedule Section', 'nightlife' ),\n 'description' => '',\n ) ); \n \n // Home Page Layout & Content : Home Page Columns\n \n // Home Page Columns : Column 1 Top Title\n $wp_customize->add_setting( 'home_column_1_title', array(\n 'default' => __('Good, clean, music.'),\n 'sanitize_callback' => 'sanitize_text_field',\n ) );\n\n $wp_customize->add_control( 'home_column_1_title', array(\n 'type' => 'text',\n 'priority' => 11,\n 'section' => 'layout_options_section',\n 'label' => __( 'Column 1 Title', 'nightlife' ),\n 'description' => '',\n ) ); \n \n // Home Page Columns : Column 1 Top Text\n $wp_customize->add_setting( 'home_column_1_text', array(\n 'default' => __('Add text via WordPress Customizer...consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'nightlife'),\n 'sanitize_callback' => 'sanitize_text_field',\n ) );\n\n $wp_customize->add_control( 'home_column_1_text', array(\n 'type' => 'textarea',\n 'priority' => 12,\n 'section' => 'layout_options_section',\n 'label' => __( 'Column 1 Text', 'nightlife' ),\n 'description' => '',\n ) ); \n \n // Home Page Columns : Column 2 Top Title\n $wp_customize->add_setting( 'home_column_2_title', array(\n 'default' => __('Premium Sound.', 'nightlife'),\n 'sanitize_callback' => 'sanitize_text_field',\n ) );\n\n $wp_customize->add_control( 'home_column_2_title', array(\n 'type' => 'text',\n 'priority' => 13,\n 'section' => 'layout_options_section',\n 'label' => __( 'Column 2 Title', 'nightlife' ),\n 'description' => '',\n ) ); \n \n // Home Page Columns : Column 2 Top Text\n $wp_customize->add_setting( 'home_column_2_text', array(\n 'default' => __('Add text via WordPress Customizer...consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'nightlife'),\n 'sanitize_callback' => 'sanitize_text_field',\n ) );\n\n $wp_customize->add_control( 'home_column_2_text', array(\n 'type' => 'textarea',\n 'priority' => 14,\n 'section' => 'layout_options_section',\n 'label' => __( 'Column 2 Text', 'nightlife' ),\n 'description' => '',\n ) ); \n \n // Home Page Columns : Column 3 Top Title\n $wp_customize->add_setting( 'home_column_3_title', array(\n 'default' => __('Exciting Lighting Effects.', 'nightlife'),\n 'sanitize_callback' => 'sanitize_text_field',\n ) );\n\n $wp_customize->add_control( 'home_column_3_title', array(\n 'type' => 'text',\n 'priority' => 15,\n 'section' => 'layout_options_section',\n 'label' => __( 'Column 3 Title', 'nightlife' ),\n 'description' => '',\n ) ); \n \n // Home Page Columns : Column 3 Top Text\n $wp_customize->add_setting( 'home_column_3_text', array(\n 'default' => __('Add text via WordPress Customizer...consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'nightlife'),\n 'sanitize_callback' => 'sanitize_text_field',\n ) );\n\n $wp_customize->add_control( 'home_column_3_text', array(\n 'type' => 'textarea',\n 'priority' => 16,\n 'section' => 'layout_options_section',\n 'label' => __( 'Column 3 Text', 'nightlife' ),\n 'description' => '',\n ) ); \n \n // Home Page Layout & Content : Profile Block\n \n // Profile Block : Title\n $wp_customize->add_setting( 'home_profile_title', array(\n 'default' => __('BDT DJ Profile', 'nightlife'),\n 'sanitize_callback' => 'sanitize_text_field',\n ) );\n\n $wp_customize->add_control( 'home_profile_title', array(\n 'type' => 'text',\n 'priority' => 17,\n 'section' => 'layout_options_section',\n 'label' => __( 'Profile Title', 'nightlife' ),\n 'description' => '',\n ) ); \n \n // Profile Block : Text\n $wp_customize->add_setting( 'home_profile_text', array(\n 'default' => __('Add text via WordPress Customizer...consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'nightlife'),\n 'sanitize_callback' => 'sanitize_text_field',\n ) );\n\n $wp_customize->add_control( 'home_profile_text', array(\n 'type' => 'textarea',\n 'priority' => 18,\n 'section' => 'layout_options_section',\n 'label' => __( 'Profile Text', 'nightlife' ),\n 'description' => '',\n ) ); \n \n // Theme Customizer - Social Icons -------------------------------------------\n $wp_customize->add_section( 'social_icons_section', array(\n 'title' => __( 'Social Icons', 'nightlife' ),\n 'description' => __( 'Add your social media URLs to each field below to display their related social icons in the footer.', 'nightlife' ),\n 'priority' => 20,\n ) );\n\n // Social Icons : Facebook Link\n $wp_customize->add_setting( 'facebook_url', array(\n 'default' => '',\n 'sanitize_callback' => 'esc_url',\n ) );\n $wp_customize->add_control( 'facebook_url', array(\n 'type' => 'url',\n 'priority' => 10,\n 'section' => 'social_icons_section',\n 'label' => __( 'Facebook URL', 'nightlife' ),\n 'description' => __( 'Enter the complete address, including the http://', 'nightlife' ),\n ) );\n\n // Social Icons : Twitter Link\n $wp_customize->add_setting( 'twitter_url', array(\n 'default' => '',\n 'sanitize_callback' => 'esc_url',\n ) );\n $wp_customize->add_control( 'twitter_url', array(\n 'type' => 'url',\n 'priority' => 11,\n 'section' => 'social_icons_section',\n 'label' => __( 'Twitter URL', 'nightlife' ),\n 'description' => __( 'Enter the complete address, including the http://', 'nightlife' ),\n ) );\n\n // Social Icons : Instagram Link\n $wp_customize->add_setting( 'instagram_url', array(\n 'default' => '',\n 'sanitize_callback' => 'esc_url',\n ) );\n $wp_customize->add_control( 'instagram_url', array(\n 'type' => 'url',\n 'priority' => 12,\n 'section' => 'social_icons_section',\n 'label' => __( 'Instagram URL', 'nightlife' ),\n 'description' => __( 'Enter the complete address, including the http://', 'nightlife' ),\n ) );\n \n \n \n // Theme Customizer - Unused Section Removal\n $wp_customize->remove_section('header_image'); //remove unused section;\n $wp_customize->remove_section( 'static_front_page'); \n \n }", "function vendd_customizer_styles() { ?>\n\t<style type=\"text/css\">\n\t\t#customize-controls #customize-theme-controls .description { display: block; color: #999; margin: 2px 0 15px; font-style: italic; }\n\t\ttextarea, input, select,\n\t\t.customize-description { font-size: 12px !important; }\n\t\t.customize-control-title { font-size: 13px !important; margin: 5px 0 3px !important; }\n\t\t.customize-control label { font-size: 12px !important; }\n\t\t.customize-control { margin-bottom: 10px; }\n\t\t.control-description { color: #999; font-style: italic; margin-bottom: 6px; }\n\t\t.customize-control-text + .customize-control-checkbox,\n\t\t.customize-control-customtext + .customize-control-checkbox,\n\t\t.customize-control-image + .customize-control-checkbox { margin-top: 12px; }\n\t</style>\n<?php }", "public function render_content() {\n // call wp_dropdown_cats to get data and add to select field\n add_action('wp_dropdown_cats', array($this,\n 'wp_dropdown_cats'));\n\n // Set defaults\n $this->defaults = array('show_option_none' => __('None'),\n 'orderby' => 'name',\n 'hide_empty' => 0,\n 'id' => $this->id,\n 'selected' => $this->value());\n\n // parse defaults and user data\n $cats = wp_parse_args($this->options, $this->defaults);\n ?>\n <label>\n <span class=\"customize-control-title\"><?php echo esc_html($this->label); ?></span>\n <?php wp_dropdown_categories($cats); ?>\n </label>\n <?php\n }", "function sixty4kitchen_customizer( $wp_customize ){\n // Copyright Section\n\n $wp_customize->add_section(\n 'sec_copyright', array(\n 'title' => __( 'Copyright Settings', '64kitchen' ),\n 'description' => __( 'Copyright Section', '64kitchen' ),\n )\n );\n\n // Field 1 - Copyright Text Box\n $wp_customize->add_setting(\n 'set_copyright', array(\n 'type' => 'theme_mod',\n 'default' => 'true',\n 'sanitize_callback' => 'sanitize_text_field'\n )\n );\n\n $wp_customize->add_control(\n 'set_copyright', array(\n 'label' => __( 'Copyright','64kitchen' ),\n 'description' => __( 'Please, add your copyright information here','64kitchen' ),\n 'section' => 'sec_copyright',\n 'type' => 'text'\n )\n );\n\n// ------------------------------------------------------------------------------------------------\n \n\n// Slider Section\n \n $wp_customize->add_section(\n 'sec_slider', array(\n 'title' => __( 'Slider Settings', '64kitchen' ),\n 'description' => __( 'Slider Section', '64kitchen' ),\n )\n );\n\n// Field 1 - Slider Page Number 1\n\n $wp_customize->add_setting(\n 'set_slider_page1', array(\n 'type' => 'theme_mod',\n 'default' => '',\n 'sanitize_callback' => 'absint'\n )\n );\n\n $wp_customize->add_control(\n 'set_slider_page1', array(\n 'label' => __( 'Set slidier page 1', '64kitchen' ),\n 'description' => __( 'Set slidier page 1', '64kitchen' ),\n 'section' => 'sec_slider',\n 'type' => 'dropdown-pages'\n )\n );\n \n// Field 2 - Slider Button Text Number 1\n\n $wp_customize->add_setting(\n 'set_slider_button_text1', array(\n 'type' => 'theme_mod',\n 'default' => '',\n 'sanitize_callback' => 'sanitize_text_field'\n )\n );\n\n $wp_customize->add_control(\n 'set_slider_button_text1', array(\n 'label' => __( 'Buttom Text for Page 1', '64kitchen' ),\n 'description' => __( 'Buttom Text for Page 1', '64kitchen' ),\n 'section' => 'sec_slider',\n 'type' => 'text'\n )\n );\n\n// Field 3 - Slider Button URL Number 1\n\n $wp_customize->add_setting(\n 'set_slider_button_url1', array(\n 'type' => 'theme_mod',\n 'default' => '',\n 'sanitize_callback' => 'esc_url_raw'\n )\n );\n\n $wp_customize->add_control(\n 'set_slider_button_url1', array(\n 'label' => __( 'URL for Page 1', '64kitchen' ),\n 'description' => __( 'URL for Page 1', '64kitchen' ),\n 'section' => 'sec_slider',\n 'type' => 'url'\n )\n );\n\n// Field 4 - Slider Page Number 2\n\n $wp_customize->add_setting(\n 'set_slider_page2', array(\n 'type' => 'theme_mod',\n 'default' => '',\n 'sanitize_callback' => 'absint'\n )\n );\n\n $wp_customize->add_control(\n 'set_slider_page2', array(\n 'label' => __( 'Set slidier page 2', '64kitchen' ),\n 'description' => __( 'Set slidier page 2', '64kitchen' ),\n 'section' => 'sec_slider',\n 'type' => 'dropdown-pages'\n )\n );\n \n// Field 5 - Slider Button Text Number 2\n\n $wp_customize->add_setting(\n 'set_slider_button_text2', array(\n 'type' => 'theme_mod',\n 'default' => '',\n 'sanitize_callback' => 'sanitize_text_field'\n )\n );\n\n $wp_customize->add_control(\n 'set_slider_button_text2', array(\n 'label' => __( 'Buttom Text for Page 2', '64kitchen' ),\n 'description' => __( 'Buttom Text for Page 2', '64kitchen' ),\n 'section' => 'sec_slider',\n 'type' => 'text'\n )\n );\n\n// Field 6 - Slider Button URL Number 2\n\n $wp_customize->add_setting(\n 'set_slider_button_url2', array(\n 'type' => 'theme_mod',\n 'default' => '',\n 'sanitize_callback' => 'esc_url_raw'\n )\n );\n\n $wp_customize->add_control(\n 'set_slider_button_url2', array(\n 'label' => __( 'URL for Page 2', '64kitchen' ),\n 'description' => __( 'URL for Page 2', '64kitchen' ),\n 'section' => 'sec_slider',\n 'type' => 'url'\n )\n );\n\n\n// Field 7 - Slider Page Number 3\n\n $wp_customize->add_setting(\n 'set_slider_page3', array(\n 'type' => 'theme_mod',\n 'default' => '',\n 'sanitize_callback' => 'absint'\n )\n );\n\n $wp_customize->add_control(\n 'set_slider_page3', array(\n 'label' => __( 'Set slidier page 3', '64kitchen' ),\n 'description' => __( 'Set slidier page 3', '64kitchen' ),\n 'section' => 'sec_slider',\n 'type' => 'dropdown-pages'\n )\n );\n \n// Field 8 - Slider Button Text Number 3\n\n $wp_customize->add_setting(\n 'set_slider_button_text3', array(\n 'type' => 'theme_mod',\n 'default' => '',\n 'sanitize_callback' => 'sanitize_text_field'\n )\n );\n\n $wp_customize->add_control(\n 'set_slider_button_text3', array(\n 'label' => __( 'Button Text for Page 3', '64kitchen' ),\n 'description' => __( 'Button Text for Page 3', '64kitchen' ),\n 'section' => 'sec_slider',\n 'type' => 'text'\n )\n );\n\n// Field 9 - Slider Button URL Number 3\n\n $wp_customize->add_setting(\n 'set_slider_button_url3', array(\n 'type' => 'theme_mod',\n 'default' => '',\n 'sanitize_callback' => 'esc_url_raw'\n )\n );\n\n $wp_customize->add_control(\n 'set_slider_button_url3', array(\n 'label' => __( 'URL for Page 3', '64kitchen' ),\n 'description' => __( 'URL for Page 3', '64kitchen' ),\n 'section' => 'sec_slider',\n 'type' => 'url'\n )\n );\n\n\n//---------------------------------------------------------------------------------------------\n// Home Page Settings\n \n $wp_customize->add_section(\n 'sec_home_page', array(\n 'title' => __( 'Home Page Products and Blog Settings', '64kitchen' ),\n 'description' => __( 'Home Page Section', '64kitchen' ),\n )\n );\n\n// Popular Products\n\n // Headline\n\n $wp_customize->add_setting(\n 'set_popular_text', array(\n 'type' => 'theme_mod',\n 'default' => '',\n 'sanitize_callback' => 'sanitize_text_field'\n )\n );\n \n $wp_customize->add_control(\n 'set_popular_text', array(\n 'label' => __( 'Set the headline', '64kitchen' ),\n 'description' => __( 'Sorted by popularity', '64kitchen' ),\n 'section' => 'sec_home_page',\n 'type' => 'text'\n )\n );\n\n // Number of products\n\n $wp_customize->add_setting(\n 'set_popular_max_num', array(\n 'type' => 'theme_mod',\n 'default' => '',\n 'sanitize_callback' => 'absint'\n )\n );\n\n $wp_customize->add_control(\n 'set_popular_max_num', array(\n 'label' => __( 'Popular Products Max Number', '64kitchen' ),\n 'description' => __( 'Popular Products Max Number', '64kitchen' ),\n 'section' => 'sec_home_page',\n 'type' => 'number'\n )\n ); \n\n // Number of Columns\n\n $wp_customize->add_setting(\n 'set_popular_max_col', array(\n 'type' => 'theme_mod',\n 'default' => '',\n 'sanitize_callback' => 'absint'\n )\n );\n\n $wp_customize->add_control(\n 'set_popular_max_col', array(\n 'label' => __( 'Popular Products Max Columns', '64kitchen' ),\n 'description' => __( 'Popular Products Max Columns', '64kitchen' ),\n 'section' => 'sec_home_page',\n 'type' => 'number'\n )\n ); \n \n// New Arrivals\n\n // Headline\n\n $wp_customize->add_setting(\n 'set_new_arrivals_text', array(\n 'type' => 'theme_mod',\n 'default' => '',\n 'sanitize_callback' => 'sanitize_text_field'\n )\n );\n \n $wp_customize->add_control(\n 'set_new_arrivals_text', array(\n 'label' => __( 'Set the headline', '64kitchen' ),\n 'description' => __( 'Sorted by newest date', '64kitchen' ),\n 'section' => 'sec_home_page',\n 'type' => 'text'\n )\n );\n\n // Number of Products\n\n $wp_customize->add_setting(\n 'set_new_arrivals_max_num', array(\n 'type' => 'theme_mod',\n 'default' => '',\n 'sanitize_callback' => 'absint'\n )\n );\n\n $wp_customize->add_control(\n 'set_new_arrivals_max_num', array(\n 'label' => __( 'New Arrivals Max Number', '64kitchen' ),\n 'description' => __( 'New Arrivals Max Number', '64kitchen' ),\n 'section' => 'sec_home_page',\n 'type' => 'number'\n )\n ); \n\n // Number of Columns\n\n $wp_customize->add_setting(\n 'set_new_arrivals_max_col', array(\n 'type' => 'theme_mod',\n 'default' => '',\n 'sanitize_callback' => 'absint'\n )\n );\n\n $wp_customize->add_control(\n 'set_new_arrivals_max_col', array(\n 'label' => __( 'New Arrivals Max Columns', '64kitchen' ),\n 'description' => __( 'New Arrivals Max Columns', '64kitchen' ),\n 'section' => 'sec_home_page',\n 'type' => 'number'\n )\n ); \n \n// Deal of the Week\n\n // Headline\n\n $wp_customize->add_setting(\n 'set_deal_text', array(\n 'type' => 'theme_mod',\n 'default' => '',\n 'sanitize_callback' => 'sanitize_text_field'\n )\n );\n \n $wp_customize->add_control(\n 'set_deal_text', array(\n 'label' => __( 'Set the headline for your deal', '64kitchen' ),\n 'description' => __( 'deal', '64kitchen' ),\n 'section' => 'sec_home_page',\n 'type' => 'text'\n )\n );\n\n // Checkbox\n\n $wp_customize->add_setting(\n 'set_deal_show', array(\n 'type' => 'theme_mod',\n 'default' => '',\n 'sanitize_callback' => 'sixty4kitchen_sanitize_checkbox'\n )\n );\n\n $wp_customize->add_control(\n 'set_deal_show', array(\n 'label' => __( 'Show Deal of the Week?', '64kitchen' ),\n 'section' => 'sec_home_page',\n 'type' => 'checkbox'\n )\n ); \n \n // Product ID\n \n $wp_customize->add_setting(\n 'set_deal', array(\n 'type' => 'theme_mod',\n 'default' => '',\n 'sanitize_callback' => 'absint'\n )\n );\n\n $wp_customize->add_control(\n 'set_deal', array(\n 'label' => __( 'Deal of the Week Product ID', '64kitchen' ),\n 'description' => __( 'Product ID to Display', '64kitchen' ),\n 'section' => 'sec_home_page',\n 'type' => 'number'\n )\n ); \n\n // Blog\n\n // Headline\n\n $wp_customize->add_setting(\n 'set_blog_text', array(\n 'type' => 'theme_mod',\n 'default' => '',\n 'sanitize_callback' => 'sanitize_text_field'\n )\n );\n \n $wp_customize->add_control(\n 'set_blog_text', array(\n 'label' => __( 'Set the headline for your blog section', '64kitchen' ),\n 'description' => __( 'blog', '64kitchen' ),\n 'section' => 'sec_home_page',\n 'type' => 'text'\n )\n );\n\n}", "function centreforge_customize_register($wp_customize){\n\t$wp_customize->add_section('layout_section', array(\n\t\t'title' => 'Layout',\n\t\t'capability' => 'edit_theme_options',\n\t\t'description' => 'Allows you to edit your theme\\'s layout.')\n\t);\n\t$wp_customize->add_setting('cf_options[use_custom_text]', array(\n\t\t'capability' => 'edit_theme_options',\n\t\t'type' => 'option',\n\t\t'default' => '1'\n\t));\n\t$wp_customize->add_control('cf_options[use_custom_text]', array(\n\t\t'settings' => 'cf_options[use_custom_text]',\n\t\t'label' => 'Display Custom Text',\n\t\t'section' => 'layout_section',\n\t\t'type' => 'checkbox',\n\t));\n\t\n\t$wp_customize->add_setting('cf_options[logo_upload]', array(\n\t\t'capability' => 'edit_theme_options',\n\t\t'type' => 'option'\n\t));\n\t$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'logo_upload', array(\n\t \t'label' => 'Logo Upload',\n\t \t'section' => 'title_tagline',\n\t \t'settings' => 'cf_options[logo_upload]',\n \t)));\n\t\n // Menu Options\n \n $wp_customize->add_section('menu_layout', array(\n\t\t'title' => 'Menu Layout',\n\t\t'capability' => 'edit_theme_options',\n 'panel' => 'nav_menus',\n 'priority' => 5,\n\t\t'description' => 'Allows you to edit your theme\\'s layout.')\n\t);\n \n $cf_nav_types = array();\n $cfchild_nav_types = array();\n \n // Find all files in the centreforge theme with nav-\n $cfcore_nav_types = glob(TEMPLATEPATH.\"/nav-*.php\");\n \n // If there is a child theme preset, get the child theme navs\n if(TEMPLATEPATH != STYLESHEETPATH){\n //Find all Child Theme nav-\n $cfchild_nav_types = glob(STYLESHEETPATH.\"/nav-*.php\");\n }\n \n $cf_nav_types = array_merge($cfcore_nav_types, $cfchild_nav_types);\n \n if(count($cf_nav_types) > 0) {\n $menuTypes = array();\n foreach($cf_nav_types as $cf_nav_type) {\n $info = pathinfo($cf_nav_type);\n $filenameNoNav = str_replace('nav-', '', $info['filename']);\n $filename = str_replace('-', ' ', $filenameNoNav);\n $menuTypes[$filenameNoNav] = ucwords($filename);\n }\n \n $wp_customize->add_setting('cf_menu_options[menu_type]', array(\n 'default' => 'bootstrap',\n 'type' => 'option',\n 'capability' => 'edit_theme_options'\n ));\n $wp_customize->add_control('cf_menu_options[menu_type]', array(\n 'label' => 'Primary Menu Style',\n 'section' => 'menu_layout',\n 'settings' => 'cf_menu_options[menu_type]',\n 'type' => 'select',\n 'choices' => $menuTypes\n ));\n }\n \n $wp_customize->add_setting('cf_menu_options[show_menu]', array(\n\t\t'capability' => 'edit_theme_options',\n\t\t'type' => 'option',\n\t\t'default' => '1'\n\t));\n\t$wp_customize->add_control('cf_menu_options[show_menu]', array(\n\t \t'label' => 'Show Main Menu',\n 'section' => 'menu_layout',\n 'settings' => 'cf_menu_options[show_menu]',\n 'type' => 'checkbox',\n \t));\n \n // Social Profiles\n\t$wp_customize->add_section('social_section', array(\n\t\t'title' => 'Social Profiles',\n\t\t'capability' => 'edit_theme_options',\n\t\t'description' => 'Allows you to add your social profiles.')\n\t);\n\t$wp_customize->add_setting('cf_options[facebook]', array(\n\t\t'capability' => 'edit_theme_options',\n\t\t'type' => 'option',\n\t\t'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control('cf_options[facebook]', array(\n\t\t'settings' => 'cf_options[facebook]',\n\t\t'label' => 'Facebook URL',\n\t\t'section' => 'social_section',\n\t\t'type' => 'text'\n\t));\n\t$wp_customize->add_setting('cf_options[twitter]', array(\n\t\t'capability' => 'edit_theme_options',\n\t\t'type' => 'option',\n 'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control('cf_options[twitter]', array(\n\t\t'settings' => 'cf_options[twitter]',\n\t\t'label' => 'Twitter URL',\n\t\t'section' => 'social_section',\n\t\t'type' => 'text'\n\t));\n\t$wp_customize->add_setting('cf_options[googleplus]', array(\n\t\t'capability' => 'edit_theme_options',\n\t\t'type' => 'option',\n 'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control('cf_options[googleplus]', array(\n\t\t'settings' => 'cf_options[googleplus]',\n\t\t'label' => 'Google+ URL',\n\t\t'section' => 'social_section',\n\t\t'type' => 'text'\n\t));\n\t$wp_customize->add_setting('cf_options[linkedin]', array(\n\t\t'capability' => 'edit_theme_options',\n\t\t'type' => 'option',\n 'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control('cf_options[linkedin]', array(\n\t\t'settings' => 'cf_options[linkedin]',\n\t\t'label' => 'LinkedIn URL',\n\t\t'section' => 'social_section',\n\t\t'type' => 'text'\n\t));\n\t$wp_customize->add_setting('cf_options[youtube]', array(\n\t\t'capability' => 'edit_theme_options',\n\t\t'type' => 'option',\n 'transport' => 'postMessage'\n\t));\n\t$wp_customize->add_control('cf_options[youtube]', array(\n\t\t'settings' => 'cf_options[youtube]',\n\t\t'label' => 'YouTube URL',\n\t\t'section' => 'social_section',\n\t\t'type' => 'text'\n\t));\n \n // Custom Colors\n \n // Remove these two controls and re-add them using our colors array\n $wp_customize->remove_control('header_textcolor');\n $wp_customize->remove_control('background_color');\n \n $colors = array();\n $colors[] = array(\n 'slug' =>'cf_colors[body-bg]', \n 'default' => '#ffffff',\n 'label' => 'Background Color',\n 'description' => __( 'The main body background color.', 'centreforge' ),\n );\n \n $colors[] = array(\n 'slug' =>'cf_colors[text-color]', \n 'default' => '#333333',\n 'label' => 'Content Text Color',\n 'description' => __( 'The main text color for your content.', 'centreforge' ),\n );\n $colors[] = array(\n 'slug' =>'cf_colors[link-color]', \n 'default' => '#337ab7',\n 'label' => 'Content Link Color',\n 'description' => __( 'The text color for all your links. This is typically the same color as Brand Primary.', 'centreforge' ),\n );\n $colors[] = array(\n 'slug' =>'cf_colors[brand-primary]', \n 'default' => '#337ab7',\n 'label' => 'Brand Primary Color',\n 'description' => __( 'Primary color for any buttons, labels, and headings you may have.', 'centreforge' ),\n );\n $colors[] = array(\n 'slug' =>'cf_colors[brand-success]', \n 'default' => '#5cb85c',\n 'label' => 'Success Color',\n 'description' => __( 'The color for any success labels, buttons or alerts.', 'centreforge' ),\n );\n $colors[] = array(\n 'slug' =>'cf_colors[brand-info]', \n 'default' => '#46b8da',\n 'label' => 'Info Button Color',\n 'description' => __( 'The color for any info labels, buttons or alerts.', 'centreforge' ),\n );\n $colors[] = array(\n 'slug' =>'cf_colors[brand-warning]', \n 'default' => '#f0ad4e',\n 'label' => 'Warning Button Color',\n 'description' => __( 'The color for any warning labels, buttons or alerts.', 'centreforge' ),\n );\n $colors[] = array(\n 'slug' =>'cf_colors[brand-danger]', \n 'default' => '#d9534f',\n 'label' => 'Danger Button Color',\n 'description' => __( 'The color for any danger labels, buttons or alerts.', 'centreforge' ),\n );\n foreach( $colors as $color ) {\n // SETTINGS\n $wp_customize->add_setting(\n $color['slug'], array(\n 'default' => $color['default'],\n 'type' => 'option', \n 'capability' => 'edit_theme_options',\n 'transport' => 'postMessage',\n 'sanitize_callback' => 'check_compile_bootstrap',\n )\n );\n // CONTROLS\n $wp_customize->add_control(\n new WP_Customize_Color_Control(\n $wp_customize,\n $color['slug'], \n array(\n 'label' => $color['label'], \n 'section' => 'colors',\n 'settings' => $color['slug'],\n 'description' => $color['description']\n )\n )\n );\n }\n}", "function proto_theme_customizer( $wp_customize ) {\n \n if ( post_type_exists( 'jetpack-portfolio' ) ) {\n // Add Sections\n\n // Add Settings\n\t$wp_customize->add_setting(\n\t 'proto_show_jetpack_tags',\n\t array(\n\t 'default' => '1',\n\t 'capability' => 'edit_theme_options',\n\t 'sanitize_callback' => 'portfolio_sanitize_checkbox'\n\t )\n\t);\n \n // Add Controls\n $wp_customize->add_control(\n\t 'proto_show_jetpack_tags',\n\t array(\n\t 'section' => 'portfolio_layout_options',\n\t 'label' => __('Show tags on Jetpack portfolio', 'proto'),\n\t 'type' => 'checkbox',\n 'priority' => 100\n\t )\n\t);\n }\n \n /*\n * Front Page Setup Notifications\n */\n // Add Settings\n $wp_customize->add_setting(\n 'proto_show_front_page_notifications',\n array(\n 'default' => '1',\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'portfolio_sanitize_checkbox'\n )\n );\n // Add Controls\n $wp_customize->add_control(\n 'proto_show_front_page_notifications',\n array(\n 'section' => 'static_front_page',\n 'label' => __('Show Front Page setup notifications', 'proto'),\n 'type' => 'checkbox',\n 'priority' => 100\n )\n );\n}", "function mytheme_customizer_live_preview()\n{\n wp_enqueue_script(\n 'mytheme-themecustomizer', //Give the script an ID\n get_template_directory_uri().'/js/theme-customizer.js',//Point to file\n array( 'jquery','customize-preview' ), //Define dependencies\n '', //Define a version (optional)\n true //Put script in footer?\n );\n}", "function lady_bug_customizer( $wp_customize ) {\n /* Sections' order\n **************************************/\n $wp_customize->remove_section('colors');\n $wp_customize->remove_section('header_image');\n $wp_customize->get_section('title_tagline')->priority = 1;\n $wp_customize->get_section('static_front_page')->priority = 2;\n\n /* Title & Tagline become Branding\n **************************************/\n $wp_customize->get_section('title_tagline')->title = __('Branding','lady-bug');\n $wp_customize->get_control('blogdescription')->label = __('Author','lady-bug');\n //about text area\n $wp_customize->add_setting(\n 'about_textarea',\n array(\n 'default' => 'Default about text',\n 'sanitize_callback' => 'esc_textarea'\n )\n );\n $wp_customize->add_control(\n 'about_textarea',\n array(\n 'label' => __('About','lady-bug'),\n 'section' => 'title_tagline',\n 'type' => 'textarea'\n )\n );\n //linkedin url\n $wp_customize->add_setting(\n 'linkedin_text',\n array(\n 'sanitize_callback' => 'esc_url'\n )\n );\n $wp_customize->add_control(\n 'linkedin_text',\n array(\n 'label' => __('LinkedIn URL','lady-bug'),\n 'section' => 'title_tagline',\n 'type' => 'text'\n )\n );\n //github url\n $wp_customize->add_setting(\n 'github_text',\n array(\n 'sanitize_callback' => 'esc_url'\n )\n );\n $wp_customize->add_control(\n 'github_text',\n array(\n 'label' => __('GitHub URL','lady-bug'),\n 'section' => 'title_tagline',\n 'type' => 'text'\n )\n );\n\n /* Google Analytics\n **************************************/\n $wp_customize->add_section(\n 'google_analytics_section',\n array(\n 'title' => __('Google Analytics','lady-bug'),\n 'description' => 'Enter your analytics tracking code.',\n 'priority' => 3\n )\n );\n $wp_customize->add_setting(\n 'ga_textarea',\n array(\n 'sanitize_callback' => 'esc_textarea'\n )\n );\n $wp_customize->add_control(\n 'ga_textarea',\n array(\n 'section' => 'google_analytics_section',\n 'type' => 'textarea'\n )\n );\n}", "function cah_ajax_section_advanced_cb( $args ) {\n ?>\n <p>User Customization Settings</p>\n <?\n}", "function floatingorchard_customize_register( $wp_customize ) {\n\t$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';\n\n\t//Home Page\n\t$wp_customize->add_setting( 'homepage_setting' , array(\n\n\t) );\n\n\t$wp_customize->add_section( 'homepage_section' , array(\n\t 'title' => __( 'Home Page', 'floatingorchard' ),\n\t 'priority' => 120,\n\t) );\n\n\t$wp_customize->add_control( 'homepage_control', array(\n\t\t'label' => __( 'Core Commitments', 'floatingorchard' ),\n\t\t'section' => 'homepage_section',\n\t\t'settings' => 'homepage_setting'\n\t) );\t\n\n\n\t//Footer\n\t$wp_customize->add_setting( 'footersetting' , array(\n\n\t) );\n\n\t$wp_customize->add_section( 'footersection' , array(\n\t 'title' => __( 'Footer Section', 'floatingorchard' ),\n\t 'priority' => 130,\n\t) );\n\n\t$wp_customize->add_control( 'footercontrol', array(\n\t\t'label' => __( 'Footer Label', 'floatingorchard' ),\n\t\t'section' => 'footersection',\n\t\t'settings' => 'footersetting'\n\t) );\n\n\n}", "function getPage() \n {\n global $constructor, $admin, $theme_path, $theme_uri;\n /*@var $constructor array*/\n $constructor = $this->_options;\n \n /*@var $admin array*/\n $admin = $this->_admin;\n\n /*@var $theme_path string */\n $theme_path = $this->getThemePath();\n\n /*@var $theme_uri string */\n $theme_uri = $this->getThemeUri();\n ?>\n <div class='wrap'>\n <h2><?php _e('Customize Theme', 'constructor'); ?></h2>\n <?php\n if ( $this->_admin['donate'] ) {\n echo '<div id=\"message\" class=\"updated fade donate\"><div class=\"donate-button\">'.$this->_donate.'</div><p>'.__('If you like this theme and find it useful, help keep this theme free and actively developed by clicking the donate button (via PayPal or CC)').'</p><a href=\"'.get_bloginfo('wpurl').'/wp-admin/admin-ajax.php\" class=\"message-close ui-icon ui-icon-close\" title=\":(\"><span/></a><br class=\"clear\"/></div>';\n }\n \n if ( isset( $_REQUEST['saved'] ) ) {\n echo '<div id=\"message\" class=\"updated fade\"><p><strong>'.__('Options saved.').'</strong></p></div>';\n }\n \n if ( isset( $_REQUEST['errors'] ) ) {\n if (isset($_SESSION['errors']) && $_SESSION['errors'] != '') {\n $errors = unserialize($_SESSION['errors']);\n $_SESSION['errors'] = '';\n }\n echo '<div id=\"errors\" class=\"error fade\"><p><strong>'.\n __('Some images can\\'t be upload. Please check permissions').'<br/>'.\n join('<br/>',$errors).\n '</strong></p></div>';\n }\n ?>\n <div class=\"constructor\">\n <form method=\"post\" id=\"constructor-form\" action=\"<?php echo esc_attr($_SERVER['REQUEST_URI']); ?>\" enctype=\"multipart/form-data\">\n <?php wp_nonce_field('constructor'); ?>\n <input type=\"hidden\" name=\"action\" value=\"save\" />\n <div id=\"tabs\">\n <ul>\n <?php foreach ($this->_modules as $module => $file) : ?>\n <li><a href=\"#constr-<?php echo $file ?>\" name=\"<?php echo $file ?>\"><?php echo $module ?></a></li>\n <?php endforeach; ?>\n </ul>\n <?php foreach ($this->_modules as $module => $file) : ?>\n <div id=\"constr-<?php echo $file ?>\">\n <?php require_once CONSTRUCTOR_DIRECTORY .\"/admin/settings/$file.php\" ?>\n </div>\n <?php endforeach; ?>\n \n </div>\n <p class=\"submit\">\n <input type=\"submit\" name=\"Submit\" class=\"button-primary\" value=\"<?php _e('Save Changes', 'constructor')?>\" />\n </p>\n </form>\n </div>\n </div>\n <?php\n }", "public function content_template() {\n\t\t?>\n\n\t\t<label>\n\t\t\t<# if ( data.label ) { #>\n\t\t\t\t<span class=\"customize-control-title\">{{ data.label }}</span>\n\t\t\t\t<# } #>\n\n\t\t\t\t\t<# if ( data.description ) { #>\n\t\t\t\t\t\t<span class=\"description customize-control-description\">{{ data.description }}</span>\n\t\t\t\t\t\t<# } #>\n\n\t\t\t\t\t\t\t<# if( data.edit_link ){ #>\n\t\t\t\t\t\t\t\t<# _.each(data.edit_link, function(v, k) { #>\n\t\t\t\t\t\t\t\t\t<!-- wp-playlist-caption class is added to not add customize changeset to this link -->\n\t\t\t\t\t\t\t\t\t<a href=\"{{{v}}}\" class=\"wp-playlist-caption\"><div id=\"{{k}}-editor-button\" class=\"button button-primary\">\n\t\t\t\t\t\t\t\t\t\t\t<# if( k === 'elementor') {#>\n\t\t\t\t\t\t\t\t\t\t\t\t<i class=\"eicon-elementor\" aria-hidden=\"true\"></i>\n\t\t\t\t\t\t\t\t\t\t\t\t<# } #>\n\t\t\t\t\t\t\t\t\t\t\t\t\tEdit with {{k}}\n\t\t\t\t\t\t\t\t\t\t</div></a>\n\t\t\t\t\t\t\t\t\t<# }) #>\n\t\t\t\t\t\t\t\t\t\t<# } #>\n\n\t\t</label>\n\t\t<?php\n\t}", "public function render_page() {\n\t\t?>\n\t\t<div class=\"wrap block-lab-settings\">\n\t\t\t<?php\n\t\t\t$this->render_page_header();\n\t\t\tinclude block_lab()->get_path() . 'php/views/license.php';\n\t\t\t?>\n\t\t</div>\n\t\t<?php\n\t}", "function render() {\n global $wp_meta_boxes;\n \n $title = __( 'Content Scheduler', 'contentscheduler' );\n ?>\n <div class=\"wrap\">\n <?php screen_icon( \"options-general\" ); ?>\n <h2><?php echo esc_html( $title ); ?></h2>\n <form method=\"post\" action=\"options.php\">\n <div class=\"metabox-holder\">\n <div class=\"postbox-container\" style=\"width: 99%;\">\n <?php\n settings_fields( $this->settings_field);\n do_settings_sections( 'cs_settings_page' );\n ?>\n </div><!-- /.postbox-container -->\n </div><!-- /.metabox-holder -->\n <p>\n <input type=\"submit\" class=\"button button-primary\" name=\"save_options\" value=\"<?php esc_attr_e( 'Save Options' ); ?>\" />\n </p>\n </form>\n </div><!-- /.wrap -->\n <?php }", "public function additional_styles() {\n global $canvys; ?>\n <style id=\"cv-theme-settings-visual-style\">\n\n #cv-header-preview-header {\n padding: 35px 5px;\n }\n\n .cv-header-preview {\n padding: 0 !important;\n border: 1px solid #eee;\n font-size: 11px;\n }\n\n /* Secondary Bar */\n .secondary-bar {\n border-bottom: 1px solid #eee;\n padding: 10px 5px;\n }\n .cv-header-preview .secondary-bar .secondary-menu,\n .cv-header-preview .secondary-bar .secondary-social {\n margin: 0 !important;\n padding: 0 5px;\n }\n .cv-header-preview .secondary-bar .secondary-menu li,\n .cv-header-preview .secondary-bar .secondary-social li {\n padding: 0 5px;\n }\n .cv-header-preview .secondary-bar .additional-text {\n padding: 0 5px;\n }\n\n /* Banner Area */\n .banner-area {\n border-top: 1px solid #eee;\n padding: 15px 0;\n }\n\n /* Banner Area Elements */\n .banner-area > * {\n margin: 6px 0;\n padding: 0 5px;\n display: inline;\n }\n .banner-area .banner-title {\n font-size: 16px !important;\n font-weight: 600;\n }\n .banner-area .banner-description {\n font-size: 16px !important;\n font-weight: 200;\n }\n\n /* Centered */\n .banner-area[data-style=\"center\"] {\n text-align: center;\n }\n .banner-area[data-style=\"center\"] > * {\n float: none !important;\n display: block;\n }\n\n /* Left Aligned */\n .banner-area[data-style=\"left\"] {\n text-align: left;\n }\n .banner-area[data-style=\"left\"] > * {\n float: none !important;\n display: block;\n }\n\n /* Right Aligned */\n .banner-area[data-style=\"right\"] {\n text-align: right;\n }\n .banner-area[data-style=\"right\"] > * {\n float: none !important;\n display: block;\n }\n\n /* Hidden */\n .banner-area[data-style=\"hidden\"] {\n display: none !important;\n }\n\n /* Logo */\n .cv-header-preview .logo {\n width: 125px;\n padding: 0 5px;\n }\n .cv-header-preview .logo img {\n display: block;\n }\n\n /* main Navigation */\n .cv-header-preview .main-navigation {\n padding: 5px 0;\n }\n\n /* Modern inline menu style */\n .cv-header-preview .main-navigation[data-style=\"modern\"] .main-menu span {\n font-weight: 600;\n font-size: 13px;\n }\n\n /* Overlay Style */\n .cv-header-preview .main-navigation[data-style=\"overlay\"] {\n font-size: 16px;\n }\n .cv-header-preview .main-navigation[data-style=\"overlay\"] .normal-menu,\n .cv-header-preview .main-navigation:not([data-style=\"overlay\"]) .main-menu.overlay-menu {\n display: none;\n }\n\n .cv-header-preview .main-navigation .main-menu,\n .cv-header-preview .main-navigation .main-tools,\n .cv-header-preview .main-navigation .main-social {\n margin: 0 !important;\n padding: 0 5px;\n }\n .cv-header-preview .main-navigation .main-menu li,\n .cv-header-preview .main-navigation .main-tools li,\n .cv-header-preview .main-navigation .main-social li {\n padding: 0 5px;\n }\n\n /* Language directions */\n html[dir=\"rtl\"] .cv-header-preview .banner-area .bread-crumbs,\n html:not([dir=\"rtl\"]) .cv-header-preview .banner-area .banner-title,\n html:not([dir=\"rtl\"]) .cv-header-preview .banner-area .banner-description,\n html:not([dir=\"rtl\"]) .cv-header-preview .main-navigation .main-menu,\n html:not([dir=\"rtl\"]) .cv-header-preview .main-navigation .main-tools,\n html:not([dir=\"rtl\"]) .cv-header-preview .main-navigation .main-social,\n html:not([dir=\"rtl\"]) .cv-header-preview .main-navigation .main-menu li,\n html:not([dir=\"rtl\"]) .cv-header-preview .main-navigation .main-tools li,\n html:not([dir=\"rtl\"]) .cv-header-preview .main-navigation .main-social li,\n html:not([dir=\"rtl\"]) .cv-header-preview .secondary-bar .secondary-menu li,\n html:not([dir=\"rtl\"]) .cv-header-preview .secondary-bar .secondary-social li {\n float: left;\n }\n html:not([dir=\"rtl\"]) .cv-header-preview .banner-area .bread-crumbs,\n html[dir=\"rtl\"] .cv-header-preview .banner-area .banner-title,\n html[dir=\"rtl\"] .cv-header-preview .main-navigation .main-menu,\n html[dir=\"rtl\"] .cv-header-preview .main-navigation .main-tools,\n html[dir=\"rtl\"] .cv-header-preview .main-navigation .main-social,\n html[dir=\"rtl\"] .cv-header-preview .main-navigation .main-menu li,\n html[dir=\"rtl\"] .cv-header-preview .main-navigation .main-tools li,\n html[dir=\"rtl\"] .cv-header-preview .main-navigation .main-social li,\n html[dir=\"rtl\"] .cv-header-preview .secondary-bar .secondary-menu li,\n html[dir=\"rtl\"] .cv-header-preview .secondary-bar .secondary-social li {\n float: right;\n }\n </style>\n <?php }", "function bjorn_header_promo2_show() {\n $bjorn_theme_options = bjorn_get_theme_options();\n\n echo '<div class=\"header-promo-content\">'.do_shortcode($bjorn_theme_options['header_banner2_editor']).'</div>'; // This is safe place and we can't use wp_kses_post or other esc_ functions here because this is ads area where user may use Google Adsense and other Java Script banners code with <script> inside.\n}", "protected function render() {\n $settings = $this->get_settings_for_display();\n\n if ( is_array( $settings['filterpanel'] ) ) {\n $settings['filterpanel'] = $this->rehub_filter_values( $settings['filterpanel'] );\n $settings['filterpanel'] = rawurlencode( json_encode( $settings['filterpanel'] ) );\n }\n // print_r($settings);\n $this->normalize_arrays( $settings );\n $this->render_custom_js();\n echo wpsm_compactgrid_loop_shortcode( $settings );\n }", "function cprogressive_theme_customizer( $wp_customize ) {\n // Create logo section\n $wp_customize->add_section( 'cprogressive_logo_section' , array(\n 'title' => __( 'Logo', 'cprogressive' ),\n 'priority' => 30,\n 'description' => 'Upload a logo to replace the default site name and description in the header',\n ) );\n\n // Create secondary logo section\n $wp_customize->add_section( 'cprogressive_sec_logo_section' , array(\n 'title' => __( 'Secondary Logo', 'cprogressive' ),\n 'priority' => 30,\n 'description' => 'Upload a secondary logo.',\n ) );\n\n // Create footer section\n $wp_customize->add_section( 'cprogressive_footer_section' , array(\n 'title' => __( 'Footer Copyright', 'cprogressive' ),\n 'priority' => 200,\n 'description' => '',\n ) );\n\n // Register logo section in theme customizer\n $wp_customize->add_setting( 'cprogressive_logo' );\n\n // Register secondary logo section in theme customizer\n $wp_customize->add_setting( 'cprogressive_sec_logo' );\n\n // Register footer section in theme customizer\n $wp_customize->add_setting( 'cprogressive_footer' );\n\n // Use an img uploader for logo section\n $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'cprogressive_logo', array(\n 'label' => __( 'Logo', 'cprogressive' ),\n 'section' => 'cprogressive_logo_section',\n 'settings' => 'cprogressive_logo',\n ) ) );\n\n // Use an img uploader for secondary logo section\n $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'cprogressive_sec_logo', array(\n 'label' => __( 'Secondary logo', 'cprogressive' ),\n 'section' => 'cprogressive_sec_logo_section',\n 'settings' => 'cprogressive_sec_logo',\n ) ) );\n\n // Use an img uploader for logo section\n $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'cprogressive_footer', array(\n 'label' => __( 'Footer Copyright Text', 'cprogressive' ),\n 'section' => 'cprogressive_footer_section',\n 'settings' => 'cprogressive_footer',\n ) ) );\n}", "function _theme_name_customize_register( $wp_customize ) {\n\n $wp_customize -> get_setting('blogname') -> transport = 'postMessage';\n\n $wp_customize -> selective_refresh -> add_partial('blogname', [\n // 'settings' => [] // You put DOM ID of the settings here and if we have ID from the add_partial. We don't need to use 'setting' key\n 'selectors' => '.c-header__blogname', \n 'container_inclusive' => false,\n 'render_callback' => function() {\n bloginfo('name');\n }\n ]);\n\n /************************ SINGLE SETTINGS ************************/\n\n $wp_customize -> add_section('_theme_name_single_blog_options', [\n 'title' => esc_html('Single Blog Options', '_theme_name'),\n 'description' => esc_html('You can change single options here', '_theme_name'),\n 'active_callback' => '_theme_name_show_single_blog_section'\n ]); \n\n $wp_customize -> add_setting( '_theme_name_display_author_info', [\n 'default' => true,\n 'transport' => 'postMessage',\n 'sanitize_callback' => '_theme_name_sanitize_checkbox',\n ]);\n\n $wp_customize -> add_control('_theme_name_display_author_info', [\n 'type' => 'checkbox',\n 'label' => esc_html__( 'Show Author Info', '_theme_name'),\n 'section' => '_theme_name_single_blog_options'\n ]);\n\n function _theme_name_show_single_blog_section() {\n global $post;\n return is_single() && $post -> post_type === 'post';\n }\n\n function _theme_name_sanitize_checkbox( $checked ) {\n return (isset($checked) && $checked === true ) ? true : false;\n\n }\n\n /************************ GENERAL SETTINGS ************************/\n\n $wp_customize -> add_section('_theme_name_general_options', [\n 'title' => esc_html('General Options', '_theme_name'),\n 'description' => esc_html('You can change general options here', '_theme_name'),\n 'priority' => 30\n ]);\n\n $wp_customize -> add_setting('_theme_name_accent_colour', [\n 'default' => '#20dda',\n 'transport' => 'postMessage',\n 'sanitize_callback' => 'sanitize_hex_color'\n ]);\n \n // https://developer.wordpress.org/themes/customize-api/customizer-objects/#core-custom-controls\n\n $wp_customize -> add_control( new WP_Customize_Color_Control( $wp_customize, '_theme_name_accent_colour', array(\n 'label' => __( 'Accent Color', '_theme_name' ),\n 'section' => '_theme_name_general_options',\n ) ) );\n\n /************************ FOOTER SETTINGS ************************/\n\n $wp_customize -> selective_refresh -> add_partial('_theme_name_footer_partial', [\n 'settings' => [ // You put DOM ID of the settings here and if we have ID from the add_partial. We don't need to use 'setting' key\n '_theme_name_footer_background',\n '_theme_name_footer_layout'\n ], \n 'selectors' => '#footer', \n 'container_inclusive' => false, // partial will replace the whole .c-site-info, and we do not put content inside of it\n 'render_callback' => function() {\n get_template_part('template-parts/footer/widget');\n get_template_part('template-parts/footer/info');\n }\n ]);\n\n $wp_customize -> add_section('_theme_name_footer_options', [\n 'title' => esc_html('Footer Options', '_theme_name'),\n 'description' => esc_html('You can change footer options here', '_theme_name'),\n 'priority' => 30\n ]);\n\n $wp_customize -> add_setting('_theme_name_site_info', [\n 'default' => '',\n 'sanitize_callback' => '_theme_name_sanitize_site_info',\n 'transport' => 'postMessage',\n ]); \n\n // https://developer.wordpress.org/themes/customize-api/customizer-objects/#sections\n $wp_customize -> add_control('_theme_name_site_info', [\n 'type' => 'text', // This is the most important one\n 'label' => esc_html__('Site info', '_theme_name' ),\n 'section' => '_theme_name_footer_options' \n ]);\n \n $wp_customize -> add_setting('_theme_name_footer_background', [\n 'default' => 'dark',\n 'transport' => 'postMessage',\n 'sanitize_callback' => '_theme_name_sanitize_footer_background'\n ]);\n\n $wp_customize -> add_control('_theme_name_footer_background', [\n 'type' => 'select',\n 'label' => esc_html__('Footer background', '_theme_name'),\n 'choices' => [\n 'light' => esc_html__('Light', '_theme_name'),\n 'dark' => esc_html__('Dark', '_theme_name'),\n ],\n 'section' => '_theme_name_footer_options'\n ]);\n\n $wp_customize -> add_setting('_theme_name_footer_layout', [\n 'default' => '3,3,3,3',\n 'transport' => 'postMessage',\n 'sanitize_callback' => 'sanitize_text_field',\n 'validate_callback' => '_theme_name_valider_footer_layout',// This will happen before saving to the WP database\n ]);\n\n $wp_customize -> add_control('_theme_name_footer_layout', [\n 'type' => 'text', // This is the most important one\n 'label' => esc_html__('Footer Layout', '_theme_name' ),\n 'section' => '_theme_name_footer_options' \n ]);\n }", "function an_new_customizer_settings($wp_customize) {\n\n///////////////////////////////////////////////////////////////////\n// PANEL: STARTSEITE //\n//////////////////////////////////////////////////////////////////\n \n// Create custom panel.\n\t$wp_customize->add_panel( 'homepage', array(\n\t\t'priority' => 130,\n\t\t'title' => __( 'Startseite', 'lvh' ),\n\t\t'description' => __( 'Die Inhalte auf der Startseite editieren.', 'lvh' ),\n\t) );\n \n///////////////////////////////////////////////////////////////////\n// SECTION: Über uns //\n//////////////////////////////////////////////////////////////////\n \n// Add section.\n $wp_customize->add_section( 'lvh_start', array(\n 'title' => 'Startseite',\n 'priority' => 201\n )\n );\n \n// Add setting\n $wp_customize->add_setting( 'lvh_start_image', array(\n 'default' => '',\n 'transport' => 'postMessage'\n )\n );\n\n// Add control\n\t$wp_customize->add_control(\n new WP_Customize_Image_Control(\n $wp_customize, 'lvh_start_image', array(\n 'label' => 'Foto auf der STartseite',\n 'settings' => 'lvh_start_image',\n 'section' => 'lvh_start'\n )\n )\n); \n \n// Add setting\n\t$wp_customize->add_setting( 'lvh_start_copyright', array(\n\t\t 'default' => __( '(c) peter maffia', 'lvh' ),\n\t\t 'sanitize_callback' => 'sanitize_text'\n\t) );\n \n// Add control\n\t$wp_customize->add_control( new WP_Customize_Control(\n\t $wp_customize,\n\t\t'lvh_start_copyright',\n\t\t array(\n\t\t 'label' => __( 'Foto Copyright', 'lvh' ),\n\t\t 'section' => 'lvh_start',\n\t\t 'settings' => 'lvh_start_copyright',\n\t\t 'type' => 'text'\n\t\t )\n\t )\n\t); \n \n// Add setting\n\t$wp_customize->add_setting( 'lvh_start_head1', array(\n\t\t 'default' => __( 'Landesverband Hochbegabung', 'lvh' ),\n\t\t 'sanitize_callback' => 'sanitize_text'\n\t) );\n \n// Add control\n\t$wp_customize->add_control( new WP_Customize_Control(\n\t $wp_customize,\n\t\t'lvh_start_head1',\n\t\t array(\n\t\t 'label' => __( 'Headline Startseite', 'lvh' ),\n\t\t 'section' => 'lvh_start',\n\t\t 'settings' => 'lvh_start_head1',\n\t\t 'type' => 'text'\n\t\t )\n\t )\n\t); \n \n// Add setting\n\t$wp_customize->add_setting( 'lvh_start_head2', array(\n\t\t 'default' => __( 'Baden-Württemberg e.V.', 'lvh' ),\n\t\t 'sanitize_callback' => 'sanitize_text'\n\t) );\n \n// Add control\n\t$wp_customize->add_control( new WP_Customize_Control(\n\t $wp_customize,\n\t\t'lvh_start_head2',\n\t\t array(\n\t\t 'label' => __( 'Headline Startseite', 'lvh' ),\n\t\t 'section' => 'lvh_start',\n\t\t 'settings' => 'lvh_start_head2',\n\t\t 'type' => 'text'\n\t\t )\n\t )\n\t); \n \n \n \t// Sanitize text\n\tfunction sanitize_text( $text ) {\n\t return sanitize_text_field( $text );\n\t}\n}", "public function render_content() {\n\t\t\t?>\n\t\t\t<label>\n\t\t\t\t<span class=\"customize-control-title\">\n\t\t\t\t\t<?php echo esc_attr( $this->label ); ?>\n\t\t\t\t\t<?php if ( ! empty( $this->description ) ) : ?>\n\t\t\t\t\t\t<i class=\"dashicons dashicons-editor-help\" style=\"vertical-align: text-bottom; position: relative;\">\n\t\t\t\t\t\t\t<span class=\"mte-tooltip\"><?php echo wp_kses_post( $this->description ); ?></span>\n\t\t\t\t\t\t</i>\n\t\t\t\t\t<?php endif; ?>\n\t\t\t\t</span>\n\t\t\t\t<input disabled type=\"hidden\" id=\"selectors_<?php echo $this->id ?>\" value=\"<?php echo $this->set_selectors(); ?>\"/>\n\t\t\t\t<input disabled type=\"hidden\" class=\"epsilon-typography-input\" id=\"hidden_input_<?php echo $this->id; ?>\" value=\"<?php echo esc_attr( $this->value() ); ?>\" <?php $this->link(); ?>/>\n\t\t\t</label>\n\n\t\t\t<?php\n\t\t\t$inputs = $this->get_values( $this->id );\n\t\t\t$fonts = $this->google_fonts();\n\t\t\t?>\n\n\t\t\t<div class=\"epsilon-typography-container\" data-unique-id=\"<?php echo $this->id ?>\">\n\t\t\t\t<?php if ( in_array( 'font-family', $this->choices ) ) : ?>\n\t\t\t\t\t<div class=\"epsilon-typography-font-family\">\n\t\t\t\t\t\t<label for=\"<?php echo $this->id; ?>-font-family\"><?php echo __( 'Font Family', 'epsilon-framework' ); ?></label>\n\t\t\t\t\t\t<select id=\"<?php echo $this->id; ?>-font-family\" class=\"epsilon-typography-input\">\n\t\t\t\t\t\t\t<option value=\"default_font\"><?php echo __( 'Theme default', 'epsilon-framework' ); ?></option>\n\t\t\t\t\t\t\t<?php foreach ( $fonts as $font => $properties ) { ?>\n\t\t\t\t\t\t\t\t<option <?php echo $inputs['font-family'] === $properties->family ? 'selected' : ''; ?>\n\t\t\t\t\t\t\t\t\tvalue=\"<?php echo $properties->family ?>\"><?php echo $properties->family ?></option>\n\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</div>\n\t\t\t\t<?php endif; ?>\n\t\t\t\t<?php if ( in_array( 'font-weight', $this->choices ) ) : ?><?php\n\t\t\t\t\t$defaults = array( 'Select font', 'Theme default', 'initial' );\n\t\t\t\t\t?>\n\t\t\t\t\t<div class=\"epsilon-typography-font-weight\">\n\t\t\t\t\t\t<label for=\"<?php echo $this->id; ?>-font-weight\"><?php echo __( 'Font Weight', 'epsilon-framework' ); ?></label>\n\t\t\t\t\t\t<select id=\"<?php echo $this->id; ?>-font-weight\" class=\"epsilon-typography-input\">\n\t\t\t\t\t\t\t<option value=\"initial\"><?php echo __( 'Theme default', 'epsilon-framework' ); ?></option>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tif ( ! in_array( $inputs['font-family'], $defaults ) ) {\n\t\t\t\t\t\t\t\tforeach ( $fonts->{$inputs['font-family']}->variants as $variant ) { ?>\n\t\t\t\t\t\t\t\t\t<option value=\"<?php echo esc_attr( $variant ) ?>\" <?php echo $inputs['font-weight'] === $variant ? 'selected' : '' ?>><?php echo esc_html( $variant ) ?></option>\n\t\t\t\t\t\t\t\t<?php }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</div>\n\t\t\t\t<?php endif; ?>\n\t\t\t\t<?php if ( in_array( 'font-style', $this->choices ) ) : ?>\n\t\t\t\t\t<div class=\"epsilon-typography-font-style\">\n\t\t\t\t\t\t<label for=\"<?php echo $this->id; ?>-font-style\"><?php echo __( 'Font Style', 'epsilon-framework' ); ?></label>\n\t\t\t\t\t\t<select id=\"<?php echo $this->id; ?>-font-style\" class=\"epsilon-typography-input\">\n\t\t\t\t\t\t\t<option value=\"initial\"><?php echo __( 'Theme default', 'epsilon-framework' ); ?></option>\n\t\t\t\t\t\t\t<option <?php echo 'normal' === $inputs['font-style'] ? 'selected' : ''; ?>\n\t\t\t\t\t\t\t\tvalue=\"normal\"><?php echo __( 'Normal', 'epsilon-framework' ); ?>\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t<option <?php echo 'italic' === $inputs['font-style'] ? 'selected' : ''; ?>\n\t\t\t\t\t\t\t\tvalue=\"italic\"><?php echo __( 'Italic', 'epsilon-framework' ); ?>\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</div>\n\t\t\t\t<?php endif; ?>\n\t\t\t\t<?php if ( in_array( 'font-size', $this->choices ) ) : ?>\n\t\t\t\t\t<div class=\"epsilon-typography-font-size epsilon-number-field\">\n\t\t\t\t\t\t<label for=\"<?php echo $this->id; ?>-font-size\"><?php echo __( 'Font Size', 'epsilon-framework' ); ?></label>\n\t\t\t\t\t\t<input class=\"epsilon-typography-input\" id=\"<?php echo $this->id; ?>-font-size\" value=\"<?php echo $inputs['font-size'] ?>\" type=\"number\" min=\"0\" step=\"any\"/>\n\t\t\t\t\t\t<span class=\"unit <?php echo (int) $inputs['font-size'] > 99 ? 'go-right' : '' ?>\">px</span>\n\t\t\t\t\t</div>\n\t\t\t\t<?php endif; ?>\n\t\t\t\t<?php if ( in_array( 'line-height', $this->choices ) ) : ?>\n\t\t\t\t\t<div class=\"epsilon-typography-line-height epsilon-number-field\">\n\t\t\t\t\t\t<label for=\"<?php echo $this->id; ?>-line-height\"><?php echo __( 'Line Height', 'epsilon-framework' ); ?></label>\n\t\t\t\t\t\t<input class=\"epsilon-typography-input\" id=\"<?php echo $this->id; ?>-line-height\" value=\"<?php echo $inputs['line-height'] ?>\" type=\"number\" min=\"0\" step=\"any\"/>\n\t\t\t\t\t\t<span class=\"unit <?php echo (int) $inputs['line-height'] > 99 ? 'go-right' : '' ?>\">px</span>\n\t\t\t\t\t</div>\n\t\t\t\t<?php endif; ?>\n\t\t\t\t<a href=\"#\" class=\"epsilon-typography-default\"><?php echo __( 'Reset to default', 'epsilon-framework' ) ?></a>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}", "public function preview()\n \t{\n \t\twp_enqueue_script('customizer', get_template_directory_uri().'/assets/js/customizer.min.js', array('jquery', 'customize-preview'), '1.0.0', true);\n \t}", "function mars_customizer() {\n wp_enqueue_script(\n 'mars_customizer',\n get_template_directory_uri() . '/inc/customizer.js',\n array( 'jquery','customize-preview' ),\n '',\n true\n );\n}", "function render() {\n\t\t\t$output = '<div class=\"vc_css-editor vc_row vc_ui-flex-row\" data-css-editor=\"true\">';\n\t\t\t$output .= $this->onionLayout();\n\t\t\t$output .= '<div class=\"vc_col-xs-5 vc_settings\">'\n\t\t\t . ' <label>' . __( 'Border color', 'js_composer' ) . '</label> '\n\t\t\t . ' <div class=\"color-group\"><input type=\"text\" name=\"border_color\" value=\"\" class=\"vc_color-control\"></div>'\n\t\t\t . ' <label>' . __( 'Border style', 'js_composer' ) . '</label> '\n\t\t\t . ' <div class=\"vc_border-style\"><select name=\"border_style\" class=\"vc_border-style\">' . $this->getBorderStyleOptions() . '</select></div>'\n\t\t\t . ' <label>' . __( 'Border radius', 'js_composer' ) . '</label> '\n\t\t\t . ' <div class=\"vc_border-radius\"><select name=\"border_radius\" class=\"vc_border-radius\">' . $this->getBorderRadiusOptions() . '</select></div>'\n\t\t\t . ' <label>' . __( 'Background', 'js_composer' ) . '</label>'\n\t\t\t . ' <div class=\"color-group\"><input type=\"text\" name=\"background_color\" value=\"\" class=\"vc_color-control\"></div>'\n\t\t\t . ' <div class=\"vc_background-image\">' . $this->getBackgroundImageControl() . '<div class=\"vc_clearfix\"></div></div>'\n\t\t\t . ' <div class=\"vc_background-style\"><select name=\"background_style\" class=\"vc_background-style\">' . $this->getBackgroundStyleOptions() . '</select></div>'\n\t\t\t . ' <label>' . __( 'Box controls', 'js_composer' ) . '</label>'\n\t\t\t . ' <label class=\"vc_checkbox\"><input type=\"checkbox\" name=\"simply\" class=\"vc_simplify\" value=\"\"> ' . __( 'Simplify controls', 'js_composer' ) . '</label>'\n\t\t\t . '</div>';\n\t\t\t$output .= '<input name=\"' . $this->setting( 'param_name' ) . '\" class=\"wpb_vc_param_value ' . $this->setting( 'param_name' ) . ' ' . $this->setting( 'type' ) . '_field\" type=\"hidden\" value=\"' . esc_attr( $this->value() ) . '\"/>';\n\t\t\t$output .= '</div><div class=\"vc_clearfix\"></div>';\n\t\t\t$output .= '<script type=\"text/html\" id=\"vc_css-editor-image-block\">'\n\t\t\t . '<li class=\"added\">'\n\t\t\t . ' <div class=\"inner\" style=\"width: 80px; height: 80px; overflow: hidden;text-align: center;\">'\n\t\t\t . ' <img src=\"{{ img.url }}?id={{ img.id }}\" data-image-id=\"{{ img.id }}\" class=\"vc_ce-image<# if (!_.isUndefined(img.css_class)) {#> {{ img.css_class }}<# }#>\">'\n\t\t\t . ' </div>'\n\t\t\t . ' <a href=\"#\" class=\"vc_icon-remove\"><i class=\"vc-composer-icon vc-c-icon-close\"></i></a>'\n\t\t\t . '</li>'\n\t\t\t . '</script>';\n\n\t\t\treturn apply_filters( 'vc_css_editor', $output );\n\t\t}", "function bones_theme_customizer($wp_customize) {\n // $wp_customize calls go here.\n //\n // Uncomment the below lines to remove the default customize sections\n\n // $wp_customize->remove_section('title_tagline');\n // $wp_customize->remove_section('colors');\n // $wp_customize->remove_section('background_image');\n // $wp_customize->remove_section('static_front_page');\n // $wp_customize->remove_section('nav');\n\n // Uncomment the below lines to remove the default controls\n // $wp_customize->remove_control('blogdescription');\n\n // Uncomment the following to change the default section titles\n // $wp_customize->get_section('colors')->title = __( 'Theme Colors' );\n // $wp_customize->get_section('background_image')->title = __( 'Images' );\n}", "function photoboard_notifications_theme_options_render_page() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<?php screen_icon(); ?>\n\t\t\t<h2><?php _e( 'Photoboard Notifications Settings', 'photoboard_notifications' ); ?></h2>\n\n\t\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t\t<?php\n\t\t\t\t\tsettings_fields( 'photoboard_notifications_options' );\n\t\t\t\t\tdo_settings_sections( 'photoboard_notifications_theme_options' );\n\t\t\t\t\tsubmit_button();\n\t\t\t\t?>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "protected function _content_template() {\r\n\t\t?>\r\n\t\t<div class=\"animate-javascript-div\">\r\n\t\t\t{{{ settings.createjs_source_url }}}{{{ settings.ja_assets_url }}}{{{ settings.page_javascript_url }}}\r\n\t\t</div>\r\n\t\t<?php\r\n\t}", "function picassopro_theme_customizer( $wp_customize ) {\n \n //\n // Social Media\n //\n\n $wp_customize->add_setting( 'picassopro_twitter_handle');\n $wp_customize->add_setting( 'picassopro_facebook_url');\n $wp_customize->add_setting( 'picassopro_vimeo_url');\n\n $wp_customize->add_section( 'picassopro_social_media', array(\n 'title' => __('Social Media', 'picassopro'), \n ) );\n $wp_customize->add_control( 'twitter_handle', array(\n 'label' => __('Twitter Handle', 'picassopro'),\n 'section' => 'picassopro_social_media',\n 'settings' => 'picassopro_twitter_handle', \n 'type' => 'text',\n ) );\n $wp_customize->add_control( 'facebook_url', array(\n 'label' => __('Facebook URL', 'picassopro'),\n 'section' => 'picassopro_social_media',\n 'settings' => 'picassopro_facebook_url', \n 'type' => 'text',\n ) );\n $wp_customize->add_control( 'vimeo_url', array(\n 'label' => __('Vimeo URL', 'picassopro'),\n 'section' => 'picassopro_social_media',\n 'settings' => 'picassopro_vimeo_url', \n 'type' => 'text',\n ) );\n\n // Header Settings\n $wp_customize->add_setting( 'picassopro_searchbar');\n $wp_customize->add_control( new WP_Customize_Control( $wp_customize, \n 'picassopro_searchbar', array(\n 'label' => __( 'Show Search Bar in Header', 'picassopro' ),\n 'section' => 'title_tagline',\n 'description' => 'Display the searchbar in the header.', \n 'settings' => 'picassopro_searchbar',\n 'type' => 'checkbox',\n 'priority' => 80,\n ) ) );\n\n $wp_customize->add_setting( 'picassopro_logo');\n $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'themeslug_logo', array(\n 'label' => __( 'Logo', 'picassopro' ),\n 'section' => 'title_tagline',\n 'description' => 'Upload a logo that will appear in the site header. In order to fit properly, the logo will be resized to 150 pixels wide.', \n 'priority' => 20,\n 'settings' => 'picassopro_logo',\n ) ) );\n}", "function brandefined_customizer($wp_customize)\n{\n $wp_customize->add_setting('brandefined_custom_css', array(\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n 'theme_supports' => '',\n 'default' => '',\n 'transport' => 'postMessage',\n 'sanitize_callback' => '',\n 'sanitize_js_callback' => ''\n ));\n $wp_customize->add_section('custom_css', array(\n 'title' => __('Custom CSS'),\n 'description' => __('Add custom CSS here'),\n 'panel' => '',\n 'priority' => 160,\n 'capability' => 'edit_theme_options',\n 'theme_supports' => ''\n ));\n $wp_customize->add_control('custom_theme_css', array(\n 'label' => __('Custom Theme CSS'),\n 'type' => 'textarea',\n 'section' => 'custom_css',\n 'settings' => 'brandefined_custom_css'\n ));\n}", "function codesigner_home_settings( $wp_customize ) {\n\t$wp_customize->add_panel('codesigner_home_panel', array(\n\t\t'title' \t\t=> __( 'Homepage', 'codesigner' ),\n\t\t'priority' \t\t=> 45,\n\t));\n\n}", "function _preview_theme_template_filter()\n{\n}", "function nightlife_customizer_css() {\n ?>\n <style>\n /*=== Style from The Customizer Colors Section - Header Background Color ===*/\n .navbar {\n background-color: <?php echo get_theme_mod( 'header_bg_color' ); ?>;\n }\n /*=== Style from The Customizer Colors Section - Header Text Color ===*/\n .navbar .navbar-brand { \n color: #<?php header_textcolor(); ?>;\n }\n \n <?php if (get_theme_mod('home_area_colors') == 'value2') : ?>\n .service-highlights, .service-highlights:nth-of-type(3) {\n background-color: #303030;\n color: #fff0a5;\n } \n .service-highlights h2, .service-highlights:nth-of-type(3) h2 a{\n color: white;\n }\n #scheduler-col, #bio {\n background-color: black;\n }\n <?php endif; ?>\n \n /*=== Style from The Customizer Hero-Jumbotron Background Section - Image Source ===*/ \n <?php $jumbo_bg_ID = get_theme_mod( 'nightlife_jumbotron_bg_image' ) ?>\n <?php if( get_theme_mod( 'nightlife_jumbotron_bg_image' ) ) : ?>\n \n .jumbotron:before { background-image: url( \"<?php echo wp_get_attachment_url( $jumbo_bg_ID ); ?>\" ); }\n \n <?php else : ?>\n .jumbotron:before { background-image: url( \"<?php echo get_template_directory_uri() . '/img/dance-party.jpg'; ?>\" ); }\n <?php endif; ?>\n \n /*=== Style from The Customizer Hero-Jumbotron Background Section - BG Image Opacity ===*/ <?php if( get_theme_mod( 'nightlife_image_opacity' ) ) : ?> \n .jumbotron:before { opacity: <?php echo get_theme_mod( 'nightlife_image_opacity' ); ?> ;}\n <?php else : ?>\n .jumbotron:before { opacity: 1; }\n <?php endif; ?>\n </style>\n <?php\n }", "protected function render_template() {\n\t\t?>\n\t\t<li id=\"accordion-section-{{ data.id }}\" class=\"theme-section\">\n\t\t\t<button type=\"button\" class=\"customize-themes-section-title themes-section-{{ data.id }}\">{{ data.title }}</button>\n\t\t\t<?php if ( current_user_can( 'install_themes' ) || is_multisite() ) : // @todo: upload support ?>\n\t\t\t<?php endif; ?>\n\t\t\t<div class=\"customize-themes-section themes-section-{{ data.id }} control-section-content themes-php\">\n\t\t\t\t<div class=\"theme-overlay\" tabindex=\"0\" role=\"dialog\" aria-label=\"<?php esc_attr_e( 'Theme Details' ); ?>\"></div>\n\t\t\t\t<div class=\"theme-browser rendered\">\n\t\t\t\t\t<div class=\"customize-preview-header themes-filter-bar\">\n\t\t\t\t\t\t<?php $this->filter_bar_content_template(); ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<?php $this->filter_drawer_content_template(); ?>\n\t\t\t\t\t<div class=\"error unexpected-error\" style=\"display: none; \"><p><?php _e( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href=\"https://wordpress.org/support/\">support forums</a>.' ); ?></p></div>\n\t\t\t\t\t<ul class=\"themes\">\n\t\t\t\t\t</ul>\n\t\t\t\t\t<p class=\"no-themes\"><?php _e( 'No themes found. Try a different search.' ); ?></p>\n\t\t\t\t\t<p class=\"no-themes-local\">\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t/* translators: %s: \"Search WordPress.org themes\" button */\n\t\t\t\t\t\tprintf( __( 'No themes found. Try a different search, or %s.' ),\n\t\t\t\t\t\t\tsprintf( '<button type=\"button\" class=\"button-link search-dotorg-themes\">%s</button>', __( 'Search WordPress.org themes' ) )\n\t\t\t\t\t\t);\n\t\t\t\t\t\t?>\n\t\t\t\t\t</p>\n\t\t\t\t\t<p class=\"spinner\"></p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</li>\n\t\t<?php\n\t}", "function kreativ_customizer_register() {\n \n global $wp_customize;\n \n // Background image sections\n $bgimages = apply_filters( 'kreativ_images', array( '1' ) ); // Section IDs\n \n // Adds Text if Custom Logo isn't used\n $wp_customize->add_setting(\n 'wohc_cta_nav',\n array(\n 'default' => '',\n 'type' => 'theme_mod', // you can also use 'theme_mod'\n 'capability' => 'edit_theme_options'\n ),\n );\n \n $wp_customize->add_control( new WP_Customize_Control(\n $wp_customize,\n 'wohc_cta_nav',\n array(\n 'label' => __( 'CTA Text', 'kreativ-pro' ),\n 'description' => __( 'Appears if logo is not used.', 'kreativ-pro' ),\n 'settings' => 'wohc_cta_nav',\n 'priority' => 11,\n 'section' => 'title_tagline',\n 'type' => 'text',\n )\n ) );\n \n // Front Page Images section\n $wp_customize->add_section( 'kreativ-settings', array(\n 'description' => __( 'Upload image or use the default image.<br />Default image size: <strong>1600 x 1050 px</strong>.', 'kreativ-pro' ),\n 'title' => __( 'Front Page Images', 'kreativ-pro' ),\n 'priority' => 35\n ) );\n \n // Background image settings\n foreach( $bgimages as $bgimage ){\n \n $wp_customize->add_setting( 'kreativ-image-'. $bgimage, array(\n 'default' => sprintf( '%s/images/bg-%s.jpg', get_stylesheet_directory_uri(), $bgimage ),\n 'type' => 'option',\n 'sanitize_callback' => 'sanitize_text_field'\n ) );\n \n $wp_customize->add_control(\n new WP_Customize_Image_Control( $wp_customize, 'kreativ-image-'. $bgimage,\n array(\n 'label' => sprintf( __( 'Section %s Image:', 'kreativ-pro' ), $bgimage ),\n 'section' => 'kreativ-settings',\n 'settings' => 'kreativ-image-'. $bgimage,\n 'priority' => $bgimage + 1\n )\n )\n );\n \n }\n \n // Accent color settings\n $wp_customize->add_setting( 'kreativ_accent_color',\tarray(\n 'default' => kreativ_customizer_default_accent_color(),\n 'sanitize_callback' => 'sanitize_hex_color'\n ) );\n \n $wp_customize->add_control(\n new WP_Customize_Color_Control( $wp_customize, 'kreativ_accent_color',\n array(\n 'description' => __( 'Change theme accent color', 'kreativ-pro' ),\n 'label' => __( 'Accent Color', 'kreativ-pro' ),\n 'section' => 'colors',\n 'settings' => 'kreativ_accent_color'\n )\n )\n );\n \n // Notice Bar Colors\n $wp_customize->add_section( 'notice_bar_section' , array(\n 'title' => __( 'Notice Bar', 'kreativ-pro' ),\n 'priority' => 10,\n ) );\n \n $wp_customize->add_setting( 'notice_bar_bg_color',\tarray(\n 'default' => '',\n 'sanitize_callback' => 'sanitize_hex_color'\n ) );\n \n $wp_customize->add_control(\n new WP_Customize_Color_Control( $wp_customize, 'notice_bar_bg_color',\n array(\n 'description' => __( 'Change background color', 'kreativ-pro' ),\n 'label' => __( 'Notice Bar Background Color', 'kreativ-pro' ),\n 'section' => 'notice_bar_section',\n 'settings' => 'notice_bar_bg_color'\n )\n )\n );\n \n $wp_customize->selective_refresh->add_partial( 'notice_bar_bg_color', array(\n 'selector' => '.notice-bar .wrap',\n 'settings' => 'notice_bar_bg_color',\n 'render_callback' => function() {\n return get_theme_mod('notice_bar_bg_color');\n },\n )\n );\n \n // Notice Bar Font Colors\n $wp_customize->add_setting( 'notice_bar_font_color',\tarray(\n 'default' => '',\n 'sanitize_callback' => 'sanitize_hex_color'\n ));\n \n $wp_customize->add_control(\n new WP_Customize_Color_Control( $wp_customize, 'notice_bar_font_color',\n array(\n 'description' => __( 'Change font color', 'kreativ-pro' ),\n 'label' => __( 'Notice Bar Font Color', 'kreativ-pro' ),\n 'section' => 'notice_bar_section',\n 'settings' => 'notice_bar_font_color'\n )\n )\n );\n \n $wp_customize->selective_refresh->add_partial( 'notice_bar_font_color', array(\n 'selector' => '.notice-content',\n 'settings' => 'notice_bar_font_color',\n 'render_callback' => function() {\n return get_theme_mod('notice_bar_font_color');\n },\n )\n );\n \n $wp_customize->add_setting( 'notice_bar_scroll_check', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'themeslug_sanitize_checkbox',\n ));\n \n $wp_customize->add_control( 'notice_bar_scroll_check', array(\n 'type' => 'checkbox',\n 'section' => 'notice_bar_section', // Add a default or your own section\n 'label' => __( 'Activate Text Scroll In Notice Bar' ),\n 'settings' => 'notice_bar_scroll_check',\n 'description' => __( 'Add content in Widget area.' ),\n )\n );\n \n function themeslug_sanitize_checkbox( $checked ) {\n // Boolean check.\n return ( ( isset( $checked ) && true == $checked ) ? true : false );\n }\n \n // Add theme layout setting to the Customizer\n $wp_customize->add_section( 'kreativ_sticky_header_section', array(\n 'title'\t\t\t\t=> __( 'Sticky Header', 'kreativ-pro' ),\n 'description'\t=> __( 'Choose if you would like to display sticky header fixed to the top of page.', 'kreativ-pro' ),\n 'priority'\t\t=> 80.01,\n ));\n \n // Add theme layout setting to the Customizer\n $wp_customize->add_setting( 'kreativ_sticky_header', array(\n 'capability'\t=> 'edit_theme_options',\n 'type'\t\t\t\t=> 'option',\n 'default'\t\t\t=> '',\n ));\n \n $wp_customize->add_control(\n new WP_Customize_Control(\n $wp_customize, 'kreativ_sticky_header', array(\n 'label'\t\t\t\t=> __( 'Sticky Header', 'kreativ-pro' ),\n 'section'\t\t\t=> 'kreativ_sticky_header_section',\n 'settings'\t\t=> 'kreativ_sticky_header',\n 'type' => 'radio',\n 'choices' => array(\n '' \t => __( 'Enable', 'kreativ-pro' ),\n 'disable' => __( 'Disable', 'kreativ-pro'),\n ),\n ))\n );\n}", "function theme_opengraph_customizer($wp_customize) {\n\t$wp_customize->add_section( 'opengraph_settings_section', array(\n\t\t'title' => 'Facebook Open Graph Meta Tags'\n\t) );\n\t\n\t//settings\n\t$wp_customize->add_setting( 'opengraph_fb_id', array(\n\t\t'default' => '',\n\t) );\n\t$wp_customize->add_setting( 'opengraph_image', array(\n\t\t'default-image' => '',\n\t) );\n\t$wp_customize->add_setting( 'opengraph_tw_summary', array(\n\t\t'default' => '',\n\t) );\n\t$wp_customize->add_setting( 'opengraph_tw_user_site', array(\n\t\t'default' => '',\n\t) );\n\t$wp_customize->add_setting( 'opengraph_tw_username', array(\n\t\t'default' => '',\n\t) );\n\t\n\t//controls\n\t$wp_customize->add_control( 'opengraph_fb_id', array(\n\t\t'label' => __( 'Your Facebook profile Id', 'understrap' ),\n\t\t'section' => 'opengraph_settings_section',\n\t\t'type' => 'text',\n\t) );\n\t$wp_customize->add_control(\n\t\tnew WP_Customize_Image_Control(\n\t\t\t$wp_customize,\n\t\t\t'opengraph_image',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Featured image for meta tags', 'understrap' ),\n\t\t\t\t'type' \t\t => 'image',\n\t\t\t\t'section' => 'opengraph_settings_section',\n\t\t\t)\n\t\t)\n\t);\n\t$wp_customize->add_control( 'opengraph_tw_summary', array(\n\t\t'label' => __( 'Twitter Summary', 'understrap' ),\n\t\t'section' => 'opengraph_settings_section',\n\t\t'type' => 'text',\n\t) );\n\t$wp_customize->add_control( 'opengraph_tw_user_site', array(\n\t\t'label' => __( 'Twitter user site', 'understrap' ),\n\t\t'section' => 'opengraph_settings_section',\n\t\t'type' => 'text',\n\t) );\n\t$wp_customize->add_control( 'opengraph_tw_username', array(\n\t\t'label' => __( 'Twitter user name', 'understrap' ),\n\t\t'section' => 'opengraph_settings_section',\n\t\t'type' => 'text',\n\t) );\n\t\n}", "function gateway_customizer_settings( $wp_customize ) {\n $wp_customize->get_setting( 'blogname' )->transport = 'postMessage';\n $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';\n $wp_customize->get_setting( 'header_textcolor' )->transport = 'refresh';\n\n//file input sanitization function\n function gateway_sanitize_file( $file, $setting ) {\n//allowed file types\n $mimes = array(\n 'jpg|jpeg|jpe' => 'image/jpeg',\n 'gif' => 'image/gif',\n 'png' => 'image/png'\n );\n//check file type from file name\n $file_ext = wp_check_filetype( $file, $mimes );\n//if file has a valid mime type return it, otherwise return default\n return ( $file_ext['ext'] ? $file : $setting->default );\n }\n//adds extra setting to change the background color\n//----------------------------------------------------------------//\n//adds an extra section called Background Color\n $wp_customize->add_section( 'bg_colors' , array(\n 'title' => 'Background Color',\n 'priority' => 30,\n ) );\n //sets the default color and the transport type for live refresh\n $wp_customize->add_setting( 'background_color' , array(\n 'default' => '#43C6E4',\n 'transport' => 'refresh',\n ) );\n //adds new customizer control with a label\n $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'background_color', array(\n 'label' => 'Background Color',\n 'section' => 'bg_colors',\n 'settings' => 'background_color',\n ) ) );\n//----------------------------------------------------------------//\n\n//SLIDER CONTROLS\n\n//----------------------------------------------------------------//\n\n// Creates a new panel called slider controls, and displays it only if the user is on the front-page.\n$wp_customize->add_panel( 'slider_panel', array(\n 'title' => 'Slider Controls',\n 'description' => 'Configure text and images for the Front Page Main Slider ',\n 'priority' => 10,\n 'active_callback' => 'is_front_page',\n));\n\n// Settings for first image in slider and containing text\n//////////////////////////////////////////////////////////////\n/*adds section for slider 1 */\n$wp_customize->add_section('slider_control_one', array(\n \"title\" => 'Slide One Controls',\n \"priority\" => 28,\n \"description\" => 'Configure the first Slide. Recommended image size 1980*1080.',\n 'panel' => 'slider_panel',\n));\n//settings for slide one\n$wp_customize->add_setting('slider_image_one', array(\n 'default' => '',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'gateway_sanitize_file',\n));\n$wp_customize->add_setting( 'slider_linkText_one' , array(\n 'default' => 'Find out More',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'wp_filter_nohtml_kses',\n));\n$wp_customize->add_setting( 'slider_linkhref_one' , array(\n 'default' => '#',\n 'transport' => 'refresh',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'esc_url',\n));\n$wp_customize->add_setting( 'slider_heading_one' , array(\n 'default' => 'Heading',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'wp_filter_nohtml_kses',\n));\n$wp_customize->add_setting( 'slider_description_one' , array(\n 'default' => 'Description',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'wp_filter_nohtml_kses',\n));\n//Controls for slide one\n$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'slider_image_one', array(\n 'label' => 'Image One',\n 'section' => 'slider_control_one',\n 'settings' => 'slider_image_one',\n)));\n$wp_customize->add_control( 'slider_linkText_one', array(\n 'label' => 'Link Text',\n 'section'\t => 'slider_control_one',\n 'type'\t => 'text',\n));\n$wp_customize->add_control( 'slider_linkhref_one', array(\n 'label' => 'Link URL',\n 'section'\t => 'slider_control_one',\n 'type' => 'url',\n));\n$wp_customize->add_control( 'slider_heading_one', array(\n 'label' => 'Heading Slide One',\n 'section'\t => 'slider_control_one',\n 'type' => 'text',\n));\n$wp_customize->add_control( 'slider_description_one', array(\n 'label' => 'Text Slide One',\n 'section'\t => 'slider_control_one',\n 'type' => 'text',\n));\n//////////////////////////////////////////////////////////////\n/*adds section for slide2 2 */\n$wp_customize->add_section('slider_control_two', array(\n \"title\" => 'Slide two Controls',\n \"priority\" => 28,\n \"description\" => 'Configure the second Slide. Recommended image size 1980*1080.',\n 'panel' => 'slider_panel',\n));\n//settings for slide two\n$wp_customize->add_setting('slider_image_two', array(\n 'default' => '',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'gateway_sanitize_file',\n));\n$wp_customize->add_setting( 'slider_linkText_two' , array(\n 'default' => 'Find out More',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'wp_filter_nohtml_kses',\n));\n$wp_customize->add_setting( 'slider_linkhref_two' , array(\n 'default' => '#',\n 'transport' => 'refresh',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'esc_url',\n));\n$wp_customize->add_setting( 'slider_heading_two' , array(\n 'default' => 'Heading',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'wp_filter_nohtml_kses',\n));\n$wp_customize->add_setting( 'slider_description_two' , array(\n 'default' => 'Description',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'wp_filter_nohtml_kses',\n));\n//controls for slode two\n$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'slider_image_two', array(\n 'label' => 'Image Two',\n 'section' => 'slider_control_two',\n 'settings' => 'slider_image_two',\n)));\n$wp_customize->add_control( 'slider_linkText_two', array(\n 'label' => 'Link Text',\n 'section'\t => 'slider_control_two',\n 'type'\t => 'text',\n));\n$wp_customize->add_control( 'slider_linkhref_two', array(\n 'label' => 'Link URL',\n 'section'\t => 'slider_control_two',\n 'type' => 'url',\n));\n$wp_customize->add_control( 'slider_heading_two', array(\n 'label' => 'Heading Slide Two',\n 'section'\t => 'slider_control_two',\n 'type' => 'text',\n));\n$wp_customize->add_control( 'slider_description_two', array(\n 'label' => 'Text Slide two',\n 'section'\t => 'slider_control_two',\n 'type' => 'text',\n));\n//////////////////////////////////////////////////////////////\n/*adds section for slide2 3 */\n$wp_customize->add_section('slider_control_three', array(\n \"title\" => 'Slide three Controls',\n \"priority\" => 28,\n \"description\" => 'Configure the thirds Slide. Recommended image size 1980*1080.',\n 'panel' => 'slider_panel',\n));\n//settings for slide 3\n$wp_customize->add_setting('slider_image_three', array(\n 'default' => '',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'gateway_sanitize_file'\n));\n$wp_customize->add_setting( 'slider_linkText_three' , array(\n 'default' => 'Find out More',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'wp_filter_nohtml_kses',\n));\n$wp_customize->add_setting( 'slider_linkhref_three' , array(\n 'default' => '#',\n 'transport' => 'refresh',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'esc_url',\n));\n$wp_customize->add_setting( 'slider_heading_three' , array(\n 'default' => 'Heading',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'wp_filter_nohtml_kses'\n));\n$wp_customize->add_setting( 'slider_description_three' , array(\n 'default' => 'Description',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'wp_filter_nohtml_kses'\n));\n//Controls for slide 3\n$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'slider_image_three', array(\n 'label' => 'Image Three',\n 'section' => 'slider_control_three',\n 'settings' => 'slider_image_three',\n)));\n$wp_customize->add_control( 'slider_linkText_three', array(\n 'label' => 'Link Text',\n 'section'\t => 'slider_control_three',\n 'type'\t => 'text',\n));\n$wp_customize->add_control( 'slider_linkhref_three', array(\n 'label' => 'Link URL',\n 'section'\t => 'slider_control_three',\n 'type' => 'url',\n));\n$wp_customize->add_control( 'slider_heading_three', array(\n 'label' => 'Heading Slide Three',\n 'section'\t => 'slider_control_three',\n 'type' => 'text',\n));\n$wp_customize->add_control( 'slider_description_three', array(\n 'label' => 'Text Slide three',\n 'section'\t => 'slider_control_three',\n 'type' => 'text',\n));\n\n//////////////////////////////////////////////////////////////\n/*adds section for slide 4 */\n$wp_customize->add_section('slider_control_four', array(\n \"title\" => 'Slide four Controls',\n \"priority\" => 28,\n \"description\" => 'Configure the fourth Slide. Recommended image size 1980*1080.',\n 'panel' => 'slider_panel',\n));\n//settings for slide 4\n$wp_customize->add_setting('slider_image_four', array(\n 'default' => '',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'gateway_sanitize_file'\n));\n$wp_customize->add_setting( 'slider_linkText_four' , array(\n 'default' => 'Find out More',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'wp_filter_nohtml_kses',\n));\n$wp_customize->add_setting( 'slider_linkhref_four' , array(\n 'default' => '#',\n 'transport' => 'refresh',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'esc_url',\n));\n$wp_customize->add_setting( 'slider_heading_four' , array(\n 'default' => 'Heading',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'wp_filter_nohtml_kses'\n));\n$wp_customize->add_setting( 'slider_description_four' , array(\n 'default' => 'Description',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'wp_filter_nohtml_kses'\n));\n//Controls for slide 4\n$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'slider_image_four', array(\n 'label' => 'Image Four',\n 'section' => 'slider_control_four',\n 'settings' => 'slider_image_four',\n)));\n$wp_customize->add_control( 'slider_linkText_four', array(\n 'label' => 'Link Text',\n 'section'\t => 'slider_control_four',\n 'type'\t => 'text',\n));\n$wp_customize->add_control( 'slider_linkhref_four', array(\n 'label' => 'Link URL',\n 'section'\t => 'slider_control_four',\n 'type' => 'url',\n));\n$wp_customize->add_control( 'slider_heading_four', array(\n 'label' => 'Heading Slide Four',\n 'section'\t => 'slider_control_four',\n 'type' => 'text',\n));\n$wp_customize->add_control( 'slider_description_four', array(\n 'label' => 'Text Slide Four',\n 'section'\t => 'slider_control_four',\n 'type' => 'text',\n));\n//////////////////////////////////////////////////////////////\n/*adds section for slide2 4 */\n$wp_customize->add_section('slider_control_five', array(\n \"title\" => 'Slide five Controls',\n \"priority\" => 28,\n \"description\" => 'Configure the fourth Slide. Recommended image size 1980*1080.',\n 'panel' => 'slider_panel',\n));\n//settings for slide 3\n$wp_customize->add_setting('slider_image_five', array(\n 'default' => '',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'gateway_sanitize_file'\n));\n$wp_customize->add_setting( 'slider_linkText_five' , array(\n 'default' => 'Find out More',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'wp_filter_nohtml_kses',\n));\n$wp_customize->add_setting( 'slider_linkhref_five' , array(\n 'default' => '#',\n 'transport' => 'refresh',\n 'type' => 'theme_mod',\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'esc_url',\n));\n$wp_customize->add_setting( 'slider_heading_five' , array(\n 'default' => 'Heading',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'wp_filter_nohtml_kses'\n));\n$wp_customize->add_setting( 'slider_description_five' , array(\n 'default' => 'Description',\n 'transport' => 'refresh',\n 'sanitize_callback' => 'wp_filter_nohtml_kses'\n));\n//Controls for slide 3\n$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'slider_image_five', array(\n 'label' => 'Image Five',\n 'section' => 'slider_control_five',\n 'settings' => 'slider_image_five',\n)));\n$wp_customize->add_control( 'slider_linkText_five', array(\n 'label' => 'Link Text',\n 'section'\t => 'slider_control_five',\n 'type'\t => 'text',\n));\n$wp_customize->add_control( 'slider_linkhref_five', array(\n 'label' => 'Link URL',\n 'section'\t => 'slider_control_five',\n 'type' => 'url',\n));\n$wp_customize->add_control( 'slider_heading_five', array(\n 'label' => 'Heading Slide Five',\n 'section'\t => 'slider_control_five',\n 'type' => 'text',\n));\n$wp_customize->add_control( 'slider_description_five', array(\n 'label' => 'Text Slide Five',\n 'section'\t => 'slider_control_five',\n 'type' => 'text',\n));\n/* retrieves the setttings configuired below for each image*/\n $wp_customize->get_setting( 'slider_image_one' )->transport = 'postMessage';\n $wp_customize->get_setting( 'slider_image_two' )->transport = 'postMessage';\n $wp_customize->get_setting( 'slider_image_three' )->transport = 'postMessage';\n $wp_customize->get_setting( 'slider_image_four' )->transport = 'postMessage';\n $wp_customize->get_setting( 'slider_image_five' )->transport = 'postMessage';\n\n }", "public function render_content() {\n\t\t\t\tif ( $this->label ) {\n\t\t\t\t\t// echo '<h2 class=\"admin-custom-h2\">' . wp_kses_post( $this->label ) . '</h2>';\n\t\t\t\t\techo '<h2 class=\"admin-custom-h2\">' . wp_kses_post( $this->label ) . '</h2>';\n\t\t\t\t}\n\t\t\t\tif ( $this->custom_title_sub ) {\n\t\t\t\t\techo '<h3 class=\"admin-custom-h3\">' . wp_kses_post( $this->custom_title_sub ) . '</h3>';\n\t\t\t\t}\n\t\t\t\tif ( $this->custom_html ) {\n\t\t\t\t\techo '<div>' . wp_kses_post( $this->custom_html ) . '</div>';\n\t\t\t\t}\n\t\t\t}", "function bjorn_header_promo_show() {\n $bjorn_theme_options = bjorn_get_theme_options();\n\n echo '<div class=\"header-promo-content\">'.do_shortcode($bjorn_theme_options['header_banner_editor']).'</div>'; // This is safe place and we can't use wp_kses_post or other esc_ functions here because this is ads area where user may use Google Adsense and other Java Script banners code with <script> inside.\n}", "public function render() {\n\t\t// Remove standard admin footer content.\n\t\tadd_filter( 'admin_footer_text', '__return_empty_string' );\n\t\tremove_all_filters( 'update_footer' );\n\n\t\t/** This action is documented in wp-admin/admin-header.php */\n\t\tdo_action( 'admin_head' );\n\n\t\t// <head> tag was opened prior to this action and hasn't been closed.\n\t\t?>\n\t\t</head>\n\t\t<body>\n\t\t\t<?php // The admin footer template closes three divs. ?>\n\t\t\t<div>\n\t\t\t<div>\n\t\t\t<div>\n\t\t\t<div class=\"amp\" id=\"<?php echo esc_attr( static::APP_ROOT_ID ); ?>\"></div>\n\n\t\t\t<style>\n\t\t\t#wpfooter { display:none; }\n\t\t\t</style>\n\t\t<?php\n\n\t\trequire_once ABSPATH . 'wp-admin/admin-footer.php';\n\t}", "function theme_copyright_customizer($wp_customize) {\n $wp_customize->add_section('footer_copyright_section', array(\n 'title' => 'Footer Settings',\n 'priority' => 33,\n ));\n\n //adding setting for copyright text\n $wp_customize->add_setting('footer_copyright_text', array(\n 'default' => '<p>\n <strong>Bulma</strong> by <a href=\"https://jgthms.com\" class=\"customize-unpreviewable\">Jeremy Thomas</a>. The source code is licensed\n <a href=\"http://opensource.org/licenses/mit-license.php\" class=\"customize-unpreviewable\">MIT</a>. The website content\n is licensed <a href=\"http://creativecommons.org/licenses/by-nc-sa/4.0/\" class=\"customize-unpreviewable\">CC BY NC SA 4.0</a>.\n </p>',\n 'transport' => 'refresh',\n\n ));\n\n $wp_customize->add_control('footer_copyright_text', array(\n 'label' => 'Copyright text',\n 'section' => 'footer_copyright_section',\n 'type' => 'textarea',\n ));\n}", "public function render()\n\t{\n\t\tif(!current_user_can(\"administrator\"))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t/*\n\t\t\tSave Settings\n\t\t*/\n\t\t$this->save();\n\t\t/*\n\t\t\tPrepare names for JS\n\t\t*/\n\t\t$names = array();\n\t\tforeach($this->settings as $field)\n\t\t{\n\t\t\tif($field[\"type\"] == \"wp_editor\")\n\t\t\t{\n\t\t\t\tarray_push($names, $field[\"name\"]);\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t\tEnqueue scripts / styles\n\t\t*/\n\t\t$plugin_url = plugins_url() . '/' . basename( plugin_dir_path( (dirname( __FILE__ ) ) ));\n\t\t\n\t\twp_enqueue_style(\"email-settings/admin-bootstrap\",$plugin_url.'/css/bootstrap.min.css');\n\n\t\twp_enqueue_style(\"email-settings/settings-css\",$plugin_url.'/css/settings-page.css');\n\n\t\twp_enqueue_script(\"email-settings/settings-js\",$plugin_url.'/js/settings-page.js');\n\n\t\twp_localize_script( \"email-settings/settings-js\", 'php_vars', \n\t array(\n\t 'names' => $names \n\t )\n\t );\n\t\t/*\n\t\t\tRender HTML\n\t\t*/\n\t\t?>\n\t\t<div class=\"wrap-overlay\" style=\"opacity: 0;\">\n\t\t\t<img src=\"<?php echo $plugin_url . '/img/load.gif'?>\" alt=\"Load\"/>\n\t\t</div>\n\t\t<div class=\"wrap\" style=\"min-height: 80vh;opacity: 0;position: relative;\">\n\t\t\t<form method=\"post\">\n\t\t\t<input type=\"hidden\" name=\"save_nonce\" value=\"<?php echo wp_create_nonce(__FILE__);?>\"/>\n\t\t\t<div class=\"nav-tabs-container\">\n\t\t\t\t<span class=\"arrows dashicons dashicons-arrow-left\"></span>\n\t\t\t\t<span class=\"arrows dashicons dashicons-arrow-right\"></span>\n\t\t\t\t<ul class=\"nav nav-tabs\">\n\t\t\t\t\t<?php\n\t\t\t\t\t/*\n\t\t\t\t\t\tRender buttons for all tabs\n\t\t\t\t\t*/\n\t\t\t\t\tforeach($this->tabs as $container)\n\t\t\t\t\t{\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<li><a class=\"bootstrap-tab-link\" href=\"javascript:void(0)\" onclick=\"open_tab(this)\" id=\"<?php echo $container[\"id\"];?>\"><?php echo $container[\"title\"];?></a></li>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<?php\n\t\t\t\t/*\n\t\t\t\t\tRender all settings fields\n\t\t\t\t*/\n\t\t\t\tforeach($this->settings as $field)\n\t\t\t\t{\n\t\t\t\t\t?>\n\t\t\t\t\t<div class=\"container-tab-contents\" opens-by=\"<?php echo $field['container'];?>\">\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t\tGet raw current value\n\t\t\t\t\t\t*/\n\t\t\t\t\t\t$current_val = get_option($field[\"name\"]);\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t\tDefine default properties/settings for wp_editor\n\t\t\t\t\t\t*/\n\t\t\t\t\t\t$settings = array( 'textarea_name' => $field[\"name\"].'-editor', 'editor_height' => '350');\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t\tRender simple title for setting if it's set\n\t\t\t\t\t\t*/\n\t\t\t\t\t\tif(isset($field[\"title\"]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<h3><?php echo $field[\"title\"];?></h3>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t\tRender simple text input (input type text)\n\t\t\t\t\t\t*/\n\t\t\t \t\tif($field[\"type\"] == \"text\")\n\t\t\t \t\t{\n\t\t\t \t\t\t?>\n\t\t\t \t\t\t<label for=\"<?php echo $field[\"name\"];?>\">\n\t\t\t \t\t\t\t\t<span><?php echo $field[\"label\"];?></span>\n\t\t\t \t\t\t\t</label>\n\t\t\t \t\t\t\t<input type=\"text\" style=\"width: 100%\" id=\"<?php echo $field[\"name\"];?>\" name=\"<?php echo $field[\"name\"];?>\" value=\"<?php echo $current_val; ?>\" />\n\t\t\t \t\t\t<?php\n\t\t\t \t\t}\n\t\t\t \t\t/*\n\t\t\t\t\t\t\tRender simple radio input group\n\t\t\t \t\t*/\n\t\t\t \t\tif($field[\"type\"] == \"radio\")\n\t\t\t \t\t{\n\t\t\t \t\t\t?>\n\t\t\t \t\t\t\t<input type=\"radio\" id=\"<?php echo $field[\"name\"].'-'.$field['value'];?>\" name=\"<?php echo $field[\"name\"];?>\" value=\"<?php echo $field['value']; ?>\" <?php if($current_val == $field['value']) echo \"checked\";?> />\n\t\t\t \t\t\t\t<label class=\"radio-label\" for=\"<?php echo $field[\"name\"].'-'.$field['value'];?>\">\n\t\t\t \t\t\t\t\t<span><?php echo $field[\"label\"];?></span>\n\t\t\t \t\t\t\t</label>\n\t\t\t \t\t\t<?php\n\t\t\t \t\t}\n\t\t\t \t\t/*\n\t\t\t\t\t\t\tRender simple checkbox array input (i.e multiple checkboxes)\n\t\t\t \t\t*/\n\t\t\t \t\tif($field[\"type\"] == \"checkboxarray\")\n\t\t\t \t\t{\n\t\t\t \t\t\t/*\n\t\t\t\t\t\t\t\tGet an array of items that are checked and retrieve current value\n\t\t\t \t\t\t*/\n\t\t\t \t\t\t$test = json_decode($current_val);\n\t\t\t \t\t\tif(!is_null($test) && is_array($test))\n\t\t\t \t\t\t{\n\t\t\t \t\t\t\tif(in_array($field[\"value\"], $test))\n\t\t\t \t\t\t\t{\n\t\t\t \t\t\t\t\t$current_val = $field[\"value\"];\n\t\t\t \t\t\t\t}\n\t\t\t \t\t\t}\n\t\t\t \t\t\t?>\n\t\t\t \t\t\t\t<input type=\"checkbox\" id=\"<?php echo $field[\"name\"].'-'.$field['value'];?>\" name=\"<?php echo $field[\"name\"];?>[]\" value=\"<?php echo $field['value']; ?>\" <?php if($current_val == $field['value']) echo \"checked\";?> />\n\t\t\t \t\t\t\t<label class=\"radio-label\" for=\"<?php echo $field[\"name\"].'-'.$field['value'];?>\">\n\t\t\t \t\t\t\t\t<span><?php echo $field[\"label\"];?></span>\n\t\t\t \t\t\t\t</label>\n\t\t\t \t\t\t<?php\n\t\t\t \t\t}\n\t\t\t \t\t/*\n\t\t\t\t\t\t\tRender simple select input with values passed in setting options\n\t\t\t \t\t*/\n\t\t\t \t\tif($field[\"type\"] == \"select\")\n\t\t\t \t\t{\n\t\t\t \t\t\t?>\n\t\t\t \t\t\t<label for=\"<?php echo $field[\"name\"];?>\">\n\t\t\t \t\t\t\t\t<span><?php echo $field[\"label\"];?></span>\n\t\t\t \t\t\t\t</label>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t$current_value = get_option($field[\"name\"]);\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<select style=\"width: 100%\" name=\"<?php echo $field[\"name\"];?>\" id=\"<?php echo $field[\"name\"];?>\">\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\tforeach($field[\"values\"] as $value)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t<option value=\"<?php echo $value['shortname'];?>\" <?php echo ($current_value == $value['shortname']) ? 'selected' : '';?>><?php echo $value['name'] .' ['.$value['shortname'].']';?></option>\n\t\t\t\t\t\t\t\t\t\t<?php\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</select>\n\t\t\t \t\t\t<?php\n\t\t\t \t\t}\n\t\t\t \t\t/*\n\t\t\t\t\t\t\tRender wp_editor instance, with a hidden input to store base64\n\t\t\t \t\t*/\n\t\t\t \t\tif($field[\"type\"] == \"wp_editor\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<label for=\"<?php echo $field[\"name\"];?>\">\n\t\t\t \t\t\t\t<span><?php echo $field[\"label\"];?></span>\n\t\t\t \t\t\t</label>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\tif(isset($field[\"additional_text\"]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t<p><?php echo $field[\"additional_text\"];?></p>\n\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t}\n\t\t\t \t\t\twp_editor( base64_decode($current_val), $field[\"name\"].'-editor', $settings );\n\t\t\t \t\t\t?>\n\t\t\t \t\t\t<input type=\"hidden\" name=\"<?php echo $field[\"name\"];?>\" id=\"<?php echo $field[\"name\"];?>\" value=\"<?php echo $current_val; ?>\">\n\t\t\t \t\t\t<?php\n\t\t\t \t\t}\n\n\t\t\t \t\t?>\n\t\t \t\t</div>\n\t\t \t\t<?php\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t<br>\n\t\t\t\t<button class=\"button save-btn\" type=\"submit\"><?php _e(\"Save\");?></button>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "function oki_wzi_customize_register( $wp_customize ) { \n $options_posts = array();\n $options_posts_obj = get_posts('posts_per_page=-1');\n $options_posts[''] = __( 'Choose Post', 'education-zone' );\n foreach ( $options_posts_obj as $posts ) {\n $options_posts[$posts->ID] = $posts->post_title;\n }\n /* Option list of all post */ \n $options_pages = array();\n $options_pages_obj = get_posts('post_type=page&posts_per_page=-1');\n $options_pages[''] = __( 'Choose Page', 'education-zone' );\n foreach ( $options_pages_obj as $education_pages ) {\n $options_pages[$education_pages->ID] = $education_pages->post_title;\n }\n\n /** Publication Section Settings */\n $wp_customize->add_section(\n 'oki_wzi_publication_section_settings',\n array(\n 'title' => __( 'Publication Section', 'education-zone' ),\n 'priority' => 60,\n 'capability' => 'edit_theme_options',\n 'panel' => 'education_zone_home_page_settings'\n )\n );\n \n /** Enable Publication Section */ \n $wp_customize->add_setting(\n 'oki_wzi_ed_publication_section',\n array(\n 'default' => '',\n 'sanitize_callback' => 'education_zone_sanitize_checkbox',\n )\n );\n \n $wp_customize->add_control(\n 'oki_wzi_ed_publication_section',\n array(\n 'label' => __( 'Enable Extra Info Section', 'education-zone' ),\n 'section' => 'oki_wzi_publication_section_settings',\n 'type' => 'checkbox',\n )\n );\n \n /** Section Title */\n $wp_customize->add_setting(\n 'oki_wzi_publication_section_title',\n array(\n 'default'=> '',\n 'sanitize_callback'=> 'sanitize_text_field'\n )\n );\n \n $wp_customize-> add_control(\n 'oki_wzi_publication_section_title',\n array(\n 'label' => __('Select Page','education-zone'),\n 'type' => 'select',\n 'choices' => $options_pages,\n 'section' => 'oki_wzi_publication_section_settings', \n \n ));\n \n\n /** CTA First Button */\n $wp_customize->add_setting(\n 'oki_wzi_publication_section_button_one',\n array(\n 'default'=> '',\n 'sanitize_callback'=> 'sanitize_text_field'\n )\n );\n \n $wp_customize-> add_control(\n 'oki_wzi_publication_section_button_one',\n array(\n 'label' => __('CTA First Button','education-zone'),\n 'section' => 'oki_wzi_publication_section_settings', \n 'type' => 'text',\n ));\n\n /** CTA First Button Link */\n $wp_customize->add_setting(\n 'oki_wzi_publication_button_one_url',\n array(\n 'default'=> '',\n 'sanitize_callback'=> 'esc_url_raw'\n )\n );\n \n $wp_customize-> add_control(\n 'oki_wzi_publication_button_one_url',\n array(\n 'label' => __('CTA First Button Link','education-zone'),\n 'section' => 'oki_wzi_publication_section_settings', \n 'type' => 'text',\n ));\n \n /** CTA Second Button */ \n $wp_customize->add_setting(\n 'oki_wzi_publication_section_button_two',\n array(\n 'default'=> '',\n 'sanitize_callback'=> 'sanitize_text_field'\n )\n );\n \n $wp_customize-> add_control(\n 'oki_wzi_publication_section_button_two',\n array(\n 'label' => __('CTA Second Button','education-zone'),\n 'section' => 'oki_wzi_publication_section_settings', \n 'type' => 'text',\n ));\n\n /** CTA Second Button Link */\n $wp_customize->add_setting(\n 'oki_wzi_publication_button_two_url',\n array(\n 'default'=> '',\n 'sanitize_callback'=> 'esc_url_raw'\n ));\n $wp_customize-> add_control(\n 'oki_wzi_publication_button_two_url',\n array(\n 'label' => __('CTA Second Button Link','education-zone'),\n 'section' => 'oki_wzi_publication_section_settings', \n 'type' => 'text',\n ));\n\n /** Maps Section Settings */\n $wp_customize->add_section(\n 'oki_wzi_maps_section_settings',\n array(\n 'title' => __( 'Maps Section', 'education-zone' ),\n 'priority' => 60,\n 'capability' => 'edit_theme_options',\n 'panel' => 'education_zone_home_page_settings'\n )\n );\n \n /** Enable Maps Section */ \n $wp_customize->add_setting(\n 'oki_wzi_ed_maps_section',\n array(\n 'default' => '',\n 'sanitize_callback' => 'education_zone_sanitize_checkbox',\n )\n );\n \n $wp_customize->add_control(\n 'oki_wzi_ed_maps_section',\n array(\n 'label' => __( 'Enable Maps Section', 'education-zone' ),\n 'section' => 'oki_wzi_maps_section_settings',\n 'type' => 'checkbox',\n )\n );\n \n /** Section Title */\n $wp_customize->add_setting(\n 'oki_wzi_maps_section_title',\n array(\n 'default'=> '',\n 'sanitize_callback'=> 'sanitize_text_field'\n )\n );\n \n $wp_customize-> add_control(\n 'oki_wzi_maps_section_title',\n array(\n 'label' => __('Select Page','education-zone'),\n 'type' => 'select',\n 'choices' => $options_pages,\n 'section' => 'oki_wzi_maps_section_settings', \n \n ));\n \n\n /** CTA First Button */\n $wp_customize->add_setting(\n 'oki_wzi_maps_section_button_one',\n array(\n 'default'=> '',\n 'sanitize_callback'=> 'sanitize_text_field'\n )\n );\n \n $wp_customize-> add_control(\n 'oki_wzi_maps_section_button_one',\n array(\n 'label' => __('CTA First Button','education-zone'),\n 'section' => 'oki_wzi_maps_section_settings', \n 'type' => 'text',\n ));\n\n /** CTA First Button Link */\n $wp_customize->add_setting(\n 'oki_wzi_maps_button_one_url',\n array(\n 'default'=> '',\n 'sanitize_callback'=> 'esc_url_raw'\n )\n );\n \n $wp_customize-> add_control(\n 'oki_wzi_maps_button_one_url',\n array(\n 'label' => __('CTA First Button Link','education-zone'),\n 'section' => 'oki_wzi_maps_section_settings', \n 'type' => 'text',\n ));\n \n /** CTA Second Button */ \n $wp_customize->add_setting(\n 'oki_wzi_maps_section_button_two',\n array(\n 'default'=> '',\n 'sanitize_callback'=> 'sanitize_text_field'\n )\n );\n \n $wp_customize-> add_control(\n 'oki_wzi_maps_section_button_two',\n array(\n 'label' => __('CTA Second Button','education-zone'),\n 'section' => 'oki_wzi_maps_section_settings', \n 'type' => 'text',\n ));\n\n /** CTA Second Button Link */\n $wp_customize->add_setting(\n 'oki_wzi_maps_button_two_url',\n array(\n 'default'=> '',\n 'sanitize_callback'=> 'esc_url_raw'\n ));\n $wp_customize-> add_control(\n 'oki_wzi_maps_button_two_url',\n array(\n 'label' => __('CTA Second Button Link','education-zone'),\n 'section' => 'oki_wzi_maps_section_settings', \n 'type' => 'text',\n ));\n\n}", "protected function render_content() {\n\t\t\t$collapsed_class = null;\n\n\t\t\tif ( isset( $this->input_attrs['collapsed'] ) && $this->input_attrs['collapsed'] ) {\n\t\t\t\t$collapsed_class = 'customize-collapsed';\n\t\t\t}\n\t\t\t?>\n\t\t\t<div class=\"customize-collapsible <?php echo esc_attr( $collapsed_class ); ?>\"><h3><?php echo esc_attr( $this->label ); ?></h3></div>\n\t\t\t<?php\n\t\t}", "public function header_output() {\n\n\t\t?><!-- Customizer CSS -->\n\t\t<style type=\"text/css\"><?php\n\n\t\t\t// pattern:\n\t\t\t// $this->generate_css( 'selector', 'style', 'mod_name', 'prefix', 'postfix', true );\n\t\t\t//\n\t\t\t// background-image example:\n\t\t\t// $this->generate_css( '.class', 'background-image', 'background_image_example', 'url(', ')' );\n\n\n\t\t?></style><!-- Customizer CSS --><?php\n\n\t\t/**\n\t\t * Hides all but the first Soliloquy slide while using Customizer previewer.\n\t\t */\n\t\tif ( is_customize_preview() ) {\n\n\t\t\t?><style type=\"text/css\">\n\n\t\t\t\tli.soliloquy-item:not(:first-child) {\n\t\t\t\t\tdisplay: none !important;\n\t\t\t\t}\n\n\t\t\t</style><!-- Customizer CSS --><?php\n\n\t\t}\n\n\t}", "public function setSections() {\n\t\t\t// Background Patterns Reader\n\t\t\t$sample_patterns_path = ReduxFramework::$_dir . '../sample/patterns/';\n\t\t\t$sample_patterns_url = ReduxFramework::$_url . '../sample/patterns/';\n\t\t\t$sample_patterns = array();\n\n\t\t\tif (is_dir($sample_patterns_path)) :\n\n\t\t\t\tif ($sample_patterns_dir = opendir($sample_patterns_path)) :\n\t\t\t\t\t$sample_patterns = array();\n\n\t\t\t\t\twhile (( $sample_patterns_file = readdir($sample_patterns_dir) ) !== false) {\n\n\t\t\t\t\t\tif (stristr($sample_patterns_file, '.png') !== false || stristr($sample_patterns_file, '.jpg') !== false) {\n\t\t\t\t\t\t\t$name = explode('.', $sample_patterns_file);\n\t\t\t\t\t\t\t$name = str_replace('.' . end($name), '', $sample_patterns_file);\n\t\t\t\t\t\t\t$sample_patterns[] = array('alt' => $name, 'img' => $sample_patterns_url . $sample_patterns_file);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tendif;\n\t\t\tendif;\n\n\t\t\tob_start();\n\n\t\t\t$ct = wp_get_theme();\n\t\t\t$this->theme = $ct;\n\t\t\t$item_name = $this->theme->get('Name');\n\t\t\t$tags = $this->theme->Tags;\n\t\t\t$screenshot = $this->theme->get_screenshot();\n\t\t\t$class = $screenshot ? 'has-screenshot' : '';\n\n\t\t\t$customize_title = sprintf(__('Customize &#8220;%s&#8221;', 'sellegance'), $this->theme->display('Name'));\n\t\t\t\n\t\t\t?>\n\t\t\t<div id=\"current-theme\" class=\"<?php echo esc_attr($class); ?>\">\n\t\t\t<?php if ($screenshot) : ?>\n\t\t\t\t<?php if (current_user_can('edit_theme_options')) : ?>\n\t\t\t\t\t\t<a href=\"<?php echo wp_customize_url(); ?>\" class=\"load-customize hide-if-no-customize\" title=\"<?php echo esc_attr($customize_title); ?>\">\n\t\t\t\t\t\t\t<img src=\"<?php echo esc_url($screenshot); ?>\" alt=\"<?php esc_attr_e('Current theme preview'); ?>\" />\n\t\t\t\t\t\t</a>\n\t\t\t\t<?php endif; ?>\n\t\t\t\t\t<img class=\"hide-if-customize\" src=\"<?php echo esc_url($screenshot); ?>\" alt=\"<?php esc_attr_e('Current theme preview'); ?>\" />\n\t\t\t\t<?php endif; ?>\n\n\t\t\t\t<h4><?php echo $this->theme->display('Name'); ?></h4>\n\n\t\t\t\t<div>\n\t\t\t\t\t<ul class=\"theme-info\">\n\t\t\t\t\t\t<li><?php printf(__('By %s', 'sellegance'), $this->theme->display('Author')); ?></li>\n\t\t\t\t\t\t<li><?php printf(__('Version %s', 'sellegance'), $this->theme->display('Version')); ?></li>\n\t\t\t\t\t\t<li><?php echo '<strong>' . __('Tags', 'sellegance') . ':</strong> '; ?><?php printf($this->theme->display('Tags')); ?></li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t<p class=\"theme-description\"><?php echo $this->theme->display('Description'); ?></p>\n\t\t\t<?php\n\t\t\tif ($this->theme->parent()) {\n\t\t\t\tprintf(' <p class=\"howto\">' . __('This <a href=\"%1$s\">child theme</a> requires its parent theme, %2$s.') . '</p>', __('http://codex.wordpress.org/Child_Themes', 'sellegance'), $this->theme->parent()->display('Name'));\n\t\t\t}\n\t\t\t?>\n\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<?php\n\t\t\t$item_info = ob_get_contents();\n\n\t\t\tob_end_clean();\n\n\t\t\t$sampleHTML = '';\n\t\t\tif (file_exists(dirname(__FILE__) . '/info-html.html')) {\n\t\t\t\t/** @global WP_Filesystem_Direct $wp_filesystem */\n\t\t\t\tglobal $wp_filesystem;\n\t\t\t\tif (empty($wp_filesystem)) {\n\t\t\t\t\trequire_once(ABSPATH . '/wp-admin/includes/file.php');\n\t\t\t\t\tWP_Filesystem();\n\t\t\t\t}\n\t\t\t\t$sampleHTML = $wp_filesystem->get_contents(dirname(__FILE__) . '/info-html.html');\n\t\t\t}\n\n\t// ACTUAL DECLARATION OF SECTIONS\n\n\t$url= get_template_directory_uri().'/images/patterns/';\n\t$url2= get_template_directory_uri().'/includes/assets/images/';\n\n\t$this->sections[] = array(\n\t\t'icon' => 'el-icon-cogs',\n\t\t'title' => __('General Settings', 'sellegance'),\n\t\t'fields' => array(\n\t\t\tarray(\n\t\t\t\t'id'=>'main_layout',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'title' => __('Main Layout', 'sellegance'),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'boxed' => 'Boxed',\n\t\t\t\t\t'framed' => 'Framed',\n\t\t\t\t\t'fullwidth' => 'Full Width',\n\t\t\t\t\t'transparent_header' => 'Transparent Header',\n\t\t\t\t\t),\n\t\t\t\t'default' => 'boxed'\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'responsive_layout',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'title' => __('Responsive Layout', 'sellegance'), \n\t\t\t\t'subtitle' => __('2 responsive modes and 1 fixed mode', 'sellegance'),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'responsive' => 'Responsive - Max Width 1170px',\n\t\t\t\t\t'responsive940' => 'Responsive - Max Width 940px',\n\t\t\t\t\t'fixed' => 'Fixed - Min width 940px'),\n\t\t\t\t'default' => 'responsive'\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t 'id' => 'section-start',\n\t\t\t 'type' => 'section',\n\t\t\t 'title' => __( 'Background', 'sellegance' ),\n\t\t\t 'indent' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'overlay_pattern',\n\t\t\t\t'type' => 'image_select',\n\t\t\t\t'tiles' => true,\n\t\t\t\t'compiler'=>true,\n\t\t\t\t'title' => __('Overlay Pattern', 'sellegance'), \n\t\t\t\t'subtitle' => __('Default option is pattern 5.<br>First option (0) is <em>transparent</em>.', 'sellegance'),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'0' => array('alt' => '1', 'img' => $url .'0.png'),\n\t\t\t\t\t'1' => array('alt' => '1', 'img' => $url .'1.png'),\n\t\t\t\t\t'2' => array('alt' => '2', 'img' => $url .'2.png'),\n\t\t\t\t\t'3' => array('alt' => '3', 'img' => $url .'3.png'),\n\t\t\t\t\t'4' => array('alt' => '4', 'img' => $url .'4.png'),\n\t\t\t\t\t'5' => array('alt' => '5', 'img' => $url .'5.png'),\n\t\t\t\t\t'6' => array('alt' => '6', 'img' => $url .'6.png'),\n\t\t\t\t\t'7' => array('alt' => '7', 'img' => $url .'7.png'),\n\t\t\t\t\t'8' => array('alt' => '8', 'img' => $url .'8.png'),\n\t\t\t\t\t'9' => array('alt' => '9', 'img' => $url .'9.png'),\n\t\t\t\t\t'10' => array('alt' => '10', 'img' => $url .'10.png'),\n\t\t\t\t\t'11' => array('alt' => '11', 'img' => $url .'11.png'),\n\t\t\t\t\t'12' => array('alt' => '12', 'img' => $url .'12.png'),\n\t\t\t\t\t'13' => array('alt' => '13', 'img' => $url .'13.png'),\n\t\t\t\t\t'14' => array('alt' => '14', 'img' => $url .'14.png'),\n\t\t\t\t\t'15' => array('alt' => '15', 'img' => $url .'15.png'),\n\t\t\t\t\t'16' => array('alt' => '16', 'img' => $url .'16.png'),\n\t\t\t\t\t'17' => array('alt' => '17', 'img' => $url .'17.png'),\n\t\t\t\t\t'18' => array('alt' => '18', 'img' => $url .'18.png'),\n\t\t\t\t\t'19' => array('alt' => '19', 'img' => $url .'19.png'),\n\t\t\t\t\t'20' => array('alt' => '20', 'img' => $url .'20.png'),\n\t\t\t\t\t'21' => array('alt' => '21', 'img' => $url .'21.png'),\n\t\t\t\t\t'22' => array('alt' => '22', 'img' => $url .'22.png'),\n\t\t\t\t\t'23' => array('alt' => '23', 'img' => $url .'23.png'),\n\t\t\t\t\t'24' => array('alt' => '24', 'img' => $url .'24.png'),\n\t\t\t\t\t'25' => array('alt' => '25', 'img' => $url .'25.png'),\n\t\t\t\t\t'26' => array('alt' => '26', 'img' => $url .'26.png'),\n\t\t\t\t\t'27' => array('alt' => '27', 'img' => $url .'27.png'),\n\t\t\t\t\t'28' => array('alt' => '28', 'img' => $url .'28.png'),\n\t\t\t\t\t'29' => array('alt' => '29', 'img' => $url .'29.png'),\n\t\t\t\t\t'30' => array('alt' => '30', 'img' => $url .'30.png'),\n\t\t\t\t\t'31' => array('alt' => '31', 'img' => $url .'31.png'),\n\t\t\t\t\t'32' => array('alt' => '32', 'img' => $url .'32.png'),\n\t\t\t\t\t'33' => array('alt' => '33', 'img' => $url .'33.png'),\n\t\t\t\t\t'34' => array('alt' => '34', 'img' => $url .'34.png'),\n\t\t\t\t\t'35' => array('alt' => '35', 'img' => $url .'35.png'),\n\t\t\t\t\t'36' => array('alt' => '36', 'img' => $url .'36.png'),\n\t\t\t\t\t'37' => array('alt' => '37', 'img' => $url .'37.png'),\n\t\t\t\t\t'38' => array('alt' => '38', 'img' => $url .'38.png'),\n\t\t\t\t\t'39' => array('alt' => '39', 'img' => $url .'39.png'),\n\t\t\t\t\t'40' => array('alt' => '40', 'img' => $url .'40.png'),\n\t\t\t\t\t'41' => array('alt' => '41', 'img' => $url .'41.png'),\n\t\t\t\t\t'42' => array('alt' => '42', 'img' => $url .'42.png'),\n\t\t\t\t),\n\t\t\t\t'default' => $url .'5.png'\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'custom_overlay_pattern',\n\t\t\t\t'type' => 'media', \n\t\t\t\t'url'=> true,\n\t\t\t\t'title' => __('Custom Overlay Pattern', 'sellegance'),\n\t\t\t\t'compiler' => 'true',\n\t\t\t\t'subtitle'=> __('Upload your own <em>Pattern</em>.<br> Use <em>.png</em> images to preserve transparency.', 'sellegance'),\n\t\t\t\t'default' => array (\n\t\t\t\t\t'url' => '',\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'body_bg_color',\n\t\t\t\t'type' => 'background',\n\t\t\t\t'output' => array('body'),\n\t\t\t\t'title' => __('Site Background', 'sellegance'), \n\t\t\t\t'subtitle' => __('For Boxed and Framed layouts. <br><br> Default <code>#FFFFFF</code>.', 'sellegance'),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'background-color' => '#FFFFFF',\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t 'id' => 'section-start',\n\t\t\t 'type' => 'section',\n\t\t\t 'title' => __( 'Colors', 'sellegance' ),\n\t\t\t 'indent' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'maincontent_text_color',\n\t\t\t\t'type' => 'image_select',\n\t\t\t\t'compiler'=>true,\n\t\t\t\t'title' => __('Central Content Text Color', 'sellegance'), \n\t\t\t\t'subtitle' => __('Light or Dark text style.', 'sellegance'),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'light' => $url2 . 'text-light.gif',\n\t\t\t\t\t'dark' => $url2 . 'text-dark.gif',\n\t\t\t\t\t),\n\t\t\t\t'default' => 'light',\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'maincontent_bg_color',\n\t\t\t\t'type' => 'color',\n\t\t\t\t'title' => __('Central Content Background', 'sellegance'), \n\t\t\t\t'subtitle' => __('It\\'s the section between the header and footer.<br> Default <code>#FFFFFF</code>', 'sellegance'),\n\t\t\t\t'default' => '#FFFFFF',\n\t\t\t\t'validate' => 'color',\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t 'id' => 'section-start',\n\t\t\t 'type' => 'section',\n\t\t\t 'title' => __( 'Favicon', 'sellegance' ),\n\t\t\t 'indent' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'favicon_image',\n\t\t\t\t'type' => 'media', \n\t\t\t\t'url'=> true,\n\t\t\t\t'title' => __('Favicon', 'sellegance'),\n\t\t\t\t'subtitle'=> __('Add your custom Favicon image. 16x16px .ico or .png file required.', 'sellegance'),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'url' => '',\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'favicon_retina',\n\t\t\t\t'type' => 'media', \n\t\t\t\t'url'=> true,\n\t\t\t\t'title' => __('Retina Favicon', 'sellegance'),\n\t\t\t\t'subtitle'=> __('The Retina version of your Favicon. 144x144px .png file required.', 'sellegance'),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'url' => '',\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\tarray(\n 'id' => 'section-end',\n 'type' => 'section',\n 'indent' => false,\n ),\n\t\t\tarray(\n\t\t\t\t'id'=>'backtotop',\n\t\t\t\t'type' => 'switch', \n\t\t\t\t'title' => __('Back to Top button', 'sellegance'),\n\t\t\t\t\"default\"=> 1,\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'page_comments',\n\t\t\t\t'type' => 'switch', \n\t\t\t\t'title' => __('Show comments on pages', 'sellegance'),\n\t\t\t\t\"default\"=> 0,\n\t\t\t\t)\n\t\t\t)\n\t\t\n\t\t);\n\n\t$url= get_template_directory_uri().'/includes/assets/images/';\n\n\t$this->sections[] = array(\n\t\t'icon' => 'el-icon-cogs',\n\t\t'title' => __('Header', 'sellegance'),\n\t\t'fields' => array( \n\n\t\t\tarray(\n\t\t\t\t'id'=>'header_layout',\n\t\t\t\t'type' => 'image_select',\n\t\t\t\t'compiler'=>true,\n\t\t\t\t'title' => __('Header Layout', 'sellegance'), \n\t\t\t\t'subtitle' => __('Choose header layout:<br><br>\n\t\t\t\t\t1. Centered Logo<br>\n\t\t\t\t\t2. Left Logo<br>\n\t\t\t\t\t3. Minimal', 'sellegance'),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'header1' => $url . 'header1.jpg',\n\t\t\t\t\t'header2' => $url . 'header2.jpg',\n\t\t\t\t\t'header3' => $url . 'header3.jpg',\n\t\t\t\t\t),\n\t\t\t\t'default' => 'header1',\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t 'id' => 'section-start',\n\t\t\t 'type' => 'section',\n\t\t\t 'title' => __( 'Logo', 'sellegance' ),\n\t\t\t 'indent' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'site_logo',\n\t\t\t\t'type' => 'media', \n\t\t\t\t'url'=> true,\n\t\t\t\t'title' => __('Logo', 'sellegance'),\n\t\t\t\t'compiler' => 'true',\n\t\t\t\t'subtitle'=> __('Upload your logo here.<br><br><em>*Use an image double size the logo container for better results on retina displays.</em>', 'sellegance'),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'url' => get_template_directory_uri().'/images/logo.png',\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'logo_size',\n\t\t\t\t'type' => 'dimensions',\n\t\t\t\t'units' => 'px',\n\t\t\t\t'title' => __('Logo container size (Width/Height)', 'sellegance'),\n\t\t\t\t'subtitle' => __('The default container size is 250 x 100 px.', 'sellegance'),\n\t\t\t\t'default' => array('width' => 250, 'height'=>100, )\n\t\t\t\t), \n\t\t\tarray(\n\t\t\t 'id' => 'section-start',\n\t\t\t 'type' => 'section',\n\t\t\t 'title' => __( 'Navigation', 'sellegance' ),\n\t\t\t 'indent' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'fixed_navigation',\n\t\t\t\t'type' => 'switch', \n\t\t\t\t'title' => __('Sticky Menu', 'sellegance'),\n\t\t\t\t'subtitle'=> __('Fixed navigation when scrolling', 'sellegance'),\n\t\t\t\t\"default\"=> 1,\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'navigation_inside',\n\t\t\t\t'type' => 'switch', \n\t\t\t\t'title' => __('Navigation inside central container', 'sellegance'),\n\t\t\t\t'subtitle'=> __('Boxed layout only', 'sellegance'),\n\t\t\t\t\"default\"=> 0,\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t 'id' => 'section-start',\n\t\t\t 'type' => 'section',\n\t\t\t 'title' => __( 'Custom Text', 'sellegance' ),\n\t\t\t 'indent' => true,\n\t\t\t),\n\t\t\t\n\t\t\tarray(\n\t\t\t\t'id'=>'header_text',\n\t\t\t\t'type' => 'editor',\n\t\t\t\t'title' => __('Header Text', 'sellegance'),\n\t\t\t\t'subtitle' => __('Custom content on header', 'sellegance'),\n\t\t\t\t'default' => 'Order before 1pm PST for Free Next Business Shipping on all Clothing',\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t 'id' => 'section-start',\n\t\t\t 'type' => 'section',\n\t\t\t 'title' => __( 'Header Colors', 'sellegance' ),\n\t\t\t 'indent' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'header_text_color',\n\t\t\t\t'type' => 'image_select',\n\t\t\t\t'compiler'=>true,\n\t\t\t\t'title' => __('Header Text Color', 'sellegance'), \n\t\t\t\t'subtitle' => __('Light or Dark text style.', 'sellegance'),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'header_light' => $url . 'text-light.gif',\n\t\t\t\t\t'header_dark' => $url . 'text-dark.gif',\n\t\t\t\t\t),\n\t\t\t\t'default' => 'light',\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'header_bg_color',\n\t\t\t\t'type' => 'color',\n\t\t\t\t'title' => __('Header Background', 'sellegance'), \n\t\t\t\t'subtitle' => __('Default <code>transparent</code>', 'sellegance'),\n\t\t\t\t'default' => 'transparent',\n\t\t\t\t'validate' => 'color',\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t 'id' => 'section-start',\n\t\t\t 'type' => 'section',\n\t\t\t 'title' => __( 'Top Bar', 'sellegance' ),\n\t\t\t 'indent' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'top_bar',\n\t\t\t\t'type' => 'switch', \n\t\t\t\t'title' => __('Top Bar', 'sellegance'),\n\t\t\t\t\"default\"=> 1,\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'topbar_dropdown_title',\n\t\t\t\t'type' => 'text', \n\t\t\t\t'title' => __('Topbar Dropdown Title', 'sellegance'),\n\t\t\t\t'subtitle'=> __('Configure dropdown items in <em>Appearance > Menus</em>', 'sellegance'),\n\t\t\t\t\"default\"=> 'My Account',\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'topbar_bg_color',\n\t\t\t\t'type' => 'color',\n\t\t\t\t'title' => __('Top Bar Background', 'sellegance'), \n\t\t\t\t'subtitle' => __('Default <code>transparent</code> <br>The same color as the whole header.', 'sellegance'),\n\t\t\t\t'default' => 'transparent',\n\t\t\t\t'validate' => 'color',\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'topbar_text_color',\n\t\t\t\t'type' => 'image_select',\n\t\t\t\t'compiler'=>true,\n\t\t\t\t'title' => __('Top Bar Text Color', 'sellegance'), \n\t\t\t\t'subtitle' => __('Light or Dark text style.', 'sellegance'),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'topbar_light' => $url . 'text-light.gif',\n\t\t\t\t\t'topbar_dark' => $url . 'text-dark.gif',\n\t\t\t\t\t),\n\t\t\t\t'default' => 'light',\n\t\t\t\t),\n\n\t\t\t)\n\t);\n\n\t$this->sections[] = array(\n\t\t'icon' => 'el-icon-cogs',\n\t\t'title' => __('Footer', 'sellegance'),\n\t\t'fields' => array( \n\n\t\t\tarray(\n\t\t\t\t'id' => 'footer_top_columns',\n\t\t\t\t'type' => 'slider',\n\t\t\t\t'title' => __('Footer Top widgets', 'sellegance'),\n\t\t\t\t'subtitle' => __('Number of columns for Footer Top widgets', 'sellegance'),\n\t\t\t\t'default' => 4,\n\t\t\t\t'min' => 1,\n\t\t\t\t'step' => 1,\n\t\t\t\t'max' => 6,\n\t\t\t\t'display_value' => 'text'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id' => 'footer_bottom_columns',\n\t\t\t\t'type' => 'slider',\n\t\t\t\t'title' => __('Footer Bottom widgets', 'sellegance'),\n\t\t\t\t'subtitle' => __('Number of columns for Footer Bottom widgets', 'sellegance'),\n\t\t\t\t'default' => 4,\n\t\t\t\t'min' => 1,\n\t\t\t\t'step' => 1,\n\t\t\t\t'max' => 6,\n\t\t\t\t'display_value' => 'text'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'footer_text',\n\t\t\t\t'type' => 'editor',\n\t\t\t\t'title' => __('Footer Copyright Text', 'sellegance'),\n\t\t\t\t'subtitle' => __('Add custom content to the copyright section', 'sellegance'),\n\t\t\t\t'default' => 'Powered by Sellegance.',\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'payment_icons',\n\t\t\t\t'type' => 'media', \n\t\t\t\t'url'=> true,\n\t\t\t\t'title' => __('Payment Icons', 'sellegance'),\n\t\t\t\t'compiler' => 'true',\n\t\t\t\t'subtitle'=> __('Upload your own payment icon sprite', 'sellegance'),\n\t\t\t\t'default'=>array('url'=> get_template_directory_uri().'/images/payment_cards.png'),\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t 'id' => 'section-start',\n\t\t\t 'type' => 'section',\n\t\t\t 'title' => __( 'Footer Colors', 'sellegance' ),\n\t\t\t 'indent' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'footer_top_bg',\n\t\t\t\t'type' => 'color',\n\t\t\t\t'title' => __('Footer Top Background', 'sellegance'), \n\t\t\t\t'subtitle' => __('Default <code>#F6F6F6</code>', 'sellegance'),\n\t\t\t\t'default' => '#f6f6f6',\n\t\t\t\t'validate' => 'color',\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'footer_top_text_color',\n\t\t\t\t'type' => 'image_select',\n\t\t\t\t'compiler'=>true,\n\t\t\t\t'title' => __('Footer Top text color', 'sellegance'), \n\t\t\t\t'subtitle' => __('Light or Dark text style.', 'sellegance'),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'light' => $url . 'text-light.gif',\n\t\t\t\t\t'dark' => $url . 'text-dark.gif',\n\t\t\t\t\t),\n\t\t\t\t'default' => 'light',\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'footer_bottom_bg',\n\t\t\t\t'type' => 'color',\n\t\t\t\t'title' => __('Footer Bottom Background*', 'sellegance'), \n\t\t\t\t'subtitle' => __('Default:\n\t\t\t\t\t<br><br>-Boxed/Framed <code>transparent</code>\n\t\t\t\t\t<br>-Fullwidth/Transparent-header <code>#777777</code>', 'sellegance'),\n\t\t\t\t'default' => '#777777',\n\t\t\t\t'validate' => 'color',\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'footer_bottom_text_color',\n\t\t\t\t'type' => 'image_select',\n\t\t\t\t'compiler'=>true,\n\t\t\t\t'title' => __('Footer Bottom text color', 'sellegance'), \n\t\t\t\t'subtitle' => __('Default:\n\t\t\t\t\t<br><br>-Boxed/Framed <code>Light</code>\n\t\t\t\t\t<br>-Fullwidth/Transparent-header <code>Dark</code>', 'sellegance'),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'light' => $url . 'text-light.gif',\n\t\t\t\t\t'dark' => $url . 'text-dark.gif',\n\t\t\t\t\t),\n\t\t\t\t'default' => 'light',\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'footer_copyright_bg',\n\t\t\t\t'type' => 'color',\n\t\t\t\t'title' => __('Footer Copyright Background*', 'sellegance'), \n\t\t\t\t'subtitle' => __('Default:\n\t\t\t\t\t<br><br>-Boxed/Framed <code>transparent</code>\n\t\t\t\t\t<br>-Fullwidth/Transparent-header <code>#5B5B5B</code>', 'sellegance'),\n\t\t\t\t'default' => 'transparent',\n\t\t\t\t'validate' => 'color',\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'footer_copyright_text_color',\n\t\t\t\t'type' => 'image_select',\n\t\t\t\t'compiler'=>true,\n\t\t\t\t'title' => __('Footer Copyright text color', 'sellegance'), \n\t\t\t\t'subtitle' => __('Default:\n\t\t\t\t\t<br><br>-Boxed/Framed <code>Light</code>\n\t\t\t\t\t<br>-Fullwidth/Transparent-header <code>Dark</code>', 'sellegance'),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'light' => $url . 'text-light.gif',\n\t\t\t\t\t'dark' => $url . 'text-dark.gif',\n\t\t\t\t\t),\n\t\t\t\t'default' => 'light',\n\t\t\t\t),\n\t\t\tarray(\n 'id' => 'section-end',\n 'type' => 'section',\n 'indent' => false,\n ),\n\t\t\t)\n\t);\n\n\t$this->sections[] = array(\n\t\t'icon' => 'el-icon-cogs',\n\t\t'title' => __('Shop', 'sellegance'),\n\t\t'fields' => array(\n\n\t\t\tarray(\n\t\t\t\t'id'=>'shop_sidebar',\n\t\t\t\t'type' => 'image_select',\n\t\t\t\t'compiler'=>true,\n\t\t\t\t'title' => __('Shop Sidebar Position', 'sellegance'), \n\t\t\t\t'subtitle' => __('Select position for the shop sidebar.', 'sellegance'),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'left' => array('alt' => '2 Column Left', 'img' => ReduxFramework::$_url.'assets/img/2cl.png'),\n\t\t\t\t\t'right' => array('alt' => '2 Column Right', 'img' => ReduxFramework::$_url.'assets/img/2cr.png'),\n\t\t\t\t\t'fullwidth' => array('alt' => '1 Column', 'img' => ReduxFramework::$_url.'assets/img/1col.png'),\n\t\t\t\t\t),\n\t\t\t\t'default' => 'left'\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'catalog_mode',\n\t\t\t\t'type' => 'switch', \n\t\t\t\t'title' => __('Catalog Only', 'sellegance'),\n\t\t\t\t'subtitle'=> __('Disable \"Add To Cart\" button and shopping cart. This option will turn off the shopping functionality of WooCommerce.', 'sellegance'),\n\t\t\t\t\"default\"=> 0,\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'global_search',\n\t\t\t\t'type' => 'switch', \n\t\t\t\t'title' => __('Global search', 'sellegance'),\n\t\t\t\t'subtitle'=> __('Include pages, portfolios and posts in search results when WooCommerce is active. Otherwise, it will show only products.', 'sellegance'),\n\t\t\t\t\"default\"=> 0,\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t 'id' => 'section-start',\n\t\t\t 'type' => 'section',\n\t\t\t 'title' => __( 'Shop Banner', 'sellegance' ),\n\t\t\t 'indent' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'shop_banner',\n\t\t\t\t'type' => 'switch', \n\t\t\t\t'title' => __('Shop Banner', 'sellegance'),\n\t\t\t\t'subtitle'=> __('Enable the banner on the shop main page', 'sellegance'),\n\t\t\t\t\"default\"=> 1,\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'shop_banner_img',\n\t\t\t\t'type' => 'media', \n\t\t\t\t'url'=> true,\n\t\t\t\t'title' => __('Shop banner image', 'sellegance'),\n\t\t\t\t'compiler' => 'true',\n\t\t\t\t'subtitle'=> __('Upload your banner image', 'sellegance'),\n\t\t\t\t'default' => array (\n\t\t\t\t\t'url' => '',\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'shop_banner_desc',\n\t\t\t\t'type' => 'editor',\n\t\t\t\t'title' => __('Banner Description', 'sellegance'),\n\t\t\t\t'subtitle' => __('Your description for the shop main page', 'sellegance'),\n\t\t\t\t'default' => ''\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'shop_banner_desc_align',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'title' => __('Banner Description', 'sellegance'),\n\t\t\t\t'subtitle' => __('Your description for the shop main page', 'sellegance'),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'right' => 'Right',\n\t\t\t\t\t'left' => 'Left'),\n\t\t\t\t'default' => 'left'\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'shop_banner_desc_color',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'title' => __('Banner description background', 'sellegance'),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'dark' => 'Dark',\n\t\t\t\t\t'light' => 'Light'),\n\t\t\t\t'default' => 'dark'\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'shop_banner_link',\n\t\t\t\t'type' => 'text', \n\t\t\t\t'title' => __('Banner link', 'sellegance'),\n\t\t\t\t'subtitle'=> __('Enter the full URL (e.g. <code>http://site.com/link</code>)', 'sellegance'),\n\t\t\t\t'default' => ''\n\t\t\t\t),\n\t\t\tarray(\n 'id' => 'section-end',\n 'type' => 'section',\n 'indent' => false,\n ),\n\n\t\t\t)\n\t);\n\n\t$this->sections[] = array(\n\t\t'icon' => 'el-icon-cogs',\n\t\t'title' => __('Products Listing', 'sellegance'),\n\t\t'fields' => array( \n\n\t\t\tarray(\n\t\t\t\t'id'=>'products_default_view',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'title' => __('Products Default View', 'sellegance'), \n\t\t\t\t'subtitle' => __('Select default presentation.', 'sellegance'),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'grid' => 'Grid',\n\t\t\t\t\t'list' => 'List'),\n\t\t\t\t'default' => 'grid'\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'products_per_row',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'title' => __('Products per row', 'sellegance'), \n\t\t\t\t'options' => array(\n\t\t\t\t\t'three_side' => '3 columns (sidebar)',\n\t\t\t\t\t'four_side' => '4 columns (sidebar/full width)',\n\t\t\t\t\t'five_full' => '5 columns (full width)'),\n\t\t\t\t'default' => 'three_side'\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'product_animation',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'title' => __('Animation on hover', 'sellegance'), \n\t\t\t\t'subtitle' => __('The animation to switch 2 images on hover.', 'sellegance'),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'noanim'=>'None',\n\t\t\t\t\t'productanim3' => 'Slide',\n\t\t\t\t\t'productanim5' => 'Fade',\n\t\t\t\t\t'productanim1' => 'Flip'),\n\t\t\t\t'default' => 'productanim3'\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t 'id' => 'section-start',\n\t\t\t 'type' => 'section',\n\t\t\t 'title' => __( 'Elements', 'sellegance' ),\n\t\t\t 'indent' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'show_quick_view',\n\t\t\t\t'type' => 'switch', \n\t\t\t\t'title' => __('Show Quick View', 'sellegance'),\n\t\t\t\t\"default\"=> 1,\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'category_listing',\n\t\t\t\t'type' => 'switch', \n\t\t\t\t'title' => __('Category in product listing', 'sellegance'),\n\t\t\t\t\"default\"=> 1,\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'rating_listing',\n\t\t\t\t'type' => 'switch', \n\t\t\t\t'title' => __('Rating in product listing', 'sellegance'),\n\t\t\t\t\"default\"=> 1,\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'new_badge',\n\t\t\t\t'type' => 'switch', \n\t\t\t\t'title' => __('\\'New\\' Badge', 'sellegance'),\n\t\t\t\t'subtitle'=> __('Show \\'New\\' badge on recent products', 'sellegance'),\n\t\t\t\t\"default\"=> 1,\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'new_badge_duration',\n\t\t\t\t'type' => 'text', \n\t\t\t\t'title' => __('\\'New\\' Badge Duration', 'sellegance'),\n\t\t\t\t'subtitle'=> __('How many days \\'New\\' badge will display', 'sellegance'),\n\t\t\t\t\"default\"=> 5,\n\t\t\t\t),\n\n\t\t\t)\n\t);\n\t\n\t$this->sections[] = array(\n\t\t'icon' => 'el-icon-cogs',\n\t\t'title' => __('Single Product', 'sellegance'),\n\t\t'fields' => array( \n\n\t\t\tarray(\n\t\t\t\t'id'=>'product_details_mode',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'title' => __('Product Details Mode', 'sellegance'), \n\t\t\t\t'subtitle' => __('Select Tabs or Accordion.', 'sellegance'),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'tab_normal' => 'Tabs',\n\t\t\t\t\t'tab_accordion' => 'Accordion'),\n\t\t\t\t'default' => 'tab_normal'\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'product_prev_next',\n\t\t\t\t'type' => 'switch', \n\t\t\t\t'title' => __('Show Previous/Next product links', 'sellegance'),\n\t\t\t\t\"default\"=> 1,\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'share_buttons',\n\t\t\t\t'type' => 'switch', \n\t\t\t\t'title' => __('Show share buttons', 'sellegance'),\n\t\t\t\t\"default\"=> 1,\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t 'id' => 'section-start',\n\t\t\t 'type' => 'section',\n\t\t\t 'title' => __( 'Custom Tab', 'sellegance' ),\n\t\t\t 'indent' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'custom_tab',\n\t\t\t\t'type' => 'switch', \n\t\t\t\t'title' => __('Display custom tab', 'sellegance'),\n\t\t\t\t'subtitle'=> __('Check to Show custom tab on Single product Page', 'sellegance'),\n\t\t\t\t\"default\"=> 1,\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'custom_tab_title',\n\t\t\t\t'type' => 'text', \n\t\t\t\t'required' => array('custom_tab', '=' , '1'),\n\t\t\t\t'title' => __('Custom tab title', 'sellegance'),\n\t\t\t\t\"default\"=> 'Returns & Delivery',\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'custom_tab_content',\n\t\t\t\t'type' => 'editor',\n\t\t\t\t'required' => array('custom_tab', '=' , '1'),\n\t\t\t\t'title' => __('Custom tab content', 'sellegance'),\n\t\t\t\t'subtitle' => __('Enter custom content you would like to output to the product custom tab (for all products)', 'sellegance'),\n\t\t\t\t'default' => 'This is a static Custom Tab Content from admin panel.',\n\t\t\t\t),\n\t\t\tarray(\n 'id' => 'section-end',\n 'type' => 'section',\n 'indent' => false,\n ),\n\n\t\t\t)\n\t);\n\n\t\n\t$this->sections[] = array(\n\t\t'icon' => 'el-icon-cogs',\n\t\t'title' => __('Blog', 'sellegance'),\n\t\t'fields' => array( \n\n\t\t\tarray(\n\t\t\t\t'id'=>'blog_layout',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'title' => __('Blog Layout', 'sellegance'), \n\t\t\t\t'options' => array(\n\t\t\t\t\t'standard' => 'Standard',\n\t\t\t\t\t'grid' => 'Grid',\n\t\t\t\t\t'timeline' => 'Timeline'\n\t\t\t\t\t),\n\t\t\t\t'default' => 'standard'\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'blog_sidebar',\n\t\t\t\t'type' => 'image_select',\n\t\t\t\t'compiler'=>true,\n\t\t\t\t'title' => __('Blog Sidebar Position', 'sellegance'), \n\t\t\t\t'options' => array(\n\t\t\t\t\t'none' => array('alt' => '1 Column', 'img' => ReduxFramework::$_url.'assets/img/1col.png'),\n\t\t\t\t\t'left' => array('alt' => '2 Column Left', 'img' => ReduxFramework::$_url.'assets/img/2cl.png'),\n\t\t\t\t\t'right' => array('alt' => '2 Column Right', 'img' => ReduxFramework::$_url.'assets/img/2cr.png'),\n\t\t\t\t\t),\n\t\t\t\t'default' => 'right'\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id' => 'blog_page',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'data' => 'pages',\n\t\t\t\t'title' => __('Blog page', 'sellegance'),\n\t\t\t\t'subtitle' => __('Select blog items page', 'sellegance'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'post_prev_next',\n\t\t\t\t'type' => 'switch', \n\t\t\t\t'title' => __('Show Previous/Next posts links', 'sellegance'),\n\t\t\t\t\"default\"=> 1,\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'blog_related_posts',\n\t\t\t\t'type' => 'switch', \n\t\t\t\t'title' => __('Show related posts', 'sellegance'),\n\t\t\t\t\"default\"=> 1,\n\t\t\t\t),\n\n\t\t\t)\n\t);\n\n\t\n\t$this->sections[] = array(\n\t\t'icon' => 'el-icon-cogs',\n\t\t'title' => __('Portfolio', 'sellegance'),\n\t\t'fields' => array(\n\n\t\t\tarray(\n\t\t\t\t'id' => 'portfolio_page',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'data' => 'pages',\n\t\t\t\t'title' => __('Porftolio page', 'sellegance'),\n\t\t\t\t'subtitle' => __('Select porfolio items page', 'sellegance'),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'portfolio_related',\n\t\t\t\t'type' => 'switch', \n\t\t\t\t'title' => __('Show Portfolio related posts', 'sellegance'),\n\t\t\t\t\"default\"=> 1,\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'portfolio_related_height',\n\t\t\t\t'type' => 'text', \n\t\t\t\t'required' => array('portfolio_related', '=' , '1'),\n\t\t\t\t'title' => __('Related projects thumbnail height', 'sellegance'),\n\t\t\t\t\"default\"=> '400',\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'portfolio_comments',\n\t\t\t\t'type' => 'switch', \n\t\t\t\t'title' => __('Show comments on portfolio', 'sellegance'),\n\t\t\t\t\"default\"=> 0,\n\t\t\t\t)\n\n\t\t\t)\n\t);\n\n\n\t$this->sections[] = array(\n\t\t'icon' => 'el-icon-cogs',\n\t\t'title' => __('Social Icons', 'sellegance'),\n\t\t'desc' => __('Enter the full URL to each of your social accounts', 'sellegance'),\n\t\t'fields' => array( \n\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_facebook_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"Facebook URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_twitter_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"Twitter URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_googleplus_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"Google+ URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_pinterest_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"Pinterest URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_vimeo_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"Vimeo URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_youtube_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"YouTube URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_flickr_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"Flickr URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_skype_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"Skype URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_behance_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"Behance URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_dribbble_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"Dribbble URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_tumblr_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"Tumblr URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_linkedin_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"LinkedIn URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_github_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"Github URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_vine_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"Vine URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_instagram_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"Instagram URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_dropbox_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"Dropbox URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_rss_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"Feedburner RSS URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_stumbleupon_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"Stumbleupon URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_paypal_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"Paypal URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t),\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_etsy_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"Etsy URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_foursquare_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"Foursquare URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_soundcloud_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"SoundCloud URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t\"id\" => \"tdl_spotify_url\",\n\t\t\t\t\t\"type\" => \"text\",\n\t\t\t\t\t\"title\" => __(\"Spotify URL\", 'sellegance'),\n\t\t\t\t\t\"default\" => \"\",\n\t\t\t\t\t)\n\t\t\t)\n\t);\n\t\n\n\t$this->sections[] = array(\n\t\t'icon' => 'el-icon-cogs',\n\t\t'title' => __('Typography', 'sellegance'),\n\t\t'fields' => array(\n\n\t\t\tarray(\n\t\t\t\t'id'=>'body_font',\n\t\t\t\t'type' => 'typography',\n\t\t\t\t'title' => __('Main Body Font', 'sellegance'),\n\t\t\t\t'subtitle' => __('The main font for all your site.\n\t\t\t\t\t<br><br>Default:\n\t\t\t\t\t<code>font-size:14px</code>, <code>font-weight:normal</code>, <code>font-family:Open Sans</code>', 'sellegance'),\n\t\t\t\t'google'=>true,\n\t\t\t\t'subsets'=>true,\n\t\t\t\t'line-height'=>false,\n\t\t\t\t'color'=>false,\n\t\t\t\t'text-align'=>false,\n\t\t\t\t'all_styles' => true,\n\t\t\t\t'default' => array(\n\t\t\t\t\t'color'=>'#333',\n\t\t\t\t\t'font-size'=>'14px',\n\t\t\t\t\t'font-weight'=>'400',\n\t\t\t\t\t'font-family'=>'Open Sans',\n\t\t\t\t\t'google' => true,\n\t\t\t\t\t),\n\t\t\t\t),\n\n\t\t\tarray(\n\t\t\t\t'id'=>'title_font',\n\t\t\t\t'type' => 'typography', \n\t\t\t\t'title' => __('Titles Font', 'sellegance'),\n\t\t\t\t'google'=>true, // Disable google fonts. Won't work if you haven't defined your google api key\n\t\t\t\t'subsets'=>true, // Only appears if google is true and subsets not set to false\n\t\t\t\t'line-height'=>false,\n\t\t\t\t'color'=>false,\n\t\t\t\t'text-align'=>false,\n\t\t\t\t'all_styles' => true, // Enable all Google Font style/weight variations to be added to the page\n\t\t\t\t'units'=>'px', // Defaults to px\n\t\t\t\t'subtitle'=> __('Font for the titles.\n\t\t\t\t\t<br><br>Default:\n\t\t\t\t\t<code>font-size:36px</code>, <code>font-weight:normal</code>, <code>font-family:Open Sans</code>', 'sellegance'),\n\t\t\t\t'default'=> array(\n\t\t\t\t\t'color'=>\"#000\",\n\t\t\t\t\t'font-size'=>'36px',\n\t\t\t\t\t'font-weight'=>'400',\n\t\t\t\t\t'font-family'=>'Open Sans', \n\t\t\t\t\t'google' => true,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\n\t\t\tarray(\n\t\t\t\t'id'=>'other_font',\n\t\t\t\t'type' => 'typography',\n\t\t\t\t'title' => __('Other Font', 'sellegance'),\n\t\t\t\t'subtitle' => __('Fonts for the small texts. Use a font easy to read.\n\t\t\t\t\t<br><br>Default:\n\t\t\t\t\t<code>font-weight:normal</code>, <code>font-family:Open Sans</code>', 'sellegance'),\n\t\t\t\t'google'=>true,\n\t\t\t\t'subsets'=>true,\n\t\t\t\t'line-height'=>false,\n\t\t\t\t'color'=>false,\n\t\t\t\t'text-align'=>false,\n\t\t\t\t'font-size'=>false,\n\t\t\t\t'color'=>false,\n\t\t\t\t'text-align'=>false,\n\t\t\t\t'default' => array(\n\t\t\t\t\t'color'=>'#777',\n\t\t\t\t\t'font-size'=>'30px',\n\t\t\t\t\t'font-family'=>'Open Sans',\n\t\t\t\t\t'font-weight'=>'400',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t)\n\t);\n\n\n\t$this->sections[] = array(\n\t\t'icon' => 'el-icon-website',\n\t\t'title' => __('Styling Options', 'sellegance'),\n\t\t'fields' => array(\n\n\t\t\tarray(\n\t\t\t\t'id'=>'primary_color',\n\t\t\t\t'type' => 'color',\n\t\t\t\t'title' => __('Primary Color', 'sellegance'), \n\t\t\t\t'subtitle' => __('Default: <code>#444444</code>', 'sellegance'),\n\t\t\t\t'description' => __('Change primary color. Used for primary buttons, shopping cart icon, etc.', 'sellegance'),\n\t\t\t\t'default' => '#444',\n\t\t\t\t'validate' => 'color',\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'secondary_color',\n\t\t\t\t'type' => 'color',\n\t\t\t\t'title' => __('Secondary Color', 'sellegance'), \n\t\t\t\t'subtitle' => __('Default: <code>#DD4B39</code>', 'sellegance'),\n\t\t\t\t'description' => __('Change secondary color. Used for Add to cart, checkout buttons, review stars and sale bubble.', 'sellegance'),\n\t\t\t\t'default' => '#DD4B39',\n\t\t\t\t'validate' => 'color',\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'links_color',\n\t\t\t\t'type' => 'link_color',\n\t\t\t\t'title' => __('Links Color', 'sellegance'), \n\t\t\t\t'subtitle' => __('Default: <code>#428bca</code>', 'sellegance'),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'regular' => '#428bca',\n\t\t\t\t\t'hover' => '#2a6496',\n\t\t\t\t\t'active' => '#2a6496',\n\t\t\t\t\t'visited' => '#428bca'),\n\t\t\t\t'validate' => 'color',\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'price_color',\n\t\t\t\t'type' => 'color',\n\t\t\t\t'title' => __('Price color', 'sellegance'), \n\t\t\t\t'subtitle' => __('Default <code>#85ad74</code>', 'sellegance'),\n\t\t\t\t'default' => '#85ad74',\n\t\t\t\t'validate' => 'color',\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'sale_tag_color',\n\t\t\t\t'type' => 'color',\n\t\t\t\t'title' => __('Sale tag color', 'sellegance'), \n\t\t\t\t'subtitle' => __('Default: <code>#dc4343</code>', 'sellegance'),\n\t\t\t\t'default' => '#dc4343',\n\t\t\t\t'validate' => 'color',\n\t\t\t\t),\n\n\t\t\tarray(\n\t\t\t\t'id'=>'rating_stars_color',\n\t\t\t\t'type' => 'color',\n\t\t\t\t'title' => __('Rating stars color', 'sellegance'), \n\t\t\t\t'subtitle' => __('Default: <code>#dc4343</code>', 'sellegance'),\n\t\t\t\t'default' => '#dc4343',\n\t\t\t\t'validate' => 'color',\n\t\t\t\t),\n\n\t\t)\n\t);\n\n\t$this->sections[] = array(\n\t\t'icon' => 'el-icon-cogs',\n\t\t'title' => __('Custom Code', 'sellegance'),\n\t\t'desc' => __('Use these options to add your own code for advanced cusomization.', 'sellegance'),\n\t\t'fields' => array( \n\n\t\t\tarray(\n\t\t\t 'id' => 'section-start',\n\t\t\t 'type' => 'section',\n\t\t\t 'title' => __( 'CSS Code', 'sellegance' ),\n\t\t\t 'indent' => true,\n\t\t\t), \n\t\t\t\n\t\t\tarray(\n\t\t\t\t'id'=>'custom_css_code',\n\t\t\t\t'type' => 'ace_editor',\n\t\t\t\t'title' => __('CSS Code', 'sellegance'), \n\t\t\t\t'subtitle' => __('Paste your custom CSS code here. The code will be added to the header of your site.<br>Example:<br><br>\n\t\t\t\t\t<code>h1{color:#000;}</code>', 'sellegance'),\n\t\t\t\t'mode' => 'css',\n\t\t\t\t'theme' => 'chrome',\n\t\t\t\t'default' => '',\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'custom_stylesheet',\n\t\t\t\t'type' => 'switch', \n\t\t\t\t'title' => __('Enable custom.css', 'sellegance'),\n\t\t\t\t'subtitle'=> __('Enable this option to load the custom stylesheet where you can override the default styling of the theme.<br><br> Rename the file <em>/css/sample.custom.css</em> to <em>custom.css</em> located in theme directory.', 'sellegance'),\n\t\t\t\t\"default\"=> 0,\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t 'id' => 'section-start',\n\t\t\t 'type' => 'section',\n\t\t\t 'title' => __( 'JS Code', 'sellegance' ),\n\t\t\t 'indent' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'custom_js_code',\n\t\t\t\t'type' => 'ace_editor',\n\t\t\t\t'title' => __('Custom JS Code', 'sellegance'), \n\t\t\t\t'subtitle' => __('Paste your custom JS here. The code will be added to the footer of your site. <br>Example: <br><br>\n\t\t\t\t\t<code>jQuery(document).ready(function(){ });</code>', 'sellegance'),\n\t\t\t\t'mode' => 'javascript',\n\t\t\t\t'theme' => 'chrome',\n\t\t\t\t'default' => \"\"\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t 'id' => 'section-start',\n\t\t\t 'type' => 'section',\n\t\t\t 'title' => __( 'Tracking', 'sellegance' ),\n\t\t\t 'indent' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id'=>'tracking_code',\n\t\t\t\t'type' => 'ace_editor',\n\t\t\t\t'title' => __('Tracking Code', 'sellegance'), \n\t\t\t\t'subtitle' => __('Paste your Google Analytics (or other) tracking code here. This will be added to the footer template of your theme.', 'sellegance'),\n\t\t\t\t'desc' => 'If you need more options and check analytics directly on your dashboard it\\'s recommended to get a plugin.',\n\t\t\t\t'mode' => 'plain_text',\n\t\t\t\t'theme' => 'chrome',\n\t\t\t\t//'validate' => 'js',\n\t\t\t\t'default' => '',\n\t\t\t\t),\n\t\t)\n\t);\n\t/**\n\t * Note here I used a 'heading' in the sections array construct\n\t * This allows you to use a different title on your options page\n\t * instead of reusing the 'title' value. This can be done on any \n\t * section - kp\n\t */\n\t\n\t\t\t\n\t$theme_info = '<div class=\"redux-framework-section-desc\">';\n\t\t\t$theme_info .= '<p class=\"redux-framework-theme-data description theme-uri\">' . __('<strong>Theme URL:</strong> ', 'sellegance') . '<a href=\"' . $this->theme->get('ThemeURI') . '\" target=\"_blank\">' . $this->theme->get('ThemeURI') . '</a></p>';\n\t\t\t$theme_info .= '<p class=\"redux-framework-theme-data description theme-author\">' . __('<strong>Author:</strong> ', 'sellegance') . $this->theme->get('Author') . '</p>';\n\t\t\t$theme_info .= '<p class=\"redux-framework-theme-data description theme-version\">' . __('<strong>Version:</strong> ', 'sellegance') . $this->theme->get('Version') . '</p>';\n\t\t\t$theme_info .= '<p class=\"redux-framework-theme-data description theme-description\">' . $this->theme->get('Description') . '</p>';\n\t\t\t$tabs = $this->theme->get('Tags');\n\t\t\tif (!empty($tabs)) {\n\t\t\t\t$theme_info .= '<p class=\"redux-framework-theme-data description theme-tags\">' . __('<strong>Tags:</strong> ', 'sellegance') . implode(', ', $tabs) . '</p>';\n\t}\n\t$theme_info .= '</div>';\n\n\t\t\tif (file_exists(dirname(__FILE__) . '/../README.md')) {\n\t$this->sections['theme_docs'] = array(\n\t\t\t\t\t'icon' => 'el-icon-list-alt',\n\t\t\t\t'title' => __('Documentation', 'sellegance'),\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'=>'17',\n\t\t\t\t\t\t'type' => 'raw',\n\t\t\t\t\t\t\t'markdown' => true,\n\t\t\t\t\t\t\t'content' => file_get_contents(dirname(__FILE__) . '/../README.md')\n\t\t\t\t\t\t), \n\t\t\t\t),\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$this->sections[] = array(\n\t\t\t\t'title' => __('Import / Export', 'sellegance'),\n\t\t\t\t'desc' => __('Import and Export your Sellegance settings from file, text or URL.', 'sellegance'),\n\t\t\t\t'icon' => 'el-icon-refresh',\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'opt-import-export',\n\t\t\t\t\t\t'type' => 'import_export',\n\t\t\t\t\t\t'title' => 'Import Export',\n\t\t\t\t\t\t'subtitle' => 'Save and restore your Redux options',\n\t\t\t\t\t\t'full_width' => false,\n\t\t\t\t\t\t),\n\t\t\t\t), \n\t\t); \n\n\t$this->sections[] = array(\n\t\t'type' => 'divide',\n\t);\n\n\n\t\tif (file_exists(trailingslashit(dirname(__FILE__)) . 'README.html')) {\n\t\t\t$tabs['docs'] = array(\n\t\t\t\t'icon' => 'el-icon-book',\n\t\t\t\t'title' => __('Documentation', 'sellegance'),\n\t\t\t\t'content' => nl2br(file_get_contents(trailingslashit(dirname(__FILE__)) . 'README.html'))\n\t\t\t);\n\t\t}\n\t}", "function llorix_one_lite_customize_register( $wp_customize ) {\n\n\trequire_once( 'class/llorix-one-lite-text-control.php' );\n\trequire_once( 'class/llorix-one-lite-alpha-control.php' );\n\trequire_once( trailingslashit( get_template_directory() ) . 'inc/customizer-page-editor/customizer-page-editor.php' );\n\n\t$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';\n\t$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';\n\n\t/* ADVANCED OPTIONS */\n\n\t$wp_customize->add_section(\n\t\t'llorix_one_lite_general_section', array(\n\t\t\t'title' => esc_html__( 'Advanced options', 'llorix-one-lite' ),\n\t\t\t'priority' => 10,\n\t\t\t'description' => esc_html__( 'Llorix One Lite theme general options', 'llorix-one-lite' ),\n\t\t)\n\t);\n\n\t$blogname = $wp_customize->get_control( 'blogname' );\n\t$blogdescription = $wp_customize->get_control( 'blogdescription' );\n\t$blogicon = $wp_customize->get_control( 'site_icon' );\n\n\tif ( ! empty( $blogname ) ) {\n\t\t$blogname->section = 'llorix_one_lite_general_section';\n\t\t$blogname->priority = 1;\n\t}\n\tif ( ! empty( $blogdescription ) ) {\n\t\t$blogdescription->section = 'llorix_one_lite_general_section';\n\t\t$blogdescription->priority = 2;\n\t}\n\tif ( ! empty( $blogicon ) ) {\n\t\t$blogicon->section = 'llorix_one_lite_general_section';\n\t\t$blogicon->priority = 3;\n\t}\n\t$wp_customize->remove_section( 'title_tagline' );\n\n\t$nav_menu_locations_primary = $wp_customize->get_control( 'nav_menu_locations[primary]' );\n\tif ( ! empty( $nav_menu_locations_primary ) ) {\n\t\t$nav_menu_locations_primary->section = 'llorix_one_lite_general_section';\n\t\t$nav_menu_locations_primary->priority = 6;\n\t}\n\n\t/**\n\t * Option to get the frontpage settings to the old default template if a static frontpage is selected\n\t */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_keep_old_fp_template', array(\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_keep_old_fp_template', array(\n\t\t\t'type' => 'checkbox',\n\t\t\t'label' => esc_html__( 'Keep the old static frontpage template?', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_general_section',\n\t\t\t'priority' => 6,\n\t\t)\n\t);\n\n\t/* Disable preloader */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_disable_preloader', array(\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_disable_preloader', array(\n\t\t\t'type' => 'checkbox',\n\t\t\t'label' => esc_html__( 'Disable preloader?', 'llorix-one-lite' ),\n\t\t\t'description' => esc_html__( 'If this box is checked, the preloader will be disabled from homepage.', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_general_section',\n\t\t\t'priority' => 7,\n\t\t)\n\t);\n\n\t/* Change the template to full width for page.php */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_change_to_full_width', array(\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_change_to_full_width', array(\n\t\t\t'type' => 'checkbox',\n\t\t\t'label' => __( 'Change the template to Full width for all the pages?', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_general_section',\n\t\t\t'priority' => 8,\n\t\t)\n\t);\n\n\t/* APPEARANCE */\n\n\t$wp_customize->add_panel(\n\t\t'panel_2', array(\n\t\t\t'priority' => 30,\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'theme_supports' => '',\n\t\t\t'title' => esc_html__( 'Appearance', 'llorix-one-lite' ),\n\t\t)\n\t);\n\n\t/* Colors */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_text_color', array(\n\t\t\t'default' => '#313131',\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\tnew WP_Customize_Color_Control(\n\t\t\t$wp_customize,\n\t\t\t'llorix_one_lite_text_color',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'Text color', 'llorix-one-lite' ),\n\t\t\t\t'section' => 'colors',\n\t\t\t\t'priority' => 5,\n\t\t\t)\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_title_color', array(\n\t\t\t'default' => '#454545',\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\tnew WP_Customize_Color_Control(\n\t\t\t$wp_customize,\n\t\t\t'llorix_one_lite_title_color',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'Title color', 'llorix-one-lite' ),\n\t\t\t\t'section' => 'colors',\n\t\t\t\t'priority' => 6,\n\t\t\t)\n\t\t)\n\t);\n\n\t/* General options */\n\t$wp_customize->add_section(\n\t\t'llorix_one_lite_appearance_general', array(\n\t\t\t'title' => esc_html__( 'General options', 'llorix-one-lite' ),\n\t\t\t'priority' => 3,\n\t\t\t'description' => esc_html__( 'Llorix One Lite theme general appearance options', 'llorix-one-lite' ),\n\t\t\t'panel' => 'panel_2',\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_logo', array(\n\t\t\t'sanitize_callback' => 'esc_url',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\tnew WP_Customize_Image_Control(\n\t\t\t$wp_customize, 'llorix_one_lite_logo', array(\n\t\t\t\t'label' => esc_html__( 'Logo', 'llorix-one-lite' ),\n\t\t\t\t'section' => 'llorix_one_lite_appearance_general',\n\t\t\t\t'priority' => 1,\n\t\t\t)\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_sticky_header', array(\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_sticky_header',\n\t\tarray(\n\t\t\t'type' => 'checkbox',\n\t\t\t'label' => esc_html__( 'Header visibility', 'llorix-one-lite' ),\n\t\t\t'description' => esc_html__( 'If this box is checked, the header will toggle on frontpage.', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_appearance_general',\n\t\t\t'priority' => 2,\n\t\t)\n\t);\n\n\t/* Background image */\n\t$wp_customize->remove_control( 'background_color' );\n\t$wp_customize->get_section( 'background_image' )->panel = 'panel_2';\n\t$wp_customize->get_section( 'colors' )->panel = 'panel_2';\n\n\t/* HEADER */\n\n\t$wp_customize->add_panel(\n\t\t'panel_1', array(\n\t\t\t'priority' => 50,\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'theme_supports' => '',\n\t\t\t'title' => esc_html__( 'Header', 'llorix-one-lite' ),\n\t\t)\n\t);\n\n\t/* VERY TOP HEADER */\n\t$wp_customize->add_section(\n\t\t'llorix_one_lite_very_top_header_content', array(\n\t\t\t'title' => esc_html__( 'Very top header', 'llorix-one-lite' ),\n\t\t\t'priority' => 10,\n\t\t\t'panel' => 'panel_1',\n\t\t)\n\t);\n\n\t/* Very top header show/hide */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_very_top_header_show', array(\n\t\t\t'default' => apply_filters( 'llorix_one_lite_very_top_header_show_filter', 0 ),\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_very_top_header_show', array(\n\t\t\t'type' => 'checkbox',\n\t\t\t'label' => __( 'Disable the Very top header?', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_very_top_header_content',\n\t\t\t'priority' => 1,\n\t\t)\n\t);\n\n\t/* Phone number - text */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_very_top_header_phone_text', array(\n\t\t\t'default' => esc_html__( 'Call us: ', 'llorix-one-lite' ),\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_very_top_header_phone_text', array(\n\t\t\t'label' => esc_html__( 'Text before the phone number', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_very_top_header_content',\n\t\t\t'priority' => 2,\n\t\t)\n\t);\n\n\t/* Phone number */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_very_top_header_phone', array(\n\t\t\t'default' => esc_html__( '(+9) 0999.500.400', 'llorix-one-lite' ),\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_very_top_header_phone', array(\n\t\t\t'label' => esc_html__( 'Phone number', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_very_top_header_content',\n\t\t\t'priority' => 3,\n\t\t)\n\t);\n\n\t/* social icons header */\n\t$default = llorix_one_lite_header_social_icons_get_default_content();\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_very_top_social_icons', array(\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_repeater',\n\t\t\t'default' => $default,\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\tnew Llorix_One_Lite_General_Repeater(\n\t\t\t$wp_customize, 'llorix_one_lite_very_top_social_icons', array(\n\t\t\t\t'label' => esc_html__( 'Add new social icon', 'llorix-one-lite' ),\n\t\t\t\t'section' => 'llorix_one_lite_very_top_header_content',\n\t\t\t\t'priority' => 4,\n\t\t\t\t'llorix_one_lite_image_control' => false,\n\t\t\t\t'llorix_one_lite_icon_control' => true,\n\t\t\t\t'llorix_one_lite_text_control' => false,\n\t\t\t\t'llorix_one_lite_link_control' => true,\n\t\t\t)\n\t\t)\n\t);\n\n\t/* BLOG HEADER */\n\n\t$wp_customize->add_section(\n\t\t'llorix_one_lite_blog_header_section', array(\n\t\t\t'title' => esc_html__( 'Blog header', 'llorix-one-lite' ),\n\t\t\t'priority' => 20,\n\t\t\t'panel' => 'panel_1',\n\t\t)\n\t);\n\n\t/* Blog Header title */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_blog_header_title', array(\n\t\t\t'default' => apply_filters( 'llorix_one_lite_blog_header_title_default_filter', 'This Theme Supports a Custom FrontPage' ),\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_blog_header_title', array(\n\t\t\t'label' => esc_html__( 'Title', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_blog_header_section',\n\t\t\t'priority' => 1,\n\t\t)\n\t);\n\n\t/* Blog Header subtitle */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_blog_header_subtitle', array(\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_blog_header_subtitle', array(\n\t\t\t'label' => esc_html__( 'Subtitle', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_blog_header_section',\n\t\t\t'priority' => 2,\n\t\t)\n\t);\n\n\t/* Blog Header image\t*/\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_blog_header_image', array(\n\t\t\t'default' => apply_filters( 'llorix_one_lite_blog_header_image_filter', llorix_one_lite_get_file( '/images/background-images/background-blog.jpg' ) ),\n\t\t\t'sanitize_callback' => 'esc_url',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\tnew WP_Customize_Image_Control(\n\t\t\t$wp_customize, 'llorix_one_lite_blog_header_image', array(\n\t\t\t\t'label' => esc_html__( 'Image', 'llorix-one-lite' ),\n\t\t\t\t'section' => 'llorix_one_lite_blog_header_section',\n\t\t\t\t'priority' => 3,\n\t\t\t)\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_blog_opacity', array(\n\t\t\t'default' => apply_filters( 'llorix_one_lite_blog_opacity_filter', 'rgba(13, 60, 85, 0.6)' ),\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\tnew Llorix_One_Lite_Customize_Alpha_Color_Control(\n\t\t\t$wp_customize, 'llorix_one_lite_blog_opacity', array(\n\t\t\t\t'label' => __( 'Overlay color and transparency', 'llorix-one-lite' ),\n\t\t\t\t'palette' => true,\n\t\t\t\t'section' => 'llorix_one_lite_blog_header_section',\n\t\t\t\t'priority' => 4,\n\t\t\t)\n\t\t)\n\t);\n\n\t/* FRONTPAGE SECTIONS */\n\n\t$wp_customize->add_panel(\n\t\t'llorix_one_lite_front_page_sections', array(\n\t\t\t'title' => __( 'Frontpage sections', 'llorix-one-lite' ),\n\t\t\t'priority' => 90,\n\t\t)\n\t);\n\n\t/* BIG TITLE SECTION */\n\n\t$wp_customize->add_section(\n\t\t'llorix_one_lite_header_content', array(\n\t\t\t'title' => esc_html__( 'Big title section', 'llorix-one-lite' ),\n\t\t\t'priority' => 10,\n\t\t\t'panel' => 'llorix_one_lite_front_page_sections',\n\t\t\t'active_callback' => 'llorix_one_lite_show_on_front',\n\t\t)\n\t);\n\n\t/* Header Logo\t*/\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_header_logo', array(\n\t\t\t'default' => apply_filters( 'llorix_one_lite_header_logo_filter', llorix_one_lite_get_file( '/images/logo-2.png' ) ),\n\t\t\t'sanitize_callback' => 'esc_url',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\tnew WP_Customize_Image_Control(\n\t\t\t$wp_customize, 'llorix_one_lite_header_logo', array(\n\t\t\t\t'label' => esc_html__( 'Header Logo', 'llorix-one-lite' ),\n\t\t\t\t'section' => 'llorix_one_lite_header_content',\n\t\t\t\t'priority' => 10,\n\t\t\t)\n\t\t)\n\t);\n\n\t/* Header title */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_header_title', array(\n\t\t\t'default' => apply_filters( 'llorix_one_lite_header_title_filter', esc_html__( 'Simple, Reliable and Awesome.', 'llorix-one-lite' ) ),\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_header_title', array(\n\t\t\t'label' => esc_html__( 'Main title', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_header_content',\n\t\t\t'priority' => 20,\n\t\t)\n\t);\n\n\t/* Header subtitle */\n\t$llorix_one_lite_header_subtitle_default = '';\n\tif ( current_user_can( 'edit_theme_options' ) ) {\n\t\t/* translators: %1$s is the customize link %2$s the customize link label */\n\t\t$llorix_one_lite_header_subtitle_default = sprintf( __( 'Change this text in %s', 'llorix-one-lite' ), sprintf( '<a href=\"%1$s\" class=\"llorix-one-lite-default-links\">%2$s</a>', esc_url( admin_url( 'customize.php?autofocus&#91;control&#93;=llorix_one_lite_header_subtitle' ) ), __( 'Big title section', 'llorix-one-lite' ) ) );\n\t}\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_header_subtitle', array(\n\t\t\t'default' => $llorix_one_lite_header_subtitle_default,\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_header_subtitle', array(\n\t\t\t'label' => esc_html__( 'Subtitle', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_header_content',\n\t\t\t'priority' => 30,\n\t\t)\n\t);\n\n\t/*Header Button text*/\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_header_button_text', array(\n\t\t\t'default' => esc_html__( 'GET STARTED', 'llorix-one-lite' ),\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_header_button_text', array(\n\t\t\t'label' => esc_html__( 'Button label', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_header_content',\n\t\t\t'priority' => 40,\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_header_button_link', array(\n\t\t\t'default' => esc_html__( '#', 'llorix-one-lite' ),\n\t\t\t'sanitize_callback' => 'esc_url',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_header_button_link', array(\n\t\t\t'label' => esc_html__( 'Button link', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_header_content',\n\t\t\t'priority' => 50,\n\t\t)\n\t);\n\n\t/* BIG TITLE SECTION BACKGROUND */\n\n\t$wp_customize->get_section( 'header_image' )->panel = 'llorix_one_lite_front_page_sections';\n\t$wp_customize->get_section( 'header_image' )->title = esc_html__( 'Big title section background', 'llorix-one-lite' );\n\t$wp_customize->get_section( 'header_image' )->priority = 20;\n\t$wp_customize->get_section( 'header_image' )->active_callback = 'llorix_one_lite_show_on_front';\n\n\t/* Enable parallax effect*/\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_enable_move', array(\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_enable_move', array(\n\t\t\t'type' => 'checkbox',\n\t\t\t'label' => esc_html__( 'Parallax effect', 'llorix-one-lite' ),\n\t\t\t'description' => esc_html__( 'If this box is checked, the parallax effect is enabled.', 'llorix-one-lite' ),\n\t\t\t'section' => 'header_image',\n\t\t\t'priority' => 3,\n\t\t)\n\t);\n\n\t/* Layer one */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_first_layer', array(\n\t\t\t'default' => llorix_one_lite_get_file( '/images/background1.png' ),\n\t\t\t'sanitize_callback' => 'esc_url',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\tnew WP_Customize_Image_Control(\n\t\t\t$wp_customize, 'llorix_one_lite_first_layer', array(\n\t\t\t\t'label' => esc_html__( 'First layer', 'llorix-one-lite' ),\n\t\t\t\t'section' => 'header_image',\n\t\t\t\t'priority' => 4,\n\t\t\t)\n\t\t)\n\t);\n\n\t/* Layer two */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_second_layer', array(\n\t\t\t'default' => llorix_one_lite_get_file( '/images/background2.png' ),\n\t\t\t'sanitize_callback' => 'esc_url',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\tnew WP_Customize_Image_Control(\n\t\t\t$wp_customize, 'llorix_one_lite_second_layer', array(\n\t\t\t\t'label' => esc_html__( 'Second layer', 'llorix-one-lite' ),\n\t\t\t\t'section' => 'header_image',\n\t\t\t\t'priority' => 5,\n\t\t\t)\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_frontpage_opacity', array(\n\t\t\t'default' => apply_filters( 'llorix_one_lite_frontpage_opacity_filter', 'rgba(13, 60, 85, 0.5)' ),\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\tnew Llorix_One_Lite_Customize_Alpha_Color_Control(\n\t\t\t$wp_customize, 'llorix_one_lite_frontpage_opacity', array(\n\t\t\t\t'label' => __( 'Overlay color and transparency', 'llorix-one-lite' ),\n\t\t\t\t'palette' => true,\n\t\t\t\t'section' => 'header_image',\n\t\t\t\t'priority' => 20,\n\t\t\t)\n\t\t)\n\t);\n\n\t/* LOGOS BAR SECTION */\n\n\t$wp_customize->add_section(\n\t\t'llorix_one_lite_logos_settings_section', array(\n\t\t\t'title' => esc_html__( 'Logos Bar section', 'llorix-one-lite' ),\n\t\t\t'priority' => 30,\n\t\t\t'panel' => 'llorix_one_lite_front_page_sections',\n\t\t\t'active_callback' => 'llorix_one_lite_show_on_front',\n\t\t)\n\t);\n\n\t/* Logos bar show/hide */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_logos_show', array(\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_logos_show', array(\n\t\t\t'type' => 'checkbox',\n\t\t\t'label' => __( 'Disable the Logos bar sections?', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_logos_settings_section',\n\t\t\t'priority' => 1,\n\t\t)\n\t);\n\n\t$default = llorix_one_lite_logos_get_default_content();\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_logos_content', array(\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_repeater',\n\t\t\t'default' => $default,\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\tnew Llorix_One_Lite_General_Repeater(\n\t\t\t$wp_customize, 'llorix_one_lite_logos_content', array(\n\t\t\t\t'label' => esc_html__( 'Add new logo', 'llorix-one-lite' ),\n\t\t\t\t'section' => 'llorix_one_lite_logos_settings_section',\n\t\t\t\t'priority' => 10,\n\t\t\t\t'llorix_one_lite_image_control' => true,\n\t\t\t\t'llorix_one_lite_icon_control' => false,\n\t\t\t\t'llorix_one_lite_text_control' => false,\n\t\t\t\t'llorix_one_lite_link_control' => true,\n\t\t\t)\n\t\t)\n\t);\n\n\t/* ABOUT SECTION */\n\n\t$wp_customize->add_section(\n\t\t'llorix_one_lite_about_section', array(\n\t\t\t'title' => esc_html__( 'About section', 'llorix-one-lite' ),\n\t\t\t'priority' => 50,\n\t\t\t'panel' => 'llorix_one_lite_front_page_sections',\n\t\t\t'active_callback' => 'llorix_one_lite_show_on_front',\n\t\t)\n\t);\n\n\t/* About show/hide */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_our_story_show', array(\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_our_story_show', array(\n\t\t\t'type' => 'checkbox',\n\t\t\t'label' => __( 'Disable the About section?', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_about_section',\n\t\t\t'priority' => 1,\n\t\t)\n\t);\n\n\t/* About title */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_our_story_title', array(\n\t\t\t'default' => esc_html__( 'Our Story', 'llorix-one-lite' ),\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_our_story_title', array(\n\t\t\t'label' => esc_html__( 'Main title', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_about_section',\n\t\t\t'priority' => 10,\n\t\t)\n\t);\n\n\t/* About Content */\n\t$llorix_one_lite_our_story_text_default = '';\n\tif ( current_user_can( 'edit_theme_options' ) ) {\n\t\t/* translators: %1$s is the customize link %2$s the customize link label */\n\t\t$llorix_one_lite_our_story_text_default = sprintf( __( 'Change this text in %s', 'llorix-one-lite' ), sprintf( '<a href=\"%1$s\" class=\"llorix-one-lite-default-links\">%2$s</a>', esc_url( admin_url( 'customize.php?autofocus&#91;control&#93;=llorix_one_lite_our_story_text' ) ), __( 'About section', 'llorix-one-lite' ) ) );\n\t}\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_our_story_text', array(\n\t\t\t'default' => $llorix_one_lite_our_story_text_default,\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_our_story_text', array(\n\t\t\t'type' => 'textarea',\n\t\t\t'label' => esc_html__( 'Content', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_about_section',\n\t\t\t'priority' => 20,\n\t\t)\n\t);\n\n\t/* About Image\t*/\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_our_story_image', array(\n\t\t\t'default' => apply_filters( 'llorix_one_lite_our_story_image_filter', llorix_one_lite_get_file( '/images/about-us.png' ) ),\n\t\t\t'sanitize_callback' => 'esc_url',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\tnew WP_Customize_Image_Control(\n\t\t\t$wp_customize, 'llorix_one_lite_our_story_image', array(\n\t\t\t\t'label' => esc_html__( 'Image', 'llorix-one-lite' ),\n\t\t\t\t'section' => 'llorix_one_lite_about_section',\n\t\t\t\t'priority' => 30,\n\t\t\t)\n\t\t)\n\t);\n\n\t/* RIBBON SECTION */\n\n\t$wp_customize->add_section(\n\t\t'llorix_one_lite_ribbon_section', array(\n\t\t\t'title' => esc_html__( 'Ribbon section', 'llorix-one-lite' ),\n\t\t\t'priority' => 80,\n\t\t\t'panel' => 'llorix_one_lite_front_page_sections',\n\t\t\t'active_callback' => 'llorix_one_lite_show_on_front',\n\t\t)\n\t);\n\n\t/* Ribbon show/hide */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_ribbon_show', array(\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_ribbon_show', array(\n\t\t\t'type' => 'checkbox',\n\t\t\t'label' => __( 'Disable the Ribbon section?', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_ribbon_section',\n\t\t\t'priority' => 1,\n\t\t)\n\t);\n\n\t/* Ribbon Background */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_ribbon_background', array(\n\t\t\t'default' => apply_filters( 'llorix_one_lite_ribbon_background_filter', llorix_one_lite_get_file( '/images/background-images/parallax-img/parallax-img1.jpg' ) ),\n\t\t\t'sanitize_callback' => 'esc_url',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\tnew WP_Customize_Image_Control(\n\t\t\t$wp_customize, 'llorix_one_lite_ribbon_background', array(\n\t\t\t\t'label' => esc_html__( 'Ribbon Background', 'llorix-one-lite' ),\n\t\t\t\t'section' => 'llorix_one_lite_ribbon_section',\n\t\t\t\t'priority' => 10,\n\t\t\t)\n\t\t)\n\t);\n\n\t/* Ribbon Title */\n\t$llorix_one_lite_ribbon_title_default = '';\n\tif ( current_user_can( 'edit_theme_options' ) ) {\n\t\t/* translators: %1$s is the customize link %2$s the customize link label */\n\t\t$llorix_one_lite_ribbon_title_default = sprintf( __( 'Change this text in %s', 'llorix-one-lite' ), sprintf( '<a href=\"%1$s\">%2$s</a>', esc_url( admin_url( 'customize.php?autofocus&#91;control&#93;=llorix_one_lite_ribbon_title' ) ), __( 'Ribbon section', 'llorix-one-lite' ) ) );\n\t}\n\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_ribbon_title', array(\n\t\t\t'default' => $llorix_one_lite_ribbon_title_default,\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_ribbon_title', array(\n\t\t\t'label' => esc_html__( 'Main title', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_ribbon_section',\n\t\t\t'priority' => 20,\n\t\t)\n\t);\n\n\t/* Ribbon button label */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_button_text', array(\n\t\t\t'default' => esc_html__( 'GET STARTED', 'llorix-one-lite' ),\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_button_text', array(\n\t\t\t'label' => esc_html__( 'Button label', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_ribbon_section',\n\t\t\t'priority' => 30,\n\t\t)\n\t);\n\n\t/* Ribbon button link */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_button_link', array(\n\t\t\t'default' => esc_html__( '#', 'llorix-one-lite' ),\n\t\t\t'sanitize_callback' => 'esc_url',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_button_link', array(\n\t\t\t'label' => esc_html__( 'Button link', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_ribbon_section',\n\t\t\t'priority' => 40,\n\t\t)\n\t);\n\n\t/* LATEST NEWS SECTION */\n\n\t$wp_customize->add_section(\n\t\t'llorix_one_lite_latest_news_section', array(\n\t\t\t'title' => esc_html__( 'Latest news section', 'llorix-one-lite' ),\n\t\t\t'priority' => 90,\n\t\t\t'panel' => 'llorix_one_lite_front_page_sections',\n\t\t\t'active_callback' => 'llorix_one_lite_show_on_front',\n\t\t)\n\t);\n\n\t/* Latest news show/hide */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_latest_news_show', array(\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_latest_news_show', array(\n\t\t\t'type' => 'checkbox',\n\t\t\t'label' => __( 'Disable the Latest news section?', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_latest_news_section',\n\t\t\t'priority' => 1,\n\t\t)\n\t);\n\n\t/* Latest news title */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_latest_news_title', array(\n\t\t\t'default' => esc_html__( 'Latest news', 'llorix-one-lite' ),\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_latest_news_title', array(\n\t\t\t'label' => esc_html__( 'Main title', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_latest_news_section',\n\t\t\t'priority' => 10,\n\t\t)\n\t);\n\n\t/* FRONTPAGE CONTENT SECTION */\n\n\t$wp_customize->add_section(\n\t\t'llorix_one_lite_frontpage_content_section', array(\n\t\t\t'title' => esc_html__( 'Frontpage content section', 'llorix-one-lite' ),\n\t\t\t'priority' => 150,\n\t\t\t'panel' => 'llorix_one_lite_front_page_sections',\n\t\t\t'active_callback' => 'llorix_one_lite_show_on_front',\n\t\t)\n\t);\n\n\t/* Frontpage content show/hide */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_frontpage_content_show', array(\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t\t'default' => 1,\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_frontpage_content_show', array(\n\t\t\t'type' => 'checkbox',\n\t\t\t'label' => __( 'Disable the Frontpage Content section?', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_frontpage_content_section',\n\t\t\t'priority' => 1,\n\t\t)\n\t);\n\n\t/* Frontpage content editor control */\n\t$frontpage_id = get_option( 'page_on_front' );\n\t$default = '';\n\n\tif ( ! empty( $frontpage_id ) ) {\n\t\t$default = get_post_field( 'post_content', $frontpage_id );\n\t}\n\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_page_editor', array(\n\t\t\t'default' => $default,\n\t\t\t'sanitize_callback' => 'wp_kses_post',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\tnew Llorix_One_Lite_Page_Editor(\n\t\t\t$wp_customize, 'llorix_one_lite_page_editor', array(\n\t\t\t\t'label' => __( 'Content', 'llorix-one-lite' ),\n\t\t\t\t'section' => 'llorix_one_lite_frontpage_content_section',\n\t\t\t\t'priority' => 10,\n\t\t\t\t'active_callback' => 'llorix_one_lite_show_on_front',\n\t\t\t\t'include_admin_print_footer' => true,\n\t\t\t\t'needsync' => true,\n\t\t\t)\n\t\t)\n\t);\n\n\t$default = '';\n\tif ( has_post_thumbnail( $frontpage_id ) ) {\n\t\t$default = get_the_post_thumbnail_url( $frontpage_id );\n\t}\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_feature_thumbnail', array(\n\t\t\t'sanitize_callback' => 'esc_url',\n\t\t\t'default' => $default,\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\tnew WP_Customize_Image_Control(\n\t\t\t$wp_customize, 'llorix_one_lite_feature_thumbnail', array(\n\t\t\t\t'label' => esc_html__( 'Background', 'llorix-one-lite' ),\n\t\t\t\t'section' => 'llorix_one_lite_frontpage_content_section',\n\t\t\t\t'priority' => 15,\n\t\t\t\t'active_callback' => 'llorix_one_lite_show_on_front',\n\t\t\t)\n\t\t)\n\t);\n\n\t/* CONTACT INFO SECTION */\n\n\t$wp_customize->add_section(\n\t\t'llorix_one_lite_contact_section', array(\n\t\t\t'title' => esc_html__( 'Contact info section', 'llorix-one-lite' ),\n\t\t\t'priority' => 100,\n\t\t\t'panel' => 'llorix_one_lite_front_page_sections',\n\t\t\t'active_callback' => 'llorix_one_lite_show_on_front',\n\t\t)\n\t);\n\n\t/* Contact info show/hide */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_contact_info_show', array(\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_contact_info_show', array(\n\t\t\t'type' => 'checkbox',\n\t\t\t'label' => __( 'Disable the Contact info section?', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_contact_section',\n\t\t\t'priority' => 1,\n\t\t)\n\t);\n\n\t/* Contact info content */\n\t$default = llorix_one_lite_contact_get_default_content();\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_contact_info_content', array(\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_repeater',\n\t\t\t'default' => $default,\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\tnew Llorix_One_Lite_General_Repeater(\n\t\t\t$wp_customize, 'llorix_one_lite_contact_info_content', array(\n\t\t\t\t'label' => esc_html__( 'Add new contact field', 'llorix-one-lite' ),\n\t\t\t\t'section' => 'llorix_one_lite_contact_section',\n\t\t\t\t'priority' => 10,\n\t\t\t\t'llorix_one_lite_image_control' => false,\n\t\t\t\t'llorix_one_lite_icon_control' => true,\n\t\t\t\t'llorix_one_lite_text_control' => true,\n\t\t\t\t'llorix_one_lite_link_control' => true,\n\t\t\t)\n\t\t)\n\t);\n\n\t/* Contact info Map ShortCode */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_frontpage_map_shortcode', array(\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_frontpage_map_shortcode', array(\n\t\t\t'label' => esc_html__( 'Map shortcode', 'llorix-one-lite' ),\n\t\t\t'description' => __( 'To use this section please install ', 'llorix-one-lite' ) . '<a href=\"https://wordpress.org/plugins/intergeo-maps/\">' . __( 'Intergeo Maps', 'llorix-one-lite' ) . '</a>' . __( ' plugin then use it to create a map and paste here the shortcode generated', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_contact_section',\n\t\t\t'priority' => 20,\n\t\t)\n\t);\n\n\t/* CONTACT PAGE OPTIONS */\n\n\t$wp_customize->add_section(\n\t\t'llorix_one_lite_contact_page', array(\n\t\t\t'title' => esc_html__( 'Contact page', 'llorix-one-lite' ),\n\t\t\t'priority' => 110,\n\t\t\t'description' => __( 'To customize the Contact Page you need to first select the template \"Contact page\" for the page you want to use for this purpose. Then open that page in the browser and press \"Customize\" in the top bar.', 'llorix-one-lite' ),\n\t\t)\n\t);\n\n\t/* Contact Form */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_contact_form_shortcode', array(\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_contact_form_shortcode', array(\n\t\t\t'label' => esc_html__( 'Contact form shortcode', 'llorix-one-lite' ),\n\t\t\t'description' => __( 'Create a form, copy the shortcode generated and paste it here. We recommend ', 'llorix-one-lite' ) . '<a href=\"' . admin_url( 'plugin-install.php?tab=plugin-information&plugin=pirate-forms' ) . '\">' . __( 'Pirate Forms', 'llorix-one-lite' ) . '</a>' . __( ' but you can use any plugin you like.', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_contact_page',\n\t\t\t'priority' => 1,\n\t\t)\n\t);\n\n\t/* Map ShortCode */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_contact_map_shortcode', array(\n\t\t\t'default' => '',\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_contact_map_shortcode', array(\n\t\t\t'label' => esc_html__( 'Map shortcode', 'llorix-one-lite' ),\n\t\t\t'description' => __( 'To use this section please install ', 'llorix-one-lite' ) . '<a href=\"' . admin_url( 'plugin-install.php?tab=plugin-information&plugin=intergeo-maps' ) . '\">' . __( 'Intergeo Maps', 'llorix-one-lite' ) . '</a>' . __( ' plugin then use it to create a map and paste here the shortcode generated', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_contact_page',\n\t\t\t'priority' => 2,\n\t\t)\n\t);\n\n\t/* FOOTER OPTIONS */\n\n\t$wp_customize->add_section(\n\t\t'llorix_one_lite_footer_section', array(\n\t\t\t'title' => esc_html__( 'Footer options', 'llorix-one-lite' ),\n\t\t\t'priority' => 130,\n\t\t\t'description' => esc_html__( 'The main content of this section is customizable in: Customize -> Widgets -> Footer area. ', 'llorix-one-lite' ),\n\t\t)\n\t);\n\n\t/* Footer Menu */\n\t$nav_menu_locations_footer = $wp_customize->get_control( 'nav_menu_locations[llorix_one_lite_footer_menu]' );\n\tif ( ! empty( $nav_menu_locations_footer ) ) {\n\t\t$nav_menu_locations_footer->section = 'llorix_one_lite_footer_section';\n\t\t$nav_menu_locations_footer->priority = 1;\n\t}\n\t/* Copyright */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_copyright', array(\n\t\t\t'default' => apply_filters( 'llorix_one_lite_copyright_default_filter', 'Themeisle' ),\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_text',\n\t\t\t'transport' => 'postMessage',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\t'llorix_one_lite_copyright', array(\n\t\t\t'label' => esc_html__( 'Copyright', 'llorix-one-lite' ),\n\t\t\t'section' => 'llorix_one_lite_footer_section',\n\t\t\t'priority' => 2,\n\t\t)\n\t);\n\n\t/* Socials icons */\n\t$wp_customize->add_setting(\n\t\t'llorix_one_lite_social_icons', array(\n\t\t\t'sanitize_callback' => 'llorix_one_lite_sanitize_repeater',\n\t\t)\n\t);\n\t$wp_customize->add_control(\n\t\tnew Llorix_One_Lite_General_Repeater(\n\t\t\t$wp_customize, 'llorix_one_lite_social_icons', array(\n\t\t\t\t'label' => esc_html__( 'Add new social icon', 'llorix-one-lite' ),\n\t\t\t\t'section' => 'llorix_one_lite_footer_section',\n\t\t\t\t'priority' => 3,\n\t\t\t\t'llorix_one_lite_image_control' => false,\n\t\t\t\t'llorix_one_lite_icon_control' => true,\n\t\t\t\t'llorix_one_lite_text_control' => false,\n\t\t\t\t'llorix_one_lite_link_control' => true,\n\t\t\t)\n\t\t)\n\t);\n\n\t/* Selective refresh */\n\tif ( isset( $wp_customize->selective_refresh ) ) {\n\n\t\t$wp_customize->selective_refresh->add_partial(\n\t\t\t'llorix_one_lite_ribbon_title', array(\n\t\t\t\t'selector' => '.call-to-action h2',\n\t\t\t\t'settings' => 'llorix_one_lite_ribbon_title',\n\t\t\t\t'render_callback' => 'llorix_one_lite_ribbon_title_render_callback',\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->selective_refresh->add_partial(\n\t\t\t'llorix_one_lite_our_story_text', array(\n\t\t\t\t'selector' => '.brief .brief-content-text',\n\t\t\t\t'settings' => 'llorix_one_lite_our_story_text',\n\t\t\t\t'render_callback' => 'llorix_one_lite_our_story_text_render_callback',\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->selective_refresh->add_partial(\n\t\t\t'llorix_one_lite_header_subtitle', array(\n\t\t\t\t'selector' => '.intro-section #intro_section_text_2',\n\t\t\t\t'settings' => 'llorix_one_lite_header_subtitle',\n\t\t\t\t'render_callback' => 'llorix_one_lite_header_subtitle_render_callback',\n\t\t\t)\n\t\t);\n\t}\n}", "public function render_content() {\n\t\t\tif ( empty( $this->choices ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$name = '_customize-radio-' . $this->id;\n\t\t\t?>\n\t\t\t<span class=\"customize-control-title\">\n\t\t\t\t<?php echo esc_attr( $this->label ); ?>\n\t\t\t\t<?php if ( ! empty( $this->description ) ) : ?>\n\t\t\t\t\t<span class=\"description customize-control-description\"><?php echo esc_html( $this->description ); ?></span>\n\t\t\t\t<?php endif; ?>\n\t\t\t</span>\n\t\t\t<div id=\"input_<?php echo $this->id; ?>\" class=\"image\">\n\t\t\t\t<?php foreach ( $this->choices as $value => $label ) : ?>\n\t\t\t\t\t<input class=\"image-select\" type=\"radio\" value=\"<?php echo esc_attr( $value ); ?>\" id=\"<?php echo $this->id . $value; ?>\" name=\"<?php echo esc_attr( $name ); ?>\" <?php $this->link(); checked( $this->value(), $value ); ?>>\n\t\t\t\t\t\t<label for=\"<?php echo $this->id . $value; ?>\">\n\t\t\t\t\t\t\t<img src=\"<?php echo esc_html( $label ); ?>\" alt=\"<?php echo esc_attr( $value ); ?>\" title=\"<?php echo esc_attr( $value ); ?>\">\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</input>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t</div>\n\t\t\t<script>jQuery(document).ready(function($) { $( '[id=\"input_<?php echo $this->id; ?>\"]' ).buttonset(); });</script>\n\t\t\t<?php\n\t\t}", "function wota_customizer( $wp_customize ) {\n \n // start with custom controls\n \n /**\n * Adds textarea support to the theme customizer\n * @TODO -> extend this out beyond the default example\n */\n class Wota_Customize_Textarea_Control extends WP_Customize_Control {\n public $type = 'textarea';\n\n public function render_content() {\n ?>\n <label>\n <span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n <textarea rows=\"5\" style=\"width:100%;\" <?php $this->link(); ?>><?php echo esc_textarea( $this->value() ); ?></textarea>\n </label>\n <?php\n }\n }\n \n // manage the boxes/panels\n \n $wp_customize->add_section(\n 'wota_customize_boxes',\n array(\n 'title' => 'wota - boxes & panels',\n 'description' => 'without the \\'a\\' theme settings.',\n 'priority' => 10,\n )\n );\n \n // front page advertising boxes\n \n $wp_customize->add_setting('hide_boxes');\n \n $wp_customize->add_control(\n 'hide_boxes',\n array(\n 'type' => 'checkbox',\n 'label' => 'Hide front page boxes?',\n 'section' => 'wota_customize_boxes',\n 'priority' => 10\n )\n );\n \n $wp_customize->add_setting(\n 'wota_customize_boxes_textbox_1',\n array(\n 'default' => 'Lorem ipsum ...',\n 'sanitize_callback' => 'wota_sanitize_text'\n )\n );\n \n $wp_customize->add_setting(\n 'wota_customize_boxes_textbox_2',\n array(\n 'default' => 'Lorem ipsum ...',\n 'sanitize_callback' => 'wota_sanitize_text'\n )\n );\n \n $wp_customize->add_setting(\n 'wota_customize_boxes_textbox_3',\n array(\n 'default' => 'Lorem ipsum ...',\n 'sanitize_callback' => 'wota_sanitize_text'\n )\n );\n \n $wp_customize->add_control(\n new Wota_Customize_Textarea_Control(\n $wp_customize,\n 'wota_customize_boxes_textbox_1',\n array(\n 'label' => 'Box 1 Text',\n 'section' => 'wota_customize_boxes',\n 'type' => 'textarea',\n 'priority' => 20\n )\n )\n );\n \n $wp_customize->add_control(\n new Wota_Customize_Textarea_Control(\n $wp_customize,\n 'wota_customize_boxes_textbox_2',\n array(\n 'label' => 'Box 2 Text',\n 'section' => 'wota_customize_boxes',\n 'type' => 'textarea',\n 'priority' => 30\n )\n )\n );\n \n $wp_customize->add_control(\n new Wota_Customize_Textarea_Control(\n $wp_customize,\n 'wota_customize_boxes_textbox_3',\n array(\n 'label' => 'Box 3 Text',\n 'section' => 'wota_customize_boxes',\n 'type' => 'textarea',\n 'priority' => 40\n )\n )\n );\n \n // the three text panels\n \n $wp_customize->add_setting('hide_panels');\n \n $wp_customize->add_control(\n 'hide_panels',\n array(\n 'type' => 'checkbox',\n 'label' => 'Hide front page panels?',\n 'section' => 'wota_customize_boxes',\n 'priority' => 50\n )\n );\n \n $wp_customize->add_setting(\n 'wota_customize_panels_textbox_1',\n array(\n 'default' => 'Lorem ipsum ...',\n 'sanitize_callback' => 'wota_sanitize_text'\n )\n );\n \n $wp_customize->add_setting(\n 'wota_customize_panels_textbox_2',\n array(\n 'default' => 'Lorem ipsum ...',\n 'sanitize_callback' => 'wota_sanitize_text'\n )\n );\n \n $wp_customize->add_setting(\n 'wota_customize_panels_textbox_3',\n array(\n 'default' => 'Lorem ipsum ...',\n 'sanitize_callback' => 'wota_sanitize_text'\n )\n );\n \n $wp_customize->add_control(\n new Wota_Customize_Textarea_Control(\n $wp_customize,\n 'wota_customize_panels_textbox_1',\n array(\n 'label' => 'Panel 1 Text',\n 'section' => 'wota_customize_boxes',\n 'type' => 'textarea',\n 'priority' => 60\n )\n )\n );\n \n $wp_customize->add_control(\n new Wota_Customize_Textarea_Control(\n $wp_customize,\n 'wota_customize_panels_textbox_2',\n array(\n 'label' => 'Panel 2 Text',\n 'section' => 'wota_customize_boxes',\n 'type' => 'textarea',\n 'priority' => 70\n )\n )\n );\n \n $wp_customize->add_control(\n new Wota_Customize_Textarea_Control(\n $wp_customize,\n 'wota_customize_panels_textbox_3',\n array(\n 'label' => 'Panel 3 Text',\n 'section' => 'wota_customize_boxes',\n 'type' => 'textarea',\n 'priority' => 80\n )\n )\n );\n \n // manage the slider\n \n $wp_customize->add_section(\n 'wota_customize_slider',\n array(\n 'title' => 'wota - slider',\n 'description' => 'without the \\'a\\' slider settings.',\n 'priority' => 15,\n )\n );\n \n $wp_customize->add_setting('wota_customize_slider_img_1');\n //$wp_customize->add_setting('wota_customize_slider_img_2');\n //$wp_customize->add_setting('wota_customize_slider_img_3');\n //$wp_customize->add_setting('wota_customize_slider_img_4');\n //$wp_customize->add_setting('wota_customize_slider_img_5');\n \n $wp_customize->add_section(\n new WP_Customize_Image_Control(\n $wp_customize,\n 'wota_customize_slider_img_1',\n array(\n 'label' => '1st Image',\n 'section' => 'wota_customize_slider',\n 'type' => 'img_upload',\n 'priority' => 10\n )\n )\n );\n}", "public function render_content() {\n ?>\n <label>\n <span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n <input type=\"text\" value=\"<?php echo esc_attr( $this->value() ); ?>\" <?php $this->link(); ?> />\n </label>\n <?php\n // The input's value gets set by JS. Don't fill it.\n ?>\n <label>\n <span class=\"customize-control-title\"><?php echo esc_html( $this->label ); ?></span>\n <div class=\"customize-control-content\">\n <form><input type=\"text\" <?= $default_attr ?> value=\"<?= $this_default ?>\" /></form>\n\n <div class=\"colorpicker\"></div>\n </div>\n </label>\n <?php\n }", "public function options_render_page() {\r\n\r\n\t\techo '<div class=\"wrap\">';\r\n\t\tscreen_icon();\r\n\t\t$theme_name = function_exists( 'wp_get_theme' ) ? wp_get_theme() : get_current_theme();\r\n\t\techo '<h2>';\r\n\t\tprintf( __( '%s Theme Options' ), $theme_name );\r\n\t\techo '</h2>';\r\n\t\tsettings_errors();\r\n\r\n\t\techo '<form action=\"options.php\" method=\"post\">';\r\n\r\n\t\tsettings_fields( self::$options_name );\r\n\t\tdo_settings_sections( self::$page_basename );\r\n\t\tsubmit_button();\r\n\r\n\t\techo '</form></div>';\r\n\r\n\t}" ]
[ "0.7348721", "0.7018419", "0.70145", "0.692374", "0.69087005", "0.69057083", "0.68944955", "0.68663627", "0.68348455", "0.68204707", "0.6804591", "0.6794966", "0.67882633", "0.67872703", "0.67821205", "0.67757624", "0.6730712", "0.67268986", "0.6725107", "0.6690205", "0.6657837", "0.6654787", "0.66463774", "0.66440415", "0.6639002", "0.663694", "0.66352594", "0.66315407", "0.6627237", "0.6623336", "0.6615927", "0.6611971", "0.6609359", "0.66041195", "0.66009855", "0.659585", "0.65957433", "0.659354", "0.6588642", "0.65879065", "0.65865064", "0.65845364", "0.65732974", "0.6572839", "0.65714055", "0.6567005", "0.656265", "0.6551462", "0.654496", "0.654174", "0.65410125", "0.6540105", "0.65386915", "0.6530287", "0.6530282", "0.65275156", "0.6525255", "0.6522334", "0.65216184", "0.65167755", "0.651287", "0.6508351", "0.65016025", "0.6497946", "0.6491741", "0.64882904", "0.6486358", "0.6476057", "0.646743", "0.64651734", "0.6454764", "0.6453686", "0.6438427", "0.64339656", "0.64225316", "0.64211226", "0.6419027", "0.6412637", "0.64103615", "0.6408954", "0.6407621", "0.640668", "0.6405453", "0.6402626", "0.6400536", "0.6397452", "0.63973933", "0.63971305", "0.6394758", "0.63920546", "0.63880247", "0.63868755", "0.6381884", "0.63790077", "0.63782144", "0.63776326", "0.63767904", "0.6372326", "0.63701975", "0.6365868" ]
0.7307964
1
Generated from protobuf field string leader = 1;
Сгенерировано из поля protobuf string leader = 1;
public function setLeader($var) { GPBUtil::checkString($var, True); $this->leader = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setLeader($var)\n {\n GPBUtil::checkUint64($var);\n $this->leader = $var;\n }", "public function getLeader()\n {\n return $this->leader;\n }", "public function getLeader()\n {\n return $this->leader;\n }", "public function getFirstLeader()\n {\n return $this->first_leader;\n }", "public function getLeaderId() {\n return $this->leader_id;\n }", "public function setLeader($leader)\n\t{\n\t\t$this->leaderLabel->setText($leader);\n\t}", "public function setLeaderId($value) {\n $this->leader_id = $value;\n }", "public function getSecondLeader()\n {\n return $this->second_leader;\n }", "public function leader()\n {\n return $this->hasOne('App\\User', 'id', 'leader_id');\n }", "public function leader()\n {\n return $this->belongsTo('App\\Models\\Member', 'leader_id', 'id');\n }", "public function getIsLeader()\n {\n return $this->is_leader;\n }", "public function getLeader()\n\t{\n\t\t$lead_id = $this->getLeaderID();\n\t\tif (false === ($leader = Shadowrun4::getPlayerByPID($lead_id)))\n\t\t{\n\t\t\tif (false === ($leader = SR_Player::getByID($lead_id)))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn $leader;\n\t}", "public function setFirstLeader($first_leader)\n {\n $this->first_leader = $first_leader;\n\n return $this;\n }", "public static function getLeader($id) {\n // Get the student leaders cwid\n $cwid = StudentGroup::where('group_id', $id)->where('status', 'leader')->value('cwid');\n // Return their name\n return Student::getFirstName($cwid);\n }", "public function getGroupLeaderNameById($leaderId=null)\n {\n $model = ClassRegistry::init('BusinessOwner');\n $leader = \"\";\n if ($leaderId) {\n $leader = $model->find('first', array('fields' => array('BusinessOwner.fname,BusinessOwner.lname'), 'conditions' => array('BusinessOwner.user_id' => $leaderId)));\n return $leader['BusinessOwner']['fname'].' '.$leader['BusinessOwner']['lname'];\n } else {\n return $leader;\n }\n }", "public function getLeaderBoardAsString()\n {\n if (empty($this->users)) {\n return self::LEADERBOARD_IS_EMPTY;\n }\n\n $strLeaderBoard = '';\n\n foreach ($this->users as $index => $user) {\n if (array_key_exists($index, $places = self::EMOJI_OF_PRIZE_PLACES)) {\n $user->addPrefix($places[$index]);\n }\n\n $strLeaderBoard .= $user . $this->linesDelimiter;\n }\n\n return $strLeaderBoard;\n }", "public function getLeaderboard() {\n return $this->leaderboard;\n }", "public function getThirdLeader()\n {\n return $this->third_leader;\n }", "public function hasLeader() {\n return (bool) isset($this->leader_id);\n }", "public function adminSquadLeader($playerName)\n {\n $teamID = $this->getPlayerTeamID($playerName);\n $squadID = $this->getPlayerSquadID($playerName);\n\n return $this->_array2String($this->_clientRequest('squad.leader ' . $teamID . ' ' . $squadID . ' ' . $playerName),\n 0);\n }", "public function edit(Leader $leader)\n {\n //\n }", "public function leader()\n {\n return $this->belongsTo('\\App\\Profile', 'nim_ketua', 'nim');\n }", "public function IsYoungLeader()\r\n { if (($this->patrol->id??0) == -3) return true;\r\n return false;\r\n }", "public function _leader_name($leader_name)\n\t{\n\t\tif (preg_match(\"/^[a-z \\-\\.()]+$/i\", $leader_name)) \n\t\t{\t \t\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{ \n\t\t\treturn FALSE;\n\t\t}\n\t}", "function get_leaderboard_data($members, $leaderboard_id) {\n\tglobal $db;\n\t$score = -1;\n\t$scores = array();\n\n\t// using my id, then grabbing the scores for anyone in the group\n\t$player_spelunky_leaderboard = 'http://steamcommunity.com/stats/239350/leaderboards/' . $leaderboard_id . '/?xml=1&steamid=76561198000338942';\n\t$xml = file_get_contents($player_spelunky_leaderboard);\n\t$ob = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA);\n\t$json = json_encode($ob);\n\t$array = json_decode($json, true);\n\n\tif (!$array['entries']) return NULL;\n\n\t// get the player info\n\t$query = \"SELECT steamid, name, avatar, updated FROM spelunky_players\";\n\t$result = $db->query($query);\n\twhile ($row = $result->fetch_assoc()) {\n\t\t$database[$row['steamid']]['name'] = $row['name'];\n\t\t$database[$row['steamid']]['avatar'] = $row['avatar'];\n\t\t$database[$row['steamid']]['updated'] = $row['updated'];\n\t}\n\n\tforeach($array['entries']['entry'] as $key => $value) {\n\t\tif (in_array($value['steamid'],$members)) {\n\t\t\t$scores[$value['steamid']]['score'] = $value['score'];\n\n\t\t\t// Characters are stored as hex values, converting to decimal\n\t\t\t$scores[$value['steamid']]['character'] = hexdec(substr($value['details'], 0, 2));\n\n\t\t\t// Levels ares stored as hex values from 0-19, so convert them into what's shown on the leaderboards in-game\n\t\t\t$level = hexdec(substr($value['details'], 8, 2));\n\t\t\t$scores[$value['steamid']]['level'] = ceil($level / 4) . \"-\" . ($level % 4 == 0? 4 : ($level % 4));\n\n\t\t\t// do we know you?\n\t\t\tif (!$database[$value['steamid']]) { // also deal with if it was last updated X days ago\n\t\t\t\t$info = get_player_info($value['steamid']);\n\t\t\t\tupdate_player($info);\n\n\t\t\t\t$database[$value['steamid']]['name'] = $info['name'];\n\t\t\t\t$database[$value['steamid']]['avatar'] = $info['avatar'];\n\t\t\t}\n\n\t\t\t$scores[$value['steamid']]['name'] = $database[$value['steamid']]['name'];\n\t\t\t$scores[$value['steamid']]['avatar'] = $database[$value['steamid']]['avatar'];\n\t\t}\n\t}\n\n\n\t// IF THERE ARE PEOPLE IN THE GROUP NOT PRESENT, CHECK AGAIN?\n\treturn $scores;\n}", "function is_clan_leader($player_id) {\n\treturn (($clan = get_clan_by_player_id($player_id)) && $player_id == $clan->getLeaderID());\n}", "public function getClusterLeader() {\n return $this->hasOne('App\\User', 'id', 'cl_id');\n }", "function post_leaderboard() {\n}", "public function getGroupLeaderID() {\n return posix_getpgid( $this->id );\n }", "public function leaderBoard($players){\n\t\tif(is_array($players)){\n\t\t\t$players = implode(\",\", $players);\n\t\t}\n\t\t$url = $this->_api_url.$this->api_key.\"/leaderboard/\".$players;\n\t\t$data = ($this->_webRequest)? webRequest($url) : alternativeRequest($url);\n\t\tif(!is_object($data)){\n\t\t\t$data = str_chop_lines($data,1);\n\t\t\t$data = json_decode($data);\n\t\t}\n\t\tif(!isset($data->error) && !is_null($data) && $data !== false){\n\t\t\treturn $data;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function getTeamLeader() {\n return $this->hasOne('App\\User', 'id', 'tl_id');\n }", "public function getSessionLeaderID() {\n return posix_getsid( $this->id );\n }", "public function leaderRel() \n {\n return $this->belongsTo('Modules\\Agente\\Entities\\Agente','leader','id'); \n }", "public function setIsLeader($is_leader)\n {\n $this->is_leader = $is_leader;\n\n return $this;\n }", "public function getSkillNameLeaderShip()\n {\n return $this->getSkillName('LeaderShip');\n }", "public function setSecondLeader($second_leader)\n {\n $this->second_leader = $second_leader;\n\n return $this;\n }", "protected function readGroupLeaders() {\n\t\t$sql = \"SELECT\t\tleader.*,\n\t\t\t\t\tuser_table.username, usergroup.groupName,\n\t\t\t\t\tCASE WHEN user_table.username IS NOT NULL THEN user_table.username ELSE usergroup.groupName END AS name\n\t\t\tFROM \t\twcf\".WCF_N.\"_group_leader leader\n\t\t\tLEFT JOIN \twcf\".WCF_N.\"_user user_table\n\t\t\tON\t\t(user_table.userID = leader.leaderUserID)\n\t\t\tLEFT JOIN \twcf\".WCF_N.\"_group usergroup\n\t\t\tON\t\t(usergroup.groupID = leader.leaderGroupID)\n\t\t\tORDER BY \tname\";\n\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\tif (!isset($this->groupLeaders[$row['groupID']])) $this->groupLeaders[$row['groupID']] = array();\n\t\t\tif ($row['leaderUserID']) $this->groupLeaders[$row['groupID']][] = new User(null, $row);\n\t\t\telse $this->groupLeaders[$row['groupID']][] = new Group(null, $row);\n\t\t}\n\t}", "function findLeaders($array)\n{\n for ($i = 0; $i < count($array); $i++) {\n # once we get the number, we want to loop through the array again to get the next number\n for ($n = ($i + 1); $n < count($array); $n++) {\n # Check $i with $n and determine if it is a leader or not.\n if ($array[$i] < $array[$n]) {\n echo \"{$array[$i]} is not a leader \\n\";\n $notLeaders[] = $i;\n break;\n }\n }\n }\n print_r($notLeaders);\n}", "private function parse_leaderboard($csv_leaderboard) {\n\t\t$leaderboard = array();\n\t\t/*\n\t\t * Input format:\n\t\t * N,Description\n\t\t */\n\t\t$rows = str_getcsv($csv_leaderboard, \"\\n\");\n\t\tforeach ($rows as &$row) {\n\t\t\t$len = strlen($row);\n\t\t\tif ($len === 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$fields = str_getcsv($row);\n\t\t\t$leaderboard[] = $fields;\n\t\t}\n\t\treturn $leaderboard;\n\t}", "public function nextToken() \n {\n if (!parent::nextToken()) {\n return false;\n }\n\n switch ($this->type) {\n case 'name':\n switch ($this->token) {\n case \"void\":\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::VOID;\n break;\n case \"bool\":\n case \"boolean\":\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::BOOL;\n break;\n case \"int\":\n case \"integer\":\n case \"long\":\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::INT;\n break;\n case \"float\":\n case \"double\":\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::FLOAT;\n break;\n case \"string\":\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::STRING;\n break;\n case \"array\":\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::ARRAY_;\n break;\n case \"class\":\n case \"object\":\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::CLASS_;\n break;\n case \"resource\":\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::RESOURCE;\n break;\n case \"mixed\":\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::MIXED;\n break;\n case \"callback\":\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::CALLBACK;\n break;\n case \"stream\":\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::STREAM;\n break;\n case \"...\":\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::ELLIPSE;\n break;\n case \"true\":\n case \"TRUE\":\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::TRUE_;\n break;\n case \"false\":\n case \"FALSE\":\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::FALSE_;\n break;\n case \"null\":\n case \"NULL\":\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::NULL_;\n break;\n default:\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::NAME;\n break;\n }\n break;\n case 'numeric':\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::NUMVAL;\n break;\n case 'string':\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::STRVAL;\n break;\n case 'char':\n switch ($this->token) {\n case '=':\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::EQ;\n break;\n case ',':\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::COMMA;\n break;\n case ';':\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::SEMICOLON;\n break;\n case '(':\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::PAR_OPEN;\n break;\n case ')':\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::PAR_CLOSE;\n break;\n case '[':\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::SQUARE_OPEN;\n break;\n case ']':\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::SQUARE_CLOSE;\n break;\n case '&':\n case '@': // alternative char to avoid XML escaping\n $this->tokenId = CodeGen_PECL_Tools_ProtoParser::AMPERSAND;\n break;\n default: \n return PEAR::raiseError(\"invalid character '{$this->token}' in prototype\");\n \n }\n break;\n default:\n // invalid token type\n return PEAR::raiseError(\"invalid token '{$this->token}' in prototype\");\n break;\n }\n\n return true;\n }", "function getLeader($user_id){\n\t\tif (isset($user_id) and is_numeric($user_id)){\n\t\t\t/**\n\t\t\t * @var CI_DB_result $query\n\t\t\t */\n\t\t\t$query = $this->db\n\t\t\t\t->select('ldr.*')\n\t\t\t\t->from('users u')\n\t\t\t\t->join('users ldr', 'u.leader=ldr.person_id')\n\t\t\t\t->where('u.leader IS NOT NULL')\n\t\t\t\t->where('ldr.person_id IS NOT NULL')\n\t\t\t\t->where('u.user_id', $user_id)\n\t\t\t\t->get();\n\n\t\t\tif ($query and ($query->num_rows() > 0)){\n\t\t\t\treturn $query->row_array();\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "function is_group_leader( $user ) {\n\t\tif ( function_exists( '_deprecated_function' ) ) {\n\t\t\t_deprecated_function( __FUNCTION__, '2.3.0', 'learndash_is_group_leader_user()' );\n\t\t}\n\n\t\treturn learndash_is_group_leader_user( $user );\n\t}", "function get_leaderboard($date = FALSE) {\n\tglobal $db;\n\n\tif (!$date) $date = date('m/d/Y');\n\telse $date = date(\"m/d/Y\",strtotime($date));\n\t$today = date(\"m/d/Y\",strtotime($date)) . ' DAILY';\n\t$leaderboard = '';\n\n\t$url = 'http://steamcommunity.com/stats/239350/leaderboards/?xml=1';\n\n\t$xml = file_get_contents($url);\n\t$ob = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA);\n\t$json = json_encode($ob);\n\t$array = json_decode($json, true);\n\n\tforeach($array['leaderboard'] as $key => $value) {\n\t\tif ($value['name'] == $today) {\n\t\t\t$leaderboard = $value['lbid'];\n\t\t}\n\t}\n\n\tif ($leaderboard) {\n\t\t$query = \"SELECT date FROM spelunky_games WHERE leaderboard_id=\" . $leaderboard;\n\t\t$result = $db->query($query);\n\t\t$row = $result->fetch_assoc();\n\n\t\t// this is the first time we've loaded this leaderboard\n\t\t// it will save the id even if there are no scores, yes. \n\t\t// and we have to check again to see if we've posted the geeklist item\n\t\t// (which we DO only do if there are scores). it's not perfect, but\n\t\t// if we don't do it here the date is kind of a pain to pass in.\n\t\tif (!$row) {\n\t\t\t$query = \"INSERT INTO spelunky_games(leaderboard_id, date) VALUES(\" . $leaderboard . \", '\" . date(\"Y-m-d\",strtotime($date)) . \"')\";\n\t\t\t$db->query($query);\n\t\t}\n\t}\n\n\treturn $leaderboard;\n}", "public function getIsInvestLeader()\n {\n return $this->is_invest_leader;\n }", "public function leaderboard() {\n \n Log::debug(\"leaderboard\");\n \n $players = Player::all();\n \n // sort all players by wins and losses\n $sortedPlayers = $players->sort(function (Player $player1, Player $player2) {\n if ( $player1->wins() > $player2->wins() ) {\n return -1;\n } elseif ( $player1->wins() < $player2->wins() ) {\n return 1;\n } elseif ( $player1->wins() == $player2->wins() ) {\n if ( $player1->losses() < $player2->losses() ) {\n return -1;\n } elseif ( $player1->losses() > $player2->losses() ) {\n return 1;\n } elseif ( $player1->losses() == $player2->losses() ) {\n return 0;\n }\n }\n return 0;\n });\n \n // add rank to display on leaderboard\n $rank = 1;\n foreach($sortedPlayers as $player) {\n $player->setRank($rank);\n $rank++;\n }\n\n return view('players.leaderboard', ['players' => $sortedPlayers]);\n \n }", "function reCountLeaderboards() {\n\t\t$this->autoRender = false;\n\t\t$this->loadModel(\"User\");\n\n\t\t$queryReCount = \"\n\t\tcreate temporary table tmp_leaderboards (rank integer primary key auto_increment, passcode VARCHAR(10), points integer)\n\t\tselect passcode, points from users order by points desc;\n\n\t\tdelete from leaderboards;\n\t\tinsert into leaderboards (rank, passcode, points)\n\t\t select rank, passcode, points from tmp_leaderboards;\n\n\t\tdrop table tmp_leaderboards;\";\n\n\t\t$this->User->query($queryReCount);\n\n\t}", "function getSupremeLeaderNameEmail()\n {\n $accAuthority = new AccAuthority();\n $buf = $this->getStaffList(false, $accAuthority->getAccAuthority(\"最高權限\"));\n foreach ($buf as $row) {\n $name = $row[\"desknum\"] . ' ' . $row[\"eName\"] . ' ' . $row[\"eLastName\"] . \" / QA Transport\";\n $email = $row[\"email\"];\n break;\n }\n return $name . \"_\" . $email;\n }", "public function delete($leader_id)\n\t{\n\t\t$this->leaderModel->delete_leader($leader_id);\n\t\tflashdata(lang('deleted_leader'));\n\t\tredirect($this->agent->referrer(), 'refresh');\n\t}", "public function scopeLeader($query, bool $leader)\n {\n $query->where('isLeader', $leader);\n }", "public static function getLeaderboard() {\n\n $dbPDOConnection = Database\\DBConnection::getPDOInstance();\n $selectStatement = $dbPDOConnection->query(\n \"SELECT u.username, FORMAT(SUM(weekpointstotal), 2) AS total FROM userweeklyscores uws, users u \".\n \"WHERE uws.userid = u.id \".\n \"GROUP BY username \".\n \"ORDER BY FORMAT(SUM(weekpointstotal), 2) ASC\");\n\n $leaderboard = array();\n while ($row = $selectStatement->fetch()) {\n $row[0]; // total points\n $row[1]; // username\n\n $leaderboard[$row[1]] = $row[0];\n }\n\n return $leaderboard;\n }", "public function addFriend(){\n \n return \"$this->username added a new friend \";\n\n }", "public function add_friend()\n {\n return \"$this->username added a new friend\";\n }", "public function first(): string\n {\n return $this->names[0];\n }", "public function getPlayerOne()\n {\n return $this->player_one;\n }", "public function getLeaderboard() {\n $leaders = \\p4\\User::orderBy('points','desc')->get();\n return view('more.leaderboard')->with('leaders',$leaders);\n }", "public function sendFirstJoinMessages(Player $player){\n\t}", "public function sendFirstJoinMessages(Player $player){\n\t}", "public static final function initializePlayer(Player $player): void {\n $rankFactory = Essentials::getRankFactory();\n\n if ($rankFactory->getPlayerRank($player->getName()) === null) {\n $rankFactory->setPlayerRank($player->getName());\n\n Essentials::getInstance()->getLogger()->info('Creating rank data for ' . $player->getName() . ' with default rank.');\n }\n\n $rank = $rankFactory->getPlayerRank($player->getName());\n\n $rankString = Essentials::getDefaultScoreboardFormat();\n\n if ($rank !== null && !$rank->isDefault()) $rankString = $rank->getFormat();\n\n Utils::setLines([$player], [\n 12 => '',\n 11 => ' Rango: ' . $rankString,\n 10 => ' Conexión: &a' . $player->getPing(),\n 9 => '',\n 8 => ' Baúles: &a10000',\n 7 => ' Polvo Misterioso: &a100000',\n 6 => '',\n 5 => ' Lobby: &e#' . Essentials::getServerId(),\n 4 => ' Conectados: &a' . count(Server::getInstance()->getOnlinePlayers()),\n 3 => '',\n 2 => '&e mc.onlymc.us'\n ]);\n }", "public function testCreatingAClubWithDuplicateLeaderId()\n {\n $club = factory(Club::class)->create();\n\n $this->actingAsAdmin()\n ->postJson('clubs', [\n 'name' => $this->faker->company,\n 'leader_id' => $club->leaderId,\n ])\n ->assertJsonValidationErrors(['leader_id']);\n }", "function checkleader($db, $login){\n \n $group = \"SELECT GroupID FROM STUDENT WHERE '$login' = Login\";\n $q1 = $db->query($group);\n $row1 = $q1->fetch();\n $gID = $row1['GroupID']; \n \n $check = \"SELECT LeaderID FROM ROOM_GROUP WHERE GroupID = '$gID';\";\n $q2 = $db->query($check);\n $row2 = $q2->fetch();\n $leader_ID = $row2['LeaderID'];\n \n $s_id = \"SELECT ID FROM STUDENT WHERE '$login' = Login;\";\n $q3 = $db->query($s_id);\n $row3 = $q3->fetch();\n $iD = $row3['ID'];\n\n if($q1 != false && $q2 != false && $q3 != false){\n if($iD == $leader_ID){\n return 1; \n }\n else{\n return -1;\n }\n }\n else{\n return false;\n }\n}", "public function addFriend(){\n\n\n return \"$this->username\";\n }", "public function scoreLetter(): string\n {\n return $this->scoreLetter;\n }", "public function getBookmarkSeniorPlayerNumber()\n {\n $xpath = new \\DOMXPath($this->getXml());\n return $xpath->query('//BookmarkTypeID[.=\"' . Config\\Config::BOOKMARK_SENIOR_PLAYER . '\"]')->length;\n }", "function testAddLeaderboard() {\n //=========================================\n\n // To verify number of winner is invalid\n $numberInvalid = array( null, 'abc', -1, 0);\n\n foreach ($numberInvalid as $key => $value) {\n \n $testResultFirst = $this->leaderboard->add( $value );\n\n if ( is_array( $testResultFirst ) && isset( $testResultFirst['message'] ) ) {\n\n // To verify number must be is numberic and greater than zero\n $this->assertContains( $testResultFirst['message'], 'Number Of Winners must is a numeric and greater than zero', 'To verify number must be is numberic and greater than zero' );\n } \n \n }\n\n // To verify leaderboard create is valid\n // ========================================\n $numberOfWinner = 5;\n\n $testResultSecond = $this->leaderboard->add( $numberOfWinner );\n\n if ( is_array( $testResultSecond ) && isset( $testResultSecond['leaderBoards'] ) ) {\n\n // To verify leaderboard create must be equal number of winner input\n $this->assertEquals( sizeof($testResultSecond['leaderBoards']), $numberOfWinner, 'To verivy leaderboard create must be equal number of winner input');\n\n foreach ( $testResultSecond['leaderBoards'] as $key => $value ) {\n\n // To verify all value return on leaderboard is null\n $this->assertEquals( $value->id, ($key + 1), 'To verify Id return is valid' );\n\n // To verify leaderBoad id null\n $this->assertEmpty( $value->leaderboardId, 'To verify leaderboardId return is valid' ); \n \n // To verify imageURL id null\n $this->assertEmpty( $value->imageURL, 'To verify imageURL return is valid' );\n \n // To verify location id null\n $this->assertEmpty( $value->location, 'To verify location return is valid' );\n \n // To verify screenName id null\n $this->assertEmpty( $value->screenName, 'To verify screenName return is valid' );\n \n // To verify prize id null\n $this->assertEmpty( $value->prize, 'To verify prize return is valid' );\n \n }\n \n }\n\n }", "public function getFollowersText()\n {\n \tif($this->users()->count() == 1)\n \t{\n \t\treturn 'follower';\n \t}\n\n \treturn 'followers';\n }", "public function getListUserByLeader(){\n \n $res = array();\n \n User::getAllCapduoi($res, $this->user_id, $this->company_id);\n\n if(!in_array($this->user_id, $res)){\n $res[] = $this->user_id; \n }\n \n $user_list = array();\n \n \n sort($res);\n \n foreach ($res as $key => $u) {\n $user_list[] = User::getByID($u, $this->company_id);\n }\n \n return $user_list;\n }", "function showLadder()\n{\n global $game;\n \n if ($game->roundFinished)\n {\n if (count($game->records) > 0)\n {\n for($i = 0; $i < count($game->records); $i++)\n {\n $prev = $next = null;\n $current = $game->records[$i];\n $player = getPlayer($current->name);\n \n // check if a record exists before the current one\n if (($i - 1) >= 0)\n {\n $prev = $game->records[$i - 1];\n if ($prev && $player)\n {\n cpm($player->screen_name, \"zombie_challenge_prev_rank\");\n }\n }\n \n if ($current && $player)\n {\n cpm($player->screen_name, \"zombie_challenge_current_rank\");\n }\n \n // check if a record exists after the current one\n if (($i + 1) < count($game->records))\n {\n $next = $game->records[$i - 1];\n if ($next && $player)\n {\n cpm($player->screen_name, \"zombie_challenge_next_rank\");\n }\n }\n }\n }\n }\n else\n {\n \n }\n}", "private function announcePacket($challenge_packet){\n // schemata of interest\n $schema = $this->getPacketSchema($challenge_packet);\n $packet_name = \"\";\n\n // normalize the packet\n $challenge_packet = $this->buildStandard3LengthPacket($challenge_packet);\n\n switch((string)$schema){\n // 000, ZZZ\n case self::CHALLENGE_PACKET_SCHEMA_ZZZ:\n $packet_name = $this->ZZZSchemaReader($challenge_packet);\n break;\n // 001 ones, 'ZZN'\n case self::CHALLENGE_PACKET_SCHEMA_ZZN:\n $packet_name = $this->ZZNSchemaReader($challenge_packet);\n break;\n // 010,020,030,040,050,060,070,080,090, 'ZNZ'\n case self::CHALLENGE_PACKET_SCHEMA_ZNZ:\n $packet_name = $this->ZNZSchemaReader($challenge_packet);\n break;\n // 099,015,070 usual two digit, teens and tens ,'ZNN'\n case self::CHALLENGE_PACKET_SCHEMA_ZNN:\n $packet_name = $this->ZNNSchemaReader($challenge_packet);\n break;\n // 789 usual 3 digit non zero anywhere packet,'NNN'\n case self::CHALLENGE_PACKET_SCHEMA_NNN:\n $packet_name = $this->NNNSchemaReader($challenge_packet);\n break;\n // 770 , hundreds and tens , 'NNZ'\n case self::CHALLENGE_PACKET_SCHEMA_NNZ :\n $packet_name = $this->NNZSchemaReader($challenge_packet);\n break;\n // 700 , hundreds only\n case self::CHALLENGE_PACKET_SCHEMA_NZZ:\n $packet_name = $this->NZZSchemaReader($challenge_packet);\n break;\n // 707 , hundreds and ones\n default :\n // NZN\n $packet_name = $this->NZNSchemaReader($challenge_packet);\n break;\n\n } // close switch\n\n\n //echo $packet_name;\n return $packet_name;\n\n\n }", "function get_leader_id_by_user_id($id_user, $c) {\n $sql = (\"SELECT id_dirigeants FROM dirigeants WHERE id_utilisateurs ='$id_user'\");\n $result = mysqli_query($c,$sql);\n if($row = mysqli_fetch_row($result)){\n $id_leader = $row[0];\n }\n if(isset($id_leader)){\n return $id_leader;\n }\n else{\n return null;\n }\n}", "public function addPlayer(\\utilpb\\PbMemberInfo $value){\r\n return $this->_add(1, $value);\r\n }", "public function getFirstTurn() {\n\t\t$turn = elgg_get_annotations(array(\n\t\t\t'guid' => $this->guid,\n\t\t\t'metastring_names' => 'pool_turn',\n\t\t\t'order_by' => 'v.string asc',\n\t\t\t'limit' => 1,\n\t\t));\n\n\t\treturn $turn[0];\n\t}", "public function chatMsgBonus($partnerMember,$textMsg) { \n \n $memBig = ID_HAAMBLE_USER;\n $partnerBig = $partnerMember;\n $text = $textMsg;\n $relId = null;\n $checkinBig = null;\n $xfoto = null;\n //$pollo=$this->api['photo']; \n $newerThan = null;\n \n /*\n * Check if user is not in partners ignore list Find checkins -> because of status and checkin big Find ,potentially create member_rel If users are not checked in at the same place, they have to have a memberRel record (chat started based on previous conversation) Save to DB\n */\n \n // Check if user is not on partners ignore list\n $isIgnored = $this->ChatMessage->Sender->MemberSetting->isOnIgnoreListDual ( $partnerBig, $memBig );\n if ($isIgnored) {\n $this->_apiEr ( __('Non posso inviare il messaggio chat. L\\'utente è stato bloccato.'), false, false, array (\n 'error_code' => '510' \n ) );\n }\n \n // Find valid checkin for member and partner\n //$memCheckin = $this->ChatMessage->Checkin->getCheckedinEventFor ( $memBig, TRUE );\n \n //$partnerCheckin = $this->ChatMessage->Checkin->getCheckedinEventFor ( $partnerBig, TRUE );\n \n // Find relationship in member_rels table\n $memRel = $this->ChatMessage->MemberRel->findRelationships ( $memBig, $partnerBig );\n \n //$frieRel = $this->Friend->FriendsRelationship ( $memBig, $partnerBig, 'A' );\n \n if (empty ( $memRel )) {\n // Create a new one\n $relationship = array (\n 'member1_big' => $memBig,\n 'member2_big' => $partnerBig \n );\n $this->ChatMessage->MemberRel->create();\n $this->ChatMessage->MemberRel->set( $relationship );\n try {\n $memRel = $this->ChatMessage->MemberRel->save();\n $relId = $memRel ['MemberRel'] ['id'];\n \n } catch ( Exception $e ) {\n $this->_apiEr ( __('Errore. Relazione non creata.') );\n }\n } else {\n $relId = $memRel ['MemberRel'] ['id'];\n }\n \n // Create chat message record\n $message = array (\n 'rel_id' => $relId,\n 'from_big' => $memBig,\n 'to_big' => $partnerBig,\n 'checkin_big' => $checkinBig,\n 'text' => $text,\n 'from_status' => 1, // from status = 1 (not deleted)\n 'to_status' => 1, // tp status = 1 (not deleted)\n 'created' => 'NOW()',\n 'status' => 1 \n // 'photo' => $hasphoto,\n );\n \n // $this->Model->getLastInsertId();\n $this->ChatMessage->create();\n $this->ChatMessage->set( $message );\n $msgId = null;\n $chatMsg = null;\n try {\n $res = $this->ChatMessage->save ();\n $result = ($res) ? true : false;\n /* $this->log(\"-------ChatMessages CONTROLLER-api_receive-----\");\n $this->log(\"id messaggio inserito = \".serialize($res[ChatMessage][id]));\n $this->log(\"--------------close api_receive----------------\");\n */ \n $msgId = $res ['ChatMessage'] ['id'];\n $pars = array (\n 'conditions' => array (\n 'ChatMessage.id' => $msgId \n ),\n 'fields' => array (\n 'ChatMessage.id',\n 'ChatMessage.rel_id',\n 'ChatMessage.created' \n ),\n 'recursive' => - 1 \n );\n \n \n $chatMsg = $this->ChatMessage->find ( 'first', $pars );\n \n \n } catch ( Exception $e ) {\n $this->_apiEr ( __('Errore. Messaggio non creato.') );\n }\n //$this->log(\"link photo = $photolink\");\n $this->ChatCache->write ( $partnerBig . '_last_msg', strtotime ( $chatMsg ['ChatMessage'] ['created'] ) );\n \n // Determine number of unread messages\n $unreadCount = $this->ChatMessage->getUnreadMsgCount ( $partnerBig );\n // debug($unreadCount);\n \n // Send push notifications\n $privacySettings=$this->PrivacySetting->getPrivacySettings($partnerBig);\n $privacySettings=$privacySettings[0]['PrivacySetting'];\n $notifyChatMessages=$privacySettings['notifychatmessages'];\n \n $goonPrivacy=true;\n $this->log(\"-------chatmessages----------\");\n $this->log(\"Settings \".serialize($privacySettings));\n $this->log(\"notifychatmessages \".intval($notifyChatMessages));\n if (count($privacySettings)>0)\n {\n if ($notifyChatMessages == 0)\n {\n $goonPrivacy=false;\n }\n }\n $this->log(\"goonPrivacy \".intval($goonPrivacy));\n if ($goonPrivacy)\n {\n $strLen = 50;\n \n $name = 'Haamble';\n \n $msg = (strlen ( $text ) > $strLen + 4) ? substr ( $text, 0, $strLen ) . ($text [$strLen + 1] == ' ' ? ' ...' : '...') : $text;\n $this->PushToken->sendNotification ( $name, $msg, array (\n 'partner_big' => $memBig,\n 'created' => $chatMsg ['ChatMessage'] ['created'],\n 'rel_id' => $chatMsg ['ChatMessage'] ['rel_id'],\n 'msg_id' => $chatMsg ['ChatMessage'] ['id'],\n // 'timestamp' => time(),\n 'unread' => $unreadCount \n ), array (\n $partnerBig \n ), 'chat', 'new' );\n \n }\n // return chat messages like in the receive call with refresh enabled\n $newMsgs = $this->ChatMessage->findConversations ( $memBig, $partnerBig, null, $newerThan, 0, true );\n \n // Mark mesaages as read\n if (! empty ( $newMsgs ['chat_messages'] )) {\n $updated = $this->ChatMessage->markAsRead ( $memBig, $partnerBig );\n if (! $updated)\n CakeLog::warning ( 'Messages not marked as read. Membig ' . $memBig . ' Partner big ' . $partnerBig );\n /* $this->log(\"-------ChatMessages CONTROLLER-api_send-----\");\n $this->log(\"updated = $updated \");\n $this->log(\"WWWROOT =\".WWW_ROOT);\n $this->log(\"--------------close api_send----------------\");*/\n }\n \n $newMsgs['chat_messages'][count($newMsgs['chat_messages'])-1]['photo']=$this->FileUrl->chatmsg_picture($msgId);\n //print_r($newMsgs);\n /*if ($result !== false) {\n $this->Util->transform_name ( $chatMsg );\n $this->Util->transform_name ( $newMsgs );\n $this->_apiOk ( $chatMsg );\n $this->_apiOk ( $newMsgs );\n \n \n } else {\n $this->_apiEr ( __('Error occured. Message not sent.') );\n }\n */\n }", "function build_team_leaderboard($people_data, $team_data){\n\t$position = 1;\n\tforeach($team_data as $team){\n\t\t?>\n\t\t<section class=\"leader <?php if($team[\"yourteam\"]){ echo \"your-team\";} ?>\">\n\t\t\t<div class=\"highlight-area\">\n\t\t\t<a class=\"team-hide-show\" href=\"#<?php echo $team[\"id\"] ?>\">\n\t\t\t\t<p class=\"pix-stat-number position\">\n\t\t\t\t<?php\n\t\t\t\techo $position++ . \"</p>\";\n\t\t\t\techo \"<img src=\\\"\" . $team[\"image\"] . \"\\\">\";\n\t\t\t\techo \"<div class='left'><p class='pix-stat-title-big'>\" . $team[\"name\"];\n\t\t\t\techo \"</p>\";\n\t\t\t\techo \"<p class='pix-stat-label-small members-detail'>\" . $team[\"members\"] . \" members</p>\";\n\t\t\t\techo \"</div>\";\n\t\t\t\t?>\n\t\t\t\t<div class=\"miles\">\n\t\t\t\t\t\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<span class='pix-stat-number'><?php echo $team[\"avgtrips\"]; ?></span>\n\t\t\t\t\t\t<span class='pix-stat-label'>avg trips</span>\n\t\t\t\t\t</p>\n\t\t\t\t\t<p class='pix-stat-label-small'>\n\t\t\t\t\t\t<?php echo $team[\"miles\"]; ?> mi\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</a>\n\t\t\t</div>\n\t\t\t<div id=\"<?php echo $team[\"id\"] ?>\" class=\"team-members-section\">\n\t\t\t\t<?php create_people_list_for_team($people_data, $team); ?>\n\t\t\t</div>\n\t\t</section>\n\t<?php\n\t}\n}", "private function checkUserIsLeader(Player $player)\n {\n // first checking if player has a team\n if (false === $player->hasTeam()) {\n throw new \\Exception(\"The player has no team\");\n }\n\n // final checking\n return $player->getTeam()->getLeader()->getUsername() === $player->getUsername();\n }", "function echoLeaderboard($db){\n try{\n $statement = $db->query('SELECT * FROM user ORDER BY best_score DESC');\n $users = $statement->fetchAll(PDO::FETCH_CLASS, 'User');\n }\n catch (PDOException $exception){\n error_log('Request error: '.$exception->getMessage());\n return false;\n }\n foreach ($users as $key => $value) {\n if ($key>24) {//A maximum of 25 users are shown\n break;\n }\n echo '<tr>\n <td>Numéro '.($key+1).'</td>\n <td>'.$value->getLogin().'</td>';\n if (NULL != $value->getBestScore()) {//If the user has a high score\n echo '<td>'.$value->getBestScore().' pts</td>\n <td>\n <a href=\"mainmenu.php?gameId='.$value->getBestGameId().'\">Partie n°'.$value->getBestGameId().'</a>\n </td>\n </tr>';\n // Anyone can click on the game number to challenge the user\n }\n else{\n echo '<td></td>\n <td></td>\n </tr>';\n }\n }\n}", "function informLeaderAboutMembershipChange($groupId, $pId, $changeType, $additionalText = false) {\n global $base_url, $user;\n $mt = getGroupMemberTypes();\n\n // Get involved person (pId) and all Leaders in Group\n $res = db_query(\"\n SELECT p.name, p.vorname, p.spitzname, p.email, p.id p_id, p.lastlogin, gp.id gp_id, gpg.status_no, g.bezeichnung,\n DATE_FORMAT(gpg.letzteaenderung, '%d.%m.%Y') letzteaenderung, cmsuserid, gpg.comment\n FROM {cdb_person} p, {cdb_gemeindeperson} gp, {cdb_gemeindeperson_gruppe} gpg, {cdb_gruppe} g\n WHERE p.id=gp.person_id AND gp.id=gpg.gemeindeperson_id AND g.id=gpg.gruppe_id\n AND gpg.gruppe_id=:groupId AND\n (p.id = :pId OR (NOT ISNULL(p.lastlogin) AND gpg.status_no BETWEEN 1 AND 3 AND p.email > ''))\",\n array(':pId' => $pId, ':groupId' => $groupId)\n );\n foreach ($res as $p) $persons[$p->p_id] = $p;\n foreach ($persons as $p) {\n // if person had logged in in the past and is one of leader(1), coleader(2) or supervisor(3)\n // and it was not changed by current user\n // and if delete a person, the person himselves should not be informed about his deletion!\n if (!empty($p->lastlogin) && $p->status_no >= 1 && $p->status_no <= 3 && $p->p_id != $user->id\n && ($changeType!=\"delete\" || $p->p_id != $pId)) {\n $data = array(\n 'title' => $mt[$p->status_no][\"bezeichnung\"],\n 'userIsSupervisor' => $p->status_no == 3,\n 'groupName' => $p->bezeichnung,\n 'memberType' => $mt[$persons[$pId]->status_no][\"bezeichnung\"],\n 'member' => $persons[$pId],\n 'changeType' => $changeType,\n 'additionalText' => $additionalText,\n 'gotoMemberUrl' => $base_url. '?q=churchdb#PersonView/searchEntry:' . $pId,\n );\n\n $lang = getUserLanguage($pId);\n $content = getTemplateContent('email/groupMemberChange', 'churchdb', $data, null, $lang);\n churchdb_send_mail(\"[\". getConf('site_name'). \"] \" . t2($lang, 'change.in.group.x', $p->bezeichnung), $content, $p->email);\n }\n }\n}", "public static function getRelationName(): Name\n {\n return new Name('producer position');\n }", "protected function teaserHeadline() {\n $words = $this->getWords();\n if ($this->VerifierUsername!=\"\") {\n echo $words->getFormatted(\"verifymembers_verifiedbynb\",count($this->list),\"<a href=\\\"members/\".$this->VerifierUsername.\"\\\">\".$this->VerifierUsername.\"</a>\") ;\n }\n if ($this->VerifiedUsername!=\"\") {\n echo count($this->list),\" have been verified by \",$this->VerifiedUsername ;\n }\n }", "public function setThirdLeader($third_leader)\n {\n $this->third_leader = $third_leader;\n\n return $this;\n }", "function get_next_member($member)\n\t{\n\t\t$tempid=$this->connection->query_value_null_ok_full('SELECT userid FROM '.$this->connection->get_table_prefix().'users WHERE userid>'.strval((integer)$member).' ORDER BY userid');\n\t\treturn $tempid;\n\t}", "function setFollower($username, $followerName) {\n\t\tself::query(\"INSERT INTO followers VALUES ('\".$username.\"','\".$followerName.\"')\");\n\t}", "public function destroy(Leader $leader)\n {\n //\n $leader->delete();\n $response = [\n 'data' => $leader,\n 'message' => 'Dirigente apagado',\n 'result' => 'ok'\n ];\n //return response($response, 200);\n return redirect('/list_leaders');\n }", "public function labelWithScore(): string\n {\n return \"`{$this->topTeam->country}` vs `{$this->bottomTeam->country}`\" .\n \" ({$this->top_team_score}:{$this->bottom_team_score})\";\n }", "public static function stablefordPoint($score) {\n\t\t$points = self::getStablefordPoints();\n\t\treturn in_array($score, array_keys($points)) ? $points[$score] : 0;\n\t}", "private function getRemenberToken():string\n {\n return str_random(self::TOKEN_LENGTH);\n }", "public function toString(){\r\n echo $playerNum . $firstName . $lastName . $position . $bats . $throw . $age . $height . $weight . $birthPlace;\r\n }", "function get_group_leader_uid($gid){\n\n $sql = db_select('users', 'u');\n\n $sql->fields('u', array('uid'));\n $sql->fields('gm', array('mid'));\n $sql->fields('gmr', array('role'));\n\n $sql->innerJoin('group_membership', 'gm', 'gm.uid = u.uid');\n $sql->innerJoin('group_membership_role', 'gmr', 'gmr.mid = gm.mid');\n $sql->innerJoin('groups', 'g', 'g.gid = gm.gid');\n\n $sql->condition('gmr.role', 'country_group_leader', '=');\n $sql->condition('g.gid', $gid, '=');\n\n $results = $sql->execute()->fetchAll();\n if(empty($results)){\n $sql = db_select('users', 'u');\n\n $sql->fields('u', array('uid'));\n $sql->fields('gm', array('mid'));\n $sql->fields('gmr', array('role'));\n\n $sql->innerJoin('group_membership', 'gm', 'gm.uid = u.uid');\n $sql->innerJoin('group_membership_role', 'gmr', 'gmr.mid = gm.mid');\n $sql->innerJoin('groups', 'g', 'g.gid = gm.gid');\n\n $sql->condition('gmr.role', 'workgroup_leader', '=');\n $sql->condition('g.gid', $gid, '=');\n\n $results = $sql->Execute()->fetchAll();\n\n }\n foreach ($results as $key => $value) {\n $default_uid = $value->uid;\n }\n\n if(!is_null($default_uid)){\n\n return $default_uid;\n }\n}", "public function getPlayerName()\n {\n return $this->getText();\n }", "public function follower_count() {\n\t\treturn $this->redis()->sCard(\"graph:user:{$this->id}:followed_by\");\n\t}", "public function stNextPlayer()\n {\n $pId = self::activeNextPlayer();\n self::giveExtraTime($pId);\n if (self::getGamestateValue(\"firstPlayer\") == $pId) {\n $n = (int) self::getGamestateValue('actionCounter') + 1;\n $actionPerTurn = Players::count() == 2? 3 : 2;\n if($n == $actionPerTurn){\n $m = (int) self::getGamestateValue('currentRound') + 1;\n self::setGamestateValue(\"currentRound\", $m);\n $n = 0;\n\n $field = Fields::new();\n Notifications::newField($field);\n }\n self::setGamestateValue(\"actionCounter\", $n);\n }\n\n $this->gamestate->nextState('start');\n }", "function get_next_member($member)\n\t{\n\t\t$tempid=$this->connection->query_value_null_ok_full('SELECT id_member FROM '.$this->connection->get_table_prefix().'members WHERE id_member>'.strval((integer)$member).' ORDER BY id_member');\n\t\treturn $tempid;\n\t}", "public function leader($user_id)\n\t{\n\t\tif (!correct_user($user_id)) return;\n\n\t\t$experiments = $this->leaderModel->get_experiments_by_leader($user_id);\n\n\t\t$data['page_title'] = lang('experiments');\n\t\t$data['table'] = create_experiment_table($experiments);\n\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('templates/list_view', $data);\n\t\t$this->load->view('templates/footer');\n\t}", "public function getWinnerName(){\n return $this->winnerName;\n }", "public function getLeaderBoardRankByUserAndTournament($userId, $tournament) {\n\n\t\t$query =\n\t\t\t'SELECT\n\t\t\t\tu.id,\n\t\t\t\tu.name,\n\t\t\t\tu.username,\n\t\t\t\tl1.currency,\n\t\t\t\tl1.turned_over,\n\t\t\t\tcount(l2.currency) as rank,\n\t\t\t\t1 as qualified\n\t\t\tFROM\n\t\t\t\ttbdb_tournament_leaderboard as l1\n\t\t\tINNER JOIN\n\t\t\t\ttbdb_tournament_leaderboard as l2 ON l1.currency < l2.currency\n\t\t\tOR\n\t\t\t\t(l1.currency = l2.currency AND l1.user_id = l2.user_id)\n\t\t\tINNER JOIN\n\t\t\t\ttbdb_users AS u\n\t\t\tON\n\t\t\t\tl1.user_id = u.id\n\t\t\tWHERE\n\t\t\t\tl2.tournament_id = \"' . $tournament->id . '\"\n\t\t\tAND\n\t\t\t\tl1.tournament_id = \"' . $tournament->id . '\"\n\t\t\tAND\n\t\t\t\tl1.turned_over >= \"' . $tournament->start_currency . '\"\n\t\t\tAND\n\t\t\t\tl2.turned_over >= \"' . $tournament->start_currency . '\"\n\t\t\tAND\n\t\t\t\tl1.currency > 0\n\t\t\tAND\n\t\t\t\tu.id = \"' . $userId . '\"\n\t\t\tGROUP BY\n\t\t\t\tl1.user_id,\n\t\t\t\tl1.currency\n\t\t\tUNION SELECT\n\t\t\t\tu.id,\n\t\t\t\tu.name,\n\t\t\t\tu.username,\n\t\t\t\tl1.currency,\n\t\t\t\tl1.turned_over,\n\t\t\t\t\"-\" as rank,\n\t\t\t\t0 as qualified\n\t\t\tFROM\n\t\t\t\ttbdb_tournament_leaderboard as l1\n\t\t\tINNER JOIN\n\t\t\t\ttbdb_tournament_leaderboard as l2\n\t\t\tON\n\t\t\t\tl1.currency < l2.currency\n\t\t\tOR\n\t\t\t\t(l1.currency = l2.currency AND l1.user_id = l2.user_id)\n\t\t\tINNER JOIN\n\t\t\t\ttbdb_users AS u\n\t\t\tON\n\t\t\t\tl1.user_id = u.id\n\t\t\tWHERE\n\t\t\t\tl2.tournament_id = \"' . $tournament->id . '\"\n\t\t\tAND\n\t\t\t\tl1.tournament_id = \"' . $tournament->id . '\"\n\t\t\tAND\n\t\t\t\t(\n\t\t\t\t\tl1.currency = 0\n\t\t\t\tOR\n\t\t\t\t\t(\n\t\t\t\t\t\tl1.turned_over < \"' . $tournament->start_currency . '\"\n\t\t\t\t\tAND\n\t\t\t\t\t\tl2.turned_over < \"' . $tournament->start_currency . '\"\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\tAND\n\t\t\t\tu.id = \"' . $userId . '\"\n\t\t\tGROUP BY\n\t\t\t\tqualified,\n\t\t\t\tl1.user_id,\n\t\t\t\tl1.currency\n\t\t\tORDER BY\n\t\t\t\tqualified DESC,\n\t\t\t\tcurrency DESC';\n\n\t\t$result = \\DB::select($query);\n\n\t\treturn $result[0];\n\t}", "public function byLeader1($id) {\n // Es decir, se filtra leader final y leader envoltura diferente a leader inicio\n \n $empresa=almproducts::where('id',$id)->first();\n $emp=$empresa->id_company;\n\n $pt = DB::table('products as art')\n ->join('almproducts as almp','almp.id_product','=','art.id')\n ->join('units as un','art.id_unidad_prod','=','un.id')\n ->select(DB::raw('CONCAT(art.name,\" - \",art.description,\" \",almp.etiqueta) AS articulo'),'almp.id','almp.id_product','art.name','art.id_unidad_prod','almp.cantidad_prod','art.ancho_prod',DB::raw('if(art.formula is NULL, \"NA\", art.formula) as formula'),'almp.etiqueta','almp.existencia','un.name as unidad','un.id as id_unidad','almp.precioc','almp.preciov')\n ->where('art.activo','=','1')\n ->where('art.roll_id','=','4') // Es Leader\n ->where('almp.id','<>',$id)\n ->where('almp.existencia','>','0')\n ->where('almp.id_company','=',$emp)\n ->groupBy('articulo','almp.id','almp.etiqueta','almp.existencia','almp.cantidad_prod','unidad','precioc','preciov')\n ->get();\n\n\n\n //return $mp; \n //return Product::where('id',$id)->get();\n return $pt;\n }", "public function getNextToken();", "public function getTrelloFirstName()\n {\n return $this->trelloFirstName;\n }", "function test_following_valid_user()\n {\n $rmt_mck = new mck_mdl_remotes('sue', 'Big fat human');\n\n $rel = new ctrl_relations();\n $rel->params = array('relations', 'following', 'fred');\n $rel->following($rmt_mck);\n $result = $rel->display_outer(true);\n\n $this->assertEquals(preg_match('/>sue</', $result), 1);\n $this->assertEquals(preg_match('/sues avatar/', $result), 1);\n $this->assertEquals(preg_match('/Message/', $result), 1);\n }", "public function left_member ($left_member, $message_id, $from, $chat, $date) {\n }", "public static function getGroupLeader($cwid) {\n // Get the group the student is in\n $student = StudentGroup::where('cwid', $cwid)->where('status', 'leader')->orWhere('status', 'member')->get();\n\n // With the group id return the leader\n $groupLeader = StudentGroup::where('group_id', $student[0]->group_id)->value('cwid');\n\n // Return the group leader\n return Student::where('cwid', $groupLeader)->first();\n }" ]
[ "0.7100793", "0.6764525", "0.6764525", "0.6762486", "0.6513184", "0.6287916", "0.6228105", "0.60481614", "0.5933152", "0.5850902", "0.5813716", "0.57417727", "0.5636128", "0.5501628", "0.54974455", "0.5496737", "0.5352431", "0.5325947", "0.53186756", "0.523681", "0.5181515", "0.5087375", "0.50838965", "0.50790036", "0.5067501", "0.5054941", "0.50519913", "0.505183", "0.5029123", "0.50116724", "0.49894968", "0.49776933", "0.49259102", "0.4908084", "0.48506945", "0.48281676", "0.4758969", "0.47352678", "0.47276518", "0.47076038", "0.46859017", "0.4685298", "0.46655723", "0.45958072", "0.45870453", "0.45788324", "0.45511368", "0.45482752", "0.45250726", "0.451661", "0.44918534", "0.4488686", "0.44499955", "0.4442557", "0.43512714", "0.43488625", "0.43488625", "0.4330667", "0.43299842", "0.43103296", "0.43009996", "0.42558065", "0.42429802", "0.4229965", "0.4225206", "0.42227754", "0.42166033", "0.42150414", "0.42137346", "0.42126527", "0.42083412", "0.4200641", "0.4177403", "0.41772488", "0.41568524", "0.4151242", "0.4147832", "0.412904", "0.41187328", "0.4100464", "0.40940437", "0.40887764", "0.40821892", "0.4079836", "0.4079537", "0.407781", "0.40759826", "0.4071391", "0.40636912", "0.4057953", "0.40421563", "0.40388572", "0.40383747", "0.40324506", "0.40248692", "0.40198758", "0.4019421", "0.40187272", "0.40152106", "0.40148395" ]
0.7028878
1
Generated from protobuf field .api.Membership membership = 2;
Сгенерировано из поля protobuf .api.Membership membership = 2;
public function setMembership($var) { GPBUtil::checkEnum($var, \Api\Membership::class); $this->membership = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setMembership($var)\n {\n GPBUtil::checkString($var, True);\n $this->membership = $var;\n\n return $this;\n }", "public function getMembership()\n {\n return $this->membership;\n }", "public function getMembership()\n {\n return $this->membership;\n }", "public function membership() {\n return $this->belongsTo(Membership::class, 'membership_id');\n }", "public function member()\n {\n return $this->belongsTo('App\\Member', 'membership_id');\n }", "public function membership() {\r\n return new Engine_ProxyObject($this, Engine_Api::_()->getDbtable('membership', 'ynforum'));\r\n }", "public function members(): BelongsTo\n {\n return $this->belongsTo(Membership::class);\n }", "function getMembership() {\n\n\t\t// get current user\n\t\t$user_id = session()->value(\"user_id\");\n\n\t\t$query = new Query();\n\t\t$IC = new Items();\n\t\t$SC = new Shop();\n\n\n\t\t// membership with subscription\n\t\t$sql = \"SELECT members.id as id, subscriptions.id as subscription_id, subscriptions.item_id as item_id, subscriptions.order_id as order_id, members.user_id as user_id, members.created_at as created_at, members.modified_at as modified_at, subscriptions.renewed_at as renewed_at, subscriptions.expires_at as expires_at FROM \".$this->db_subscriptions.\" as subscriptions, \".$this->db_members.\" as members WHERE members.user_id = $user_id AND members.subscription_id = subscriptions.id LIMIT 1\";\n\t\tif($query->sql($sql)) {\n\t\t\t$membership = $query->result(0);\n\t\t\t$membership[\"item\"] = $IC->getItem(array(\"id\" => $membership[\"item_id\"], \"extend\" => array(\"prices\" => true, \"subscription_method\" => true)));\n\t\t\tif($membership[\"order_id\"]) {\n\t\t\t\t$membership[\"order\"] = $SC->getOrders(array(\"order_id\" => $membership[\"order_id\"]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$membership[\"order\"] = false;\n\t\t\t}\n\n\t\t\treturn $membership;\n\t\t}\n\t\t// membership without subscription\n\t\telse {\n\t\t\t$sql = \"SELECT * FROM \".$this->db_members.\" WHERE user_id = $user_id LIMIT 1\";\n\t\t\tif($query->sql($sql)) {\n\t\t\t\t$membership = $query->result(0);\n\n\t\t\t\t$membership[\"item\"] = false;\n\t\t\t\t$membership[\"order\"] = false;\n\t\t\t\t$membership[\"order_id\"] = false;\n\t\t\t\t$membership[\"item_id\"] = false;\n\t\t\t\t$membership[\"expires_at\"] = false;\n\t\t\t\t$membership[\"renewed_at\"] = false;\n\n\t\t\t\treturn $membership;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function testParseGroupMembership()\n {\n $p = new MockGroupAPI(\"uw_enrollment_eis_gws_test\");\n\n // Check the membership is working as expected\n $this->assertContains('bonifacp', $p->getMembers());\n $this->assertContains('jschilz', $p->getDirectMembers());\n $this->assertContains('jschilz', $p->getEffectivemembers());\n\n $this->assertNotContains('blarg', $p->getMembers());\n }", "public function newMembership($servIp, $hostHead, $webHead, $requestIp, $requestPort, $hash, $requestType, $requestDate, $city, $assoType, $pLastname1, $pLastname2, $pName1, $pName2, $pDocType, $pIdentification, $pExpDate, $pExpPlace, $pGender, $pBornDate, $pNacionality, $pTownship, $pDepartment, $pCivilStatus, $pLivingplaceType, $pResAddress, $pStratum, $pResTel, $pCell, $department, $pResCity, $pCorrespondence, $pEmail, $pProfession, $pEducationLevel, $sLastname1, $sLastname2, $sName1, $sName2, $sDocType, $sIdentification, $sCell, $wCompName, $wCompTel, $wCompTelExt, $wCompDir, $wDepartment, $wCity, $wAdmiDate, $wContractType, $wCharge, $wCivilServant, $wPubResourAdmin, $wPubPerson, $lRPubPerson, $wCompFax, $wEmail, $wCIIUDesc, $wCIIUCode, $monthlyInc, $monthlyEgr, $immovabAssets, $othersInc, $descEgr, $vehiclesAssets, $othersDescInc, $totalEgr, $othersAssets, $totalInc, $totalAssets, $totalLiabilities, $totalHeritage, $fctransactions, $fcWhich, $fcAccount, $fcAccountNumber, $fcBank, $fcCurrency, $fcCity, $fcCountry, $fcTransactionType, $fcWichTransac)\n {\n try {\n $this->objMembership->__setMembership($servIp, $hostHead, $webHead, $requestIp, $requestPort, $hash, $requestType, $requestDate, $city, $assoType, $pLastname1, $pLastname2, $pName1, $pName2, $pDocType, $pIdentification, $pExpDate, $pExpPlace, $pGender, $pBornDate, $pNacionality, $pTownship, $pDepartment, $pCivilStatus, $pLivingplaceType, $pResAddress, $pStratum, $pResTel, $pCell, $department, $pResCity, $pCorrespondence, $pEmail, $pProfession, $pEducationLevel, $sLastname1, $sLastname2, $sName1, $sName2, $sDocType, $sIdentification, $sCell, $wCompName, $wCompTel, $wCompTelExt, $wCompDir, $wDepartment, $wCity, $wAdmiDate, $wContractType, $wCharge, $wCivilServant, $wPubResourAdmin, $wPubPerson, $lRPubPerson, $wCompFax, $wEmail, $wCIIUDesc, $wCIIUCode, $monthlyInc, $monthlyEgr, $immovabAssets, $othersInc, $descEgr, $vehiclesAssets, $othersDescInc, $totalEgr, $othersAssets, $totalInc, $totalAssets, $totalLiabilities, $totalHeritage, $fctransactions, $fcWhich, $fcAccount, $fcAccountNumber, $fcBank, $fcCurrency, $fcCity, $fcCountry, $fcTransactionType, $fcWichTransac);\n @$intValidate = $this->objDao->newMembership($this->objMembership);\n } catch (Exception $e) {\n echo 'Exception captured: ', $e->getMessage(), \"\\n\";\n @$intValidate = 0;\n }\n return @$intValidate;\n }", "public function membership($user);", "function is_member($userData) {\n $memberships = $userData->dataList[0]->memberships;\n if ($memberships) {\n if (sizeof($memberships) > 0) {\n return 1;\n }\n }\n return 0;\n}", "function membership_members() {\n return membership_members_list();\n}", "function _dirprof_membership_field_info() {\n return array(\n 'dirprof_membership' => array(\n 'label' => t('Membership'),\n 'description' => t('A membership for an individual - defined by the Directory Profile module.'),\n 'content_icon' => 'icon_content_text.png',\n ),\n );\n}", "public function getCustomerMembershipId(): int\n {\n return $this->customerMembershipId;\n }", "protected function readMemberships() {\n\t\t$sql = \"SELECT\t\t*\n\t\t\tFROM\t\twcf\".WCF_N.\"_group\n\t\t\tWHERE\t\tgroupID IN (\".implode(',', WCF::getUser()->getGroupIDs()).\")\n\t\t\t\t\tAND groupType > 3\n\t\t\tORDER BY\tgroupName\";\n\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t$this->memberships[] = $row;\n\t\t}\n\t}", "public function members()\n {\n return $this->belongsToMany(User::class, 'memberships');\n }", "public function befriend(MembershipInterface $target): PodiumResponse;", "public function setResources($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Cloud\\GkeHub\\V1\\Membership::class);\n $this->resources = $arr;\n\n return $this;\n }", "public function membership()\n {\n return page('membership');\n }", "public function memberable()\n {\n return $this->membership_type::where('id', $this->membership_id)->first();\n }", "function getGroupMembership($principal);", "public function role_umemberships($uid){return($this->role('memberships', array('uid' => $uid)));}", "public static function membershipModel()\n {\n return static::$membershipModel;\n }", "function membership_members_list() {\n $output = '';\n // get a list of membership status values to select\n $standings = membership_get_member_list_standings();\n $sql = \"SELECT m.nid, m.category, m.member, m.address, m.city, m.postcode, m.email, m.phone FROM {node} n JOIN {org_members} m ON m.nid = n.nid WHERE m.vid = n.vid AND (m.standing = ''\";\n foreach ($standings as $standing) {\n $sql .= \" OR m.standing = '\" . $standing . \"'\";\n }\n $sql .= \") ORDER BY m.category, m.member\";\n $result = db_query(db_rewrite_sql($sql));\n $category = '[none]';\n while ($member = db_fetch_object($result)) {\n if ($member->category <> $category) {\n if ($category <> '[none]') {\n $output .= '</ul>';\n }\n $category = $member->category;\n $output .= '<p>Membership category: <strong>' . $category . '</strong><p><ul>';\n }\n // Generate a line of listing for this member\n $member_output = '';\n $member_output .= l($member->member, 'node/' . $member->nid) . ' ';\n $member_output .= l('[edit]', 'node/' . $member->nid . '/edit') . ' ';\n $member_output .= orgright_multi_field_to_string($member->phone, '; ') . ', ';\n $member_output .= orgright_multi_field_to_string($member->address, '; ') . ', ';\n $member_output .= $member->city . ', ';\n $member_output .= $member->postcode . ', ';\n $member_output .= orgright_multi_field_to_string($member->email, '; ');\n $output .= '<li>' . $member_output . '</li>';\n }\n if ($category <> '[none]') {\n $output .= '</ul>';\n }\n // Set page breadcrumb\n orgright_breadcrumb(array(t('Membership') => 'membership'));\n //orgright_debug_msg('membership',$output);\n return $output;\n}", "public function members()\n {\n return $this->hasMany(Member::class, 'membership_id', 'id');\n }", "function checkMembership($membership) {\n\t\tif (!strcmp($membership, \"CorpNonProvider\" ) || !strcmp($membership, \"CorpNonProviderIndividual\") || !strcmp($membership, \"Corporate Membership\") \n\t\t || !strcmp($membership, \"NonProfit Membership\") || !strcmp($membership, \"CorpProviderIndividual\") || !strcmp($membership, \"AddlCorpProvider Membership\")) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function lala_check_membership(){\n\t if(is_user_logged_in()){\n\t \t$current_user_id = get_current_user_id();\n\n\t \t$user->membership_level = pmpro_getMembershipLevelForUser($current_user_id);\n\n\t\t\tif(bp_get_profile_field_data('field=1047&user_id='.$current_user_id ) == 'Real Estate Pro'){ // if user is a PRO\n\t \t\tvar_dump(123);\n\t \t\tif(isset($user->membership_level->ID) && $user->membership_level->ID ==5){ // 5 is the ID for the FREE member\n\t \t\t\tpmpro_changeMembershipLevel(0,$current_user_id);\n\t \t\t}\n\t \t}\n\t \t\n\t }\n\t}", "public function update(Membership $membership)\n {\n $this->authorize('update', $membership);\n\n DB::transaction(function () use ($membership) {\n $membership->entity->approved = true;\n $membership->entity->update();\n\n $membership->approved = true;\n $membership->approved_by = Auth::id();\n $membership->update();\n });\n\n Bus::chain([\n new GitAddEntity($membership->entity, Auth::user()),\n new GitAddToHfd($membership->entity, Auth::user()),\n new GitAddMembership($membership, Auth::user()),\n function () use ($membership) {\n $admins = User::activeAdmins()->select('id', 'email')->get();\n Notification::send($membership->entity->operators, new MembershipAccepted($membership));\n Notification::send($admins, new MembershipAccepted($membership));\n if ($membership->entity->hfd) {\n Notification::send($membership->entity->operators, new EntityAddedToHfd($membership->entity));\n Notification::send(User::activeAdmins()->select('id', 'email')->get(), new EntityAddedToHfd($membership->entity));\n }\n },\n ])->dispatch();\n\n return redirect()\n ->back()\n ->with('status', __('federations.membership_accepted', ['entity' => $membership->entity->entityid]));\n }", "public function membershipNumber($membershipNumber)\n {\n return $this->setProperty('membershipNumber', $membershipNumber);\n }", "public function __getMember()\r\n {\r\n\t$this->activity = \"A\";\r\n\t$this->gender = \"M\";\r\n\tif($this->__selectMember() == true)goto getMemberEnd;\r\n\t$this->activity = \"P\";\r\n\tif($this->__selectMember() == true)goto getMemberEnd;\r\n\t$this->activity = \"A\";\r\n\t$this->gender = \"F\";\r\n\tif($this->__selectMember() == true)goto getMemberEnd;\r\n\t$this->activity = \"P\";\r\n\tif($this->__selectMember() == true)goto getMemberEnd;\r\n\techo date(\"H:i:s\"),B,\" No more member to select \", B1, EOL;\r\n\t\treturn false;\r\n\tgetMemberEnd:\r\n\t\techo date(\"H:i:s\"),\" New member for: \", $this->familyname, EOL;\r\n\t\treturn true;\r\n }", "public function getMembership($viewer_id = null) {\n if (empty($viewer_id)) {\n $viewer_id = Engine_Api::_()->user()->getViewer()->getIdentity();\n }\n\n $friendStr = $friendArray = null;\n\n //FETCH FRIEND ID FROM DATABASE.\n $table = Engine_Api::_()->getDbtable('membership', 'user');\n $iName = $table->info('name');\n\n $user_table = Engine_Api::_()->getItemTable('user');\n $uName = $user_table->info('name');\n\n $select = $table->select()\n ->setIntegrityCheck(false)\n ->from($iName, array('resource_id'))\n ->joinLeft($uName, \"$uName.user_id = $iName.user_id\", null)\n ->where($iName . '.user_id = ?', $viewer_id);\n $fetch_record = $select->query()->fetchAll();\n foreach ($fetch_record as $friend_id) {\n $friendArray[] = $friend_id['resource_id'];\n }\n if (!empty($friendArray) && is_array($friendArray)) {\n $friendStr = implode(',', $friendArray);\n }\n $friendStr = $this->getTrimStr($friendStr);\n return $friendStr;\n }", "public function getMembershipState(): int\n {\n return $this->membership_state;\n }", "public function updateMembershipData(\\XLite\\Model\\Membership $membership)\n {\n $i = 0;\n do {\n $processed = 0;\n foreach (\\XLite\\Core\\Database::getRepo('XLite\\Model\\Product')->findFrame($i, static::CHUNK_LENGTH) as $product) {\n $this->updateData($product, $membership);\n $processed++;\n }\n\n if (0 < $processed) {\n \\XLite\\Core\\Database::getEM()->flush();\n \\XLite\\Core\\Database::getEM()->clear();\n }\n $i += $processed;\n\n } while (0 < $processed);\n }", "public function getMembershipType()\n {\n if (array_key_exists(\"membershipType\", $this->_propDict)) {\n if (is_a($this->_propDict[\"membershipType\"], \"\\Microsoft\\Graph\\Model\\ChannelMembershipType\") || is_null($this->_propDict[\"membershipType\"])) {\n return $this->_propDict[\"membershipType\"];\n } else {\n $this->_propDict[\"membershipType\"] = new ChannelMembershipType($this->_propDict[\"membershipType\"]);\n return $this->_propDict[\"membershipType\"];\n }\n }\n return null;\n }", "public function groupsMembershipAction()\n {\n $groups = GroupSport::getGroupsByMembership($this->user->userName);\n $groups = $this->addAmountOfMembers($groups);\n $invitations = UsersGroups::adminInvitation($this->user->userName);\n\n View::renderTemplate('Group/groupsMembership.html', [\n 'user' => $this->user, \n 'Groups' => $groups,\n 'post' => $_POST,\n 'invitations' => $invitations ]);\n }", "public function hasAvailableMembership()\n {\n return 0 == $this->getMemberships()->count()\n || in_array(\\XLite\\Core\\Auth::getInstance()->getMembershipId(), $this->getMembershipIds());\n }", "public function testMember() {\n $this->group->getOwnerId()->willReturn(rand(100, 200));\n\n $this\n ->membershipManager\n ->isMember($this->group->reveal(), $this->user->reveal(), [OgMembershipInterface::STATE_BLOCKED])\n ->willReturn(FALSE);\n\n $this\n ->membershipManager\n ->isMember($this->group->reveal(), $this->user->reveal(), [OgMembershipInterface::STATE_ACTIVE, OgMembershipInterface::STATE_PENDING])\n ->willReturn(TRUE);\n\n $elements = $this->getElements();\n $this->assertEquals('Unsubscribe from group', $elements[0]['#title']);\n }", "public function create_membership($post_data) {\n $membership = array(\n 'business_service_id' => $post_data['business_service_id'],\n 'membership' => $post_data['membership'],\n 'description' => $post_data['description'],\n 'duration' => $post_data['duration'],\n 'fees' => $post_data['fees'],\n 'max_number_of_members' => $post_data['max_number_of_members']\n );\n $this->db->insert('memberships', $membership);\n return true;\n }", "public function addMember(\\utilpb\\PbMemberInfo $value){\r\n return $this->_add(2, $value);\r\n }", "public function hasAvailableMembership()\n {\n return 0 === $this->getMemberships()->count()\n || in_array(\\XLite\\Core\\Auth::getInstance()->getMembershipId(), $this->getMembershipIds());\n }", "function addUpdateMembershipDetails($memType ) {\n\n\terror_log(\"----------------- Updating Membership -----------------\");\n\n\t$success = false;\n\t$days = 0;\n\t$startDate = time();\n\n\t\n\n\t$current_user = wp_get_current_user();\n\t$data = array();\n\t$data['wp_user'] = $current_user->user_login;\n\t$data['wp_user_key'] = $current_user->ID;\n\t$data['user_type'] = \"\";\n\t$data['exp_date'] = \"\";\n\t$data['days_bought'] = \"\";\n\t$data['user_type'] = $memType;\n\n\t$user_info = dgGetAccountStatus();\n\n\tif ( $user_info['has_dduser'] == 1 ) {\n\t\t// Already got a user record\n\t\t// What now depends on their current record.\n\t\tif ( $user_info['user_type'] != \"l\" ) {\n\t\t\t// Not a Lifetime member\n\n\t\t\tif ( $user_info['user_type'] != 'DB' && $data['user_type'] != 'DB' ) {\n\t\t\t\t// Currently not a Days Bought and buying something other than DB so update expiry date etc\n\t\t\t\tif ( $user_info['valid_member'] == 1 ) {\n\t\t\t\t\t// Still a current member so extend membership\n\t\t\t\t\t$startDate = $user_info['exp_date'];\n\t\t\t\t} \n\t\t\t} else if ($data['user_type'] == 'DB') {\n\t\t\t\t// Set days bought\n\t\t\t\tif ( $user_info['days_left'] > 0 ) {\n\t\t\t\t\t$days = $user_info['days_left'];\n\t\t\t\t}\n\t\t\t} else { \n\t\t\t\t// Should never get here\n\t\t\t}\n\n\t\t} else {\n\t\t\t// Lifetime member. No need to update \n\t\t}\n\t}\n\n\tswitch ($data['user_type']) {\n\t\tcase \"l\":\n \t$data['exp_date'] = $startDate + (60*60*24*365 * 120);\n\t\t\tbreak;\n\t\tcase \"y\":\n\t\t\t$days = 365;\n\t\t\t$data['exp_date'] = $startDate + (60*60*24*$days);\n\t\t\tbreak;\n\t\tcase \"6\":\n\t\t\t$days = 183;\n\t\t\t$data['exp_date'] = $startDate + (60*60*24*$days);\n\t\t\tbreak;\n\t\tcase \"3\":\n\t\t\t$days = 92;\n\t\t\t$data['exp_date'] = $startDate + (60*60*24*$days);\n\t\t\tbreak;\n\t\tcase \"w\":\n\t\t\t$days = 7;\n\t\t\t$data['exp_date'] = $startDate + (60*60*24*$days);\n\t\t\tbreak;\n\t\tcase \"DB\" :\n\t\t\t$days = $days + 30;\n\t\t\t$data['days_bought'] = $days;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t/* UNKNOWN - Something is wrong */\n\t\t\treturn $success;\n }\n\n\terror_log(var_export($data,1));\n\n\t$link = getDBLink();\n\tif ($user_info['has_dduser'] == 1 ) {\n\t\t// Update record\n\t\t$query = \"update dduser set dduser_wp_key = '\".$data['wp_user'].\"', dduser_type = '\".$data['user_type'].\"', dduser_exp_date = '\".$data['exp_date'].\"', dduser_days_bought = '\".$data['days_bought'].\"' WHERE dduser_id = '\".$data['wp_user'].\"'\";\n\t} else {\n\t\t// New ddRecord Required\n\t\t\t$query = \"insert into dduser (dduser_id, dduser_wp_key, dduser_type, dduser_mon_created, dduser_last_date, dduser_exp_date, dduser_days_bought) \";\n\t\t\t$query .= \" VALUES ('\".$data['wp_user'].\"', '\".$data['wp_user_key'].\"', '\".$data['user_type'].\"', '0', '\".time().\"', '\".$data['exp_date'].\"', '\".$data['days_bought'].\"')\";\n\t}\t\t\n\n\terror_log($query);\n\t$queryRes = mysqli_query($link, $query) ;\n\terror_log($queryRes);\n\n\tif ( !$queryRes ) {\n\t\t// Database error\n\t\t$success = false;\n\t} else {\n\t\t$success = true;\n\t}\n\n\treturn $success;\n\n}", "public function addMembers(\\utilpb\\PbMemberInfo $value){\r\n return $this->_add(1, $value);\r\n }", "static function getMembershipFromForUser($user) {\r\n\t\tif (!$user->isLoaded()) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\t$service = new Service(array(\r\n\t\t\t'type' => self::MEMBERSHIP_TYPE\r\n\t\t));\r\n\r\n\t\treturn static::getServiceFromForUser($user, $service);\t\r\n\t}", "function fmpm_wc_memberships_user_membership_at_registration( $user_id ) {\n\n\t// bail if Memberships isn't active\n\tif ( ! function_exists( 'wc_memberships' ) ) {\n\t\treturn;\n\t}\n\n\t$args = array(\n\t\t// Enter the ID (post ID) of the plan to grant at registration\n\t\t'plan_id' => 1344,\n\t\t'user_id' => $user_id,\n\t);\n\n\t// magic!\n\twc_memberships_create_user_membership( $args );\n\n\t// Get the new membership and add a note so we know how this was registered.\n\t$user_membership = wc_memberships_get_user_membership( $user_id, $args['plan_id'] );\n\t$user_membership->add_note( 'Membership access granted automatically from registration.' );\n\n}", "public function getMember()\r\n {\r\n return $this->_member;\r\n }", "public function checkUserMembership()\n {\n \t\n \t$fitnessUser = new FitnessUserGeneral();\n \t$fitnessMembership = new FitnessUserMembership();\n \t$fitnessUnlocked = new FitnessUserWorkoutsUnlocked();\n \t$fitnessDone = new FitnessUserWorkoutsDone();\n \t\n \t\n \t\n \t$sess = new Zend_Session_Namespace('UserSession');\n \t$userDetails = $fitnessUser->getUserbyUsername($sess->username);\t\n \t$userMembership = $fitnessMembership->getUserMembership($userDetails['user_id']);\n \t\n \t//get user registration date from database only if user in trial period\n \t\n \tif($userMembership['trial'] == 1)\n \t{\n\t \t$registrationDate = $userMembership['registration_date'];\n\t \t//get the number of days in the current month\n\t \tif($userMembership['trial_period'] == 1)\n\t \t{\n\t \t$monthDays = cal_days_in_month(CAL_GREGORIAN, date('m'), date('Y'));\n\t \t}\n\t \telse \n\t \t{\n\t \t\t$monthdaysFirst = cal_days_in_month(CAL_GREGORIAN, date('m'), date('Y'));\n\t \t\t$monthdaysSecond = cal_days_in_month(CAL_GREGORIAN, date('m')+1, date('Y'));\n\t \t\t$monthdaysThird = cal_days_in_month(CAL_GREGORIAN, date('m')+2, date('Y'));\n\t \t\t$monthDays = $monthdaysFirst + $monthdaysSecond + $monthdaysThird;\n\t \t\t\n\t \t}\n\t \t\n\t \t\n\t \t$diff = $this->_date_diff(strtotime($registrationDate), time());\n\t \t$purchasedWorkouts = $fitnessUnlocked->getPurchasedWorkouts($userDetails['user_id']);\n\t \tforeach($purchasedWorkouts as $purchased)\n\t \t{\n\t \t\t$pWorkouts[] = $purchased['workout_id'];\n\t \t}\n\t \t$implodedWorkouts = implode(\",\",$pWorkouts);\n\t \t\n\t \tif($diff['days'] > $monthDays)\n\t \t{\n\t \t\t//$fitnessUnlocked->setLockStatus($userDetails['user_id'],0,$implodedWorkouts);\n\t \t\t//$fitnessDone->setLockStatus($userDetails['user_id'],0);\n\t \t\treturn 0;\n\t \t}\n\t \telse \n\t \t{\n\t \t\t\n\t \t\treturn 1;\n\t \t}\n \t}\n \telse \n \t{\n \t\treturn 1;\n \t}\n \t\n }", "static function getMembershipToForUser($user) {\r\n\t\tif (!$user->isLoaded()) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\t$service = new Service(array(\r\n\t\t\t'type' => self::MEMBERSHIP_TYPE\r\n\t\t));\r\n\t\t\r\n\t\treturn static::getServiceToForUser($user, $service);\t\r\n\t}", "public function memberType()\r\n {\r\n return \"member\";\r\n }", "public function setMembershipType($val)\n {\n $this->_propDict[\"membershipType\"] = $val;\n return $this;\n }", "public function setMembers($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Adamant\\PBGlobal\\V1\\WalletMember::class);\n $this->members = $arr;\n\n return $this;\n }", "public function getMember()\n {\n return $this->member;\n }", "public function getMember()\n {\n return $this->member;\n }", "public function getMember()\n {\n return $this->member;\n }", "function members($memberships = 'all') {\n\t\t$return = '';\n\n\t\t// PMPro Support - print member list by level\n\t\tif (defined('PMPRO_DIR')) {\n\t\t\tglobal $wpdb;\n\n\t\t\t$memberships = array_map('trim',explode(',', $memberships));\n\t\t\t$member_levels = $wpdb->get_results(\"SELECT id, name FROM $wpdb->pmpro_membership_levels ORDER BY name\");\n\t\t\tforeach($member_levels as $member_level) {\n\t\t\t\tif (in_array($member_level->name, $memberships) || $memberships[0] == 'all') {\n\t\t\t\t\t$sqlQuery = \"SELECT SQL_CALC_FOUND_ROWS u.ID, u.user_login, u.user_email, u.user_url, UNIX_TIMESTAMP(u.user_registered) as joindate, mu.membership_id, mu.initial_payment, mu.billing_amount, mu.cycle_period, mu.cycle_number, mu.billing_limit, mu.trial_amount, mu.trial_limit, UNIX_TIMESTAMP(mu.startdate) as startdate, UNIX_TIMESTAMP(mu.enddate) as enddate, m.name as membership FROM $wpdb->users u \n\t\t\t\t\tLEFT JOIN $wpdb->pmpro_memberships_users mu ON u.ID = mu.user_id \n\t\t\t\t\tLEFT JOIN $wpdb->pmpro_membership_levels m ON mu.membership_id = m.id\n\t\t\t\t\tLEFT JOIN $wpdb->usermeta mt ON u.ID = mt.user_id\n\t\t\t\t\tWHERE mu.membership_id > 0 AND mu.status = 'active' AND mu.membership_id = '\" . $member_level->id . \"' AND mt.meta_key = 'last_name' \n\t\t\t\t\tGROUP BY u.ID ORDER BY mt.meta_value ASC\";\n\t\t\t\t\t$users = $wpdb->get_results($sqlQuery);\n\t\t\t\t\tif ($users) {\n\t\t\t\t\t\t$return .= '<h3>'.$member_level->name.'</h3>';\n\t\t\t\t\t\t$return .= $this->_format_members($users);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$users = get_users(array(\n\t\t\t\t\t'orderby'\t\t=> 'display_name'\n\t\t\t\t\t));\n\t\t\tif ($users) {\n\t\t\t\tusort($users, array($this, '_sort_lastname'));\n\t\t\t\t$return .= $this->_format_members($users);\n\t\t\t}\n\t\t}\n\t\treturn $return;\n\t}", "public function hasMember(){\r\n return $this->_has(2);\r\n }", "public function Membership(){\n return $this->belongsTo('membresia');\n }", "public function getMembershipLevelId()\n {\n return $this->response['membershipLevelId'];\n }", "public static function updateProfileGroup(int $membershipId, array $membership): int\n {\n $groupRight = BackendModel::get(GroupRightRepository::class)->find($membershipId);\n\n if (!$groupRight instanceof GroupRight) {\n return $membershipId;\n }\n\n $group = $groupRight->getGroup();\n if (array_key_exists('group_id', $membership)) {\n $group = BackendModel::get(GroupRepository::class)->find($membership['group_id']);\n }\n $expiresOn = $groupRight->getExpiryDate();\n if (array_key_exists('expires_on', $membership)) {\n $expiresOn = new DateTime();\n $expiresOn->setTimestamp($membership['expires_on']);\n }\n $startsOn = $groupRight->getStartDate();\n if (array_key_exists('starts_on', $membership)) {\n $startsOn = new DateTime();\n $startsOn->setTimestamp($membership['starts_on']);\n }\n\n $groupRight->update($group, $startsOn, $expiresOn);\n\n BackendModel::get('doctrine.orm.entity_manager')->flush();\n\n return $membershipId;\n }", "public static function insertProfileGroup(array $membership): int\n {\n $profile = BackendModel::get(ProfileRepository::class)->find($membership['profile_id']);\n $group = BackendModel::get(GroupRepository::class)->find($membership['group_id']);\n\n $startsOn = new DateTime();\n $startsOn->setTimestamp($membership['starts_on']);\n\n $expiresOn = null;\n if (array_key_exists('expires_on', $membership)) {\n $expiresOn = new DateTime();\n $expiresOn->setTimestamp($membership['expires_on']);\n }\n\n $existingGroupRight = $profile->getRights()->filter(\n function (GroupRight $groupRight) use ($group) {\n return $groupRight->getGroup()->getId() === $group->getId();\n }\n )->first();\n\n if ($existingGroupRight instanceof GroupRight) {\n $existingGroupRight->update(\n $group,\n $startsOn,\n $expiresOn\n );\n\n BackendModel::get('doctrine.orm.entity_manager')->flush();\n\n return $existingGroupRight->getId();\n }\n\n $groupRight = new GroupRight(\n $profile,\n $group,\n $startsOn,\n $expiresOn\n );\n\n BackendModel::get(GroupRightRepository::class)->add($groupRight);\n\n return $groupRight->getId();\n }", "public function createMembership(array $data, array $response = []): array\n {\n $uri = 'team-directory/memberships';\n $required = [\n 'member' => self::TYPE_STRING,\n 'teamId' => self::TYPE_STRING,\n 'roleId' => self::TYPE_STRING,\n ];\n $this->throwIfInvalid($required, $data);\n\n return $this->client->post($this->buildUrl($uri), $data, $response);\n }", "public function __construct($member)\n\n {\n\n $this->member = $member;\n\n }", "public function isMember();", "public function testWorkflow_PrepareMembership()\n {\n $this->setUpPlans();\n\n // User selected first plan\n list($user, $plan, $membership, $service, $invoice) = $this->generateMembership($this->plan1);\n $this->assertNotNull($plan, $membership, $service, $service->status, $invoice, $invoice->status);\n\n $this->assertEquals(1, $membership->services()->count());\n $this->assertEquals(1, Invoice::applyUser($user)->count());\n $this->assertEquals(10, $this->plan1->price);\n $this->assertEquals(10, $invoice->total);\n $this->assertEquals(1, $invoice->items()->count());\n $this->assertEquals(1, $service->is_throwaway);\n $this->assertEquals(1, $invoice->is_throwaway);\n $this->assertEquals($service->freshTimestamp(), $invoice->due_at, '', 5);\n\n // User selected second plan\n list($user, $plan, $membership, $service, $invoice) = $this->generateMembership($this->plan2, $user);\n\n $this->assertEquals(1, $membership->services()->count());\n $this->assertEquals(1, Invoice::applyUser($user)->count());\n $this->assertEquals(1, $invoice->items()->count());\n $this->assertEquals(20, $invoice->total);\n $this->assertEquals($service->freshTimestamp(), $invoice->due_at, '', 5);\n\n // User selected yet another plan\n list($user, $plan, $membership, $service, $invoice) = $payload = $this->generateMembership($this->plan3, $user);\n\n $this->assertEquals(1, $membership->services()->count());\n $this->assertEquals(1, Invoice::applyUser($user)->count());\n $this->assertEquals(30, $invoice->total);\n\n // Pay the invoice, activate the membership\n $invoice->submitManualPayment('Testing');\n\n list($user, $plan, $membership, $service, $invoice) = $payload = $this->reloadMembership($payload);\n\n $this->assertEquals(0, $invoice->is_throwaway);\n $this->assertEquals(0, $service->is_throwaway);\n }", "public function ApiGetListOfMembers()\r\n { if ($this->scouts === null) {\r\n $this->scouts = array();\r\n $r = $this->osm->PostAPI( \"ext/members/contact/?action=getListOfMembers&sort=lastname\" .\r\n \"&sectionid={$this->section->id}&termid={$this->id}\" .\r\n \"&section={$this->section->type}\" );\r\n if ($r) {\r\n foreach ($r->items as $apiItem ) {\r\n $scout = $this->section->FindScout( $apiItem->scoutid );\r\n $scout->ApiUseGetListOfMembers( $apiItem );\r\n $this->scouts[$scout->id] = $scout;\r\n }\r\n }\r\n }\r\n }", "public function testMembershipAdd() {\n $loop = 0;\n $random_name = $this->randomMachineName();\n /** @var \\Drupal\\Core\\Entity\\EntityTypeManagerInterface $entity_type_manger */\n $entity_type_manger = $this->container->get('entity_type.manager');\n /** @var \\Drupal\\og\\MembershipManager $membership_manager */\n $membership_manager = $this->container->get('og.membership_manager');\n foreach ($this->membershipAddScenarios() as $scenario) {\n [$account] = $scenario;\n $this->drupalLogin($account);\n $group_data = [\n [$this->groupNode, $this->anotherNodeMembership],\n [$this->groupTestEntity, $this->anotherTestEntityMembership],\n ];\n\n foreach ($group_data as $data) {\n [$group, $membership] = $data;\n /** @var \\Drupal\\og\\OgMembershipInterface $membership */\n $exiting_member = $membership->getOwner();\n $this->drupalGet($this->groupMemberAddFormUrl($group));\n $value = $exiting_member->getDisplayName() . ' (' . $exiting_member->id() . ')';\n $this->submitForm(['Username' => $value], 'Save');\n $this->assertSession()->pageTextMatches('/The user .+ is already a member in this group/');\n $match = 'adminz';\n // Test entity query match.\n $found = $entity_type_manger->getStorage('user')\n ->getQuery()\n ->accessCheck()\n ->condition('uid', 0, '<>')\n ->condition('name', $match, 'CONTAINS')\n ->execute();\n $this->assertCount(3, $found, print_r($found, TRUE));\n // Two of the three possible matches are already members.\n $this->assertAutoCompleteMatches($group, $match, 1);\n // Verify that we can add a new user after matching.\n $new_user = $this->createUser([], $random_name . $loop++);\n $json_data = $this->assertAutoCompleteMatches($group, $new_user->getDisplayName(), 1);\n $this->drupalGet($this->groupMemberAddFormUrl($group));\n $this->submitForm(['Username' => $json_data[0]['value']], 'Save');\n $this->assertSession()->pageTextMatches('/Added .+ to .+/');\n $this->assertTrue($membership_manager->isMember($group, $new_user->id()));\n $new_membership = $membership_manager->getMembership($group, $new_user->id());\n $this->drupalGet($new_membership->toUrl('edit-form'));\n $this->submitForm(['state' => OgMembershipInterface::STATE_BLOCKED], 'Save');\n $new_membership = $entity_type_manger\n ->getStorage('og_membership')\n ->loadUnchanged($new_membership->id());\n $this->assertSame(OgMembershipInterface::STATE_BLOCKED, $new_membership->getState());\n $this->drupalGet($new_membership->toUrl('delete-form'));\n $this->submitForm([], 'Delete');\n $new_membership = $entity_type_manger\n ->getStorage('og_membership')\n ->loadUnchanged($new_membership->id());\n $this->assertNull($new_membership);\n }\n }\n }", "function guardarMembership(){\n\n\t\t$membership = $this->input->post('membership');\n\t\t$membership['usuario_app'] = userNick();\n\t\t$user = userNick();\n\n\t\t//guarda membership en BD (para menues y manejo local de usr)\n\t\t$resp = $this->user_model->guardarMembership($membership);\n\n\t\t// guarda membership en BPM\n\t\t$membershipBPM = $this->input->post('membershipBPM');\n\t\t\n\t\t//obtiene el nick de un usuario por email\n\t\t$infoUser = $this->user_model->getUserInfoByEmail($membership['email']);\n\t\t$this->load->model('Roles');\n\t\t\n\t\t\n\t\t//log_message('DEBUG','#TRAZA|MAIN|guardarMembership() membership: >> '. json_encode($membership) );\n\t\t//log_message('DEBUG','#TRAZA|MAIN|guardarMembership() membershipBPM: >> '. json_encode($membershipBPM) );\n\t\t//log_message('DEBUG','#TRAZA|MAIN|guardarMembership() membershipBPM: >> '.$infoUser );\n\n\t\t$resp = $this->Roles->guardarMembershipBPM($membershipBPM, $infoUser->usernick);\n\n\t\treturn true;\n\t}", "function membership_validate_member(&$member) {\n //orgright_debug_msg('membership',t('Validate member name: @mbr', array('@mbr' => $member)));\n // Query the database to ensure that the member name is valid, and to find the mnid\n if (is_numeric($member)) {\n // then the passed value should be the nid of a member node\n $mnid = $member;\n $sql = \"SELECT n.type, m.member FROM {node} n JOIN {org_members} m ON m.nid = n.nid WHERE m.vid = n.vid AND m.nid = %d\";\n $obj = db_fetch_object(db_query($sql, $mnid));\n if ($obj->type == 'member') {\n $member = $obj->member;\n }\n else {\n $mnid = 0;\n }\n return $mnid;\n }\n else {\n $sql = \"SELECT m.nid FROM {node} n JOIN {org_members} m ON m.nid = n.nid WHERE m.vid = n.vid AND m.member = '%s'\";\n return db_result(db_query($sql, $member));\n }\n}", "public function getMemberList(){\r\n return $this->_get(2);\r\n }", "public function populate() {\n\t\tglobal $wpdb, $bp;\n\n\t\tif ( $this->user_id && $this->group_id && !$this->id )\n\t\t\t$sql = $wpdb->prepare( \"SELECT * FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d\", $this->user_id, $this->group_id );\n\n\t\tif ( !empty( $this->id ) )\n\t\t\t$sql = $wpdb->prepare( \"SELECT * FROM {$bp->groups->table_name_members} WHERE id = %d\", $this->id );\n\n\t\t$member = $wpdb->get_row($sql);\n\n\t\tif ( !empty( $member ) ) {\n\t\t\t$this->id = $member->id;\n\t\t\t$this->group_id = $member->group_id;\n\t\t\t$this->user_id = $member->user_id;\n\t\t\t$this->inviter_id = $member->inviter_id;\n\t\t\t$this->is_admin = $member->is_admin;\n\t\t\t$this->is_mod = $member->is_mod;\n\t\t\t$this->is_banned = $member->is_banned;\n\t\t\t$this->user_title = $member->user_title;\n\t\t\t$this->date_modified = $member->date_modified;\n\t\t\t$this->is_confirmed = $member->is_confirmed;\n\t\t\t$this->comments = $member->comments;\n\t\t\t$this->invite_sent = $member->invite_sent;\n\n\t\t\t$this->user = new BP_Core_User( $this->user_id );\n\t\t}\n\t}", "public function get($id)\n {\n return $this->client->get('cadence_memberships/$id.json');\n }", "public function users()\n {\n return $this->belongsToMany(Podstream::userModel(), Podstream::membershipModel())\n ->withPivot('role')\n ->withTimestamps()\n ->as('membership');\n }", "public function testSaveSameMembershipTwice() {\n $group = EntityTest::create([\n 'type' => Unicode::strtolower($this->randomMachineName()),\n 'name' => $this->randomString(),\n ]);\n\n $group->save();\n\n Og::groupTypeManager()->addGroup('entity_test', $group->bundle());\n\n /** @var \\Drupal\\og\\Entity\\OgMembershipInterface $membership */\n $membership = Og::createMembership($group, $this->user);\n $membership->save();\n\n // Block membership and save.\n $membership->setState(OgMembershipInterface::STATE_BLOCKED);\n $membership->save();\n }", "function getMember($member_id)\n {\n global $f3;\n $db = $this->_dbh;\n // query string to match member id\n $sql = \"SELECT fname, lname, age, gender, phone, email, state, seeking, bio, premium, image\n FROM member\n WHERE member_id=:member_id\";\n\n $statement = $db->prepare($sql);\n $statement->bindParam(':member_id', $member_id);\n $statement->execute();\n $memberInfo = $statement->fetch(2);\n\n // get interests for each member\n if($memberInfo['premium'] == 0) {\n $member = new Member($memberInfo['fname'], $memberInfo['lname'], $memberInfo['age'], $memberInfo['gender'],\n $memberInfo['phone']);\n }\n\n if($memberInfo['premium'] == 1) {\n $member = new PremiumMember($memberInfo['fname'], $memberInfo['lname'], $memberInfo['age'], $memberInfo['gender'],\n $memberInfo['phone']);\n // works whether image is actually set or using default profile image\n $member->setImage($memberInfo['image']);\n//\n // allInterests = f3 variable for view member page, implode for comma-separated string\n $f3->set('allInterests', implode(', ', $this->getInterests($member_id)));\n }\n\n // values to add for both member types\n $member->setEmail($memberInfo['email']);\n $member->setState($memberInfo['state']);\n $member->setSeeking($memberInfo['seeking']);\n $member->setBio($memberInfo['bio']);\n\n return $member;\n }", "public function getProductionMembership(): ?ProductionMembership\n {\n return $this->production_membership;\n }", "public function setMembershipClubs($membershipClubs) { $this->membershipClubs = $membershipClubs ; }", "public function testNonMemberRoleMembershipSave() {\n /** @var \\Drupal\\og\\Entity\\OgRole $role */\n $role = OgRole::getRole('block_content', 'group', OgRoleInterface::ANONYMOUS);\n\n $role\n ->grantPermission('edit any group_content content')\n ->save();\n\n $membership = OgMembership::create();\n $membership\n ->setOwner($this->users['non-member'])\n ->setGroup($this->group)\n ->addRole($role)\n ->setState(OgMembershipInterface::STATE_ACTIVE)\n ->save();\n }", "public static function getMember(){\n return $user;\n }", "public function setProductionMembership(ProductionMembership $production_membership): self\n {\n $this->production_membership = $production_membership;\n\n return $this;\n }", "function every2ndhourly_limited_membership_extend(){\t\t\r\r\n\t\tmgm_check_limited_memberships();\r\r\n\t}", "public function format_team_member(){\n\t\t$count = count($this->request->data['TskProjectRequest']['member']) - 1;\n\t\t$comma = ',';\n\t\tforeach($this->request->data['TskProjectRequest']['member'] as $key => $user){\n\t\t\tif($count == $key){\n\t\t\t\t$comma = '';\n\t\t\t}\n\t\t\t$member .= $user.$comma;\n\t\t}\n\t\treturn $member;\n\t}", "public function hasMembers(){\r\n return $this->_has(1);\r\n }", "public function testComAdobeCqSocialMembersEndpointsImplCommunityMemberGroupProfile() {\n\n }", "public function testMemberRole() {\n $membership = Og::createMembership($this->group, $this->user);\n $membership->setState(OgMembershipInterface::STATE_ACTIVE)->save();\n\n $membership = $this->entityTypeManager->getStorage('og_membership')->loadUnchanged($membership->id());\n\n $roles = $membership->getRoles();\n $role = current($roles);\n\n $this->assertEquals(1, count($roles));\n $this->assertEquals(OgRoleInterface::AUTHENTICATED, $role->getName());\n }", "public function getAffiliatemembers();", "public function getMembercount()\n\t{\n\t\treturn $this->membercount;\n\t}", "public function testGetOrganizationMemberships()\n {\n $this->assertEquals($this->org_memberships, $this->model->getOrganizationMemberships());\n $this->assertEquals($this->org_memberships, $this->model->getOrgMemberships());\n }", "public function loadMembership(Production $production, UserInterface $user): ?ProductionMembershipInterface;", "public function testAddMember()\n {\n $this->client->logInAsClient();\n\n $user = User::create([\n 'first_name' => 'Tester',\n 'last_name' => 'McTester-Butt',\n 'email' => str_random(10) . '_test@test.com',\n 'password' => str_random(10),\n ]);\n\n $options = [\n 'title' => 'Title',\n 'department' => 'Department'\n ];\n $this->client->addUser($user, $options);\n\n $this->assertTrue(isset($user->memberships[$this->client->domain]));\n $this->assertSame($user->info->title, 'Title');\n $this->assertSame($user->info->department, 'Department');\n }", "public function getTeamsIdMembershipsWithHttpInfo($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling getTeamsIdMemberships');\n }\n // parse inputs\n $resourcePath = \"/teams/{id}/memberships\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Caplinked\\Model\\Membership[]',\n '/teams/{id}/memberships'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Caplinked\\Model\\Membership[]', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Caplinked\\Model\\Membership[]', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "public function testCreateMemberSuccessfully(): void\n {\n $this->app->make(Kernel::class)->call('migrate:refresh', ['--seed' => TRUE]);\n $this->post('/mailchimp/lists/' . env('MAILCHIMP_LIST_ID') . '/members', static::$memberData);\n\n $content = \\json_decode($this->response->getContent(), true);\n\n $this->assertResponseOk();\n $this->seeJson(static::$memberData);\n self::assertArrayHasKey('mail_chimp_id', $content);\n self::assertNotNull($content['mail_chimp_id']);\n\n $this->createdMemberIds[] = $content['id']; // Store MailChimp member id for cleaning purposes\n }", "function upgradeMembership($action) {\n\n\t\t// get current user\n\t\t$user_id = session()->value(\"user_id\");\n\n\t\t// Get posted values to make them available for models\n\t\t$this->getPostedEntities();\n\n\n\t\t// does values validate\n\t\tif(count($action) == 1 && $this->validateList(array(\"item_id\"))) {\n\n\t\t\t$query = new Query();\n\t\t\t$IC = new Items();\n\t\t\t$SC = new Shop();\n\n\t\t\t$item_id = $this->getProperty(\"item_id\", \"value\");\n\n\t\t\t$member = $this->getMembership();\n\t\t\tif($member && $member[\"item_id\"]) {\n\n\n\t\t\t\tinclude_once(\"classes/shop/supershop.class.php\");\n\t\t\t\t$SC = new SuperShop();\n\n\n\t\t\t\t$_POST[\"user_id\"] = $user_id;\n\t\t\t\t$_POST[\"order_comment\"] = \"Membership upgraded\";\n\t\t\t\t$order = $SC->addOrder(array(\"addOrder\"));\n\t\t\t\tunset($_POST);\n\n\t\t\t\t// get existing membership price\n\t\t\t\t$current_price = $SC->getPrice($member[\"item_id\"]);\n\n\t\t\t\t// get new item and price\n\t\t\t\t$item = $IC->getItem(array(\"id\" => $item_id, \"extend\" => array(\"subscription_method\" => true)));\n\t\t\t\t$new_price = $SC->getPrice($item_id);\n\n\n\t\t\t\t// add item to cart\n\t\t\t\t$_POST[\"quantity\"] = 1;\n\t\t\t\t$_POST[\"item_id\"] = $item_id;\n\t\t\t\t$_POST[\"item_price\"] = $new_price[\"price\"] - $current_price[\"price\"];\n\t\t\t\t$_POST[\"item_name\"] = $item[\"name\"] . \" (Upgrade)\";\n\t\t\t\t$_POST[\"subscription_upgrade\"] = 1;\n\n\n\t\t\t\t// adding a membership to an order will automatically change the membership\n\t\t\t\t$order = $SC->addToOrder(array(\"addToOrder\", $order[\"id\"]));\n\t\t\t\tunset($_POST);\n\n\t\t\t\tif($order) {\n\n\t\t\t\t\tglobal $page;\n\t\t\t\t\t$page->addLog(\"User->upgradeMembership: member_id:\".$member[\"id\"].\",item_id:$item_id, subscription_id:\".$member[\"subscription_id\"]);\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n// \t\t\t\t// only perform membership upgrade if it is an actual upgrade\n// \t\t\t\tif($new_price[\"price\"] > $current_price[\"price\"]) {\n//\n// \t\t\t\t\t// find price difference\n// \t\t\t\t\t$order_price[\"price\"] = $new_price[\"price\"] - $current_price[\"price\"];\n// \t\t\t\t\t$order_price[\"vat\"] = $new_price[\"price\"] * (1 - (1 / (1 + ($new_price[\"vatrate\"]/100))));\n//\n//\n// \t\t\t\t\t// Start creating custom difference order\n//\n// \t\t\t\t\t// get existing order to copy data for new order\n// \t\t\t\t\t$sql = \"SELECT * FROM \".$SC->db_orders.\" WHERE id = \".$member[\"order_id\"].\" LIMIT 1\";\n// \t\t\t\t\tif($query->sql($sql)) {\n// \t\t\t\t\t\t$order = $query->result(0);\n//\n// \t\t\t\t\t\t// get new order number\n// \t\t\t\t\t\t$order_no = $SC->getNewOrderNumber();\n// \t\t\t\t\t\tif($order_no) {\n//\n// \t\t\t\t\t\t\t// create base data update sql\n// \t\t\t\t\t\t\t$sql = \"UPDATE \".$SC->db_orders.\" SET comment = 'Membership upgrade'\";\n//\n// \t\t\t\t\t\t\tforeach($order as $key => $value) {\n// //\t\t\t\t\t\t\t\tprint $key . \" = \" . $value . \"<br>\\n\";\n// \t\t\t\t\t\t\t\t// filter out order specific values\n// \t\t\t\t\t\t\t\tif(!preg_match(\"/(^order_no$|^id$|status$|^comment$|ed_at$)/\", $key) && $value) {\n// \t\t\t\t\t\t\t\t\t$sql .= \", $key = '$value'\";\n// \t\t\t\t\t\t\t\t}\n//\n// \t\t\t\t\t\t\t}\n//\n// \t\t\t\t\t\t\t$sql .= \" WHERE order_no = '$order_no'\";\n// //\t\t\t\t\t\t\tprint $sql.\"<br>\\n\";\n//\n// \t\t\t\t\t\t\tif($query->sql($sql)) {\n//\n// \t\t\t\t\t\t\t\t// get the new order\n// \t\t\t\t\t\t\t\t$order = $SC->getOrders(array(\"order_no\" => $order_no));\n//\n// \t\t\t\t\t\t\t\t// add custom order line\n// \t\t\t\t\t\t\t\t$sql = \"INSERT INTO \".$SC->db_order_items.\" SET order_id=\".$order[\"id\"].\", item_id=$item_id, name='\".$item[\"name\"].\" (Upgrade)', quantity=1, unit_price=\".$order_price[\"price\"].\", unit_vat=\".$order_price[\"vat\"].\", total_price=\".$order_price[\"price\"].\", total_vat=\".$order_price[\"vat\"];\n// //\t\t\t\t\t\t\t\tprint $sql.\"<br>\\n\";\n//\n// \t\t\t\t\t\t\t\tif($query->sql($sql)) {\n//\n// \t\t\t\t\t\t\t\t\t// update subscription data (item id, order_id, expires_at)\n//\n// \t\t\t\t\t\t\t\t\t// get current subscription\n// \t\t\t\t\t\t\t\t\t$subscription = $this->getSubscriptions(array(\"subscription_id\" => $member[\"subscription_id\"]));\n//\n// \t\t\t\t\t\t\t\t\t$sql = \"UPDATE \".$this->db_subscriptions. \" SET item_id = $item_id, order_id = \".$order[\"id\"];\n//\n// \t\t\t\t\t\t\t\t\t$expires_at = false;\n// \t\t\t\t\t\t\t\t\tif($item[\"subscription_method\"]) {\n// \t\t\t\t\t\t\t\t\t\t$start_time = $subscription[\"renewed_at\"] ? $subscription[\"renewed_at\"] : $subscription[\"created_at\"];\n// \t\t\t\t\t\t\t\t\t\t$expires_at = $this->calculateSubscriptionExpiry($item[\"subscription_method\"][\"duration\"], $start_time);\n// \t\t\t\t\t\t\t\t\t}\n//\n// \t\t\t\t\t\t\t\t\tif($expires_at) {\n// \t\t\t\t\t\t\t\t\t\t$sql .= \", expires_at = '$expires_at'\";\n// \t\t\t\t\t\t\t\t\t}\n// \t\t\t\t\t\t\t\t\telse {\n// \t\t\t\t\t\t\t\t\t\t$sql .= \", expires_at = NULL\";\n// \t\t\t\t\t\t\t\t\t}\n//\n// \t\t\t\t\t\t\t\t\t$sql .= \" WHERE id = \".$member[\"subscription_id\"];\n// //\t\t\t\t\t\t\t\t\tprint $sql.\"<br>\\n\";\n//\n// \t\t\t\t\t\t\t\t\tif($query->sql($sql)) {\n//\n// \t\t\t\t\t\t\t\t\t\tglobal $page;\n// \t\t\t\t\t\t\t\t\t\t$page->addLog(\"User->upgradeMembership: member_id:\".$member[\"id\"].\",item_id:$item_id, subscription_id:\".$member[\"subscription_id\"]);\n//\n//\n// \t\t\t\t\t\t\t\t\t\treturn true;\n// \t\t\t\t\t\t\t\t\t}\n//\n// \t\t\t\t\t\t\t\t}\n//\n// \t\t\t\t\t\t\t}\n//\n// \t\t\t\t\t\t}\n//\n// \t\t\t\t\t}\n//\n// \t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn false;\n\t}", "public function Member()\n {\n return $this->member;\n }", "function switchMembership($action) {\n\n\t\t// get current user\n\t\t$user_id = session()->value(\"user_id\");\n\n\t\t// Get posted values to make them available for models\n\t\t$this->getPostedEntities();\n\n\n\t\t// does values validate\n\t\tif(count($action) == 1 && $this->validateList(array(\"item_id\"))) {\n\n\t\t\t$query = new Query();\n\t\t\t$IC = new Items();\n\t\t\t$SC = new Shop();\n\n\t\t\t$item_id = $this->getProperty(\"item_id\", \"value\");\n\n\t\t\t$member = $this->getMembership();\n\t\t\tif($member) {\n\n\t\t\t\t// add item to cart\n\t\t\t\t$_POST[\"quantity\"] = 1;\n\t\t\t\t$_POST[\"item_id\"] = $item_id;\n\t\t\t\t$cart = $SC->addToCart(array(\"addToCart\"));\n\t\t\t\tunset($_POST);\n\n\t\t\t\t// convert to order\n\t\t\t\t// adding a membership to an order will automatically change the membership\n\t\t\t\t$order = $SC->newOrderFromCart(array(\"newOrderFromCart\", $cart[\"cart_reference\"]));\n\n\t\t\t\tif($order) {\n\t\t\t\t\treturn $order;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn false;\n\t}", "public function setCustomerMembershipId(int $customerMembershipId): self\n {\n $this->customerMembershipId = $customerMembershipId;\n\n return $this;\n }", "public function ybrMembership6Permission()\n {\n return $this->hasOne('App\\Models\\YbrMembership6Permission','plan_id','id');\n }", "function pmpro_membership_card_profile_fields($user)\r\n{\r\n\tglobal $current_user;\r\n\r\n\t$membership_level_capability = apply_filters(\"pmpro_edit_member_capability\", \"manage_options\");\r\n\tif(!current_user_can($membership_level_capability))\r\n\t\treturn false;\r\n\r\n\tif(!function_exists(\"pmpro_hasMembershipLevel\") || (function_exists(\"pmpro_hasMembershipLevel\") && pmpro_hasMembershipLevel(NULL, $user->ID)))\r\n\t{\r\n\t\t?>\r\n\t\t<h3><?php _e(\"Membership Card\", \"pmpro\"); ?></h3>\r\n\t\t<table class=\"form-table\">\r\n\t\t\t<tr>\r\n\t\t\t\t<th>&nbsp;</th>\r\n\t\t\t\t<td><a href=\"<?php echo add_query_arg('u', $user->ID, get_permalink(pmpro_membership_card_get_post_id()));?>\">View and Print Membership Card</a></td>\r\n\t\t\t</tr>\r\n\t\t</table>\r\n\t\t<?php\r\n\t}\t\r\n}", "public function boardMember()\n {\n return $this->belongsTo(BoardMember::class);\n }", "public function registerMembers()\n\t{\n\t\trequire_once(SUBSDIR . '/Members.subs.php');\n\t\t$require = array('activation', 'approval');\n\t\t$_SESSION['just_registered'] = 0;\n\n\t\t// Register a couple of members, like user0, user1\n\t\tfor ($i = 0; $i < 2; $i++)\n\t\t{\n\t\t\t$regOptions = array(\n\t\t\t\t'interface' => 'admin',\n\t\t\t\t'username' => 'user' . $i,\n\t\t\t\t'email' => 'user' . $i . '@mydomain.com',\n\t\t\t\t'password' => 'user' . $i,\n\t\t\t\t'password_check' => 'user' . $i,\n\t\t\t\t'require' => $require[$i],\n\t\t\t\t'memberGroup' => 2,\n\t\t\t);\n\n\t\t\t// Will show sh: 1: sendmail: not found in the CI console\n\t\t\t$id = registerMember($regOptions);\n\n\t\t\t// Depends a bit on when it runs, but normally will be 4, 5\n\t\t\t$this->assertContains($id, [2, 3, 4, 5], 'Unexpected MemberID: ' . $id);\n\t\t\t$_SESSION['just_registered'] = 0;\n\t\t}\n\t}", "public function __construct($member)\n {\n $this->member = $member;\n }" ]
[ "0.7696336", "0.70603746", "0.70603746", "0.6063626", "0.60399574", "0.6015242", "0.59805286", "0.5957825", "0.5905448", "0.5901049", "0.5901025", "0.58510256", "0.5817239", "0.58162946", "0.57619905", "0.5722311", "0.5707221", "0.5678298", "0.5671822", "0.5626312", "0.55761397", "0.55558985", "0.5530142", "0.54980314", "0.548108", "0.54408574", "0.54400283", "0.5433331", "0.5389964", "0.533906", "0.533164", "0.53151095", "0.5300431", "0.5261825", "0.5224766", "0.519637", "0.51957214", "0.5184934", "0.5181622", "0.51731783", "0.5168082", "0.51658845", "0.51651925", "0.51649517", "0.5154459", "0.5134063", "0.5131518", "0.5130775", "0.5128616", "0.5122555", "0.5119035", "0.50862926", "0.50862926", "0.50862926", "0.50621307", "0.50529367", "0.5037576", "0.5034249", "0.5032487", "0.5023665", "0.49999464", "0.49946463", "0.4979512", "0.4975648", "0.49724358", "0.4969809", "0.49425364", "0.49371615", "0.49252084", "0.49202722", "0.4900648", "0.4898637", "0.48972762", "0.48955688", "0.4892661", "0.48919737", "0.48868057", "0.48860532", "0.48783594", "0.48782668", "0.48776177", "0.4877085", "0.4875965", "0.48722583", "0.4870802", "0.4858486", "0.48583353", "0.48562497", "0.48549777", "0.48501393", "0.48433465", "0.48425812", "0.48371962", "0.48359025", "0.48313025", "0.48291707", "0.482826", "0.4826652", "0.4826492", "0.48240674" ]
0.74768007
1
Generated from protobuf field repeated .api.Peer peers = 3;
Сгенерировано из поля protobuf repeated .api.Peer peers = 3;
public function setPeers($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Api\Peer::class); $this->peers = $arr; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPeers()\n {\n return $this->peers;\n }", "public function getPeers() {\n return $this->_peers;\n }", "public function setNumPeers($var)\n {\n GPBUtil::checkUint32($var);\n $this->num_peers = $var;\n\n return $this;\n }", "private function getPeerCollection() {\n return $this->getcollection('peer');\n }", "public function getNumPeers()\n {\n return $this->num_peers;\n }", "public function peers(\n ): EmptyOrUnknownResult {\n /** @var \\Vazaha\\Mastodon\\Results\\EmptyOrUnknownResult<array-key,\\Vazaha\\Mastodon\\Models\\EmptyOrUnknownModel> */\n $models = $this->apiClient\n ->send(new PeersRequest(\n ));\n\n return $models;\n }", "public static function addPeer($peer){\n\t\tif( in_array($peer, self::$peers) ) return;\n\t\t\n\t\t//add to peer strings\n\t\tself::$peers[] = $peer;\n\t\t\n\t\t$peerSockets[] = null;\n\t}", "public function countPeers()\n {\n return PeerCount::createFromJson($this->getJson('COUNTPEERS'));\n }", "public function getDnsPeerings()\n {\n return $this->dns_peerings;\n }", "public function addPeer($input){\n return $this->getNetSdkObj()->addPeer($input);\n }", "public function getParticipants();", "public function getSipPeers()\n {\n $this->_checkSocket();\n\n $response = $this->_sendCommand(\"Action: Sippeers\\r\\n\\r\\n\", 'ListItems', false);\n return $response;\n }", "function &get_peers(&$db, &$info_hash_b64, $compact = 0, $extended = 0, $touch = 1) {\r\n // relations must be house kept to the current time\r\n if($touch == 1) { touch_peers($db); }\r\n\r\n // creates the query to select the complete set of\r\n // peers for the file with the provided info hash\r\n // and executes it retrieving the results\r\n $query = sprintf(\"select * from peer_file left join peer on peer_file.peer_id = peer.peer_id where peer_file.info_hash = '%s'\", $info_hash_b64);\r\n $results = $db->query($query);\r\n\r\n // creates the array that will contain the complete\r\n // set of peers and iterates over the results to\r\n // contruct the set from the results\r\n $peers = array();\r\n while($row = $results->fetchArray()) {\r\n // in case the retrieval type is compact only\r\n // the ip information and port should be returned\r\n if($compact == 1) {\r\n $port = intval($row[\"port\"]);\r\n $ip_split = explode(\".\", $row[\"ip\"]);\r\n $ip_integer = intval($ip_split[0]) << 24 | intval($ip_split[1]) << 16 | intval($ip_split[2]) << 8 | intval($ip_split[3]);\r\n $peer = pack(\"Nn\", $ip_integer, $port);\r\n }\r\n // otherwise the normal (full) mode should be used\r\n // and the peer should include much more information\r\n else {\r\n if($extended == 1) {\r\n $peer = array(\r\n \"peer id\" => base64_decode($row[\"peer_id\"]),\r\n \"ip\" => $row[\"ip\"],\r\n \"port\" => intval($row[\"port\"]),\r\n \"isDct\" => true,\r\n );\r\n } else {\r\n $peer = array(\r\n \"peer id\" => base64_decode($row[\"peer_id\"]),\r\n \"peer_id\" => base64_decode($row[\"peer_id\"]),\r\n \"ip\" => $row[\"ip\"],\r\n \"port\" => intval($row[\"port\"]),\r\n \"client\" => $row[\"client\"],\r\n \"version\" => $row[\"version\"],\r\n \"uploaded\" => $row[\"uploaded\"],\r\n \"downloaded\" => $row[\"downloaded\"],\r\n \"left\" => $row[\"left\"],\r\n \"status\" => $row[\"status\"],\r\n \"isDct\" => true,\r\n );\r\n }\r\n }\r\n\r\n // adds the created peer structure to the list\r\n // of peers for the requested file\r\n $peers[] = $peer;\r\n }\r\n\r\n // in case the compact mode is set, must join\r\n // all the peer string into on solo string\r\n if($compact == 1) { $peers = implode($peers); }\r\n\r\n // returns the list of peers that was just contructed\r\n // to the caller method\r\n return $peers;\r\n}", "public function getParticipants()\n {\n return $this->participants;\n }", "public function getParticipants()\n {\n return $this->participants;\n }", "public static function getDescriptor()\n {\n static $descriptor;\n if (!isset($descriptor)) {\n $desc = new ProtocolBuffersDescriptorBuilder();\n $desc->addField(1, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_STRING,\n \"name\" => \"name\",\n \"required\" => false,\n \"optional\" => true,\n \"repeated\" => false,\n \"packable\" => false,\n \"default\" => \"\",\n )));\n $desc->addField(2, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_INT32,\n \"name\" => \"age\",\n \"required\" => false,\n \"optional\" => true,\n \"repeated\" => false,\n \"packable\" => false,\n \"default\" => \"\",\n )));\n $desc->addField(3, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_MESSAGE,\n \"name\" => \"phone\",\n \"required\" => false,\n \"optional\" => true,\n \"repeated\" => false,\n \"packable\" => false,\n \"default\" => \"\",\n \"message\" => \"Phone\",\n )));\n $descriptor = $desc->build();\n }\n return $descriptor;\n }", "public function getReportPeers()\n {\n return [/*self::SUDO*/];\n }", "public function setPeerIds(array $value): GetConversationsById\n {\n $this->peerIds = $value;\n return $this;\n }", "public function getDataParticipants() : array\n {\n return $this->dataParticipants;\n }", "public function getConversationParticipants()\n {\n return $this->conversationParticipants;\n }", "public function getPeer()\n\t{\n\t\tif (self::$peer === null) {\n\t\t\tself::$peer = new RecognitionDataPeer();\n\t\t}\n\t\treturn self::$peer;\n\t}", "public function getPeer()\n {\n if (self::$peer === null) {\n self::$peer = new PessoaPeer();\n }\n\n return self::$peer;\n }", "public function participants()\n {\n return $this->hasMany(ChatRoomParticipant::class,'room_id','id');\n }", "public function getPeer()\n {\n if (self::$peer === null) {\n self::$peer = new ClientePeer();\n }\n\n return self::$peer;\n }", "private function CheckConnectionWithPeers() {\n\n //Run subprocess peerAlive per peer\n $peers = $this->chaindata->GetAllPeers();\n\n if (count($peers) > 0) {\n\n if (DISPLAY_DEBUG && DISPLAY_DEBUG_LEVEL >= 1)\n Display::_debug(\"Checking status of peers %G%count%W%=\".count($peers));\n\n Tools::writeLog('Checking status of peers count='.count($peers));\n\n\n //Run subprocess propagation\n Subprocess::newProcess(Tools::GetBaseDir().\"subprocess\".DIRECTORY_SEPARATOR,'peerAlive',\"\",-1);\n }\n }", "public function getPeer()\n\t{\n\t\tif (self::$peer === null) {\n\t\t\tself::$peer = new CiudadPeer();\n\t\t}\n\t\treturn self::$peer;\n\t}", "function parse_bgp_peer_index(&$peer, $index, $mib = 'BGP4V2-MIB')\n{\n $address_types = $GLOBALS['config']['mibs']['INET-ADDRESS-MIB']['rewrite']['InetAddressType'];\n $index_parts = explode('.', $index);\n switch ($mib)\n {\n case 'BGP4-MIB':\n // bgpPeerRemoteAddr\n if (get_ip_version($index))\n {\n $peer['bgpPeerRemoteAddr'] = $index;\n }\n break;\n\n case 'ARISTA-BGP4V2-MIB':\n // 1. aristaBgp4V2PeerInstance\n $peer['aristaBgp4V2PeerInstance'] = array_shift($index_parts);\n // 2. aristaBgp4V2PeerRemoteAddrType\n $peer_addr_type = array_shift($index_parts);\n if (strlen($peer['aristaBgp4V2PeerRemoteAddrType']) == 0)\n {\n $peer['aristaBgp4V2PeerRemoteAddrType'] = $peer_addr_type;\n }\n if (isset($address_types[$peer['aristaBgp4V2PeerRemoteAddrType']]))\n {\n $peer['aristaBgp4V2PeerRemoteAddrType'] = $address_types[$peer['aristaBgp4V2PeerRemoteAddrType']];\n }\n // 3. length of the IP address\n $ip_len = array_shift($index_parts);\n // 4. IP address\n $ip_parts = array_slice($index_parts, 0, $ip_len);\n\n // 5. aristaBgp4V2PeerRemoteAddr\n $peer_ip = implode('.', $ip_parts);\n if ($ip_len == 16)\n {\n $peer_ip = snmp2ipv6($peer_ip);\n }\n if ($peer_addr_type = get_ip_version($peer_ip))\n {\n $peer['aristaBgp4V2PeerRemoteAddr'] = $peer_ip;\n $peer['aristaBgp4V2PeerRemoteAddrType'] = 'ipv' . $peer_addr_type; // FIXME. not sure, but seems as Arista use only ipv4/ipv6 for afi\n }\n break;\n\n case 'BGP4V2-MIB':\n case 'FOUNDRY-BGP4V2-MIB': // BGP4V2-MIB draft\n // 1. bgp4V2PeerInstance\n $peer['bgp4V2PeerInstance'] = array_shift($index_parts);\n // 2. bgp4V2PeerLocalAddrType\n $local_addr_type = array_shift($index_parts);\n if (strlen($peer['bgp4V2PeerLocalAddrType']) == 0)\n {\n $peer['bgp4V2PeerLocalAddrType'] = $local_addr_type;\n }\n if (isset($address_types[$peer['bgp4V2PeerLocalAddrType']]))\n {\n $peer['bgp4V2PeerLocalAddrType'] = $address_types[$peer['bgp4V2PeerLocalAddrType']];\n }\n // 3. length of the local IP address\n $ip_len = array_shift($index_parts);\n // 4. IP address\n $ip_parts = array_slice($index_parts, 0, $ip_len);\n\n // 5. bgp4V2PeerLocalAddr\n $local_ip = implode('.', $ip_parts);\n if ($ip_len == 16)\n {\n $local_ip = snmp2ipv6($local_ip);\n }\n if (get_ip_version($local_ip))\n {\n $peer['bgp4V2PeerLocalAddr'] = $local_ip;\n }\n\n // Get second part of index\n $index_parts = array_slice($index_parts, $ip_len);\n $peer_addr_type = array_shift($index_parts);\n if (strlen($peer['bgp4V2PeerRemoteAddrType']) == 0)\n {\n $peer['bgp4V2PeerRemoteAddrType'] = $peer_addr_type;\n }\n if (isset($address_types[$peer['bgp4V2PeerRemoteAddrType']]))\n {\n $peer['bgp4V2PeerRemoteAddrType'] = $address_types[$peer['bgp4V2PeerRemoteAddrType']];\n }\n // 6. length of the IP address\n $ip_len = array_shift($index_parts);\n // 7. IP address\n $ip_parts = array_slice($index_parts, 0, $ip_len);\n\n // 8. bgp4V2PeerRemoteAddr\n $peer_ip = implode('.', $ip_parts);\n if ($ip_len == 16)\n {\n $peer_ip = snmp2ipv6($peer_ip);\n }\n if ($peer_addr_type = get_ip_version($peer_ip))\n {\n $peer['bgp4V2PeerRemoteAddr'] = $peer_ip;\n $peer['bgp4V2PeerRemoteAddrType'] = 'ipv' . $peer_addr_type;\n }\n break;\n\n case 'BGP4-V2-MIB-JUNIPER':\n // 1. jnxBgpM2PeerRoutingInstance\n $peer['jnxBgpM2PeerRoutingInstance'] = array_shift($index_parts);\n // 2. jnxBgpM2PeerLocalAddrType\n $local_addr_type = array_shift($index_parts);\n if (strlen($peer['jnxBgpM2PeerLocalAddrType']) == 0)\n {\n $peer['jnxBgpM2PeerLocalAddrType'] = $local_addr_type;\n }\n if (isset($address_types[$peer['jnxBgpM2PeerLocalAddrType']]))\n {\n $peer['jnxBgpM2PeerLocalAddrType'] = $address_types[$peer['jnxBgpM2PeerLocalAddrType']];\n }\n // 3. length of the local IP address\n $ip_len = (strstr($peer['jnxBgpM2PeerLocalAddrType'], 'ipv6') ? 16 : 4);\n // 4. IP address\n $ip_parts = array_slice($index_parts, 0, $ip_len);\n\n // 5. jnxBgpM2PeerLocalAddr\n $local_ip = implode('.', $ip_parts);\n if ($ip_len == 16)\n {\n $local_ip = snmp2ipv6($local_ip);\n }\n if (get_ip_version($local_ip))\n {\n $peer['jnxBgpM2PeerLocalAddr'] = $local_ip;\n }\n\n // Get second part of index\n $index_parts = array_slice($index_parts, $ip_len);\n // 6. jnxBgpM2PeerRemoteAddrType\n $peer_addr_type = array_shift($index_parts);\n if (strlen($peer['jnxBgpM2PeerRemoteAddrType']) == 0)\n {\n $peer['jnxBgpM2PeerRemoteAddrType'] = $peer_addr_type;\n }\n if (isset($address_types[$peer['jnxBgpM2PeerRemoteAddrType']]))\n {\n $peer['jnxBgpM2PeerRemoteAddrType'] = $address_types[$peer['jnxBgpM2PeerRemoteAddrType']];\n }\n // 7. length of the remote IP address\n $ip_len = (strstr($peer['jnxBgpM2PeerRemoteAddrType'], 'ipv6') ? 16 : 4);\n // 8. IP address\n $ip_parts = array_slice($index_parts, 0, $ip_len);\n\n // 9. jnxBgpM2PeerRemoteAddr\n $peer_ip = implode('.', $ip_parts);\n if ($ip_len == 16)\n {\n $peer_ip = snmp2ipv6($peer_ip);\n }\n if (get_ip_version($peer_ip))\n {\n $peer['jnxBgpM2PeerRemoteAddr'] = $peer_ip;\n }\n break;\n\n case 'FORCE10-BGP4-V2-MIB':\n // 1. f10BgpM2PeerInstance\n $peer['f10BgpM2PeerInstance'] = array_shift($index_parts);\n // 2. f10BgpM2PeerLocalAddrType\n $local_addr_type = array_shift($index_parts);\n if (strlen($peer['f10BgpM2PeerLocalAddrType']) == 0)\n {\n $peer['f10BgpM2PeerLocalAddrType'] = $local_addr_type;\n }\n if (isset($address_types[$peer['f10BgpM2PeerLocalAddrType']]))\n {\n $peer['f10BgpM2PeerLocalAddrType'] = $address_types[$peer['f10BgpM2PeerLocalAddrType']];\n }\n // 3. length of the local IP address\n $ip_len = (strstr($peer['f10BgpM2PeerLocalAddrType'], 'ipv6') ? 16 : 4);\n // 4. IP address\n $ip_parts = array_slice($index_parts, 0, $ip_len);\n\n // 5. f10BgpM2PeerLocalAddr\n $local_ip = implode('.', $ip_parts);\n if ($ip_len == 16)\n {\n $local_ip = snmp2ipv6($local_ip);\n }\n if (get_ip_version($local_ip))\n {\n $peer['f10BgpM2PeerLocalAddr'] = $local_ip;\n }\n\n // Get second part of index\n $index_parts = array_slice($index_parts, $ip_len);\n // 6. f10BgpM2PeerRemoteAddrType\n $peer_addr_type = array_shift($index_parts);\n if (strlen($peer['f10BgpM2PeerRemoteAddrType']) == 0)\n {\n $peer['f10BgpM2PeerRemoteAddrType'] = $peer_addr_type;\n }\n if (isset($address_types[$peer['f10BgpM2PeerRemoteAddrType']]))\n {\n $peer['f10BgpM2PeerRemoteAddrType'] = $address_types[$peer['f10BgpM2PeerRemoteAddrType']];\n }\n // 7. length of the remote IP address\n $ip_len = (strstr($peer['f10BgpM2PeerRemoteAddrType'], 'ipv6') ? 16 : 4);\n // 8. IP address\n $ip_parts = array_slice($index_parts, 0, $ip_len);\n\n // 9. f10BgpM2PeerRemoteAddr\n $peer_ip = implode('.', $ip_parts);\n if ($ip_len == 16)\n {\n $peer_ip = snmp2ipv6($peer_ip);\n }\n if (get_ip_version($peer_ip))\n {\n $peer['f10BgpM2PeerRemoteAddr'] = $peer_ip;\n }\n break;\n\n }\n\n}", "public function getParticipants()\n {\n return $this->participants->toArray();\n }", "public function getPeer()\n\t{\n\t\tif (self::$peer === null) {\n\t\t\tself::$peer = new ItineraryPeer();\n\t\t}\n\t\treturn self::$peer;\n\t}", "public function participants()\n {\n return $this->hasMany(Participant::class);\n\n }", "public function get_peers()\n {\n // get employee_id of the auth user\n // $employee_id = auth()->user()->employee_id;\n $employee_id = 9;\n\n // get sup id\n $superior = Superior::where('employee_id', $employee_id)\n ->get();\n $superior_id = $superior[0]->id;\n\n // get peers\n $peers = SuperiorsRecord::where('superior_id', $superior_id)->get();\n\n $data = array();\n\n foreach ($peers as $peer) {\n array_push(\n $data,\n array(\n 'superiors_record_id' => $peer->id,\n 'superior_id' => $peer->superior_id,\n 'employee_id' => $peer->employee_id,\n 'full_name' => $peer->name,\n 'questionnaire_id' => $peer->questionnaire_id,\n 'is_complete' => $peer->is_complete,\n 'competency_records' => $peer->competency_records,\n )\n );\n }\n return response()->json($data);\n }", "public static function getDescriptor()\n {\n if (!isset(self::$descriptor)) {\n $desc = new ProtocolBuffersDescriptorBuilder();\n $desc->addField(1, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_INT32,\n \"name\" => \"id\",\n \"required\" => true,\n \"packable\" => false,\n \"repeated\" => false,\n \"default\" => null,\n )));\n $desc->addField(2, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_FLOAT,\n \"name\" => \"offense\",\n \"required\" => false,\n \"packable\" => false,\n \"repeated\" => false,\n \"default\" => null,\n )));\n $desc->addField(3, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_STRING,\n \"name\" => \"name\",\n \"required\" => false,\n \"packable\" => false,\n \"repeated\" => false,\n \"default\" => null,\n )));\n\n self::$descriptor = $desc->build();\n }\n\n return self::$descriptor;\n }", "public function participants() {\n return $this->hasMany('App\\Models\\Participant');\n }", "public function testDisallowDuplicateParticipants() {\n $users = $this->generateTestUsers();\n $this->tournamentPlugin->addParticipants($this->tournament, $users);\n $this->tournamentPlugin->addParticipants($this->tournament, $users);\n }", "public function getPeer()\n\t{\n\t\tif (self::$peer === null) {\n\t\t\tself::$peer = new UserPeer();\n\t\t}\n\t\treturn self::$peer;\n\t}", "public function setMembers($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Adamant\\PBGlobal\\V1\\WalletMember::class);\n $this->members = $arr;\n\n return $this;\n }", "public function get_items_peers($itemid) {\n $itemref = $this->find_item($itemid);\n $peerids = $itemref->parentlist->get_child_ids();\n return $peerids;\n }", "public function onPeerClose($peer) {\n $peer->getSocket()->close();\n\n $peer_pos = array_search($peer, $this->_peers);\n\n // Remove the peer from the inner array\n if ($peer_pos !== false) {\n $this->_peers = array_merge(array_slice($this->_peers, 0, $peer_pos), array_slice($this->_peers, $peer_pos+1));\n }\n }", "public function getPeer()\n\t{\n\t\tif (self::$peer === null) {\n\t\t\tself::$peer = new CommuterPeer();\n\t\t}\n\t\treturn self::$peer;\n\t}", "public function getEpbReferences()\n {\n return $this->epbReferences;\n }", "public function getParticipantIds(): array\n {\n if (!$this->frozen) {\n throw new \\RuntimeException('Collection of related items is not yet completed');\n }\n return $this->participantIds;\n }", "public function getParticipantsCount(): int\n {\n return count($this->getParticipantIds());\n }", "public function setParticipants($participants);", "public static function getDescriptor()\n {\n \tstatic $descriptor;\n if (!isset($descriptor)) {\n $desc = new ProtocolBuffersDescriptorBuilder();\n\t\t\t$desc->addField(1, new ProtocolBuffersFieldDescriptor(array(\n\t\t\t\t\"type\" => ProtocolBuffers::TYPE_BOOL,\n\t\t\t\t\"name\" => \"IsDraft\",\n\t\t\t\t\"required\" => false,\n\t\t\t\t\"optional\" => true,\n\t\t\t\t\"repeated\" => false,\n\t\t\t\t\"packable\" => false,\n\t\t\t\t\"default\" => false,\n\t\t\t)));\n\t\t\t$desc->addField(2, new ProtocolBuffersFieldDescriptor(array(\n\t\t\t\t\"type\" => ProtocolBuffers::TYPE_INT32,\n\t\t\t\t\"name\" => \"from_box_id\",\n\t\t\t\t\"required\" => false,\n\t\t\t\t\"optional\" => true,\n\t\t\t\t\"repeated\" => false,\n\t\t\t\t\"packable\" => false,\n\t\t\t\t\"default\" => false,\n\t\t\t)));\n\t\t\t$desc->addField(3, new ProtocolBuffersFieldDescriptor(array(\n\t\t\t\t\"type\" => ProtocolBuffers::TYPE_INT32,\n\t\t\t\t\"name\" => \"TagId\",\n\t\t\t\t\"required\" => false,\n\t\t\t\t\"optional\" => true,\n\t\t\t\t\"repeated\" => true,\n\t\t\t\t\"packable\" => false,\n\t\t\t\t\"default\" => false,\n\t\t\t)));\n\t\t\t$descriptor = $desc->build();\n }\n\n return $descriptor;\n }", "public static function getDescriptor()\n {\n if (!isset(self::$descriptor)) {\n $desc = new ProtocolBuffersDescriptorBuilder();\n $desc->addField(1, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_MESSAGE,\n \"name\" => \"user\",\n \"required\" => false,\n \"packable\" => false,\n \"repeated\" => true,\n \"default\" => null,\n \"message\" => \"Tutorial_User\",\n )));\n\n self::$descriptor = $desc->build();\n }\n\n return self::$descriptor;\n }", "private function addParticipant(): array\n {\n return [\n $this->getThread(),\n $this->messenger->getProvider(),\n [],\n true,\n ];\n }", "public function getPeer()\n\t{\n\t\tif (self::$peer === null) {\n\t\t\tself::$peer = new CourierPeer();\n\t\t}\n\t\treturn self::$peer;\n\t}", "public function getPeer()\n\t{\n\t\tif (self::$peer === null) {\n\t\t\tself::$peer = new AirportPeer();\n\t\t}\n\t\treturn self::$peer;\n\t}", "function wg_resolve_endpoints() {\n\tglobal $wgg;\n\n\t// Get the latest info\n\twg_globals();\n\n\t// Do we have any peers?\n\tif (isset($wgg['peers']) && is_array($wgg['peers'])) {\n\t\tforeach ((array) $wgg['peers'] as $peer) {\n\t\t\t// Strip port if empty\n\t\t\t$peer['port'] = !empty($peer['port']) ? \":{$peer['port']}\" : null;\n\n\t\t\t$endpoint = \"{$peer['endpoint']}{$peer['port']}\";\n\n\t\t\twg_peer_set_endpoint($peer['tun'], $peer['publickey'], $endpoint);\n\t\t}\n\t}\n\n\t$last_update_time = new DateTime();\n\n\treturn $last_update_time;\n}", "public function getPeer()\n\t{\n\t\tif (self::$peer === null) {\n\t\t\tself::$peer = new VideoAssetPeer();\n\t\t}\n\t\treturn self::$peer;\n\t}", "public function getProtobuf()\n {\n return $this->readOneof(3);\n }", "public function getPeer()\n {\n if (self::$peer === null) {\n self::$peer = new RequerimientoPeer();\n }\n\n return self::$peer;\n }", "public function setDnsPeerings($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Cloud\\DataFusion\\V1beta1\\DnsPeering::class);\n $this->dns_peerings = $arr;\n\n return $this;\n }", "public function participants()\n {\n return $this->belongsToMany('App\\User');\n }", "public function getPeer()\n {\n if (self::$peer === null) {\n self::$peer = new comlabPeer();\n }\n\n return self::$peer;\n }", "public function getPeer()\n\t{\n\t\tif (self::$peer === null) {\n\t\t\tself::$peer = new AlpzaMiembroAnexoPeer();\n\t\t}\n\t\treturn self::$peer;\n\t}", "abstract protected function initParticipants();", "public function getPeerCountMethod () \t{ return \"doCountWithLimit\" ; }", "public function getPeers($withMetrics){\n return $this->getNetSdkObj()->getPeers($withMetrics);\n }", "public function getParticipantPeopleIds()\n\t{\n\t\t$this->getOriginalParticipantIds();\n\t\t$ids = array();\n\t\tforeach ($this->getParticipants() as $p) {\n\t\t\t$ids[] = $p['person']['id'];\n\t\t}\n\n\t\treturn $ids;\n\t}", "public function setParticipants($participants)\n {\n $this->participants = $participants;\n }", "public function setParticipants(array $participants)\n {\n $this->participants = $participants;\n return $this;\n }", "public function participants()\n {\n return $this->belongsToMany('App\\Participant', 'program_participant');\n }", "public function participants()\n\t{\n\t\treturn $this->belongsToMany('App\\User', 'confer_conversation_participants', 'user_id', 'conversation_id');\n\t}", "public function participants()\n {\n return $this->hasMany('App\\Participant', 'family_id');\n }", "public function isPeer(): bool {\n return $this->is_peer;\n }", "public function getPeer()\n {\n if (self::$peer === null) {\n self::$peer = new UtilisateurPeer();\n }\n\n return self::$peer;\n }", "public function testListParticipants()\n {\n }", "public static function getDescriptor()\n {\n static $descriptor;\n if (!isset($descriptor)) {\n $desc = new ProtocolBuffersDescriptorBuilder();\n $desc->addField(1, new ProtocolBuffersFieldDescriptor(array(\n \"type\" => ProtocolBuffers::TYPE_STRING,\n \"name\" => \"number\",\n \"required\" => false,\n \"optional\" => true,\n \"repeated\" => false,\n \"packable\" => false,\n \"default\" => \"\",\n )));\n $descriptor = $desc->build();\n }\n return $descriptor;\n }", "public function getPartners()\n {\n return $this->partners;\n }", "public function getFollowers()\n {\n return $this->hasMany(Followers::class, ['partner_id' => 'id'])->inverseOf('partner');\n }", "public function findPeer(string $id): PeerInterface;", "public function getPlayers()\n {\n return $this->players;\n }", "public function getPeer()\n\t{\n\t\tif (self::$peer === null) {\n\t\t\tself::$peer = new QcSearchPeer();\n\t\t}\n\t\treturn self::$peer;\n\t}", "public function getFriends()\r\n\t{\r\n\t\t$relationships = $this->node->getRelationships('Friends');\r\n\t\t$friends = array();\r\n\t\tforeach ($relationships as $ralationship) \r\n\t\t{\r\n\t\t\t$friends[] = new Member($ralationship->getEndNode());\r\n\t\t}\r\n\t\treturn $friends;\r\n\t}", "public function getProtocols(): array\n {\n return $this->protocols;\n }", "abstract public function getById($peerId);", "public function broadcastOn()\n {\n // return new PrivateChannel('channel-name'); \n $channels = [];\n\n foreach ($this->participants as $user) {\n array_push($channels, new PrivateChannel('newgroup.' . $user));\n }\n return $channels;\n }", "public function participants()\n {\n return $this->belongsToMany(User::class, 'participants');\n }", "public function getPeer()\n\t{\n\t\tif (self::$peer === null) {\n\t\t\tself::$peer = new Oops_Db_OrderDetailPeer();\n\t\t}\n\t\treturn self::$peer;\n\t}", "public function testListParticipants()\n {\n $config = Configuration::getDefaultConfiguration()\n ->setHost('http://127.0.0.1:4010')\n ->setUsername('YOUR_ACCOUNT_ID')\n ->setPassword('YOUR_API_KEY');\n\n\n $apiInstance = new DefaultApi(\n new Client(),\n $config\n );\n\n //$account_id = $account_id_test_value;\n //$conference_id = $conference_id_test_value;\n //$talk = $talk_test_value;\n //$listen = $listen_test_value;\n \n $response = $apiInstance->listParticipants($this->conference_id_listParticipants_test_value(), $this->talk_listParticipants_test_value(), $this->listen_listParticipants_test_value());\n \n \n $this->assertInstanceOf('\\FreeClimb\\Api\\Model\\ConferenceParticipantList',$response);\n }", "public function addAdditionalParticipants(Array $users)\n\t{\n\t\t$this->participants()->sync(array_merge($this->participants()->lists('id'), $users));\n\t}", "public function onPeerAccept($peer) {\n $this->_peers[] = $peer;\n\n $this->getCoinPacketHandler()->onPeerAccept($peer);\n }", "public function getReceivers()\n {\n return $this->receivers;\n }", "public function testNextGenerationFrom3Neighbors()\n {\n // three neighbors, make fourth\n $this->lb->addOrganism(5, 5);\n $this->lb->addOrganism(5, 6);\n $this->lb->addOrganism(6, 5);\n $lbNext3 = $this->livenessCalculator->getNextBoard($this->lb);\n $this->assertCount(4, $lbNext3->getOrganismList());\n }", "public function getParticipants()\n\t{\n\t\tif (!is_null($this->participants))\n\t\t{\n\t\t\treturn $this->participants;\n\t\t}\n\n\t\t$order = 'project.ordering DESC, i.last_name ASC, i.first_name ASC';\n\n\t\t$db = \\JFactory::getDbo();\n\t\t$query = $db->getQuery(true)\n\t\t\t->select('p.*')\n\t\t\t->from('#__tracks_participants AS p')\n\t\t\t->innerJoin('#__tracks_projects as project ON p.project_id = project.id')\n\t\t\t->innerJoin('#__tracks_individuals as i ON i.id = p.individual_id')\n\t\t\t->where('project.published = 1')\n\t\t\t->where('p.team_id = ' . (int) $this->id)\n\t\t\t->group('p.id')\n\t\t\t->order($order);\n\n\t\t$db->setQuery($query);\n\t\t$rows = $db->loadObjectList();\n\n\t\t$this->participants = empty($rows) ? $rows\n\t\t\t: array_map(\n\t\t\t\tfunction ($row)\n\t\t\t\t{\n\t\t\t\t\t$entity = TrackslibEntityParticipant::getInstance($row->id);\n\t\t\t\t\t$entity->bind($row);\n\n\t\t\t\t\treturn $entity;\n\t\t\t\t},\n\t\t\t\t$rows\n\t\t\t);\n\n\t\treturn $this->participants;\n\t}", "public function getPlayers ()\r\n {\r\n return $this->players;\r\n }", "public static function getDescriptor()\n {\n if (!isset(self::$descriptor)) {\n $desc = new ProtocolBuffersDescriptorBuilder();\n $phpoptions = $desc->getOptions()->getExtension(ProtocolBuffers::PHP_MESSAGE_OPTION);\n $phpoptions->setProcessUnknownFields(true);\n self::$descriptor = $desc->build();\n }\n\n return self::$descriptor;\n }", "public function getPeeringId()\n {\n return $this->peering_id;\n }", "public function getFriends() {\n $friends = new ArrayCollection();\n\n foreach ($this->getFriendships() as $friendship)\n if (!$friendship->isPending())\n $friends->add($friendship->getReceiver());\n\n foreach ($this->getReceivedFriendships() as $friendship)\n if (!$friendship->isPending())\n $friends->add($friendship->getSender());\n\n return $friends;\n }", "protected function doParticipants()\n {\n foreach ($this->getMessages() as $message) {\n $this->addParticipant($message->getSender());\n }\n }", "public function getParticipantsSortedByConsistency()\n {\n return $this->helper->sortParticipantsByConsistency($this->getParticipants());\n }", "public function getPartners()\n {\n $partners = [];\n\n foreach ($this->_xml->partners->children() as $child) {\n $partners[] = new AllopassPartner($child);\n }\n\n return $partners;\n }", "public function getPlayers()\n {\n return $this->players;\n }", "public function getFollowers() {\r return $this->followers;\r }", "protected function bootstrap() {\n if (count($this->_peers) == 0) {\n // TODO : Remove this for production\n $defaults_peers = array(\n 'tcp://127.0.0.1:22556',\n );\n\n // Connect to peers\n foreach($defaults_peers as $peer_url) {\n $this->_peers[] = SocketPeer::connect($this, $peer_url);\n }\n }\n }", "public function testItReturnsUserFriendsByGroupPerPage(): void\n {\n $sender = createUser();\n $recipients = createUser([], 6);\n\n foreach ($recipients as $recipient) {\n $sender->befriend($recipient);\n }\n\n $recipients[0]->acceptFriendRequest($sender);\n $recipients[1]->acceptFriendRequest($sender);\n\n $recipients[2]->denyFriendRequest($sender);\n\n $recipients[3]->acceptFriendRequest($sender);\n $recipients[4]->acceptFriendRequest($sender);\n\n $sender->groupFriend($recipients[0], 'acquaintances');\n $sender->groupFriend($recipients[1], 'acquaintances');\n $sender->groupFriend($recipients[3], 'acquaintances');\n $sender->groupFriend($recipients[4], 'acquaintances');\n\n $sender->groupFriend($recipients[0], 'close_friends');\n $sender->groupFriend($recipients[3], 'close_friends');\n\n $sender->groupFriend($recipients[4], 'family');\n\n //Assertions\n\n $this->assertCount(2, $sender->getFriends(2, 'acquaintances'));\n $this->assertCount(4, $sender->getFriends(0, 'acquaintances'));\n $this->assertCount(4, $sender->getFriends(10, 'acquaintances'));\n\n $this->assertCount(2, $sender->getFriends(0, 'close_friends'));\n $this->assertCount(1, $sender->getFriends(1, 'close_friends'));\n\n $this->assertCount(1, $sender->getFriends(0, 'family'));\n\n $this->containsOnlyInstancesOf(\\App\\User::class, $sender->getFriends(0, 'acquaintances'));\n }", "public function registerOutboundPeer(Peer $peer)\n {\n $next = $this->nOutPeers++;\n $peer->on('close', function ($peer) use ($next) {\n $this->emit('disconnect', [$peer]);\n unset($this->outPeers[$next]);\n });\n\n $this->outPeers[$next] = $peer;\n $this->emit('outbound', [$peer]);\n return $peer;\n }", "public function setDependencies($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::UINT32);\n $this->dependencies = $arr;\n\n return $this;\n }", "public function getPeer()\n\t{\n\t\tif (self::$peer === null) {\n\t\t\tself::$peer = new SubjectPeer();\n\t\t}\n\t\treturn self::$peer;\n\t}" ]
[ "0.65852284", "0.6499168", "0.6159024", "0.5965753", "0.5831126", "0.5740858", "0.5389869", "0.5385445", "0.520439", "0.5111604", "0.5029913", "0.49371397", "0.49325296", "0.49251756", "0.49251756", "0.4884907", "0.4851657", "0.4788927", "0.47701895", "0.47532573", "0.47447032", "0.47249487", "0.47243127", "0.47161403", "0.471598", "0.47073346", "0.4670912", "0.46707907", "0.4669822", "0.46596378", "0.46514547", "0.4649095", "0.46448916", "0.46323764", "0.46249783", "0.46107197", "0.46096507", "0.45933256", "0.45673686", "0.45657834", "0.45656025", "0.45523062", "0.45408937", "0.45372954", "0.4511155", "0.45087793", "0.4500672", "0.4495391", "0.44858122", "0.4480381", "0.44746557", "0.4436687", "0.44290283", "0.44217426", "0.44214877", "0.44157252", "0.44149953", "0.44038576", "0.440019", "0.43990707", "0.43882832", "0.43879738", "0.43798918", "0.43732056", "0.4360496", "0.43442768", "0.4327927", "0.43175253", "0.4315593", "0.42917293", "0.4273755", "0.42674834", "0.42668533", "0.4264019", "0.42624202", "0.42331198", "0.42308235", "0.42305905", "0.42126912", "0.4209345", "0.4203326", "0.42028597", "0.42020994", "0.41974866", "0.41833478", "0.41825598", "0.41791862", "0.41748083", "0.41640276", "0.41618386", "0.41521415", "0.41506034", "0.41377696", "0.4134559", "0.41084635", "0.40892148", "0.40859535", "0.40851048", "0.40685013", "0.4064956" ]
0.74485385
0
Get internet address collection
Получить сборку адресов интернета
public function getInternetAddressCollection() { return $this->internetAddressCollection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAddresses();", "public function getAddresses();", "public function getAddresses(): array;", "public function getAddresses()\n {\n return $this->callApi('/api/addresses');\n }", "public function allAddresses()\n {\n return $this->addresses;\n }", "public function getAddress();", "public function getAddress();", "public function getAddress();", "public function getAddress();", "public function getAddress();", "public function getAddress() {}", "public function getAdresses()\n {\n return $this->adresse;\n }", "public function index()\n {\n $addresses = $this->repository->addresses();\n\n return $addresses;\n\n }", "public function getAddresses()\r\n {\r\n return $this->addresses;\r\n }", "public function get_all_addresses(){\n $ip_addresses = $this->index()->toArray();\n // get all subnet addresses from subnets\n $subnets = Subnet::all()->pluck('subnet_address')->toArray();\n // merge arrays together into one bank of ip addresses\n return array_merge($ip_addresses, $subnets);\n \n }", "public function index()\n {\n return AddressResource::collection(Address::all());\n }", "public function index()\n {\n return AddressResource::collection(Address::all());\n }", "public function getAddresses()\n {\n return $this->get(\"account/addresses\", array());\n }", "public function getAddresses()\n {\n return $this->getResponse()['data']['addresses'];\n }", "public static function list()\n {\n return IPAddress::orderBy('ip')->get();\n }", "public function getAddresses()\n {\n return $this->addresses;\n }", "public function getAddresses()\n {\n return $this->addresses;\n }", "public function getAddresses(){\n $class_selector = 'a[class=name]'; \n \n // Get all elements of properties\n $list = $this->dom->find($class_selector);\n \n foreach ($list as $name){\n $link = self::DEFAULT_URL. $name->href;\n self::$addresses[] = $link;\n }\n }", "public function getAddresses()\n {\n return $this->_addresses;\n }", "public function get(): Collection {\n $endpoint = '/my/pickup_addresses';\n\n $response = $this->client->getHttp()->request('GET', $endpoint);\n if ($response->getStatusCode() != 200) {\n throw new Exception($response->getBody()->getContents(), $response->getStatusCode());\n }\n\n\n $body = \\GuzzleHttp\\json_decode($response->getBody(), true);\n $collect = new Collection();\n if (isset($body['result'])) {\n for ($ii = 0, $size = count($body['result']); $ii < $size; ++$ii) {\n $collect->push(new PickupAddress($body['result'][$ii]));\n }\n }\n\n return $collect;\n }", "abstract protected function getAddresses($ar = null);", "function getAddressList () {\n $query = \"SELECT * FROM vw_CustomerList\";\n $addressList = array();\n\n if($result = $this->connection->query($query)){\n foreach($result as $address){\n $addressList[] = $address;\n }\n }\n return $addressList;\n }", "public function getAddresses() {\n\t\treturn $this->addresses;\n\t}", "public function getLikeAddress();", "public function getUserAddresses()\n {\n return $this->get(self::API_BASE_URL . '/users/' . $this->subscription->uid . '/addresses');\n }", "public function getAddresses()\n {\n if (is_null($this->addresses)) {\n /** @psalm-var ?list<stdClass> $data */\n $data = $this->raw(self::FIELD_ADDRESSES);\n if (is_null($data)) {\n return null;\n }\n $this->addresses = BaseAddressCollection::fromArray($data);\n }\n\n return $this->addresses;\n }", "public function getAddresses() : array\n {\n return $this->addresses;\n }", "public function getAllAdresses()\n {\n return static::$adresseImpdao->findAll(self::CLASSNAMEADRESSE);\n\n }", "public function ips()\n {\n return $this->get('/ips');\n }", "public function address() {\n return $this->execByPosition('address',[\n 'maxRows'=>$this->conn['settings']['maxRows'],\n ]);\n }", "public function getIPAddresses()\n\t{\n\t\t$response = $this->sendRequest(\n\t\t\t'/security/ip-address-whitelist',\n\t\t\t[ ],\n\t\t\ttrue,\n\t\t\t'get',\n\t\t\t[ ],\n\t\t\ttrue\n\t\t);\n\n\t\t$return = new IterableResponse();\n\n\t\tforeach( $response as $address )\n\t\t{\n\t\t\t$return->addItem(\n\t\t\t\tnew Entity\\IPAddress($address->value, $address->id)\n\t\t\t);\n\t\t}\n\n\t\treturn $return;\n\t}", "public function getAllAddresses()\n {\n $sql = \"SELECT * FROM {$this->_tableName}\";\n\n return $this->_adapter->fetchAll($sql);\n }", "public function index()\n {\n return \\Auth::user()->userable->addresses;\n }", "public function getSites();", "public function ipGetAll()\n {\n $url = $this->baseUrl . '/ip';\n\n return $this->get($url);\n }", "public function getUplinks() {\n\n $results = $this->getObjectsByType(HomeNet_Model_Node::INTERNET);\n\n $array = array();\n foreach ($results as $value) {\n $array[$value->id] = $value->address;\n }\n\n\n return $array;\n }", "function getDestinations();", "public function parseAddressesProvider() {}", "public function getAddress()\n {\n return $this->get(self::address);\n }", "public function findAll()\n {\n $this->load();\n // Should make a defensive copy, skipped for the exercise.\n return array_values($this->addresses);\n }", "public function getAddressCollectionJson()\n {\n $connection = $this->resource->getConnection();\n $table = $this->resource->getTableName('customer_address_entity');\n\n $defaultCountryId = $this->directoryHelper->getDefaultCountry($this->getStore());\n $emptyAddressForm = $this->_customerFormFactory->create(\n 'customer_address',\n 'adminhtml_customer_address',\n [\\Magento\\Customer\\Api\\Data\\AddressInterface::COUNTRY_ID => $defaultCountryId]\n );\n $data = [0 => $emptyAddressForm->outputData(\\Magento\\Eav\\Model\\AttributeDataFactory::OUTPUT_FORMAT_JSON)];\n foreach ($this->getAddressCollection() as $address) {\n $addressForm = $this->_customerFormFactory->create(\n 'customer_address',\n 'adminhtml_customer_address',\n $this->addressMapper->toFlatArray($address)\n );\n $data[$address->getId()] = $addressForm->outputData(\n \\Magento\\Eav\\Model\\AttributeDataFactory::OUTPUT_FORMAT_JSON\n );\n $cityId = $connection->fetchOne('select city_id from ' . $table . ' where entity_id=?', [$address->getId()]);\n $subDistrictId = $connection->fetchOne('select sub_district_id from ' . $table . ' where entity_id=?', [$address->getId()]);\n $data[$address->getId()]['city_id'] = $cityId;\n $data[$address->getId()]['sub_district_id'] = $subDistrictId;\n }\n\n return $this->_jsonEncoder->encode($data);\n }", "public function getToAddresses()\n {\n }", "private function getAddresses(){\n try{\n $query = $this->db->prepare(\"SELECT d.calle,\n d.nro,\n d.piso,\n d.dpto,\n d.entre_calles,\n d.zona,\n d.ciudad,\n d.provincia,\n d.cod_postal\n FROM direccion d;\n\n\t\t \");\n $query->execute();\n if($query->rowCount() <= 0) return false;\n return $query->fetchAll(PDO::FETCH_ASSOC);\n }catch(PDOException $e){\n return $e;\n }\n }", "private function _getAddresses() {\n\t\tglobal $auth;\n\t\t\n\t\t$newlist = array();\n\t\t$filter['grps']=$this->getConf('watchGroup');\n\t\t$userlist = $auth->retrieveUsers(0,0,$filter);\n\t\n\t\tforeach ( $userlist as $user) {\n\t\t\t$newlist[] = $user[mail]; //creating array of email adresses;\n\t\t}\n\t\t\n\t\t//mail_isvalid ??\n\t\t\n\t\treturn $newlist;\n\t}", "public function getLocalAddress(): Address;", "public function index()\n {\n $user= auth()->user();\n return DeliveryAddressResource::collection($user->deliveryaddresses);\n }", "public function getFetchAddressEndpoint()\n {\n return Mage::getUrl('klarna/address/get');\n }", "public function address();", "public function getHosts()\n {\n }", "public function getAll()\n {\n $sentence = new SentenceUtil();\n $sentence->fromCommand(\"/ip/firewall/address-list/getall\");\n\n $resultSend = $this->talker->send($sentence);\n if($resultSend) {\n $rs = $this->talker->getResult();\n $i = 0;\n if ($i < $rs->size()) {\n return $rs->getResultArray();\n } else {\n return \"No Ip Firewall Address List To Set, Please Your Add IP Firewall Address List \";\n }\n }\n return $resultSend;\n }", "public function getAddress(): string;", "public function getAddress()\n {\n return $this->get(self::ADDRESS);\n }", "public function getAddressing()\n {\n return $this->addressing;\n }", "public function getAll() {\n\t\t$result = $this->tipimail->getData($this->url);\n\t\t$dedicatedIps = array();\n\t\tforeach ($result as $value) {\n\t\t\t$dedicatedIps[] = new DedicatedIp($value);\n\t\t}\n\t\treturn $dedicatedIps;\n\t}", "public function getStreet();", "public function address()\n {\n return $this->hasmany('App\\Models\\Address');\n }", "public function getAddress() : string;", "function get_unclean_addresses() {\n\t\treturn array(\"squibble\");\n\t}", "public function addresses()\n {\n return $this->morphMany('App\\Address', 'addressable');\n }", "public function toArray()\n {\n $data = [];\n\n foreach ($this->internetAddresses as $internetAddress) {\n $data[$internetAddress->getType()] = $internetAddress->getValue();\n }\n\n return $data;\n }", "public function get_all_proxy(){\n return $this->query('/ip/proxy/getall');\n }", "public function providerIpAddress()\n {\n return [\n [\"\"],\n [\"192.96.76.1\"],\n [\"145.38.5.6\"],\n // [\"35.158.84.49\"],\n // [\"23.34\"],\n // [\"35.158.84.49, 23.34\"],\n ];\n }", "public function addresses()\n {\n return $this->morphMany(Address::class, 'addressable');\n }", "public function get_addresses($user)\r\n\t{\r\n\r\n\t\t// Set query paramaters\r\n\t\t$params\t = array(\r\n\t\t\t\t\t'stream' \t=> 'firesale_addresses',\r\n\t\t\t\t\t'namespace'\t=> 'firesale_addresses',\r\n\t\t\t\t\t'where'\t\t=> \"created_by = '{$user}' AND title != ''\",\r\n\t\t\t\t\t'order_by'\t=> 'id',\r\n\t\t\t\t\t'sort'\t\t=> 'desc'\r\n\t\t\t\t );\r\n\t\t\r\n\t\t// Get addresses\t\r\n\t\t$addresses = $this->streams->entries->get_entries($params);\r\n\r\n\t\t// Return\r\n\t\treturn $addresses['entries'];\r\n\t}", "public function get_from_address()\n {\n }", "public function getAddress() : void\n {\n $addresses = $this->getUserAddress($this->uid, (int)$_GET[\"default\"] == 1);\n\n $this->generateStatusResult(\"200 OK\", 1, false);\n $this->outputResult([\"data\" => $addresses, \"count\" => count($addresses)]);\n }", "public function get_sites()\n {\n }", "public function addresses() {\n\t\treturn $this->hasMany(Address::class);\n }", "public function getDestinations(): array;", "protected function getAddresses() {\n\t\tif (!$this->_addresses) {\n\t\t\t$memberAddressesMapper = $this->getServiceLocator()->get('\\Account\\Mapper\\MemberAddressesMapper'); /* @var $memberAddressesMapper \\Account\\Mapper\\MemberAddressesMapper */\n\t\t\t$this->_addresses = $memberAddressesMapper->fetchManyForMemberId($this->id);\n\t\t}\n\t\treturn $this->_addresses;\n\t}", "public function getArrayAddress(): string;", "public function getAddresses()\n {\n $addresses = [];\n\n if (!$this->hasError()) {\n foreach ($this->addresses->all() as $address) {\n $addresses[] = $address->toArray();\n }\n }\n\n return $addresses;\n }", "function getAddresses($_options = false) {\n\n\t\t$user_id = session()->value(\"user_id\");\n\t\t$address_id = false;\n\n\t\tif($_options !== false) {\n\t\t\tforeach($_options as $_option => $_value) {\n\t\t\t\tswitch($_option) {\n\t\t\t\t\tcase \"address_id\" : $address_id = $_value; break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$query = new Query();\n\t\tglobal $page;\n\t\t$countries = $page->countries();\n\n\t\t// get specific address\n\t\tif($address_id) {\n\t\t\t$sql = \"SELECT * FROM \".$this->db_addresses.\" WHERE id = $address_id AND user_id = $user_id\";\n//\t\t\tprint $sql;\n\n\t\t\tif($query->sql($sql)) {\n\t\t\t\t$result = $query->result(0);\n\t\t\t\t$result[\"country_name\"] = $countries[arrayKeyValue($countries, \"id\", $result[\"country\"])][\"name\"];\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t}\n\n\t\t// get alle addresses for user\n\t\telse {\n\n\t\t\t$sql = \"SELECT * FROM \".$this->db_addresses.\" WHERE user_id = $user_id\";\n//\t\t\tprint $sql;\n\n\t\t\tif($query->sql($sql)) {\n\t\t\t\t$results = $query->results();\n\t\t\t\tforeach($results as $index => $result) {\n\t\t\t\t\t$results[$index][\"country_name\"] = $countries[arrayKeyValue($countries, \"id\", $result[\"country\"])][\"name\"];\n\t\t\t\t}\n\t\t\t\treturn $results;\n\t\t\t}\n\n\t\t}\n\t}", "public function getAddressCount();", "public function addresses()\n {\n return $this->hasMany(Address::class);\n }", "public function addresses()\n {\n return $this->hasMany(Address::class);\n }", "public function addresses()\n {\n return $this->hasMany(Address::class);\n }", "private function addressModel()\n {\n return [];\n }", "public function index()\n {\n return response()->json(auth()->user()->addresses()->get());\n }", "public function listAddress()\n {\n $user = Auth::user();\n\n $userInfo = $user->userInfo;\n $addressList = AddressUser::where('userinfo_id', $userInfo->id)->get();\n return $this->showAll($addressList, Response::HTTP_OK);\n }", "public function getSuggestedAddresses()\n {\n return $this->suggestedAddresses;\n }", "public function getCcAddresses()\n {\n }", "public function addresses( ){\n \n return $this->hasMany(Address::class);\n }", "function getto_addrs() {\n return $this->to_addrs;\n }", "public function getAllRecipientAddresses()\n {\n }", "function gethostsbyaddrs($ips) {\n global $conf;\n if(!$conf['dnslookups']) return $ips;\n\n $hosts = array();\n $ips = explode(',', $ips);\n\n if(is_array($ips)) {\n foreach($ips as $ip) {\n $hosts[] = gethostbyaddr(trim($ip));\n }\n return join(',', $hosts);\n } else {\n return gethostbyaddr(trim($ips));\n }\n}", "public function addresses()\n {\n return $this->call(__FUNCTION__);\n }", "public function getAdress(){\n\t\t$this->db->select('*');\n\t\t$this->db->where('is_deleted',0);\n\t\t$query = $this->db->get(ADDRESS);\n\t\tif($query){\n\t\t\treturn $query->result_array();\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function getAddressesForAdding(): array\n {\n return $this->addressesForAdding;\n }", "public function getProxyAddresses()\n {\n return $this->getAttribute($this->schema->proxyAddresses()) ?? [];\n }", "public function index(User $user)\n {\n return HometownaddressResource::collection($user->hometownaddresses);\n }", "public function getCollection()\n {\n if (is_null($this->_geoipCollection)) {\n $this->_geoipCollection = $this->_getCollection();\n $this->_geoipCollection->setCurPage($this->getCurrentPage());\n $this->_geoipCollection->setPageSize($this->_dataHelper->getGeoipPerPage());\n $this->_geoipCollection->setOrder('published_at','asc');\n }\n\n return $this->_geoipCollection;\n }", "public function getIpAddresses()\n {\n return $this->ipaddresses;\n }", "public function address() {}", "public function addressDataProvider()\n {\n return [\n [\n [\n 'country_id' => 'US',\n 'street' => ['Green str, 67'],\n 'company' => 'CompanyName',\n 'telephone' => '5127779999',\n 'postcode' => '77777',\n 'city' => 'CityM',\n 'firstname' => 'Johny',\n 'lastname' => 'Smith',\n 'middlename' => 'A',\n 'prefix' => 'Mr.',\n 'suffix' => 'Esq',\n 'default_shipping' => true,\n 'default_billing' => true,\n 'region' => [\n 'region_code' => 'AL',\n 'region' => 'Alabama',\n 'region_id' => 1\n ],\n 'extension_attributes' => []\n ]\n ]\n ];\n }" ]
[ "0.73630214", "0.73630214", "0.6798899", "0.6747486", "0.65980005", "0.659612", "0.659612", "0.659612", "0.659612", "0.659612", "0.6516033", "0.6444628", "0.644057", "0.6438807", "0.64354247", "0.63795465", "0.63795465", "0.6377578", "0.6363117", "0.63582164", "0.6354148", "0.6354148", "0.6348742", "0.6325931", "0.6318905", "0.6275364", "0.6252366", "0.6236004", "0.6215773", "0.61905617", "0.6162594", "0.61509055", "0.61465883", "0.6106617", "0.60937923", "0.60858977", "0.6077188", "0.60735315", "0.6049056", "0.60348296", "0.60246384", "0.6013922", "0.5969553", "0.596634", "0.5957065", "0.59439224", "0.5933986", "0.5931473", "0.5926242", "0.5924306", "0.59147286", "0.59136784", "0.59136504", "0.5910735", "0.59088945", "0.5907058", "0.5896762", "0.5887301", "0.5886371", "0.5876478", "0.58509856", "0.5849179", "0.5834158", "0.5816348", "0.5810839", "0.578974", "0.57858723", "0.5785582", "0.57491493", "0.57478744", "0.57461524", "0.5722592", "0.57169247", "0.57158387", "0.5714624", "0.5707275", "0.57002157", "0.5692117", "0.5676758", "0.5676336", "0.5676336", "0.5676336", "0.5673302", "0.5651905", "0.56491226", "0.56485015", "0.56434464", "0.56393796", "0.5633496", "0.5624877", "0.5615394", "0.5591227", "0.55896604", "0.55889535", "0.558597", "0.55835617", "0.5577967", "0.5576167", "0.55691254", "0.555254" ]
0.8392759
0
Get second phone number
Получить второй телефонный номер
public function getPhone2() { return $this->phone2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_phone();", "public function getPhoneNumber();", "public function getSecondaryPhoneNumber(): ?string\n {\n return $this->secondaryPhoneNumber;\n }", "public function getOtherMobileNumber()\n {\n return $this->getFirstAttribute($this->schema->otherMobile());\n }", "public function getPhone()\n {\n $id = explode('@', $this->getId());\n\n return $id[0] ?? '';\n }", "public function getPhone1()\n {\n return $this->phone1;\n }", "public function getPhone1()\n {\n return $this->phone1;\n }", "public function getTelephoneNumber()\n {\n return $this->getFirstAttribute($this->schema->telephone());\n }", "public function getPhoneNumber()\n {\n return '+254' . (int)$this->phone;\n }", "public function getCellPhone();", "public function getWorkPhoneNumber();", "public function getDisplayPhoneNumber();", "public function getTelephone();", "public function getTelephone();", "public function getMobilePhoneNumber();", "public function getPersonPhone();", "public function getPhoneNumber(): string {\n\t\treturn $this->phoneNumber;\n\t}", "public function getPhoneNumber(): string {\n\t\treturn $this->phoneNumber;\n\t}", "public function getTelephone() {}", "function getStreetNumber();", "public function getPhoneNumber()\n {\n return $this->_getElementText('TELEFONO');\n }", "public function getPhoneNo()\n {\n return $this->phoneNo;\n }", "public function getHomePhoneNumber();", "public static function getPhoneNumberField(): string;", "private function nextPhone($phone)\n {\n for($i=strlen($phone)-1; $i>=0; $i--)\n {\n if( $phone[$i] != '9' )\n {\n $phone[$i] = chr( ord($phone[$i]) + 1 );\n break;\n }\n $phone[$i] = '0';\n }\n return $phone;\n }", "public function getStreetNumber();", "public function getPhoneNumber() {\n // Write log when start request\n $message = '[LINKED VIP][GET - Get Phone Number] {accountname: ' . $this->params['accountname'] . '}';\n Core_Log::sendLog($message);\n\n $Core_User = Core_User::getInstance();\n $data = $Core_User->checkAccountFromPassportNew($this->params['accountname']);\n\n if (isset($data) && isset($data->Telephone)) {\n $message = '[LINKED VIP][RESPONE SUCCESFULLY] - DATA: ' . $data->Telephone . \"\\n\";\n Core_Log::sendLog($message);\n return $data->Telephone;\n }\n\n $message = '[LINKED VIP][RESPONE SUCCESFULLY]' . \"\\n\";\n Core_Log::sendLog($message);\n return null;\n }", "public function get_phone() {\n\t\tif( !isset( $this->phone ) ) {\t\t\t\n\t\t\t$sql = \"SELECT c.pf_phone\";\n\t\t\t$sql = $sql . \" FROM \" . PHPBB_PREFIX . \"_profile_fields_data c\";\n\t\t\t$sql = $sql . \" WHERE c.user_id = \" . $this->user_id . \";\";\n\t\t\t\n\t\t\tif( $result = $this->db->query($sql) ) {\n\t\t\t\tif( $result->num_rows == 1 ) {\n\t\t\t\t\t$row = $result->fetch_object();\n\t\t\t\t\t$this->phone = $row->pf_phone;\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$this->phone = \"\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->db->error;\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t\treturn $this->phone;\n\t}", "public function getPhoneNumber()\n {\n return isset($this->phone_number) ? $this->phone_number : '';\n }", "public function getPhoneNumber()\n {\n return isset($this->phone_number) ? $this->phone_number : '';\n }", "public function getPhoneNumber()\n {\n return $this->phone_number;\n }", "public function getAlternatePhone()\r\n {\r\n return $this->_alternatePhone;\r\n }", "public function getPhone(): string\n {\n return $this->phone;\n }", "public function getPhone(): string\n {\n return $this->phone;\n }", "public function getProfilePhone(): string {\n\t\treturn ($this->profilePhone);\n\t}", "public function getPhoneNumber()\n {\n return $this->phone;\n }", "public static function formatIntMobileNo($phone) {\n $phone = str_replace(\" \", \"\", $phone);\n //remove Sapces\n $phone = ereg_replace(\"[^0-9]\", \"\", $phone);\n //Remove any characters other than digits\n $mobLength = strlen($phone);\n\n //For UK numbers\n if (substr($phone, 0, 4) == '0044') {\n $phone = substr($phone, 2, $mobLength);\n } else if (substr($phone, 0, 3) == '+44') {\n $phone = substr($phone, 1, $mobLength);\n } else if (substr($phone, 0, 3) == '044') {\n $phone = substr($phone, 1, $mobLength);\n } else if (substr($phone, 0, 2) == '07') {\n $phone = '44' . substr($phone, 1, $mobLength);\n } else if (substr($phone, 0, 1) == '7') {\n $phone = '44' . substr($phone, 0, $mobLength);\n }\n //For International Numbers\n if (substr($phone, 0, 1) == '+') {\n $phone = substr($phone, 1, $mobLength);\n } else if (substr($phone, 0, 2) == '00') {\n $phone = substr($phone, 2, $mobLength);\n } else if (substr($phone, 0, 1) == '0') {\n $phone = '44' . substr($phone, 1, $mobLength);\n }\n return $phone;\n }", "public function getInternationalPhone() : string\n {\n $raw = substr($this->getRawPhone(), 1);\n return $this->_plus . $this->_country_code . $raw;\n }", "public function getPhoneNumber(){\n return $this->phone_number;\n }", "public function getTelephone(): string\n {\n return $this->telephone;\n }", "public function getPhone()\n {\n return $this->getData('phone');\n }", "public function getPhoneNumber()\n\t{\n\t\treturn $this->phoneNumber;\n\t}", "public function organizationNumberPhone(): string\n {\n return $this->numberPhone;\n }", "public function organizationNumberPhone(): string\n {\n return $this->numberPhone;\n }", "public function getPhonecode()\n {\n return $this->phonecode;\n }", "public function getPhone() : string\n {\n return $this->phone;\n }", "public function getPhone()\n {\n $value = $this->get(self::PHONE);\n return $value === null ? (string)$value : $value;\n }", "public function get_phone_number( $parens = false ) {\n $number = $this->get_meta( 'phone_number' );\n $replace = $parens ? '($1) $2-$3' : '$1-$2-$3';\n return preg_replace( '~.*(\\d{3})[^\\d]{0,7}(\\d{3})[^\\d]{0,7}(\\d{4}).*~', $replace, $number );\n }", "public function getPhoneNumber()\n {\n return $this->phoneNumber;\n }", "public function getPhoneNumber()\n {\n return $this->phoneNumber;\n }", "function gnj_get_user_phone($user_id, $code_or_phone = '')\n{\n\n $code = esc_attr(get_user_meta($user_id, 'gnj_phone_code', true));\n $number = esc_attr(get_user_meta($user_id, 'gnj_phone_no', true));\n\n if ($code_or_phone === 'number') {\n return $number;\n } else if ($code_or_phone === 'code') {\n return $code;\n }\n\n return array(\n 'code' => $code,\n 'number' => $number\n );\n}", "public function getPhone():string\n {\n return $this->phone;\n }", "protected function parsePhone(): string\n {\n\n $output = 'found too many digits';\n $digits = 8;\n $phone_parsed = '';\n\n while (strpos($output, 'found too many digits') === 0) {\n $command_txt = \"ssocr remove_isolated dilation 1 closing 1 opening 1 --number-digits=$digits --charset=digits \" .\n $this->imagePhonePath;\n $command = escapeshellcmd($command_txt);\n\n $output = shell_exec($command . ' 2>&1');\n\n $digits++;\n }\n\n // Process phone number\n if (strpos($output, 'found only') !== 0) {\n // Cut 1st character (\"+\" symbol is treated as 8)\n $phone_parsed = substr($output, 1);\n }\n\n if ($phone_parsed && ctype_digit($phone_parsed)) {\n $this->phone_is_parsed = true;\n }\n else {\n $this->errors[] = 'Phone was not parsed';\n }\n\n // @todo Handle if NOThING found (couldn't reproduce)\n\n return $phone_parsed;\n }", "public function getPhoneNumber(): Phone\n {\n $phone = $this->{self::PHONE_NUMBER};\n if (is_array($phone))\n $this->setPhoneNumber(new Phone($phone));\n\n return $this->{self::PHONE_NUMBER};\n }", "public function getPhoneNumberForVerification();", "public function getPhoneNumberForVerification();", "public function getPhoneNumber() {\n return $this->phoneNumber;\n }", "public function getPhone()\n\t{\n\t\treturn $this->phone;\n\t}", "public function getPhone()\n\t{\n\t\treturn $this->phone;\n\t}", "public function phone() {\n return rand(100, 999) . '-' . rand(100, 999) . '-' . rand(1000, 9999);\n }", "public function getCustomerNumber (){\r\n\t\treturn User::where('id', $this->user_id)->first()->phone;\r\n\t}", "public function getTelephone()\n {\n echo $this->telephone . '<br>';\n return $this->telephone;\n }", "function getParentsPhone() {\n\n\t\tforeach($GLOBALS['TSFE']->config['rootLine'] as $topPage) {\n\t\t\t// Recursive phone found\n\t\t\tif ($topPage['tx_mfiaddresschanger_address'] == 2) {\n\t\t\t\t$phone = $this->phone . $topPage['tx_mfiaddresschanger_phone'];\n\t\t\t}\n\t\t}\n\t\t// Return phone\n\t\treturn $phone;\n\t}", "public function getLinkableNumber()\n {\n return preg_replace('/[^0-9\\+]+/', '', ($this->CallToNumber ? $this->CallToNumber : $this->PhoneNumber));\n }", "public function getPhoneNumber()\n {\n return $this->getStoreInformation()->getPhone();\n }", "function get_phone_number($user_id)\r\n\t{\r\n\r\n\t\t$this->db->where('LOWER(id)=', strtolower($user_id));\r\n\t\t//$this->db->or_where('LOWER(new_email)=', strtolower($email));\r\n\r\n\t\t$query = $this->db->get($this->table_name);\r\n\t\tif ($query->num_rows() == 1)\r\n {\r\n return $query->row()->phone;\r\n }\r\n else\r\n {\r\n return NULL;\r\n }\r\n\t}", "public function getPhoneNumber()\n {\n if (array_key_exists(\"phoneNumber\", $this->_propDict)) {\n return $this->_propDict[\"phoneNumber\"];\n } else {\n return null;\n }\n }", "public function getMobileNumber()\n {\n return $this->getFirstAttribute($this->schema->mobile());\n }", "public function getPhone() {\n\t\treturn $this->phone;\n\t}", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "function getSMSSupplier($phone_number){\n $fixedPhoneNumber = preg_replace('/[^0-9]/', '', $phone_number);\n $fixedPhoneNumber = (substr($fixedPhoneNumber,0 , 1) == '0') ? substr_replace($fixedPhoneNumber,'84',0,1) : $fixedPhoneNumber;\n $phoneNumberPrefix = $app_list_strings['phone_number_prefix_options'];\n $supplier = \"other\";\n foreach ($phoneNumberPrefix as $key => $value) {\n if ((substr($fixedPhoneNumber,0 , 4) == $key) || (substr($fixedPhoneNumber,0 , 5) == $key)){\n $supplier = $value;\n }\n }\n return $supplier;\n}", "public function getPhonenumber()\n {\n return $this->_getVar('user_phonenumber');\n }", "public function getTelephone() : string {\n return $this->telephone;\n }", "public function getSPhone()\n\t{\n\t\treturn $this->s_phone;\n\t}", "public function getTelephone()\n {\n return $this->telephone;\n }", "public function getTelephone()\n {\n return $this->telephone;\n }", "public function getTelephone()\n {\n return $this->telephone;\n }" ]
[ "0.7020843", "0.68393445", "0.675466", "0.6738465", "0.67036", "0.66470265", "0.66470265", "0.66440415", "0.6589854", "0.65609795", "0.65406287", "0.652047", "0.6507534", "0.6507534", "0.64850277", "0.6479255", "0.63602227", "0.63602227", "0.63327473", "0.6327239", "0.63055456", "0.6289327", "0.6273136", "0.627125", "0.6269282", "0.62353694", "0.6233289", "0.6233116", "0.6229019", "0.6229019", "0.6210162", "0.6196289", "0.6174663", "0.6174663", "0.61605656", "0.61597705", "0.6147368", "0.6133369", "0.61277735", "0.6107696", "0.609376", "0.609122", "0.6090957", "0.6090957", "0.6089923", "0.60782486", "0.60713077", "0.60660946", "0.60649675", "0.60649675", "0.6047889", "0.6042544", "0.6031056", "0.6028303", "0.60229564", "0.60229564", "0.6018589", "0.6007218", "0.6007218", "0.600699", "0.6005863", "0.5997141", "0.5992941", "0.59927166", "0.5972393", "0.59706956", "0.5967363", "0.5953179", "0.59489876", "0.5934218", "0.5934218", "0.5934218", "0.5934218", "0.5934218", "0.5934218", "0.5934218", "0.5934218", "0.5934218", "0.5934218", "0.5934218", "0.5934218", "0.5934218", "0.5934218", "0.5934218", "0.5934218", "0.5934218", "0.5934218", "0.5934218", "0.5934218", "0.5934218", "0.5934218", "0.5934218", "0.59314215", "0.59270364", "0.59174603", "0.59152097", "0.5891417", "0.5891417", "0.5891417" ]
0.74914724
0
Get third phone number
Получить третий телефонный номер
public function getPhone3() { return $this->phone3; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_phone();", "public function getPhoneNumber();", "public function getPhoneNumber()\n {\n return '+254' . (int)$this->phone;\n }", "public function get_phone_number( $parens = false ) {\n $number = $this->get_meta( 'phone_number' );\n $replace = $parens ? '($1) $2-$3' : '$1-$2-$3';\n return preg_replace( '~.*(\\d{3})[^\\d]{0,7}(\\d{3})[^\\d]{0,7}(\\d{4}).*~', $replace, $number );\n }", "public function getTelephone();", "public function getTelephone();", "public function getTelephoneNumber()\n {\n return $this->getFirstAttribute($this->schema->telephone());\n }", "public function getWorkPhoneNumber();", "public function getPersonPhone();", "public function getCellPhone();", "public static function getPhoneNumberField(): string;", "function gnj_get_user_phone($user_id, $code_or_phone = '')\n{\n\n $code = esc_attr(get_user_meta($user_id, 'gnj_phone_code', true));\n $number = esc_attr(get_user_meta($user_id, 'gnj_phone_no', true));\n\n if ($code_or_phone === 'number') {\n return $number;\n } else if ($code_or_phone === 'code') {\n return $code;\n }\n\n return array(\n 'code' => $code,\n 'number' => $number\n );\n}", "public function getMobilePhoneNumber();", "public function getDisplayPhoneNumber();", "public function getTelephone() {}", "public function getPhoneNumber()\n {\n return $this->_getElementText('TELEFONO');\n }", "public function getPhoneNumber()\n {\n return isset($this->phone_number) ? $this->phone_number : '';\n }", "public function getPhoneNumber()\n {\n return isset($this->phone_number) ? $this->phone_number : '';\n }", "function getStreetNumber();", "public function getPhoneNumber(): string {\n\t\treturn $this->phoneNumber;\n\t}", "public function getPhoneNumber(): string {\n\t\treturn $this->phoneNumber;\n\t}", "function phone_number( $format = true, $phone = null ) {\n\n $phone = $phone ? $phone : get_field('blog_root_phone', 'options');\n\n $phone = preg_replace('/\\D/', '', $phone);\n\n if ( $format === true ) {\n\n $output = preg_replace('/^(.*?)(.{3})(.{2})(.{2})$/', '$1 $2 $3 $4', $phone);\n\n } else {\n\n $output = preg_replace('/^(.*?)(.{3})(.{3})$/', '$1-$2-$3', $phone);\n\n }\n\n echo $output;\n\n}", "public function getHomePhoneNumber();", "public function getPhone()\n {\n $id = explode('@', $this->getId());\n\n return $id[0] ?? '';\n }", "public function get_phone() {\n\t\tif( !isset( $this->phone ) ) {\t\t\t\n\t\t\t$sql = \"SELECT c.pf_phone\";\n\t\t\t$sql = $sql . \" FROM \" . PHPBB_PREFIX . \"_profile_fields_data c\";\n\t\t\t$sql = $sql . \" WHERE c.user_id = \" . $this->user_id . \";\";\n\t\t\t\n\t\t\tif( $result = $this->db->query($sql) ) {\n\t\t\t\tif( $result->num_rows == 1 ) {\n\t\t\t\t\t$row = $result->fetch_object();\n\t\t\t\t\t$this->phone = $row->pf_phone;\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$this->phone = \"\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->db->error;\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t\treturn $this->phone;\n\t}", "public function getPhoneNumber() {\n // Write log when start request\n $message = '[LINKED VIP][GET - Get Phone Number] {accountname: ' . $this->params['accountname'] . '}';\n Core_Log::sendLog($message);\n\n $Core_User = Core_User::getInstance();\n $data = $Core_User->checkAccountFromPassportNew($this->params['accountname']);\n\n if (isset($data) && isset($data->Telephone)) {\n $message = '[LINKED VIP][RESPONE SUCCESFULLY] - DATA: ' . $data->Telephone . \"\\n\";\n Core_Log::sendLog($message);\n return $data->Telephone;\n }\n\n $message = '[LINKED VIP][RESPONE SUCCESFULLY]' . \"\\n\";\n Core_Log::sendLog($message);\n return null;\n }", "function view_formatted_phone_number() \n\t{\n\t\tglobal $TMPL; \n\t\t$phone = $TMPL->fetch_param('number');\n\n\t\tif (!$phone)\n\t\t{\n\t\t\treturn NULL; \n\t\t}\n\t\t$return = array(); \n\t\t$return = $this->_get_formatted_phone($phone);\n\n\t\t$output =\"\";\n\t\tif ($return['international'])\n\t\t{\n\t\t\t$output .=$return['international'].\"-\";\n\t\t}\n\t\tif ($return['area_code'])\n\t\t{\n\t\t\t$output .=$return['area_code'].\"-\";\n\t\t}\n\t\tif ($return['prefix'])\n\t\t{\n\t\t\t$output .=$return['prefix'].\"-\";\n\t\t}\n\t\tif ($return['suffix'])\n\t\t{\n\t\t\t$output .=$return['suffix'];\n\t\t}\n\t\treturn $output; \n\t\t\n \t}", "public static function formatIntMobileNo($phone) {\n $phone = str_replace(\" \", \"\", $phone);\n //remove Sapces\n $phone = ereg_replace(\"[^0-9]\", \"\", $phone);\n //Remove any characters other than digits\n $mobLength = strlen($phone);\n\n //For UK numbers\n if (substr($phone, 0, 4) == '0044') {\n $phone = substr($phone, 2, $mobLength);\n } else if (substr($phone, 0, 3) == '+44') {\n $phone = substr($phone, 1, $mobLength);\n } else if (substr($phone, 0, 3) == '044') {\n $phone = substr($phone, 1, $mobLength);\n } else if (substr($phone, 0, 2) == '07') {\n $phone = '44' . substr($phone, 1, $mobLength);\n } else if (substr($phone, 0, 1) == '7') {\n $phone = '44' . substr($phone, 0, $mobLength);\n }\n //For International Numbers\n if (substr($phone, 0, 1) == '+') {\n $phone = substr($phone, 1, $mobLength);\n } else if (substr($phone, 0, 2) == '00') {\n $phone = substr($phone, 2, $mobLength);\n } else if (substr($phone, 0, 1) == '0') {\n $phone = '44' . substr($phone, 1, $mobLength);\n }\n return $phone;\n }", "public function getPhoneNumber()\n {\n return $this->phone;\n }", "public function getPhoneNumber()\n {\n return $this->phone_number;\n }", "public function getPhone()\n {\n return $this->getData('phone');\n }", "public function getPhone2()\n {\n return $this->phone2;\n }", "public function getPhone2()\n {\n return $this->phone2;\n }", "public function getStreetNumber();", "public function getPhoneNumber(){\n return $this->phone_number;\n }", "function get_phone_number($user_id)\r\n\t{\r\n\r\n\t\t$this->db->where('LOWER(id)=', strtolower($user_id));\r\n\t\t//$this->db->or_where('LOWER(new_email)=', strtolower($email));\r\n\r\n\t\t$query = $this->db->get($this->table_name);\r\n\t\tif ($query->num_rows() == 1)\r\n {\r\n return $query->row()->phone;\r\n }\r\n else\r\n {\r\n return NULL;\r\n }\r\n\t}", "public function getPhoneNumber()\n\t{\n\t\treturn $this->phoneNumber;\n\t}", "public function getPhoneNo()\n {\n return $this->phoneNo;\n }", "public static function phone($number)\n\t{\n\t\tif(empty($number))\n\t\t{\n\t\t\treturn $number;\n\t\t}\n\n\t\t$pieces = array();\n\n\t\t$pieces[] = substr($number, -4);\n\t\t$pieces[] = substr($number, -7, 3);\n\t\t$pieces[] = substr($number, -10, 3);\n\n\t\tif(strlen($number) > 10)\n\t\t{\n\t\t\t$pieces[] = substr($number, 0, strlen($number) - 10);\n\t\t}\n\n\t\t$string = \"({$pieces[2]}) {$pieces[1]}-{$pieces[0]}\";\n\n\t\tif(isset($pieces[3]))\n\t\t{\n\t\t\t$string = \"+{$pieces[3]} \".$string;\n\t\t}\n\n\t\treturn $string;\n\t}", "public function getPhone()\n {\n $value = $this->get(self::PHONE);\n return $value === null ? (string)$value : $value;\n }", "public function getPhonecode()\n {\n return $this->phonecode;\n }", "public static function phone_number($num)\n\t{\n\t\t//clean white spaces\n\t\t$number = preg_replace('/(?<=\\d)\\s+(?=\\d)/',\"\", $num);\n\t\t$length = strlen($number);\n\t\n\t\tif(substr($number, 0, 2) == \"00\"){\n\t\t\t$number = substr($number, 2, $length);\n\t\t}\n\t\telseif(substr($number, 0, 1) == \"0\"){\n\t\t\t$number = substr($number, 1, $length);\n\t\t}\n\t\telseif(substr($number,0,1) == \"+\" ){\n\t\t\t$number = substr($number, 1, $length);\n\t\t}\n\t\t\n\t\t//modify the value of the length...\n\t\t$length = strlen($number);\t\n\t\t\n\t\t//this is the order respectively\n\t\t//for orange numbers entered without 237\n\t\t//for mtn numbers entered without 237\n\t\t//for camtel numbers entered without 237\n\t\t//for camtel numbers entered without 237\n\t\t//for +237\n\t\n\t\t$base = 8;\n\t\t$top = 11;\n\t\t$status = true;\n\t\t\n\t\tif($length == $base AND $number[0] == '9'){\n\t\t\t$validnumber = '237'.$number; \n\t\t}\n\t\telseif($length == $base AND $number[0] == '7'){\n\t\t\t$validnumber = '237'.$number;\n\t\t}\n\t\telseif($length == $base AND $number[0] == '3'){\n\t\t\t$validnumber = '237'.$number;\n\t\t}\t\n\t\telseif($length == $base AND $number[0] == '2'){\n\t\t\t$validnumber = '237'.$number;\n\t\t}\n\t\telseif($length == $top AND substr($number, 0, 3) == \"237\"){\n\t\t\t$validnumber = $number;\n\t\t}\n\t\telse{ \n\t\t\t$validnumber = $num;\n\t\t\t$status = false;\n\t\t}\n\t\t\n\t\t//echo $validnumber.'<br>'.$status; exit;\n\t\treturn array(\"number\"=>$validnumber, \"status\"=>$status); \n\t}", "public function getPhoneNumber()\n {\n if (array_key_exists(\"phoneNumber\", $this->_propDict)) {\n return $this->_propDict[\"phoneNumber\"];\n } else {\n return null;\n }\n }", "public function getPhoneNumber()\n {\n return $this->getStoreInformation()->getPhone();\n }", "public function getPhoneNumber()\n {\n return $this->phoneNumber;\n }", "public function getPhoneNumber()\n {\n return $this->phoneNumber;\n }", "protected function parsePhone(): string\n {\n\n $output = 'found too many digits';\n $digits = 8;\n $phone_parsed = '';\n\n while (strpos($output, 'found too many digits') === 0) {\n $command_txt = \"ssocr remove_isolated dilation 1 closing 1 opening 1 --number-digits=$digits --charset=digits \" .\n $this->imagePhonePath;\n $command = escapeshellcmd($command_txt);\n\n $output = shell_exec($command . ' 2>&1');\n\n $digits++;\n }\n\n // Process phone number\n if (strpos($output, 'found only') !== 0) {\n // Cut 1st character (\"+\" symbol is treated as 8)\n $phone_parsed = substr($output, 1);\n }\n\n if ($phone_parsed && ctype_digit($phone_parsed)) {\n $this->phone_is_parsed = true;\n }\n else {\n $this->errors[] = 'Phone was not parsed';\n }\n\n // @todo Handle if NOThING found (couldn't reproduce)\n\n return $phone_parsed;\n }", "function getParentsPhone() {\n\n\t\tforeach($GLOBALS['TSFE']->config['rootLine'] as $topPage) {\n\t\t\t// Recursive phone found\n\t\t\tif ($topPage['tx_mfiaddresschanger_address'] == 2) {\n\t\t\t\t$phone = $this->phone . $topPage['tx_mfiaddresschanger_phone'];\n\t\t\t}\n\t\t}\n\t\t// Return phone\n\t\treturn $phone;\n\t}", "public function getPhone()\n\t{\n\t\treturn $this->phone;\n\t}", "public function getPhone()\n\t{\n\t\treturn $this->phone;\n\t}", "function leadership_phone_number_output($phone_number) {\n\n\t$numbers_only = preg_replace('/[^\\d]+/', '', $phone_number);\n\n\t$string_length = strlen($numbers_only);\n\n\t//Only US/Canada numbers will have this styling\n\tif($string_length == 10) {\n\n\t\t$areacode = substr($numbers_only, 0, 3);\n\t\t$prefix = substr($numbers_only, 3, 3);\n\t\t$number = substr($numbers_only, 6, 4);\n\n\t\t$phone_number = $areacode . '/' . $prefix . '-' . $number;\n\n\t}\n\tif($string_length == 11 && substr($numbers_only, 0, 1) == 1) {\n\n\t $areacode = substr($numbers_only, 1, 3);\n\t\t$prefix = substr($numbers_only, 4, 3);\n\t\t$number = substr($numbers_only, 7, 4);\n\n\t $phone_number = $areacode . '/' . $prefix . '-' . $number;\n\n\t}\n\n\treturn $phone_number;\n}", "public function organizationNumberPhone(): string\n {\n return $this->numberPhone;\n }", "public function organizationNumberPhone(): string\n {\n return $this->numberPhone;\n }", "public function getPhone(): string\n {\n return $this->phone;\n }", "public function getPhone(): string\n {\n return $this->phone;\n }", "public function getPhonenumber()\n {\n return $this->_getVar('user_phonenumber');\n }", "public function getPhone() : string\n {\n return $this->phone;\n }", "public function getCustomerNumber (){\r\n\t\treturn User::where('id', $this->user_id)->first()->phone;\r\n\t}", "static public function getPhone($phone)\n {\n $phone = trim($phone, ' .');\n\n if (strpos($phone, '.')) {\n list(, $phone) = explode('.', $phone, 2);\n }\n\n $r = array(\n '+' => '',\n '.' => '',\n '(' => '',\n ')' => '',\n ' ' => '',\n '-' => '',\n );\n\n return trim(str_replace(array_keys($r), array_values($r), $phone));\n }", "function phonenumber($phone, $format = false, $qualifyareacode = true){\n $phone = preg_replace(\"/[^0-9]/\", \"\", $phone); // strip out everything but numbers\n if (left($phone, 1) == 0 || left($phone, 1) == 1) {//do not allow 0 or 1 to be the first number\n $phone = right($phone, strlen($phone) - 1);\n }\n if(strlen($phone) > 10){$phone = left($phone, 10);}//MUST BE 10 DIGITS!!!!\n if(strlen($phone) < 10){$phone = 0;}//MUST BE 10 DIGITS!!!!\n if($qualifyareacode){\n if(!qualifyareacode($phone)){$phone = \"\";}\n }\n if($format){\n $phone = preg_replace(\"/([0-9]{3})([0-9]{3})([0-9]{4})/\", \"($1) $2-$3\", $phone);\n }\n return $phone;\n }", "public function getCphone()\n\t{\n\t\treturn $this->cphone;\n\t}", "public function getIpPhone()\n {\n return $this->getFirstAttribute($this->schema->ipPhone());\n }", "public function phone() {\n return rand(100, 999) . '-' . rand(100, 999) . '-' . rand(1000, 9999);\n }", "public function getPhoneNumber() {\n return $this->phoneNumber;\n }", "public function getPhone() {\n\t\treturn $this->phone;\n\t}", "function format_phone($number)\n{\n $number = preg_replace(\"/[^\\d]/\", \"\", $number);\n\n // get number length.\n $length = strlen($number);\n\n if (ctype_digit($number) && $length == 10) {\n $number = substr($number, 0, 3) . '-' . substr($number, 3, 3) . '-' . substr($number, 6);\n } else {\n if (ctype_digit($number) && $length == 7) {\n $number = substr($number, 0, 3) . '-' . substr($number, 3, 4);\n }\n }\n return $number;\n}", "public function getInternationalPhone() : string\n {\n $raw = substr($this->getRawPhone(), 1);\n return $this->_plus . $this->_country_code . $raw;\n }", "public function getTelephone(): string\n {\n return $this->telephone;\n }", "public function getPhoneNumberForVerification();", "public function getPhoneNumberForVerification();", "function formatPhone($num)\r\n{\r\n$num = preg_replace('/[^0-9]/', '', $num);\r\n \r\n$len = strlen($num);\r\nif($len == 7)\r\n$num = preg_replace('/([0-9]{3})([0-9]{4})/', '$1-$2', $num);\r\nelseif($len == 10)\r\n$num = preg_replace('/([0-9]{3})([0-9]{3})([0-9]{4})/', '($1) $2-$3', $num);\r\n \r\nreturn $num;\r\n}", "function formatPhone($phone) {\n return preg_replace(\"/([0-9]{3})([0-9]{3})([0-9]{4})/\", \"$1-$2-$3\", $phone);\n}", "public function getTelephone()\n {\n echo $this->telephone . '<br>';\n return $this->telephone;\n }", "public function getPhoneNumber(): Phone\n {\n $phone = $this->{self::PHONE_NUMBER};\n if (is_array($phone))\n $this->setPhoneNumber(new Phone($phone));\n\n return $this->{self::PHONE_NUMBER};\n }", "function nulib_cck_phone_formatter_local_phone_number($element) {\n $phone = '';\n\n // Display a local phone number without country code.\n if (!empty($element['number'])) {\n // Call country local formatter if exist\n $function = $element['country_codes'] . '_formatter_local';\n if (function_exists($function)) {\n $phone = $function($element);\n }\n else {\n // Default implementation is:\n // $phone = $element['number']);\n // Custom implentation styles the number in the form (xxx)-xxx-xxxx\n $phone = _make_phonenumber($element['number']);\n }\n\n // Extension\n if (!empty($element['extension'])) {\n $phone = $phone . theme('phone_number_extension', $element['extension']);\n }\n }\n\n return $phone;\n}", "public function getPhone1()\n {\n return $this->phone1;\n }", "public function getPhone1()\n {\n return $this->phone1;\n }", "function display_phone_number($phonenumber)\n{\n $phonenumber = preg_replace(\"/[^\\d]/\",\"\",$phonenumber);\n \n // get phonenumber length.\n $length = strlen($phonenumber);\n \n // if phonenumber = 10\n if($length == 10) {\n $phonenumber = preg_replace(\"/^1?(\\d{3})(\\d{3})(\\d{4})$/\", \"($1)$2-$3\", $phonenumber);\n }\n else if($length > 10) {\n $extra = \"\";\n $extra = $length - 10;\n $nonextra = substr($phonenumber, 0, 10);\n $phonenumber = preg_replace(\"/^1?(\\d{3})(\\d{3})(\\d{4})$/\", \"($1)$2-$3\", $nonextra).\" ext.\".substr($phonenumber, -$extra);\n }\n\n return $phonenumber;\n}", "function display_phone_number($phonenumber)\n{\n $phonenumber = preg_replace(\"/[^\\d]/\",\"\",$phonenumber);\n \n // get phonenumber length.\n $length = strlen($phonenumber);\n \n // if phonenumber = 10\n if($length == 10) {\n $phonenumber = preg_replace(\"/^1?(\\d{3})(\\d{3})(\\d{4})$/\", \"($1)$2-$3\", $phonenumber);\n }\n else if($length > 10) {\n $extra = \"\";\n $extra = $length - 10;\n $nonextra = substr($phonenumber, 0, 10);\n $phonenumber = preg_replace(\"/^1?(\\d{3})(\\d{3})(\\d{4})$/\", \"($1)$2-$3\", $nonextra).\" ext.\".substr($phonenumber, -$extra);\n }\n\n return $phonenumber;\n}", "function formatPhone ( $sPhoneNumber ) {\n\t$areacode \t= substr( $sPhoneNumber, 0, 3 );\n\t$prefix\t\t= substr( $sPhoneNumber, 3, 3 );\n\t$last4 \t\t= substr( $sPhoneNumber, -4 );\n\t$output \t= \"($areacode) $prefix - $last4\";\n\treturn $output;\n}", "public function getPhone():string\n {\n return $this->phone;\n }", "protected function pf_phone()\r\n {\r\n #verefication phone string\r\n\r\n $phone = $this->empty_data('phone');\r\n if ($phone === false):\r\n foreach ($this->phone As $key => $value){\r\n if (is_array($value)):\r\n if(preg_match($value[1], $value[0])):\r\n $this->data['phone'][$key] = $value[0];\r\n else:\r\n $this->error[$key] = false;\r\n endif;\r\n else:\r\n if(preg_match('/^((8|\\+7)[\\- ]?)?(\\(?\\d{3}\\)?[\\- ]?)?[\\d\\- ]{7,10}$/', $value)):\r\n $this->data['phone'][$key] = $value;\r\n else:\r\n $this->error[$key] = false;\r\n endif;\r\n endif;\r\n }\r\n endif;\r\n\r\n }", "public function getFieldPhoneNr()\n {\n return $this->fieldPhoneNr;\n }", "public function getPhoneNumber()\n {\n return $this->_phoneNumber;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }" ]
[ "0.69707847", "0.68886584", "0.6573813", "0.656122", "0.65422845", "0.65422845", "0.65135455", "0.6504092", "0.6475423", "0.6461772", "0.6441288", "0.6437454", "0.6420965", "0.6415844", "0.6394066", "0.63122636", "0.6296054", "0.6296054", "0.629032", "0.62696743", "0.62696743", "0.6261184", "0.6258232", "0.624696", "0.6244131", "0.62441206", "0.6236946", "0.61960775", "0.61782146", "0.6178067", "0.6161873", "0.6149073", "0.6149073", "0.61463535", "0.6140025", "0.61348015", "0.612223", "0.6107543", "0.608493", "0.60718995", "0.607187", "0.60712904", "0.60712725", "0.6059841", "0.60529196", "0.60529196", "0.60458565", "0.60420287", "0.6041088", "0.6041088", "0.60385066", "0.6035698", "0.6035698", "0.60220367", "0.60220367", "0.60214186", "0.6017009", "0.60139954", "0.600811", "0.6005641", "0.599909", "0.5998749", "0.5995933", "0.5993623", "0.59901124", "0.59872484", "0.5977411", "0.59774077", "0.59725744", "0.59725744", "0.59648865", "0.596385", "0.596012", "0.59426326", "0.5941005", "0.5937094", "0.5937094", "0.5932167", "0.5932167", "0.5929863", "0.5929558", "0.5918684", "0.59135747", "0.59119534", "0.5907745", "0.5907745", "0.5907745", "0.5907745", "0.5907745", "0.5907745", "0.5907745", "0.5907745", "0.5907745", "0.5907745", "0.5907745", "0.5907745", "0.5907745", "0.5907745", "0.5907745", "0.5907745" ]
0.7514749
0
Get Deck of Player as a String. It appears to be the wrong deck sometimes so its better to use getDeckFromPlayedCards maybe the deck is filled with the client deck the replay if from because it is unknown to the game.
Получить колоду игрока в виде строки. Похоже, что иногда это неправильная колода, поэтому лучше использовать getDeckFromPlayedCards, возможно, колода заполнена клиентской колодой, если реплеи происходят из-за того, что это неизвестно игре.
function getDeckString(){ if(!isset($this->deck))return ""; $retval=""; $first=true; foreach($this->deck->deckcards as $deckcard){ if($first)$first=false; else $retval.=", "; $usedString=""; if(isset($this->cardsPlayed[$deckcard->getCarddata(true)->cardId])) $usedString = "(used ".$this->cardsPlayed[$deckcard->getCarddata(true)->cardId]." "."times)"; $retval.=$deckcard->getCarddata(true)->cardName.$usedString; } return $retval; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDeckStringFromPlayedCards(){\n\n if(!isset($this->deck))return \"\";\n\n $retval=\"\";\n $first=true;\n foreach($this->cardsPlayed as $cardid=>$timesUsed){\n\n if($first)$first=false;\n else $retval.=\", \";\n\n $usedString=\"\";\n\n $usedString = \"(ID $cardid, used \".$timesUsed.\" \".\"times)\";\n\n $retval .= SkylordsCardbase::getInstance()->getCardById($cardid)->cardName.$usedString;\n\n }\n\n return $retval;\n\n\n }", "private function getDeck(){\n\t\treturn implode(\" | \", $this->cards);\n\t}", "function deck_to_string($deck) {\n $numerals = [\n '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6',\n '7' => '7', '8' => '8', '9' => '9', 'T' => '10', 'J' => 'jack',\n 'Q' => 'queen', 'K' => 'king', 'A' => 'ace'\n ];\n $suits = ['c' => 'clubs', 'd' => 'diamonds', 'h' => 'hearts', 's' => 'spades'];\n\n $deck_of_names = [];\n foreach ($deck as $card) {\n array_push($deck_of_names, $numerals[$card[0]] . '_of_' . $suits[$card[1]]);\n }\n return $deck_of_names;\n }", "public function toString() {\n $cardString = '';\n if ($this->suitIsValid($this->getSuit()) && $this->rankIsValid($this->getRank())) {\n $cardString = $this->getRank() . ' of ' . $this->getSuit();\n }\n return $cardString;\n }", "public function getDrawDeck();", "function getDeckHtmlFromPlayedCards(){\n\n if(!isset($this->deck))return \"\";\n\n $retval=\"<div class='deckwrap' >\";\n $first=true;\n foreach($this->cardsPlayed_detail as $cardid=>$deckcardinfo){\n\n $timesUsed = $deckcardinfo[\"played\"];\n $upgrade = $deckcardinfo[\"upgrade\"];\n $retval.=\"<div class='cardwrap' style='display:inline-block;width:120px;vertical-align:top;'>\";\n $cardinfo = SkylordsCardbase::getInstance()->getCardById($cardid);\n $cardinfodetails = SkylordsCardbaseDetails::getInstance()->getCardById($cardid);\n\n $retval.=\"<p style='text-align:center;font-weight:bold;min-height:38px;'>\".$cardinfo->cardName.\"</p>\";\n\n if(empty($cardinfodetails)){\n if(SL_DEBUG)\n echo \"Warning: carddetails not set:\".$cardid;;\n }\n\n\n if(empty($cardinfodetails->Image->Url)){\n if(SL_DEBUG)\n echo \"Warning: carddetailsimage not set:\".$cardid;\n }\n\n if($first)$first=false;\n\n\n $usedString=\"\";\n\n if(!empty($cardinfodetails)){\n $retval.=\"<img style='width:120px' src='\".CARDIMG_BASE_URI.$cardinfodetails->Image->Url.\"'>\";\n }\n\n $usedString .= \"(Upg:{$upgrade} Used:{$timesUsed}x)\";\n\n $retval .= $usedString;\n $retval.=\"</div>\";\n }\n $retval.=\"</div>\";\n return $retval;\n\n\n }", "public function getCard(): ?string\n {\n return $this->card;\n }", "public function getCard(): ?string\n {\n return $this->card;\n }", "function printHand( $cfg=false )\n\t{\n\t\tif(!$cfg)\n\t\t\t$cfg = new Player_Config();\n\t\t\n\t\t$cards = array();\n\t\tforeach( $this->cards as $card )\n\t\t\t$cards[] = $card->printCard( $cfg );\n\t\t\n\t\treturn join(' ', $cards);\n\t}", "public function suitFullName(): String\n {\n return $this->suit->fullName();\n }", "function getHand() {\n $playerCards = array();\n foreach ($GLOBALS['deck'] as $category => $cards) {\n \n // get random, unique cards\n $getCard = null;\n $card = null;\n while ($card == '') {\n $getCard = rand(0, count($cards) - 1);\n $card = explode('.', $cards[$getCard])[0];\n }\n \n // remove card from array and add drawn card to players cards\n unset($GLOBALS['deck'][$category][$getCard]);\n array_push($playerCards, $card);\n }\n \n return $playerCards;\n }", "public function getCardHolder()\n {\n return $this->cardHolder;\n }", "public function getIDeck();", "function getCardHolderName() {\n\t\treturn $this->m_cardHolderName;\n\t}", "public function toStringCard($card){\n\t\t$stringCard = $this->cardRank[$this->getRank($card)] . \" of \" . $this->suit[$this->getNumericSuit($card)];\n\t\treturn $stringCard;\n\t}", "public function toString()\n {\n return $this->face . $this->suit;\n }", "public function show( Card $card ) : string\n {\n return $card->toString();\n }", "public function getCardHolderDescription()\n {\n return isset($this->CardHolderDescription) ? $this->CardHolderDescription : null;\n }", "public function getPlayerClantag($playerName)\n {\n $playerInfo = $this->getPlayerdata($playerName);\n if (!isset($playerInfo[12])) {\n return $this->_globalMsg['PLAYER_NOT_FOUND'];\n }\n\n return $this->_array2String($playerInfo, 12);\n }", "public function getDeckArray(){\n return $this->deck;\n }", "protected function getHoleCardsText()\n {\n $out = '';\n\n $out .= sprintf(\"*** HOLE CARDS ***\\n\");\n\n $player = $this->getMePlayer();\n $out .= sprintf(\"Dealt to %s [%s %s]\\n\", $this->me($player['player']), $player['card1'], $player['card2']);\n\n $out .= $this->getActionsText(self::STREET_PREFLOP);\n\n return $out;\n }", "public static function getDeck()\n {\n /* no of suits in the deck */\n $suits = [\"♣\", \"♦\", \"♥\", \"♠\"];\n /* no of ranks in the deck */\n $rank = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];\n /* deck array wth the empty value */\n $deck = [];\n for ($i = 0; $i < count($suits); $i++) {\n for ($j = 0; $j < count($rank); $j++) {\n /* giving the values of cards in the deck array */\n $deck[$i][$j] = new card($suits[$i], $rank[$j]);\n }\n }\n //print_r($deck);\n return $deck;\n }", "public function getCardHolderId(): string\n {\n return $this->getParameter('card_holder_id');\n }", "public function get_card_desrcription( $card ) {\n\t\treturn apply_filters( 'llms_stripe_get_card_desrcription', sprintf( '%s &mdash; **** **** **** %s', $card->brand, $card->last4 ), $card );\n\t}", "public function __toString(): string\n {\n return implode(' ', $this->_cards);\n }", "function LoadDeck ($playerid, $deckstring = '') {\r\n global $CONF;\r\n $prefix = $CONF[GENERAL]['prefix'];\r\n \r\n if (!$this->valid) //Do nothing if we're not connected to a valid game\r\n return false;\r\n \r\n //GetOne returns false if no records were found, so this just checks for the existence of cards in the player's library\r\n if ($this->dblan->GetOne(\"select count(*) from `\" . $prefix . \"_game\" . $this->gameid . \"_cards` where location = ?\", \"library_$playerid\"))\r\n return false;\r\n \r\n $sampledeck = array(\r\n array(\"VHJvbGwgQXNjZXRpYy4xMzA0OTg=\", $playerid, $playerid, \"library_$playerid\", 536870912), //Troll Ascetic\r\n array(\"V29yc2hpcC4yNTU1Mw==\", $playerid, $playerid, \"library_$playerid\", 536870912 + pow(2,20)), //Worship\r\n array(\"QmVsb3ZlZCBDaGFwbGFpbi4yOTc5OA==\", $playerid, $playerid, \"library_$playerid\", 536870912 + 2*(pow(2,20))), //Beloved Chaplain\r\n array(\"U3R1ZmZ5IERvbGwuMTE2NzI0\", $playerid, $playerid, \"library_$playerid\", 536870912 + 3*(pow(2,20))), //Stuffy Doll\r\n array(\"RGF5YnJlYWsgQ29yb25ldC4xMzA2MzU=\", $playerid, $playerid, \"library_$playerid\", 536870912 + 4*(pow(2,20))), //Daybreak Coronet\r\n array(\"VHJvbGwgQXNjZXRpYy4xMzA0OTg=\", $playerid, $playerid, \"library_$playerid\", 536870912 + 5*(pow(2,20))), //Troll Ascetic\r\n array(\"VHJvbGwgQXNjZXRpYy4xMzA0OTg=\", $playerid, $playerid, \"library_$playerid\", 536870912 + 6*(pow(2,20))), //Troll Ascetic\r\n array(\"VHJvbGwgQXNjZXRpYy4xMzA0OTg=\", $playerid, $playerid, \"library_$playerid\", 536870912 + 7*(pow(2,20))), //Troll Ascetic\r\n array(\"VHJvbGwgQXNjZXRpYy4xMzA0OTg=\", $playerid, $playerid, \"library_$playerid\", 536870912 + 8*(pow(2,20))), //Troll Ascetic\r\n array(\"VHJvbGwgQXNjZXRpYy4xMzA0OTg=\", $playerid, $playerid, \"library_$playerid\", 536870912 + 9*(pow(2,20))), //Troll Ascetic\r\n );\r\n \r\n $this->dblan->Execute(\"insert into `\" . $prefix . \"_game\" . $this->gameid . \"_cards` (refhash, owner, controller, location, stackorder) values (?, ?, ?, ?, ?)\", $sampledeck);\r\n return true;\r\n }", "public function drawCard()\r\n {\r\n $card = array_pop($this->cardsInDeck);\r\n return $card;\r\n }", "public function get_deck() {\r\n\t\t$all = (array)$this->get_many_by('room_id', $this->session->userdata('room_id'));\r\n\t\t$deck = array();\r\n\t\tforeach ($all as $card) {\r\n\t\t\t$card = (array)$card;\r\n\t\t\t$card['place'] = unserialize($card['place']);\r\n\t\t\tif ($card['place']['type'] == 'deck') {\r\n\t\t\t\tarray_push($deck, $card);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $deck;\r\n\t}", "public function getCardholder()\n {\n return $this->getResponseKey('paymentMethod.name')\n ?: $this->getResponseKey('paymentResponse.name');\n }", "public function getBankCard()\n {\n return $this->bank_card;\n }", "public function getBankCard()\n {\n return $this->bank_card;\n }", "function getCardHolderName() {\n\t\tif ($this->_cardHolderName)\n\t\t\treturn 1 ;\n\t\telse \n\t\t\treturn 0 ;\t\t\t\n\t}", "public function getDefaultCard(): ?string\n {\n return $this->defaultCard;\n }", "public function getCardName()\n {\n return $this->cardName;\n }", "public function getCard()\n {\n return $this->card;\n }", "public function getCardHolderInformation();", "public function cardLastFour()\n {\n return (string) ($this->razorpayInfo()['payment_information']['last4'] ?? '');\n }", "private function getTheFirstDeckCard($deck)\n {\n\n return reset($deck);\n \n }", "public function __tostring()\n {\n $special = [\"Jack\", \"Queen\", \"King\", \"Ace\"];\n if ($this->rank > 10) {\n return $special[$this->rank % 11] . $this->suit;\n }\n return $this->rank . $this->suit;\n }", "function __toString()\n\t{\n\t\treturn \"$this->rank$this->suit\";\n\t}", "public function getShortName()\r\n {\r\n return $this->_shortType . Deck::getSymbol($this->_suit);\r\n }", "public function getCard()\t\t\r\n\t{\r\n\t\treturn $this->card;\r\n\t}", "public function getOpponentHand(){\n\t\t\t$database = DataLayer::getGameplayInstance();\n\t\t\tif($this->player1ID === $this->playerID){\n\t\t\t\t$opponentID = $this->player2ID;\n\t\t\t}else{\n\t\t\t\t$opponentID = $this->player1ID;\n\t\t\t}\n\n\n\t\t\t$hands = $database->getHands($this->gameID);\n\t\t\tif(!isset($hands[$opponentID])){\n\t\t\t\t// No hand exists - dealer hasn't dealt yet.\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Create the PlayerHand object to return\n\t\t\t$cards = array();\n\t\t\tforeach($hands[$opponentID] as $cardArr){\n\t\t\t\t//If we are at the right part of the game give the actual cards\n\t\t\t\t//Otherwise, display anonymous cards\n\t\t\t\tif($this->gamestate == \"VIEWING_HANDS\" ||\n\t\t\t\t\t$this->gamestate == \"WAITING_PLAYER_1\" ||\n\t\t\t\t\t$this->gamestate == \"WAITING_PLAYER_2\"){\n\t\t\t\t\t$cards[] = array(\"card\"=>new PlayingCard($cardArr[\"number\"], $cardArr[\"suit\"]), \"inHand\"=>$cardArr[\"inHand\"]);\n\t\t\t\t}else{\n\t\t\t\t\t$cards[] = array(\"card\"=>new PlayingCard(0, null), \"inHand\"=>$cardArr[\"inHand\"]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new PlayerHand(PlayerHand::NOT_CRIB, $cards);\n\n\t\t}", "public function getCard();", "public function getGwPrintedCardSku($scopeCode = null)\n {\n return (string)$this->getConfig(self::AVATAX_SERVICE_GW_PRINTED_CARD_SKU, $scopeCode);\n }", "function buildDeck($suits, $cards) {\n\t$deck = [];\n\tforeach ($suits as $suit) {\n\t\tforeach ($cards as $card) {\n\t\t\t$deck[] = $card . ' ' . $suit;\n\t\t}\n\t}\n\tshuffle($deck);\n\treturn $deck;\n}", "public function getCards()\n\t\t{\n\t\t\treturn $this->getUserPlayerCards();\n\t\t}", "public function getNameOnCard() : ?string;", "public function getUserPlayerCards()\n\t\t{\n\t\t\treturn ($this->getUserPlayer()->getId() == $this->getPlayer()->getId()) ? $this->getPlayerCards() : $this->getOpponentCards();\n\t\t}", "public function suitShortName(): String\n {\n return $this->suit->shortName();\n }", "public function getCardHolderId()\n {\n return $this->getParameter('CardHolderID');\n }", "public function get_hand($player_id = null) {\r\n\t\tif ($player_id === null) $player_id = $this->session->userdata('user_id');\r\n\t\t$all = (array)$this->get_many_by('room_id', $this->session->userdata('room_id'));\r\n\t\t$hand = array();\r\n\t\tforeach ($all as $card) {\r\n\t\t\t$card = (array)$card;\r\n\t\t\t$card['place'] = unserialize($card['place']);\r\n\t\t\tif (isset($card['place']['value']) && \r\n\t\t\t\t$card['place']['value'] == 'hand' &&\r\n\t\t\t\t$card['place']['id'] == $player_id) {\r\n\t\t\t\tarray_push($hand, $card);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $hand;\r\n\t}", "public function getBank(): ?string\n {\n return $this->bank;\n }", "public function deck() {\n return $this->belongsTo('App\\Deck');\n }", "public function getCardType(): string\n {\n return $this->card_type;\n }", "public function getCardType(): string\n {\n return $this->card_type;\n }", "function get_deck_cards($deckID) {\n $db_pdo = new PDO(DB_DSN, DB_USERNAME, DB_PASSWORD);\n\n $query = \"SELECT cardID, quantity, sidedeck FROM DeckCard WHERE deckID=?\";\n\t$stmt = $db_pdo->prepare($query);\n $stmt->execute(array($deckID));\n db_log_command($query);\n\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n // $deckID = $_POST['deck-select'];\n\t// $stmt->execute(array($deckID));\n\t// $col = $stmt->fetch(PDO::FETCH_ASSOC);\n}", "public function getPlayerNameTurn()\r\n {\r\n $players = $this->getPlayers();\r\n return $players[$this->getPlayerTurn()];\r\n }", "public function getChallengerUsername(string $gameId){\n if (empty($gameId)) {\n $this->setError(\"Game id cannot be empty\");\n return \"\";\n }\n $columns = \"player1, player2\";\n $where = \"gameId = ?\";\n $bindings = array($gameId);\n $result = $this->database->select($this->table,$columns, $where, $bindings);\n if($result->rowCount() > 0){\n $result = $result->fetch();\n return $result[\"player1\"] != $this->user->getUserName() ? $result[\"player1\"] : $result[\"player2\"];\n\n }\n return \"\";\n }", "public function show($deck)\n {\n session(['deck' => $deck]);\n\n return view('forms.decks.show', [\n 'deck' => Deck::findOrFail($deck)\n ]);\n }", "public function getMyHand(){\n\t\t\t$database = DataLayer::getGameplayInstance();\n\n\t\t\t$hands = $database->getHands($this->gameID);\n\t\t\tif(!isset($hands[$this->playerID])){\n\t\t\t\t// No hand exists - dealer hasn't dealt yet.\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Create the PlayerHand object to return\n\t\t\t$cards = array();\n\t\t\tforeach($hands[$this->playerID] as $cardArr){\n\t\t\t\t// If the gamestate is either VIEWING_HANDS or WAITING_PLAYER_# show opponent cards\n\t\t\t\t// Otherwise, show anonymous cards\n\t\t\t\t$cards[] = array(\"card\"=>new PlayingCard($cardArr[\"number\"], $cardArr[\"suit\"]), \"inHand\"=>$cardArr[\"inHand\"]);\n\t\t\t}\n\n\t\t\treturn new PlayerHand(PlayerHand::NOT_CRIB, $cards);\n\t\t}", "public function show()\n { $return ='';\n foreach($this->cards as $card){\n $return .= $card->getCard().', ';\n }\n return $return;\n }", "public function getFullName()\r\n {\r\n return $this->_type . ' of ' . $this->_suit;\r\n }", "function getCard() {\n //$query = \"select number,card,seed,seat,s.player as player from pkr_dealer d inner join pkr_seat s on d.seat=s.seat_number where s.player=\".$this->curr_player.\" and game=\".$this->curr_game.\" and d.idtable=\".$this->curr_table.\" and s.status=\".PLAYING.\" order by number\";\n $query = \"select number,card,seed,seat,player from pkr_dealer where player=\" . $this->curr_player . \" and game=\" . $this->curr_game . \" and idtable=\" . $this->curr_table . \" and player in (select player from pkr_seat where status=\" . PLAYING . \") order by number\";\n $rows = $GLOBALS['mydb']->select($query);\n return $rows;\n }", "function getDeck()\n {\n /* no of suits in the deck */\n $suits = [\"♣\", \"♦\", \"♥\", \"♠\"];\n /* no of ranks in the deck */\n $rank = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];\n /* deck array wth the empty value */\n $deck = [];\n for ($i = 0; $i < count($suits); $i++) {\n for ($j = 0; $j < count($rank); $j++) {\n /* giving the values of cards in the deck array */\n $deck[$i][$j] = new card($suits[$i], $rank[$j]);\n }\n }\n //print_r($deck);\n return $deck;\n }", "public function __toString()\r\n {\r\n return (string) $this[\"client_nickname\"];\r\n }", "public function getFullTitleFor(Player $player): string\r\n {\r\n $text = $this->titles[$player->getId()] ?? \"\";\r\n if (!empty($this->subTitles[$player->getId()] ?? \"\")) {\r\n $text .= \"\\n\\n\" . $this->subTitles[$player->getId()] ?? \"\";//?? \"\" even necessary?\r\n }\r\n if (empty($text)) $text = $this->getFullTitle();\r\n return mb_convert_encoding($text, 'UTF-8');\r\n }", "public function getDraft(): string\n {\n return $this->draft;\n }", "public function getPrintedCardItem()\n {\n $isApplicable = $this->quote->getGwAddCard();\n if ($isApplicable) {\n $printedCardPrice = $this->quote->getGwCardBasePrice();\n if ($printedCardPrice) {\n return [\n \"display_name\" => \"Printed Card\",\n \"sku\" => \"printed-card\",\n \"unit_price\" => Util::formatToCents($this->quote->getGwCardBasePrice()),\n \"qty\" => 1,\n \"item_image_url\" => $this->imageHelper->getPlaceholderImage(),\n \"item_url\" => $this->imageHelper->getPlaceholderImage()\n ];\n }\n }\n }", "public function getPlayerCards()\n\t\t{\n\t\t\t$this->_populatePlayerCards();\n\t\t\treturn $this->_player_cards;\n\t\t}", "public function getCurrentPlayerCards()\n\t\t{\n\t\t\treturn ($this->getCurrentPlayerId() == $this->getPlayer()->getId()) ? $this->getPlayerCards() : $this->getOpponentCards();\n\t\t}", "public function winner($playerKey)\n {\n\n list($playerSum, $playerString) = $this->player[$playerKey]->scoreSum($this->player[$playerKey]);\n\n list($dealerSum) = $this->dealer->scoreSum($this->dealer);\n\n if ($playerSum <= SELF::MAX_ALLOWED_POINT) {\n if ($dealerSum <= SELF::MAX_ALLOWED_POINT) {\n if ($playerSum > $dealerSum) {\n $result = 'WIN';\n } elseif ($playerSum == $dealerSum) {\n $result = 'PUSH';\n } else {\n $result = 'LOSE';\n }\n } else {\n $result = 'WIN';\n }\n } else {\n $result = 'LOSE';\n }\n\n return \"\n \\n============================================================================\n \\n Dealer : $this->dealerString\n \\n Player#\" . $playerKey . \" : $playerString\n \\n \\033[32m Player#\" . $playerKey . \" has \" . $playerSum . \" , Dealer has \" . $dealerSum . \" \\033[31m => You \" . $result . \" \\033[0m\n \\n============================================================================\n \\n\";\n\n }", "public function ejectCard()\n {\n $this->atmMachine->setATMState($this->atmMachine->getNoCardState());\n return 'Card ejected';\n }", "public function toString(): string\n {\n $output = $this->character->value;\n\n // if the character supports a skin tone...\n if ($this->skinTone && $this->character->supportsSkinTones()) {\n $output .= $this->skinTone->value;\n }\n\n return $output;\n }", "public function drawCard(){\n $return_card = $this->deck[$this->cards_drawn];//retrieve current card\n $this->cards_drawn++;\n if($this->cards_drawn >= self::DECKSIZE){//if we have drawn 45 cards, shuffle the deck\n $this->shuffleDeck();\n $this->cards_drawn = 0;\n }\n return $return_card;\n }", "protected function getHandInitText()\n {\n $tr_blind = array(\n 'Small Blind' => 'small blind',\n 'Big blind' => 'big blind',\n );\n\n $time_format = '%Y/%m/%d %H:%M:%S';\n $out = '';\n\n $this->info['timestamp'] = mktime($this->info['hour'], $this->info['minute'], $this->info['second'],\n $this->info['month'], $this->info['day'], $this->info['year']);\n $aest_time = strftime($time_format, $this->info['timestamp']);\n $et_time = strftime($time_format, $this->info['timestamp'] - (15 * 60 * 60));\n\n $out .= sprintf(\"PokerStars Hand #%d: %s %s ($%.02f/$%.02f USD) - %s AEST [%s ET]\\n\", $this->getPsHandId(), $this->getPsGame(), $this->getPsLimit(), $this->getFileSb(), $this->getFileBb(), $aest_time, $et_time);\n \n return $out;\n }", "function getPlayerName($playerID) {\n\t$query = \"SELECT name from player WHERE id = $playerID\";\n\t$result = mysql_query($query);\n\t$row = mysql_fetch_object($result);\n\t$name = $row->name;\n\treturn $name;\n\t}", "public function getCardToken(): string;", "public function testToString() {\n \n $card = new Cards\\Card('spades', 'A');\n $this->assertEqual($card->__toString(), 'A of spades');\n \n }", "function echoHand($hand, $playerNhame, $hidden = false) {\n // todo\n\techo PHP_EOL . $playerName . \"'s hand: \";\n\tif ($hidden == false) {\n\t\tforeach ($hand as $card) {\n\t\t\techo $card[0] . ' ' . $card[1];\n\t\t}\n\t\techo 'Total: ' . getHandTotal($hand) . PHP_EOL;\n\t} else {\n\t\techo $hand[0][0] . ' ' . $hand[0][1] . ' Total: ?';\n\t}\n}", "private function getPlayerScreenNames()\n\t{\n\t $message = null;\n\t $message .= '<br />Occupants:';\n\t foreach ($this->cube_players as $key => $name) {\n\t $message .= '<br />Player: ' . $this->cube_players[$key]['screen_name'];\n\t if ($this->cube_players[$key]['screen_name'] == 'test_player') $message .= ' - you';\n\t }\n\t \n\t return $message;\n\t}", "public function getPlayedCards(){\n\t\t\t$playedCards = new PlayedCards($this->gameID);\n\n\t\t\t$cards = $playedCards->getAllCards();\n\n\t\t\t$toReturn = array();\n\n\t\t\tforeach($cards as $card){\n\t\t\t\t$toReturn[] = array(\"number\"=>$card[\"card\"]->getNumber(),\n\t\t\t\t\t \"suit\"=>$card[\"card\"]->getSuit(),\n\t\t\t\t\t \"playedByID\"=>$card[\"playedByID\"]);\n\t\t\t}\n\n\t\t\treturn $toReturn;\n\t\t}", "public function getDumpString();", "public function card()\n {\n $customer = $this->customer();\n\n if ($customer !== null) {\n $defaultSource = $customer['default_source'];\n\n if ($defaultSource !== null) {\n return Billing::retrieveCard($customer['id'], $defaultSource);\n } else {\n return null;\n }\n } else {\n return null;\n }\n }", "public function getFullTitleFor(Player $player): string\n\t{\n\t\t$text = $this->titles[$player->getId()] ?? \"\";\n\t\tif (!empty($this->subTitles[$player->getId()] ?? \"\")) {\n\t\t\t$text .= \"\\n\\n\" . $this->subTitles[$player->getId()] ?? \"\";//?? \"\" even necessary?\n\t\t}\n\t\tif (empty($text)) $text = $this->getFullTitle();\n\t\treturn mb_convert_encoding($text, 'UTF-8');\n\t}", "private function writeDealtCards(Player $player, OutputInterface $output): void\n {\n $output->writeln(sprintf(\n \"%s has been dealt:\\t%s %s %s %s %s %s %s\",\n $player,\n $player->getCard(0),\n $player->getCard(1),\n $player->getCard(2),\n $player->getCard(3),\n $player->getCard(4),\n $player->getCard(5),\n $player->getCard(6),\n //$player->getCard(7),\n ));\n }", "public function cardBrand()\n {\n return (string) ($this->razorpayInfo()['payment_information']['network'] ?? '');\n }", "public function getReadableState($player, string $true = \"On\", string $false = \"Off\"):string\n {\n return $this->readableTrueFalse($this->isChatting($player), $true, $false);\n }", "public function deck(){\n return $this->belongsTo('App\\Deck', 'deck_id', 'id');\n }", "public function toString(): string\n {\n $response = $this->type.($this->realm ? \" realm=\\\"\".$this->realm.\"\\\"\" : \"\");\n foreach ($this->challenges as $key=>$value) {\n $response .= \", \".$key.\"=\\\"\".$value.\"\\\"\";\n }\n return $response;\n }", "public function getCardOutput(){\n\t\tif (!isset($this->output)){\n\t\t\t$this->generateCardOutput();\n\t\t}\n\t\treturn $this->output;\n\t}", "public function response()\n {\n return $this->response['card'];\n }", "public function getCardcode()\n {\n return $this->cardcode;\n }", "public function getDuClient(): ?string {\n return $this->duClient;\n }", "public function getCardContents()\n {\n return $this->card_contents;\n }", "function shuffleDeck($deck) { \n \t$randomDeck = array(); \n\t $keys = array_keys($deck); \n\t shuffle($keys); \n\t foreach($keys as $key) { \n\t $randomDeck[$key] = $deck[$key]; \n\t }\n\t return $randomDeck; \n\t}", "function getCard($card_id, $ontable = true) {\r\n global $CONF;\r\n $prefix = $CONF[GENERAL]['prefix'];\r\n \r\n if ($ontable) {\r\n $retval = $this->dblan->GetRow(\"select card_id, refhash, owner, controller, istapped, isattacking, doesntuntap, isphased, ismorphed, counters, location, x, y from `\" . $prefix . \"_game\" . $this->gameid . \"_cards` where (card_id = ?)\", $card_id);\r\n } else {\r\n $retval = $this->dblan->GetRow(\"select card_id, refhash, location, stackorder from `\" . $prefix . \"_game\" . $this->gameid . \"_cards` where (card_id = ?)\", $card_id);\r\n }\r\n \r\n return $retval ? $retval : $this->dblan->ErrorMsg();\r\n }", "function __tostring(){\n $special = [\"Jack\", \"Queen\", \"King\", \"Ace\"];\n if($this->rank>10){\n return $special[$this->rank%11].\" of \".$this->suit ;\n }\n return $this->rank.\" of \".$this->suit ;\n }", "function createDeck(){\n \t$deck = array();\n \t$suits = array (\n \t\t\"clubs\", \n \t\t\"diamonds\", \n \t\t\"hearts\", \n \t\t\"spades\"\n \t);\n\t\t$faces = array (\n\t \"Ace\" => 1,\n\t \"2\" => 2,\n\t \"3\" => 3, \n\t \"4\" => 4, \n\t \"5\" => 5, \n\t \"6\" => 6, \n\t \"7\" => 7,\n\t \"8\" => 8, \n\t \"9\" => 9, \n\t \"10\" => 10, \n\t \"Jack\" => 11, \n\t \"Queen\" => 12, \n\t \"King\" => 13\n );\n\t\t\n\t // assigns the suits array to each face in faces array\n\t foreach($suits as $suit){\n\t // assign each face a value \n\t foreach($faces as $face => $value){\n\t $deck[\"$face of $suit\"] = $value;\n\t }\n \t}\n\t return $deck;\n }", "function showDeckPreview() {\r\n\t\t$id = $_GET ['id'];\r\n\t\t$deck = new Deck ();\r\n\t\t$deck->createFromIDLite ( $id );\r\n\t\t$deck->content=$deck->fetchDeckContentLite ();\r\n\t\t//send the current user id to deck object as its user_id\r\n\t\t$user = new User ();\r\n\t\t$user->createFromID ( $this->getCurrentUserID () );\r\n\t\t$deck->user = $user;\r\n\t\t$slides = $deck->getSlides ();\r\n\t\t$deck->slides = $slides;\r\n\t\t$deck->is_followed_by_current_user = $deck->user->isFollowing ( 'deck', $deck->deck_id );\r\n\t\techo json_encode ( $deck );\r\n\t}" ]
[ "0.7183755", "0.7025846", "0.6334069", "0.62903833", "0.6110629", "0.6046896", "0.59886557", "0.59886557", "0.58503103", "0.5808426", "0.5800308", "0.5714632", "0.56899923", "0.5688007", "0.56709504", "0.55931795", "0.55407596", "0.5517739", "0.5515059", "0.545229", "0.54488903", "0.5418807", "0.5412123", "0.53966093", "0.53951526", "0.5335943", "0.53295094", "0.5319538", "0.5199905", "0.51719207", "0.51719207", "0.51266265", "0.5123882", "0.5107716", "0.51050776", "0.50985676", "0.508453", "0.5083197", "0.50787973", "0.5063877", "0.5063549", "0.5053335", "0.5034372", "0.49836585", "0.49744755", "0.4963554", "0.49544662", "0.49360332", "0.4924602", "0.4923961", "0.4912055", "0.49062946", "0.4905882", "0.49035802", "0.4899624", "0.4899624", "0.48967877", "0.48959097", "0.4871521", "0.4868637", "0.48664594", "0.48576567", "0.48559093", "0.48415634", "0.4838103", "0.48214364", "0.4808102", "0.480287", "0.48017618", "0.47758657", "0.47743794", "0.4766046", "0.4753347", "0.47468168", "0.47467554", "0.47394472", "0.47388336", "0.47301278", "0.47299737", "0.4726562", "0.4725184", "0.47238967", "0.47234675", "0.47166392", "0.47161976", "0.47154322", "0.4713718", "0.47122148", "0.47044718", "0.47040737", "0.4698676", "0.469331", "0.46923304", "0.46905684", "0.46759278", "0.4672441", "0.4670769", "0.46681163", "0.46671018", "0.4666556" ]
0.7187124
0
Get Deck of Player as a String from played Cards. It appears getDeckString gives the wrong deck sometimes (see fyre example replay) so its better to use getDeckFromPlayedCards
Получить колоду игрока в виде строки из сыгранных карт. Появляется, что getDeckString иногда даёт неправильную колоду (см. пример реплея fyre), поэтому лучше использовать getDeckFromPlayedCards
function getDeckStringFromPlayedCards(){ if(!isset($this->deck))return ""; $retval=""; $first=true; foreach($this->cardsPlayed as $cardid=>$timesUsed){ if($first)$first=false; else $retval.=", "; $usedString=""; $usedString = "(ID $cardid, used ".$timesUsed." "."times)"; $retval .= SkylordsCardbase::getInstance()->getCardById($cardid)->cardName.$usedString; } return $retval; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDeckString(){\n\n if(!isset($this->deck))return \"\";\n\n $retval=\"\";\n $first=true;\n foreach($this->deck->deckcards as $deckcard){\n\n if($first)$first=false;\n else $retval.=\", \";\n\n $usedString=\"\";\n\n if(isset($this->cardsPlayed[$deckcard->getCarddata(true)->cardId]))\n $usedString = \"(used \".$this->cardsPlayed[$deckcard->getCarddata(true)->cardId].\" \".\"times)\";\n\n $retval.=$deckcard->getCarddata(true)->cardName.$usedString;\n\n }\n\n return $retval;\n\n\n }", "private function getDeck(){\n\t\treturn implode(\" | \", $this->cards);\n\t}", "public function toString() {\n $cardString = '';\n if ($this->suitIsValid($this->getSuit()) && $this->rankIsValid($this->getRank())) {\n $cardString = $this->getRank() . ' of ' . $this->getSuit();\n }\n return $cardString;\n }", "function getDeckHtmlFromPlayedCards(){\n\n if(!isset($this->deck))return \"\";\n\n $retval=\"<div class='deckwrap' >\";\n $first=true;\n foreach($this->cardsPlayed_detail as $cardid=>$deckcardinfo){\n\n $timesUsed = $deckcardinfo[\"played\"];\n $upgrade = $deckcardinfo[\"upgrade\"];\n $retval.=\"<div class='cardwrap' style='display:inline-block;width:120px;vertical-align:top;'>\";\n $cardinfo = SkylordsCardbase::getInstance()->getCardById($cardid);\n $cardinfodetails = SkylordsCardbaseDetails::getInstance()->getCardById($cardid);\n\n $retval.=\"<p style='text-align:center;font-weight:bold;min-height:38px;'>\".$cardinfo->cardName.\"</p>\";\n\n if(empty($cardinfodetails)){\n if(SL_DEBUG)\n echo \"Warning: carddetails not set:\".$cardid;;\n }\n\n\n if(empty($cardinfodetails->Image->Url)){\n if(SL_DEBUG)\n echo \"Warning: carddetailsimage not set:\".$cardid;\n }\n\n if($first)$first=false;\n\n\n $usedString=\"\";\n\n if(!empty($cardinfodetails)){\n $retval.=\"<img style='width:120px' src='\".CARDIMG_BASE_URI.$cardinfodetails->Image->Url.\"'>\";\n }\n\n $usedString .= \"(Upg:{$upgrade} Used:{$timesUsed}x)\";\n\n $retval .= $usedString;\n $retval.=\"</div>\";\n }\n $retval.=\"</div>\";\n return $retval;\n\n\n }", "function deck_to_string($deck) {\n $numerals = [\n '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6',\n '7' => '7', '8' => '8', '9' => '9', 'T' => '10', 'J' => 'jack',\n 'Q' => 'queen', 'K' => 'king', 'A' => 'ace'\n ];\n $suits = ['c' => 'clubs', 'd' => 'diamonds', 'h' => 'hearts', 's' => 'spades'];\n\n $deck_of_names = [];\n foreach ($deck as $card) {\n array_push($deck_of_names, $numerals[$card[0]] . '_of_' . $suits[$card[1]]);\n }\n return $deck_of_names;\n }", "public function toStringCard($card){\n\t\t$stringCard = $this->cardRank[$this->getRank($card)] . \" of \" . $this->suit[$this->getNumericSuit($card)];\n\t\treturn $stringCard;\n\t}", "public function getDrawDeck();", "public function getCard(): ?string\n {\n return $this->card;\n }", "public function getCard(): ?string\n {\n return $this->card;\n }", "function printHand( $cfg=false )\n\t{\n\t\tif(!$cfg)\n\t\t\t$cfg = new Player_Config();\n\t\t\n\t\t$cards = array();\n\t\tforeach( $this->cards as $card )\n\t\t\t$cards[] = $card->printCard( $cfg );\n\t\t\n\t\treturn join(' ', $cards);\n\t}", "public function suitFullName(): String\n {\n return $this->suit->fullName();\n }", "public function toString()\n {\n return $this->face . $this->suit;\n }", "public function show( Card $card ) : string\n {\n return $card->toString();\n }", "protected function getHoleCardsText()\n {\n $out = '';\n\n $out .= sprintf(\"*** HOLE CARDS ***\\n\");\n\n $player = $this->getMePlayer();\n $out .= sprintf(\"Dealt to %s [%s %s]\\n\", $this->me($player['player']), $player['card1'], $player['card2']);\n\n $out .= $this->getActionsText(self::STREET_PREFLOP);\n\n return $out;\n }", "public function __toString(): string\n {\n return implode(' ', $this->_cards);\n }", "function getHand() {\n $playerCards = array();\n foreach ($GLOBALS['deck'] as $category => $cards) {\n \n // get random, unique cards\n $getCard = null;\n $card = null;\n while ($card == '') {\n $getCard = rand(0, count($cards) - 1);\n $card = explode('.', $cards[$getCard])[0];\n }\n \n // remove card from array and add drawn card to players cards\n unset($GLOBALS['deck'][$category][$getCard]);\n array_push($playerCards, $card);\n }\n \n return $playerCards;\n }", "public function getIDeck();", "public function getCardHolderDescription()\n {\n return isset($this->CardHolderDescription) ? $this->CardHolderDescription : null;\n }", "function LoadDeck ($playerid, $deckstring = '') {\r\n global $CONF;\r\n $prefix = $CONF[GENERAL]['prefix'];\r\n \r\n if (!$this->valid) //Do nothing if we're not connected to a valid game\r\n return false;\r\n \r\n //GetOne returns false if no records were found, so this just checks for the existence of cards in the player's library\r\n if ($this->dblan->GetOne(\"select count(*) from `\" . $prefix . \"_game\" . $this->gameid . \"_cards` where location = ?\", \"library_$playerid\"))\r\n return false;\r\n \r\n $sampledeck = array(\r\n array(\"VHJvbGwgQXNjZXRpYy4xMzA0OTg=\", $playerid, $playerid, \"library_$playerid\", 536870912), //Troll Ascetic\r\n array(\"V29yc2hpcC4yNTU1Mw==\", $playerid, $playerid, \"library_$playerid\", 536870912 + pow(2,20)), //Worship\r\n array(\"QmVsb3ZlZCBDaGFwbGFpbi4yOTc5OA==\", $playerid, $playerid, \"library_$playerid\", 536870912 + 2*(pow(2,20))), //Beloved Chaplain\r\n array(\"U3R1ZmZ5IERvbGwuMTE2NzI0\", $playerid, $playerid, \"library_$playerid\", 536870912 + 3*(pow(2,20))), //Stuffy Doll\r\n array(\"RGF5YnJlYWsgQ29yb25ldC4xMzA2MzU=\", $playerid, $playerid, \"library_$playerid\", 536870912 + 4*(pow(2,20))), //Daybreak Coronet\r\n array(\"VHJvbGwgQXNjZXRpYy4xMzA0OTg=\", $playerid, $playerid, \"library_$playerid\", 536870912 + 5*(pow(2,20))), //Troll Ascetic\r\n array(\"VHJvbGwgQXNjZXRpYy4xMzA0OTg=\", $playerid, $playerid, \"library_$playerid\", 536870912 + 6*(pow(2,20))), //Troll Ascetic\r\n array(\"VHJvbGwgQXNjZXRpYy4xMzA0OTg=\", $playerid, $playerid, \"library_$playerid\", 536870912 + 7*(pow(2,20))), //Troll Ascetic\r\n array(\"VHJvbGwgQXNjZXRpYy4xMzA0OTg=\", $playerid, $playerid, \"library_$playerid\", 536870912 + 8*(pow(2,20))), //Troll Ascetic\r\n array(\"VHJvbGwgQXNjZXRpYy4xMzA0OTg=\", $playerid, $playerid, \"library_$playerid\", 536870912 + 9*(pow(2,20))), //Troll Ascetic\r\n );\r\n \r\n $this->dblan->Execute(\"insert into `\" . $prefix . \"_game\" . $this->gameid . \"_cards` (refhash, owner, controller, location, stackorder) values (?, ?, ?, ?, ?)\", $sampledeck);\r\n return true;\r\n }", "function getCardHolderName() {\n\t\treturn $this->m_cardHolderName;\n\t}", "public function __tostring()\n {\n $special = [\"Jack\", \"Queen\", \"King\", \"Ace\"];\n if ($this->rank > 10) {\n return $special[$this->rank % 11] . $this->suit;\n }\n return $this->rank . $this->suit;\n }", "public function get_card_desrcription( $card ) {\n\t\treturn apply_filters( 'llms_stripe_get_card_desrcription', sprintf( '%s &mdash; **** **** **** %s', $card->brand, $card->last4 ), $card );\n\t}", "function __toString()\n\t{\n\t\treturn \"$this->rank$this->suit\";\n\t}", "public function drawCard()\r\n {\r\n $card = array_pop($this->cardsInDeck);\r\n return $card;\r\n }", "public function getCard();", "public function getCardHolder()\n {\n return $this->cardHolder;\n }", "public function getPlayedCards(){\n\t\t\t$playedCards = new PlayedCards($this->gameID);\n\n\t\t\t$cards = $playedCards->getAllCards();\n\n\t\t\t$toReturn = array();\n\n\t\t\tforeach($cards as $card){\n\t\t\t\t$toReturn[] = array(\"number\"=>$card[\"card\"]->getNumber(),\n\t\t\t\t\t \"suit\"=>$card[\"card\"]->getSuit(),\n\t\t\t\t\t \"playedByID\"=>$card[\"playedByID\"]);\n\t\t\t}\n\n\t\t\treturn $toReturn;\n\t\t}", "public function testToString() {\n \n $card = new Cards\\Card('spades', 'A');\n $this->assertEqual($card->__toString(), 'A of spades');\n \n }", "public function show_cards() {\n $html = \"\";\n print(\"got here\");\n foreach ($this->playerCards as $card) {\n $image = $card->getImage();\n $name = $card->getName();\n $word = $card->getWord();\n print($word);\n $html .= <<<HTML\n<p><img src=\"images/$image\" alt=\"$name\"></p>\nHTML;\n\n }\n //$html .= \"</div>\";\n return $html;\n }", "public function getPlayerClantag($playerName)\n {\n $playerInfo = $this->getPlayerdata($playerName);\n if (!isset($playerInfo[12])) {\n return $this->_globalMsg['PLAYER_NOT_FOUND'];\n }\n\n return $this->_array2String($playerInfo, 12);\n }", "function buildDeck($suits, $cards) {\n\t$deck = [];\n\tforeach ($suits as $suit) {\n\t\tforeach ($cards as $card) {\n\t\t\t$deck[] = $card . ' ' . $suit;\n\t\t}\n\t}\n\tshuffle($deck);\n\treturn $deck;\n}", "public function getCardName()\n {\n return $this->cardName;\n }", "public function getNameOnCard() : ?string;", "public static function getDeck()\n {\n /* no of suits in the deck */\n $suits = [\"♣\", \"♦\", \"♥\", \"♠\"];\n /* no of ranks in the deck */\n $rank = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];\n /* deck array wth the empty value */\n $deck = [];\n for ($i = 0; $i < count($suits); $i++) {\n for ($j = 0; $j < count($rank); $j++) {\n /* giving the values of cards in the deck array */\n $deck[$i][$j] = new card($suits[$i], $rank[$j]);\n }\n }\n //print_r($deck);\n return $deck;\n }", "public function show()\n { $return ='';\n foreach($this->cards as $card){\n $return .= $card->getCard().', ';\n }\n return $return;\n }", "public function display() {\n \t \t$cardsDisplay = \"\";\n \t \tforeach($this->cards as $card) {\n \t \t\t$cardsDisplay .= $card->display();\n }\n return $cardsDisplay;\n }", "public function getCard()\n {\n return $this->card;\n }", "public function getDefaultCard(): ?string\n {\n return $this->defaultCard;\n }", "public function suitShortName(): String\n {\n return $this->suit->shortName();\n }", "public function getCards()\n\t\t{\n\t\t\treturn $this->getUserPlayerCards();\n\t\t}", "public function getCard()\t\t\r\n\t{\r\n\t\treturn $this->card;\r\n\t}", "function __tostring(){\n $special = [\"Jack\", \"Queen\", \"King\", \"Ace\"];\n if($this->rank>10){\n return $special[$this->rank%11].\" of \".$this->suit ;\n }\n return $this->rank.\" of \".$this->suit ;\n }", "public function getPrintedCardItem()\n {\n $isApplicable = $this->quote->getGwAddCard();\n if ($isApplicable) {\n $printedCardPrice = $this->quote->getGwCardBasePrice();\n if ($printedCardPrice) {\n return [\n \"display_name\" => \"Printed Card\",\n \"sku\" => \"printed-card\",\n \"unit_price\" => Util::formatToCents($this->quote->getGwCardBasePrice()),\n \"qty\" => 1,\n \"item_image_url\" => $this->imageHelper->getPlaceholderImage(),\n \"item_url\" => $this->imageHelper->getPlaceholderImage()\n ];\n }\n }\n }", "public function getDeckArray(){\n return $this->deck;\n }", "public function getShortName()\r\n {\r\n return $this->_shortType . Deck::getSymbol($this->_suit);\r\n }", "public function getCardOutput(){\n\t\tif (!isset($this->output)){\n\t\t\t$this->generateCardOutput();\n\t\t}\n\t\treturn $this->output;\n\t}", "public function getOpponentCards()\n\t\t{\n\t\t\t$this->_populateOpponentCards();\n\t\t\treturn $this->_opponent_cards;\n\t\t}", "protected function concatCards($cards){\n\t\tif(is_array($cards)){\n\t\t\t$cards = $this->sortCards($cards);\n\t\t\treturn implode('',$cards);\n\t\t}else{\n\t\t\treturn $cards;\n\t\t}\n\t}", "public function getCurrentPlayerCards()\n\t\t{\n\t\t\treturn ($this->getCurrentPlayerId() == $this->getPlayer()->getId()) ? $this->getPlayerCards() : $this->getOpponentCards();\n\t\t}", "public function getPlayerCards()\n\t\t{\n\t\t\t$this->_populatePlayerCards();\n\t\t\treturn $this->_player_cards;\n\t\t}", "public function getUserPlayerCards()\n\t\t{\n\t\t\treturn ($this->getUserPlayer()->getId() == $this->getPlayer()->getId()) ? $this->getPlayerCards() : $this->getOpponentCards();\n\t\t}", "protected function getHandInitText()\n {\n $tr_blind = array(\n 'Small Blind' => 'small blind',\n 'Big blind' => 'big blind',\n );\n\n $time_format = '%Y/%m/%d %H:%M:%S';\n $out = '';\n\n $this->info['timestamp'] = mktime($this->info['hour'], $this->info['minute'], $this->info['second'],\n $this->info['month'], $this->info['day'], $this->info['year']);\n $aest_time = strftime($time_format, $this->info['timestamp']);\n $et_time = strftime($time_format, $this->info['timestamp'] - (15 * 60 * 60));\n\n $out .= sprintf(\"PokerStars Hand #%d: %s %s ($%.02f/$%.02f USD) - %s AEST [%s ET]\\n\", $this->getPsHandId(), $this->getPsGame(), $this->getPsLimit(), $this->getFileSb(), $this->getFileBb(), $aest_time, $et_time);\n \n return $out;\n }", "public function getCardHolderInformation();", "protected function getShowdownText()\n {\n $out = '';\n $has_showdown = false;\n $showdown = array();\n\n foreach ($this->getAllAction() as $action) {\n if (empty($action))\n continue;\n\n if (in_array($action['action'], array('Showdown', 'Mucks', 'Hand result'))) {\n if (! $has_showdown && $action['action'] == 'Showdown')\n $has_showdown = true;\n $showdown[] = $action;\n }\n }\n\n if ($has_showdown) {\n\n $out .= \"*** SHOW DOWN ***\\n\";\n\n foreach ($showdown as $action) {\n if ($action['action'] == 'Showdown') {\n foreach ($this->preflop['hole_cards'] as $seat) {\n if ($seat['player'] == $action['player'])\n break;\n }\n\n $out .= sprintf(\"%s: shows [%s %s] (%s)\\n\", $this->me($action['player']), $seat['card1'], $seat['card2'], $action['ranking']);\n\n } elseif ($action['action'] == 'Mucks') {\n $out .= sprintf(\"%s: mucks hand\\n\", $this->me($action['player']));\n\n } elseif ($action['action'] == 'Hand result') {\n $out .= sprintf(\"%s collected $%.02f from pot\\n\", $this->me($action['player']), $action['chips']);\n }\n }\n }\n\n return $out;\n }", "public function get_deck() {\r\n\t\t$all = (array)$this->get_many_by('room_id', $this->session->userdata('room_id'));\r\n\t\t$deck = array();\r\n\t\tforeach ($all as $card) {\r\n\t\t\t$card = (array)$card;\r\n\t\t\t$card['place'] = unserialize($card['place']);\r\n\t\t\tif ($card['place']['type'] == 'deck') {\r\n\t\t\t\tarray_push($deck, $card);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $deck;\r\n\t}", "function getCardHolderName() {\n\t\tif ($this->_cardHolderName)\n\t\t\treturn 1 ;\n\t\telse \n\t\t\treturn 0 ;\t\t\t\n\t}", "private function getPlayerScreenNames()\n\t{\n\t $message = null;\n\t $message .= '<br />Occupants:';\n\t foreach ($this->cube_players as $key => $name) {\n\t $message .= '<br />Player: ' . $this->cube_players[$key]['screen_name'];\n\t if ($this->cube_players[$key]['screen_name'] == 'test_player') $message .= ' - you';\n\t }\n\t \n\t return $message;\n\t}", "public function getPrintedCardItem();", "public function cardLastFour()\n {\n return (string) ($this->razorpayInfo()['payment_information']['last4'] ?? '');\n }", "public function getFullName()\r\n {\r\n return $this->_type . ' of ' . $this->_suit;\r\n }", "function buildDeck($suits, $cards) {\n // todo\n}", "public function getPlayerNameTurn()\r\n {\r\n $players = $this->getPlayers();\r\n return $players[$this->getPlayerTurn()];\r\n }", "public function getOpponentHand(){\n\t\t\t$database = DataLayer::getGameplayInstance();\n\t\t\tif($this->player1ID === $this->playerID){\n\t\t\t\t$opponentID = $this->player2ID;\n\t\t\t}else{\n\t\t\t\t$opponentID = $this->player1ID;\n\t\t\t}\n\n\n\t\t\t$hands = $database->getHands($this->gameID);\n\t\t\tif(!isset($hands[$opponentID])){\n\t\t\t\t// No hand exists - dealer hasn't dealt yet.\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Create the PlayerHand object to return\n\t\t\t$cards = array();\n\t\t\tforeach($hands[$opponentID] as $cardArr){\n\t\t\t\t//If we are at the right part of the game give the actual cards\n\t\t\t\t//Otherwise, display anonymous cards\n\t\t\t\tif($this->gamestate == \"VIEWING_HANDS\" ||\n\t\t\t\t\t$this->gamestate == \"WAITING_PLAYER_1\" ||\n\t\t\t\t\t$this->gamestate == \"WAITING_PLAYER_2\"){\n\t\t\t\t\t$cards[] = array(\"card\"=>new PlayingCard($cardArr[\"number\"], $cardArr[\"suit\"]), \"inHand\"=>$cardArr[\"inHand\"]);\n\t\t\t\t}else{\n\t\t\t\t\t$cards[] = array(\"card\"=>new PlayingCard(0, null), \"inHand\"=>$cardArr[\"inHand\"]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn new PlayerHand(PlayerHand::NOT_CRIB, $cards);\n\n\t\t}", "function drawCard(&$hand, &$deck) {\n // todo\n}", "public function get_hand($player_id = null) {\r\n\t\tif ($player_id === null) $player_id = $this->session->userdata('user_id');\r\n\t\t$all = (array)$this->get_many_by('room_id', $this->session->userdata('room_id'));\r\n\t\t$hand = array();\r\n\t\tforeach ($all as $card) {\r\n\t\t\t$card = (array)$card;\r\n\t\t\t$card['place'] = unserialize($card['place']);\r\n\t\t\tif (isset($card['place']['value']) && \r\n\t\t\t\t$card['place']['value'] == 'hand' &&\r\n\t\t\t\t$card['place']['id'] == $player_id) {\r\n\t\t\t\tarray_push($hand, $card);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $hand;\r\n\t}", "private function getTheFirstDeckCard($deck)\n {\n\n return reset($deck);\n \n }", "function getCard() {\n //$query = \"select number,card,seed,seat,s.player as player from pkr_dealer d inner join pkr_seat s on d.seat=s.seat_number where s.player=\".$this->curr_player.\" and game=\".$this->curr_game.\" and d.idtable=\".$this->curr_table.\" and s.status=\".PLAYING.\" order by number\";\n $query = \"select number,card,seed,seat,player from pkr_dealer where player=\" . $this->curr_player . \" and game=\" . $this->curr_game . \" and idtable=\" . $this->curr_table . \" and player in (select player from pkr_seat where status=\" . PLAYING . \") order by number\";\n $rows = $GLOBALS['mydb']->select($query);\n return $rows;\n }", "function echoHand($hand, $playerNhame, $hidden = false) {\n // todo\n\techo PHP_EOL . $playerName . \"'s hand: \";\n\tif ($hidden == false) {\n\t\tforeach ($hand as $card) {\n\t\t\techo $card[0] . ' ' . $card[1];\n\t\t}\n\t\techo 'Total: ' . getHandTotal($hand) . PHP_EOL;\n\t} else {\n\t\techo $hand[0][0] . ' ' . $hand[0][1] . ' Total: ?';\n\t}\n}", "public function asText() {\n $return = '';\n /**\n * @var AbstractCard $card\n */\n foreach ($this->list as $card) {\n $return .= $card . PHP_EOL;\n }\n\n return $return;\n }", "public function getCardHolderId(): string\n {\n return $this->getParameter('card_holder_id');\n }", "public function getFullTitleFor(Player $player): string\r\n {\r\n $text = $this->titles[$player->getId()] ?? \"\";\r\n if (!empty($this->subTitles[$player->getId()] ?? \"\")) {\r\n $text .= \"\\n\\n\" . $this->subTitles[$player->getId()] ?? \"\";//?? \"\" even necessary?\r\n }\r\n if (empty($text)) $text = $this->getFullTitle();\r\n return mb_convert_encoding($text, 'UTF-8');\r\n }", "function displayHand($player1){\n // for ($h=0; $h<sizeof($player1); $h++){\n // echo $player1[$h]%13 . \"<br />\";\n // }\n \n for ($i=0; $i<sizeof($player1); $i++){\n if ($player1[$i]==0){\n continue;\n }\n if ($player1[$i]>=1 && $player1[$i]<14){\n echo \"<img src='img/cards/clubs/\" .($player1[$i]). \".png' />\";\n }\n elseif ($player1[$i]>=14 && $player1[$i]<27){\n $player1[$i]=($player1[$i]%13);\n if ($player1[$i]==0){\n continue;\n }\n echo \"<img src='img/cards/diamonds/\" .($player1[$i]%13). \".png' />\";\n }\n elseif ($player1[$i]>=27 && $player1[$i]<40){\n $player1[$i]=($player1[$i]%13);\n if ($player1[$i]==0){\n continue;\n }\n echo \"<img src='img/cards/hearts/\" .($player1[$i]%13). \".png' />\";\n }\n elseif ($player1[$i]>=40 && $player1[$i]<53){\n $player1[$i]=($player1[$i]%13);\n if ($player1[$i]==0){\n continue;\n }\n echo \"<img src='img/cards/spades/\" .($player1[$i]%13). \".png' />\";\n }\n \n //echo \"<br />\" . \"----------------------------------------------\" . \"<br />\";\n // echo $player1[$i] . \"<br/>\";\n }\n \n for ($h=0; $h<sizeof($player2); $h++){\n echo $player2[$h]%13 . \"<br />\";\n }\n \n for ($i=0; $i<sizeof($player2); $i++){\n if ($player2[$i]==0){\n continue;\n }\n if ($player2[$i]>=1 && $player2[$i]<14){\n echo \"<img src='img/cards/clubs/\" .($player2[$i]). \".png' />\";\n }\n elseif ($player2[$i]>=14 && $player[$i]<27){\n $player2[$i]=($player2[$i]%13);\n if ($player2[$i]==0){\n continue;\n }\n echo \"<img src='img/cards/diamonds/\" .($player2[$i]%13). \".png' />\";\n }\n elseif ($player2[$i]>=27 && $player[$i]<40){\n $player2[$i]=($player2[$i]%13);\n if ($player2[$i]==0){\n continue;\n }\n echo \"<img src='img/cards/hearts/\" .($player2[$i]%13). \".png' />\";\n }\n elseif ($player2[$i]>=40 && $player[$i]<53){\n $player2[$i]=($player2[$i]%13);\n if ($player2[$i]==0){\n continue;\n }\n echo \"<img src='img/cards/spades/\" .($player2[$i]%13). \".png' />\";\n }\n //echo \"<br />\" . \"----------------------------------------------\" . \"<br />\";\n // echo $player1[$i] . \"<br/>\";\n }\n \n for ($h=0; $h<sizeof($player3); $h++){\n echo $player3[$h]%13 . \"<br />\";\n }\n \n for ($i=0; $i<sizeof($player3); $i++){\n if ($player2[$i]==0){\n continue;\n }\n if ($player3[$i]>=1 && $player3[$i]<14){\n echo \"<img src='img/cards/clubs/\" .($player3[$i]). \".png' />\";\n }\n elseif ($player3[$i]>=14 && $player3[$i]<27){\n $player3[$i]=($player3[$i]%13);\n if ($player2[$i]==0){\n continue;\n }\n echo \"<img src='img/cards/diamonds/\" .($player3[$i]%13). \".png' />\";\n }\n elseif ($player3[$i]>=27 && $player3[$i]<40){\n $player3[$i]=($player3[$i]%13);\n if ($player2[$i]==0){\n continue;\n }\n echo \"<img src='img/cards/hearts/\" .($player3[$i]%13). \".png' />\";\n }\n elseif ($player3[$i]>=40 && $player3[$i]<53){\n $player3[$i]=($player3[$i]%13);\n if ($player2[$i]==0){\n continue;\n }\n echo \"<img src='img/cards/spades/\" .($player3[$i]%13). \".png' />\";\n }\n //echo \"<br />\" . \"----------------------------------------------\" . \"<br />\";\n // echo $player1[$i] . \"<br/>\";\n } \n \n for ($h=0; $h<sizeof($player4); $h++){\n echo $player4[$h]%13 . \"<br />\";\n }\n \n for ($i=0; $i<sizeof($player4); $i++){\n if ($player4[$i]>=1 && $player4[$i]<14){\n echo \"<img src='img/cards/clubs/\" .($player4[$i]). \".png' />\";\n }\n elseif ($player4[$i]>=14 && $player4[$i]<27){\n $player4[$i]=($player4[$i]%13);\n if ($player2[$i]==0){\n continue;\n }\n echo \"<img src='img/cards/diamonds/\" .($player4[$i]%13). \".png' />\";\n }\n elseif ($player4[$i]>=27 && $player4[$i]<40){\n $player4[$i]=($player4[$i]%13);\n if ($player2[$i]==0){\n continue;\n }\n echo \"<img src='img/cards/hearts/\" .($player4[$i]%13). \".png' />\";\n }\n elseif ($player4[$i]>=40 && $player4[$i]<53){\n $player4[$i]=($player4[$i]%13);\n if ($player2[$i]==0){\n continue;\n }\n echo \"<img src='img/cards/spades/\" .($player4[$i]%13). \".png' />\";\n\n }\n // echo $player1[$i] . \"<br/>\";\n }\n echo \"<br />\" . \"----------------------------------------------\" . \"<br />\";\n}", "public function toStringArrayCards($cards){\n\t\tforeach($cards as &$value){\n\t\t\t$value = $this->toStringCard($value);\n\t\t}\n\t\treturn $cards;\n\t}", "public function __toString() {\n\t\tif ($this->isJoker ()) {\n\t\t\treturn \"a Joker\";\n\t\t}\n\t\treturn sprintf ( \"the %s of %s\", $this->_getFaceValue (), $this->_getSuite () );\n\t}", "private function writeDealtCards(Player $player, OutputInterface $output): void\n {\n $output->writeln(sprintf(\n \"%s has been dealt:\\t%s %s %s %s %s %s %s\",\n $player,\n $player->getCard(0),\n $player->getCard(1),\n $player->getCard(2),\n $player->getCard(3),\n $player->getCard(4),\n $player->getCard(5),\n $player->getCard(6),\n //$player->getCard(7),\n ));\n }", "function get_deck_cards($deckID) {\n $db_pdo = new PDO(DB_DSN, DB_USERNAME, DB_PASSWORD);\n\n $query = \"SELECT cardID, quantity, sidedeck FROM DeckCard WHERE deckID=?\";\n\t$stmt = $db_pdo->prepare($query);\n $stmt->execute(array($deckID));\n db_log_command($query);\n\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n // $deckID = $_POST['deck-select'];\n\t// $stmt->execute(array($deckID));\n\t// $col = $stmt->fetch(PDO::FETCH_ASSOC);\n}", "function strFix($card) {\n if ($card === 'Jack' || $card === 'Queen' || $card === 'King') {\n return 10;\n } elseif ($card === 'Ace') {\n return 11;\n } return $card;\n}", "function getCard($card_id, $ontable = true) {\r\n global $CONF;\r\n $prefix = $CONF[GENERAL]['prefix'];\r\n \r\n if ($ontable) {\r\n $retval = $this->dblan->GetRow(\"select card_id, refhash, owner, controller, istapped, isattacking, doesntuntap, isphased, ismorphed, counters, location, x, y from `\" . $prefix . \"_game\" . $this->gameid . \"_cards` where (card_id = ?)\", $card_id);\r\n } else {\r\n $retval = $this->dblan->GetRow(\"select card_id, refhash, location, stackorder from `\" . $prefix . \"_game\" . $this->gameid . \"_cards` where (card_id = ?)\", $card_id);\r\n }\r\n \r\n return $retval ? $retval : $this->dblan->ErrorMsg();\r\n }", "public function getCardContents()\n {\n return $this->card_contents;\n }", "public function getGwPrintedCardSku($scopeCode = null)\n {\n return (string)$this->getConfig(self::AVATAX_SERVICE_GW_PRINTED_CARD_SKU, $scopeCode);\n }", "public function ejectCard()\n {\n $this->atmMachine->setATMState($this->atmMachine->getNoCardState());\n return 'Card ejected';\n }", "public function getCardType() {\n\t\treturn \"GameModCard - \" . parent::getCardType();\n\t}", "function showcards($hand) {\n\tfor ($i=0; $hand[$i]; $i++) {\n\t\t\t$cards .= '<img src=\"cards/'.$hand[$i].'.gif\" alt=\"card\">';\n\t}\n\t\n\treturn $cards;\n}", "function dealer_vs_player() {\n\tglobal $NUM_PLAYERS, $GAME_STATE;\n\t$hands = $GAME_STATE['hands'];\n\t$dealers_hand = $hands[0];\n\t$dealers_score = card_count($dealers_hand);\n\tfor ($i = 1; $i < $NUM_PLAYERS; $i++) {\n\t\t$players_score = card_count($hands[$i]);\n\t\tif ($players_score == \"Blackjack\") {\n\t\t\t$players_score = 21;\n\t\t}\n\t\tif ($players_score > 21) {\n\t\t\techo \"Player $i - Bust\";\n\t\t\techo \"<br>\";\n\t\t} else {\n\t\t\tif ($dealers_score > 21) {\n\t\t\t\techo \"Player $i - wins\";\n\t\t\t\techo \"<br>\";\n\t\t\t} else {\n\t\t\t\tif ($dealers_score > $players_score) {\n\t\t\t\t\techo \"Player $i - loses\";\n\t\t\t\t\techo \"<br>\";\n\t\t\t\t}\n\t\t\t\tif ($dealers_score < $players_score) {\n\t\t\t\t\techo \"Player $i - wins\";\n\t\t\t\t\techo \"<br>\";\n\t\t\t\t}\n\t\t\t\tif ($dealers_score == $players_score) {\n\t\t\t\t\techo \"Player $i - push\";\n\t\t\t\t\techo \"<br>\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "public function getCard() {\n\n }", "public function getCardType(): string\n {\n return $this->card_type;\n }", "public function getCardType(): string\n {\n return $this->card_type;\n }", "public function toString(): string\n {\n $output = $this->character->value;\n\n // if the character supports a skin tone...\n if ($this->skinTone && $this->character->supportsSkinTones()) {\n $output .= $this->skinTone->value;\n }\n\n return $output;\n }", "public function getFullTitleFor(Player $player): string\n\t{\n\t\t$text = $this->titles[$player->getId()] ?? \"\";\n\t\tif (!empty($this->subTitles[$player->getId()] ?? \"\")) {\n\t\t\t$text .= \"\\n\\n\" . $this->subTitles[$player->getId()] ?? \"\";//?? \"\" even necessary?\n\t\t}\n\t\tif (empty($text)) $text = $this->getFullTitle();\n\t\treturn mb_convert_encoding($text, 'UTF-8');\n\t}", "public function drawCard(){\n $return_card = $this->deck[$this->cards_drawn];//retrieve current card\n $this->cards_drawn++;\n if($this->cards_drawn >= self::DECKSIZE){//if we have drawn 45 cards, shuffle the deck\n $this->shuffleDeck();\n $this->cards_drawn = 0;\n }\n return $return_card;\n }", "function getDeck()\n {\n /* no of suits in the deck */\n $suits = [\"♣\", \"♦\", \"♥\", \"♠\"];\n /* no of ranks in the deck */\n $rank = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14];\n /* deck array wth the empty value */\n $deck = [];\n for ($i = 0; $i < count($suits); $i++) {\n for ($j = 0; $j < count($rank); $j++) {\n /* giving the values of cards in the deck array */\n $deck[$i][$j] = new card($suits[$i], $rank[$j]);\n }\n }\n //print_r($deck);\n return $deck;\n }", "public function printCards($cards)\n {\n echo \"\\n\";\n echo \"After shuffling the cards are like below :\\n\";\n echo \"\\n\";\n // looping till the size of array\n for ($i = 0; $i < count($cards); $i++) {\n\n echo \"Player \" . ($i + 1) . \" : [ \";\n\n // looping till the size of array\n for ($j = 0; $j < count($cards[$i]); $j++) {\n\n echo $cards[$i][$j] . \" , \";//printing the data to user\n\n }\n echo \"]\\n\";\n }\n echo \"\\n\";\n }", "public function getChallengerUsername(string $gameId){\n if (empty($gameId)) {\n $this->setError(\"Game id cannot be empty\");\n return \"\";\n }\n $columns = \"player1, player2\";\n $where = \"gameId = ?\";\n $bindings = array($gameId);\n $result = $this->database->select($this->table,$columns, $where, $bindings);\n if($result->rowCount() > 0){\n $result = $result->fetch();\n return $result[\"player1\"] != $this->user->getUserName() ? $result[\"player1\"] : $result[\"player2\"];\n\n }\n return \"\";\n }", "function getTestCardWithout3dSecure()\n{\n return '4343434343434345';\n}", "abstract protected function getGameName();", "function drawCard(&$hand, &$deck) {\n\t$hand[] = array_pop($deck);\n}", "function getPlayerName($playerID) {\n\t$query = \"SELECT name from player WHERE id = $playerID\";\n\t$result = mysql_query($query);\n\t$row = mysql_fetch_object($result);\n\t$name = $row->name;\n\treturn $name;\n\t}", "public function cards()\n {\n //creating array of cardzz\n $cardzz = [];\n $i = 0; //taking temp var and intializing to 0\n for ($x = 0; $x < count($this->suite); $x++) {\n\n for ($y = 0; $y < count($this->rank); $y++) {\n\n //adding all the data into the cardzz array\n $cardzz[$i++] = $this->rank[$y] . \",\" . $this->suite[$x];\n\n }\n }\n return $cardzz;\n }", "protected function shuffleCard()\n\t{\n\t\t$this->getCache('singleCardName');\n\t\t$cards = range(1, 54);\n\t\t$shuffleRound = range(1,10);\n\t\tfor($i=0;$i < shuffle($shuffleRound);$i++){\n\t\t\tshuffle($cards);\n\t\t}\n\n\t\t$chairId=$this->lastWinner?:1;\n\t\tfor ($i=0;$i < 54;$i++) {\n\t\t\t$this->cards[$chairId][]=$this->_singleCardName[$cards[$i]];\n\t\t\t$this->detailCards[$chairId]['single'][]=$this->_singleCardName[$cards[$i]];\n\t\t\tif($chairId==$this->chairAmount){\n\t\t\t\t$chairId = 1;\n\t\t\t}else{\n\t\t\t\t$chairId++;\n\t\t\t}\n\t\t}\n\n\t\tif($this->firstRound){\n\t\t\tforeach($this->cards as $k=>$v){\n\t\t\t\tif(in_array('3c',$v)){\n\t\t\t\t\t$this->have3c = $k;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function convertStringToCardMauBinh($string){\n $arrayCard = explode(\",\", $string);\n $str = \"\";\n// var_dump($arrayCard);die;\n foreach ($arrayCard as $card){\n $str = $str . getNameCardMauBinh($card). \", \";\n }\n// var_dump($str);die;\n return $str;\n}" ]
[ "0.76603603", "0.73322767", "0.68416494", "0.68241066", "0.6753474", "0.6452178", "0.6332205", "0.6297767", "0.6297767", "0.6265234", "0.6183181", "0.6135986", "0.59824926", "0.5971374", "0.59569246", "0.5851568", "0.58306456", "0.58001345", "0.57187873", "0.56791484", "0.5661105", "0.561491", "0.55638736", "0.55402154", "0.5535653", "0.5499534", "0.5489123", "0.54855555", "0.54453564", "0.54281956", "0.54021317", "0.539902", "0.53668445", "0.5364637", "0.5357934", "0.5338428", "0.53380495", "0.5332648", "0.5327586", "0.5304705", "0.5296417", "0.52924234", "0.52898175", "0.5254548", "0.52490145", "0.524281", "0.5242607", "0.52407014", "0.5240098", "0.52397394", "0.5236914", "0.5232197", "0.52296066", "0.5228829", "0.5217952", "0.5208559", "0.5175488", "0.5171817", "0.5169767", "0.5164383", "0.515291", "0.51238847", "0.51203084", "0.50968087", "0.5095923", "0.50894403", "0.508256", "0.5077572", "0.5077156", "0.5058559", "0.5042395", "0.5040016", "0.5038696", "0.50378925", "0.503619", "0.50361896", "0.5030335", "0.50256926", "0.50163823", "0.5012528", "0.50093555", "0.50024074", "0.49957818", "0.49893048", "0.498824", "0.49858764", "0.49858764", "0.49745044", "0.49716163", "0.49692285", "0.49678978", "0.49659893", "0.49623263", "0.49615782", "0.4954525", "0.49480832", "0.49450612", "0.4940441", "0.49314752", "0.492515" ]
0.8053084
0
Display pager links. If you pass $previous and $next arrays, then there is no need to ``$this>set()`` anything.
Показать ссылки на страницы. Если вы передаете массивы $previous и $next, то не нужно ничего вызывать ``$this->set()``.
public function pager($previous = 'Previous', $next = 'Next') { $links = ''; if (!empty($previous)) { if (is_array($previous)) { if (isset($previous['url']) && isset($previous['title'])) { $links .= $this->format($this->pager['previous'], $previous['title'], $previous['url']); } } elseif (is_string($previous)) { if ($this->get && $this->total > 1 && $this->current > 1) { $links .= $this->format($this->pager['previous'], $previous, $this->current - 1); } } } if (!empty($next)) { if (is_array($next)) { if (isset($next['url']) && isset($next['title'])) { $links .= $this->format($this->pager['next'], $next['title'], $next['url']); } } elseif (is_string($next)) { if ($this->get && $this->current < $this->total) { $links .= $this->format($this->pager['next'], $next, $this->current + 1); } } } return (!empty($links)) ? "\n".$this->format($this->pager['wrapper'], $links) : ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setPaginationLinks( $args )\n\t{\n\t\t$total = (int) $args['total'];\n\t\tif ( $total < 2 )\n\t\t\treturn;\n\t\t$current = (int) $args['current'];\n\t\t$end_size = ( 0 < (int) $args['end_size'] ) ? (int) $args['end_size'] : 1; // Out of bounds? Make it the default.\n\t\t$mid_size = ( 0 <= (int) $args['mid_size'] ) ? (int) $args['mid_size'] : 2;\n\t\t$add_args = is_array( $args['add_args'] ) ? $args['add_args'] : false;\n\n\t\t$this->r = '';\n\n\t\t$page_links = array();\n\t\t$n = 0;\n\t\t$dots = false;\n\n\t\tif ( $args['prev_next'] && $current && 1 < $current ) {\n\t\t\t$link = str_replace('%_%', 2 == $current ? '' : $args['format'], $args['base'] );\n\t\t\t$link = str_replace('%#%', $current - 1, $link);\n\t\t\tif ( $add_args )\n\t\t\t\t$link = add_query_arg( $add_args, $link );\n\t\t\t$link .= $args['add_fragment'];\n\t\t\t$page_links[] = \"<a class='prev page-numbers' href='\" . $link . \"'>$prev_text</a>\";\n\t\t}\n\n\t\tfor ( $n = 1; $n <= $args['total']; $n++ ) {\n\t\t\t$n_display = $n;\n\n\t\t\tif ( $n == $args['current'] ) {\n\t\t\t\t$page_links[] = \"<span class='page-numbers current'>$n_display</span>\";\n\t\t\t\t$dots = true;\n\t\t\t} else {\n\t\t\t\tif ( $args['show_all'] || ( $n <= $end_size || ( $current && $n >= $current - $mid_size && $n <= $current + $mid_size ) || $n > $total - $end_size ) ) {\n\t\t\t\t\t$link = str_replace( '%_%', 1 == $n ? '' : $args['format'], $args['base'] );\n\t\t\t\t\t$link = str_replace( '%#%', $n, $link );\n\t\t\t\t\tif ( $add_args )\n\t\t\t\t\t\t$link = add_query_arg( $add_args, $link );\n\t\t\t\t\t$link .= $args['add_fragment'];\n\t\t\t\t\t$page_links[] = \"<a class='page-numbers' href='\" . $link . \"'>$n_display</a>\";\n\t\t\t\t\t$dots = true;\n\t\t\t\t} else if ( $dots && !$args['show_all'] ) {\n\t\t\t\t\t$page_links[] = \"<span class='page-numbers dots'>...</span>\";\n\t\t\t\t\t$dots = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( $prev_next && $current && ( $current < $total || -1 == $total ) ) {\n\t\t\t$link = str_replace('%_%', $args['format'], $args['base'] );\n\t\t\t$link = str_replace('%#%', $current + 1, $link);\n\t\t\tif ( $add_args )\n\t\t\t\t$link = add_query_arg( $add_args, $link );\n\t\t\t$link .= $args['add_fragment'];\n\t\t\t$page_links[] = \"<a class='next page-numbers' href='\" . $link . \"'>$next_text</a>\";\n\t\t}\n\n\t\tswitch ( $argst['type'] ) {\t\n\t\t\tcase 'array' :\n\t\t\t\t$this->r = $page_links;\n\t\t\t\tbreak;\n\t\t\tcase 'list' :\n\t\t\t\t$this->r .= \"<ul class='page-numbers'>\\n\\t<li>\";\n\t\t\t\t$this->r .= join(\"</li>\\n\\t<li>\", $page_links);\n\t\t\t\t$this->r .= \"</li>\\n</ul>\\n\";\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\t$this->r = join(\"\\n\", $page_links);\n\t\t\t\tbreak;\n\t\t}\n\t}", "public static function pager() {\n\n\t\t\tif ( get_theme_mod( 'post_pager', 1 ) == 1 ) { ?>\n\n\t\t\t\t<nav class=\"entry-pager\">\n\t\t\t\t\t<ul class=\"pager\">\n\t\t\t\t\t\t<?php previous_post_link( '<li class=\"previous\">%link</li>', '&larr; %title' ); ?>\n\t\t\t\t\t\t<?php next_post_link( '<li class=\"next\">%link</li>', '%title &rarr;' ); ?>\n\t\t\t\t\t</ul>\n\t\t\t\t</nav>\n\n\t\t\t<?php\n\t\t\t}\n\n\t\t}", "public function theArrayPagination() {\n\n\t\t\t$pagerContainer = '<div class=\"pagination\">';\n\t\t\tif( $this->totalPages != 0 )\n\t\t\t{\n\t\t\t\tif( $this->page == 1 )\n\t\t\t\t{\n\t\t\t\t\t$pagerContainer .= '';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$pagerContainer .= sprintf( '<span><a href=\"' . $this->link . '\" > &#171; prev</a></div>', $this->page - 1 );\n\t\t\t\t}\n\t\t\t\t$pagerContainer .= ' <div class=\"col-md-6 text-center\"> page <strong>' . $this->page . '</strong> of ' . $this->totalPages . '</div>';\n\t\t\t\tif( $this->page == $this->totalPages )\n\t\t\t\t{\n\t\t\t\t\t$pagerContainer .= '';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$pagerContainer .= sprintf( '<a class=\"nextgal\" href=\"' . $this->link . '\" > next &#187; </a>', $this->page + 1 );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$pagerContainer .= '</div>';\n\n\t\t\techo $pagerContainer;\n\t\t}", "function show($next=\"&nbsp;&nbsp;&nbsp;>&nbsp;&nbsp;&nbsp;\",$last=\"&nbsp;&nbsp;&nbsp;<&nbsp;&nbsp;&nbsp;\",$separator=\" \",$boldCurrent=0)\n {\n $array = $this->pager();\n $str = array();\n foreach($array as $k => $v)\n {\n\t\t\n if($k!='next'&&$k!='last')\n {\n if(($k==$this->getvar_val) and ($boldCurrent==0))\n {\n $str[] = \"<font style='color:#ad925b;margin-left:6px;margin-right:6px;'>\".$k.\"</font>\";\n }\n else\n {\n\t\t\t\t $submitPage=$this->getCurrentUrl().\"=\".$k;\n //$str[] = '<a href=\"'.$v.'\">'.$k.'</a>';\n\t\t\t\t\t$str[] = \"<a href=javascript:pagerSubmit(\\\"\".$submitPage.\"\\\");>\".$k.\"</a>\";\n }\n }\n }\n\t\t $currentPage = $this->start / $this->length + 1;\n $str = implode($separator, $str);\n $rt = $array['last']===null?\"\":\"<a href=javascript:pagerSubmit(\\\"\".$this->getCurrentUrl().\"=\".( $currentPage-1).\"\\\");>\".$last.\"</a>\".$separator;\n $rt .= $str.$separator;\n $rt .= $array['next']===null?\"\":\"<a href=javascript:pagerSubmit(\\\"\".$this->getCurrentUrl().\"=\".( $currentPage+1).\"\\\");>\".$next.\"</a>\";\n\t\t$currentPage=$this->start / $this->length + 1;\n\t\t//$rt .= \"<font style='font-weight:normal;font-size:10px;color:#000;'>Page <input type='text' style='width:20px;text-align:center;font-size:10px;' class='textbox' value='\".($currentPage).\"' name='txtTablePager' id='txtTablePager' onkeypress='return pagerSubmit(event,\\\"\".$this->getCurrentUrl().\"\\\",this,\".(ceil(($this->rows/$this->length))).\");' maxlength='4' > of \".(ceil(($this->rows/$this->length))).\" pages</font>\";\n\t return $rt;\n\n }", "function displayLinks() {\n\n echo '<div class=\"button2-right off\"><div class=\"start\"><span> <a href=\"?page=1\">First\n </a></span></div></div><div class=\"button2-left\"><div class=\"page\">';\n if ($this->num_of_pages < 5) {\n if (isset($_GET['page']) && $_GET['page'] > 1) {\n echo '<a href=\"?page=' . (($_GET['page']) - 1) . '\">Prev</a>';\n }\n for ($i = 1; $i <= $this->num_of_pages; $i++) {\n if (isset($_GET['page'])) {\n if ($i != $_GET['page']) {\n echo ' <a href=\"' . $this->php_self . '?page=' . $i . '\">' . $i . '</a> ';\n } else {\n echo ' <span>' . $i . '</span> ';\n }\n } else {\n if ($i != 1) {\n echo ' <a href=\"' . $this->php_self . '?page=' . $i . '\">' . $i . '</a> ';\n } else {\n echo ' <span>' . $i . '</span> ';\n }\n }\n }\n if (isset($_GET['page']) && $_GET['page'] > 1) {\n echo '<a href=\"?page=' . (($_GET['page']) + 1) . '\">Prev</a>';\n }\n echo '</div></div> <div class=\"button2-left\"><div class=\"end\"><a href=\"?page=' . $i . '\">Last</a></div></div>';\n } else {\n if (isset($_GET['page']) && $_GET['page'] > 1) {\n echo '<a href=\"?page=' . (($_GET['page']) - 1) . '\">Prev</a>';\n }\n if (isset($_GET['page'])) {\n if ($_GET['page'] < 5) {\n for ($i = 1; $i <= 5; $i++) {\n if ($i != 1) {\n echo ' <a href=\"' . $this->php_self . '?page=' . $i . '\">' . $i . '</a> ';\n } else {\n echo ' <span>' . $i . '</span> ';\n }\n }\n } else {\n $display_from = $_GET['page'] - 3;\n $display_to = $_GET['page'] + 2;\n for ($i = 1; $i <= $this->num_of_pages && $i <= $display_to; $i++) {\n if ($i > $display_from) {\n if ($i != 1) {\n echo ' <a href=\"' . $this->php_self . '?page=' . $i . '\">' . $i . '</a> ';\n } else {\n echo ' <span>' . $i . '</span> ';\n }\n }\n }\n }\n } else {\n for ($i = 1; $i <= 5; $i++) {\n if ($i != 1) {\n echo ' <a href=\"' . $this->php_self . '?page=' . $i . '\">' . $i . '</a> ';\n } else {\n echo ' <span>' . $i . '</span> ';\n }\n }\n }\n if (isset($_GET['page']) && $_GET['page'] > 1 && $_GET['page'] < $this->num_of_pages ) {\n echo '<a href=\"?page=' . (($_GET['page']) + 1) . '\">Next</a>';\n }\n echo '</div></div> <div class=\"button2-left\"><div class=\"end\"><a href=\"?page=' . $this->num_of_pages . '\">Last</a></div></div>';\n }\n }", "protected function paginationLinks()\n {\n return $this->paginator->render( 'admin.pagination' );\n }", "function set_Links($prev_next=5)\r\n\t{\r\n\t\t$this->prev_next = $prev_next;\r\n\t}", "function smarty_function_pagerlinks($params,&$smarty) {\n\tif ($params['howmany'] > 0) $howmany = (int) $params['howmany'];\n\telse return;\n\tif ($params['offset'] >= 0) $offset = (int) $params['offset'];\n\telse return;\n\tif ($params['limit'] > 0) $limit = (int) $params['limit'];\n\telse return;\n\tif ($limit > $howmany) return;\n\n\tif ($offset - $limit > 0) $prev = $offset - $limit;\n\telse $prev = 0;\n\tif ($offset + $limit > $howmany) $next = $howmany - $limit;\n\telse $next = $offset + $limit;\n\t$last = $howmany - ($howmany % $limit);\n\tif ($last == $howmany) $last -= $limit;\n\n\tif ($params['action']) $action = $params['action'];\n\telse $action = $_REQUEST[ACTION];\n\n\tif (is_array($action)) $action = implode('/',$action);\n\t$script = $_SERVER['PHP_SELF'].\"?action=$action&limit=$limit&\";\n\tif ($params['pagerid']) $script .= \"pagerid=\".urlencode($params['pagerid']);\n\n\tif (strpos($params['options'],'pages') !== false) {\n\t\t$pages = array();\n\t\tfor ($o = 0; $o <= $last; $o += $limit) {\n\t\t\t$pages[$o] = \"$script&offset=$o\";\n\t\t}\n\t}\n\n\t$smarty->assign('pagerlinks', \n\t\tarray(\n\t\t\t'first' => \"$script&offset=0\",\n\t\t\t'last' => \"$script&offset=$last\",\n\t\t\t'next' => \"$script&offset=$next\",\n\t\t\t'prev' => \"$script&offset=$prev\",\n\t\t\t'pages' => $pages,\n\t\t)\n\t);\n}", "public function _setList()\r\n {\r\n // Add the first page link.\r\n if ($this->_config['show_first_page'] &&\r\n $this->_pages > (2 * $this->_config['delta'] + 1)) {\r\n $this->_setFirst();\r\n }\r\n\r\n // Add the previous page link.\r\n $this->_setPrevious();\r\n\r\n // Add the item links.\r\n $this->_addItems();\r\n\r\n // Add the next page link.\r\n $this->_setNext();\r\n\r\n // Add the last page link.\r\n if ($this->_config['show_last_page'] &&\r\n $this->_pages > (2 * $this->_config['delta'] + 1)) {\r\n $this->_setLast();\r\n }\r\n }", "function freshio_paging_nav()\n\t{\n\t\tglobal $wp_query;\n\n\t\t$args = array(\n\t\t\t'type' => 'list',\n\t\t\t'next_text' => _x('Next', 'Next post', 'freshio'),\n\t\t\t'prev_text' => _x('Previous', 'Previous post', 'freshio'),\n\t\t);\n\n\t\tthe_posts_pagination($args);\n\t}", "private static function display_paging_links($which, $page_links, $first_item_index, $page_size, $total_lead_count) {\r\r\n\t\t//$which - header or footer, so the items can have unique names\r\r\n\t\tif($page_links)\r\r\n\t\t{\r\r\n\t\t\t$paging_html = '\r\r\n\t\t\t<div class=\"tablenav-pages\">\r\r\n\t\t\t<span id=\"paging_' . $which . '\" class=\"displaying-num\">';\r\r\n\t\t\t$range_max = '<span id=\"paging_range_max_' . $which . '\">';\r\r\n\t\t\tif (($first_item_index + $page_size) > $total_lead_count)\r\r\n\t\t\t{\r\r\n\t\t\t\t$range_max .= $total_lead_count;\r\r\n\t\t\t}\r\r\n\t\t\telse\r\r\n\t\t\t{\r\r\n\t\t\t\t$range_max .= ($first_item_index + $page_size);\r\r\n\t\t\t}\r\r\n\t\t\t$range_max .= \"</span>\";\r\r\n\t\t\t$range_min = '<span id=\"paging_range_min_' . $which . '\">' . ($first_item_index + 1) . \"</span>\";\r\r\n\t\t\t$paging_total = '<span id=\"paging_total_' . $which . '\">' . $total_lead_count . \"</span>\";\r\r\n\t\t\t$paging_html .= sprintf(__(\"Displaying %s - %s of %s\", \"gravityforms\"), $range_min, $range_max , $paging_total);\r\r\n\t\t\t$paging_html .= \"</span>\" .$page_links . \"</div>\";\r\r\n\t\t}\r\r\n\t\telse\r\r\n\t\t{\r\r\n\t\t\t$paging_html = \"\";\r\r\n\t\t}\r\r\n\t\treturn $paging_html;\r\r\n }", "function PaginateIt(){\n $this->SetCurrentPage(1);\n $this->SetItemsPerPage(10);\n $this->SetItemCount(0);\n $this->SetLinksFormat('&laquo; Back',' &bull; ','Next &raquo;');\n $this->SetLinksHref($_SERVER['PHP_SELF']);\n $this->SetLinksToDisplay(10);\n $this->SetQueryStringVar('page');\n $this->SetQueryString($_SERVER['QUERY_STRING']);\n $this->SetModRewrite(0);\n \n //if(isset($_GET[$this->queryStringVar]) && is_numeric($_GET[$this->queryStringVar])){\n // $this->SetCurrentPage($_GET[$this->queryStringVar]);\n //}\n }", "function droplitcube_pager_link($text, $page_new, $element, $parameters = array(), $attributes = array()) {\n $page = isset($_GET['page']) ? $_GET['page'] : '';\n if ($new_page = implode(',', pager_load_array($page_new[$element], $element, explode(',', $page)))) {\n $parameters['page'] = $new_page;\n }\n\n $query = array();\n if (count($parameters)) {\n $query[] = drupal_query_string_encode($parameters, array());\n }\n $querystring = pager_get_querystring();\n if ($querystring != '') {\n $query[] = $querystring;\n }\n\n // Set each pager link title\n if (!isset($attributes['title'])) {\n static $titles = NULL;\n if (!isset($titles)) {\n $titles = array(\n t('« first') => t('Go to first page'),\n t('‹ previous') => t('Go to previous page'),\n t('next ›') => t('Go to next page'),\n t('last »') => t('Go to last page'),\n );\n }\n if (isset($titles[$text])) {\n $attributes['title'] = $titles[$text];\n }\n else if (is_numeric($text)) {\n $attributes['title'] = t('Go to page @number', array('@number' => $text));\n }\n }\n\n return array(\n 'title' => $text,\n 'href' => $_GET['q'],\n 'attributes' => $attributes,\n 'query' => count($query) ? implode('&', $query) : NULL,\n );\n}", "function displaySingleLinkPaging($argVarBackLinkString, $argVarNextLinkString, $argVarCurrentPage, $argVarTotalPages)\n\n\t{\n\n\t\t$varQryStr = $_SERVER['QUERY_STRING'];\n\n\t\t\n\n\t\tif(trim($varQryStr) == '')\n\n\t\t{\n\n\t\t\t$varQryStr = '?'.$varQryStr; \n\n\t\t}\n\n\t\telse\n\n\t\t{\n\n\t\t\t$varQryStr = '?'.preg_replace('/&page=([0-9]*)/','',$varQryStr).'&amp;';\n\n\t\t}\n\n\t\t\n\n\t\tif($argVarTotalPages > 1)\n\n\t\t{\n\n\t\t\t//get next page link\n\n\t\t\tif($argVarCurrentPage == $argVarTotalPages) \n\n\t\t\t{\n\n\t\t\t\t$varNextPageLink = '<span style=\"background:transparent none repeat scroll 0 0; color:#A0A0A0;\">'.$argVarNextLinkString.'</span>';\n\n\t\t\t}\n\n\t\t\telse if($argVarCurrentPage != '' )\n\n\t\t\t{\n\n\t\t\t\t$varNextPageLink = '<a href=\"'.$PHP_SELF.$varQryStr.'page='.($argVarCurrentPage+1).'\">'.$argVarNextLinkString.'</a>';\n\n\t\t\t}\n\n\t\t\telse\n\n\t\t\t{\n\n\t\t\t\t$varNextPageLink = '<a href=\"'.$PHP_SELF.$varQryStr.'page=2\">'.$argVarNextLinkString.'</a>';\n\n\t\t\t}\n\n\t\t\t\n\n\t\t\t//get previous page link\n\n\t\t\tif($argVarCurrentPage == '' || $argVarCurrentPage == '1') \n\n\t\t\t{\n\n\t\t\t\t$varPreviousPageLink = '<span style=\"background:transparent none repeat scroll 0 0; color:#A0A0A0;\">'.$argVarBackLinkString.'</span>';\n\n\t\t\t}\n\n\t\t\telse //if($_GET['page'] != '' )\n\n\t\t\t{\n\n\t\t\t\t$varPreviousPageLink = '<a href=\"'.$PHP_SELF.$varQryStr.'page='.($argVarCurrentPage-1).'\">'.$argVarBackLinkString.'</a>';\n\n\t\t\t}\n\n\t\t\t\n\n\t\t\t$arrLinks['Prev'] = $varPreviousPageLink;\n\n\t\t\t$arrLinks['Next'] = $varNextPageLink;\n\n\t\t\t\n\n\t\t\treturn $arrLinks;\n\n\t\t}\n\n\t}", "protected function setupMonthPager()\n {\n $first_date = $this->first_date;\n $current_date = $this->current_date;\n // previous\n if ($first_date->getTimestamp() < $current_date->getTimestamp()) {\n $previous_date = $current_date->copy();\n $previous_date->subMonth(1);\n $this->previous_text = $previous_date->formatLocalized('%B') . ', ' . $previous_date->year;\n $this->previous_url = $this->makePagerUrl(array(\n 'year' => $previous_date->year,\n 'month' => $previous_date->month,\n ));\n } else {\n $this->previous_text = $current_date->formatLocalized('%B') . ', ' . $current_date->year;\n $this->previous_url = '';\n }\n // next\n if (($this->current_year < date('Y')) || ($this->current_month < date('m'))) {\n $next_date = $current_date->copy();\n $next_date->addMonth(1);\n $this->next_text = $next_date->formatLocalized('%B') . ', ' . $next_date->year;\n $this->next_url = $this->makePagerUrl(array(\n 'year' => $next_date->year,\n 'month' => $next_date->month,\n ));\n } else {\n $this->next_text = $current_date->formatLocalized('%B') . ', ' . $current_date->year;\n $this->next_url = '';\n }\n }", "function zuhaus_mikado_page_show_pagination() {\n\t\t$args_pages = array(\n\t\t\t'before' => '<div class=\"mkdf-single-links-pages\"><div class=\"mkdf-single-links-pages-inner\">',\n\t\t\t'after' => '</div></div>',\n\t\t\t'pagelink' => '<span>%</span>'\n\t\t);\n\t\t\n\t\twp_link_pages( $args_pages );\n\t}", "public function paginationLinks($pages)\n\t{\n\t\t// if the pages is empty, doesn't exist, etc.\n\t\tif ( ! $pages ) return '';\n\n\t\t// extract array vars\n\t\textract($pages);\n\n\t\t// if we didn't get a base url\n\t\tif ( ! isset($base_url) ) \n\t\t{\n\t\t\t$base_url = \\Request::fullUrl();\n\t\t}\n\n\t\t// remove any current page parameter from query string\n\t\t$base_url = $this->removeUrlQueryParam($base_url, 'p');\n\n\t\t// set the concatenator\n\t\t$concatenator = ( ! isset( $_SERVER['QUERY_STRING']) ) ? '?' : '&';\n\t\n\t\t// set next and previous page numbers\n\t\t$nextPageNumber = $page + 1;\n\t\t$previousPageNumber = (($page - 1) > 0) ? $page - 1 : 0;\n\n\t\t// calculate total pages\n\t\t$total_pages = ceil($total / $perPage);\n\n\t\t// set the previous page link and empty link\n\t\t$previousLabel = 'Previous Page';\n\t\t$previousPageLink = '<a href=\"'. $base_url . $concatenator . 'p='. $previousPageNumber .'\">' . $previousLabel . '</a>';\n\n\t\t// set the next page link and empty link\n\t\t$nextLabel = \"Next Page\";\n\t\t$nextPageLink = '<a href=\"'. $base_url . $concatenator . 'p='. $nextPageNumber .'\">' . $nextLabel. '</a>';\n\t\t\n\t\t// set the links\n\t\t$nextPage = ($page < $total_pages) ? $nextPageLink : $nextLabel;\n\t\t$previousPage = ($page > 1) ? $previousPageLink : $previousLabel;\n\n\t\treturn $total . ' Total Listings &nbsp; &nbsp; Page ' . $page . ' of ' . $total_pages . ' &nbsp; &nbsp; ' . $previousPage . ' &nbsp; &nbsp; ' . $nextPage;\n\t\t\n\t}", "function affinity_mikado_page_show_pagination() {\n\n\t\t$args_pages = array(\n\t\t\t'before' => '<div class=\"mkd-single-links-pages\"><div class=\"mkd-single-links-pages\">',\n\t\t\t'after' => '</div></div>',\n\t\t\t'pagelink' => '<span>%</span>'\n\t\t);\n\t\twp_link_pages($args_pages);\n\n\t}", "public function createNumLinks(){\r\n \tfor($i=1;$i<=$this->PageCount;$i++){\r\n \t$this->Links[$i]=$this->Url.'p='.$i;\r\n \t}\r\n \t$this->PagerData['linkhtml']=$this->Links;\r\n \t}", "function ShowNavLinks()\n {\n \t$this->paginatorObj->ShowBox($this);\n }", "function print_page_links( $p_page, $p_start, $p_end, $p_current ) {\n\t\t$t_items = array();\n\t\t$t_link = \"\";\n\n\t\t# Check if we have more than one page,\n\t\t# otherwise return without doing anything.\n\n\t\tif ( $p_end - $p_start < 1 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t# Get localized strings \n\t\t$t_first = lang_get( 'first' );\n\t\t$t_last = lang_get( 'last' );\n\t\t$t_prev = lang_get( 'prev' );\n\t\t$t_next = lang_get( 'next' );\n\n\t\t$t_page_links = 10;\n\n print( \"[ \" );\n\n\t\t# First and previous links\n\t\tprint_page_link( $p_page, $t_first, 1, $p_current );\n\t\tprint_page_link( $p_page, $t_prev, $p_current - 1, $p_current );\n\t\t\n\t\t# Page numbers ...\n\n\t\t$t_first_page = max( $p_start, $p_current - $t_page_links/2 );\n\t\t$t_first_page = min( $t_first_page, $p_end - $t_page_links );\n\t\t$t_first_page = max( $t_first_page, $p_start );\n\n\t\tif ( $t_first_page > 1 )\n\t\t\tprint( \" ... \" );\n\n\t\t$t_last_page = $t_first_page + $t_page_links;\n\t\t$t_last_page = min( $t_last_page, $p_end );\n\n\t\tfor ( $i = $t_first_page ; $i <= $t_last_page ; $i++ ) {\n\t\t\tif ( $i == $p_current ) {\n\t\t\t\tarray_push( $t_items, $i );\n\t\t\t} else {\n\t\t\t\tarray_push( $t_items, \"<a href=\\\"$p_page&page_number=$i\\\">$i</a>\" );\n\t\t\t}\n\t\t}\n\t\techo implode( '&nbsp;', $t_items );\n\n\t\tif ( $t_last_page < $p_end )\n\t\t\tprint( \" ... \" );\n\n\t\t# Next and Last links\n\t\tif ( $p_current < $p_end )\n\t\t\tprint_page_link( $p_page, $t_next, $p_current + 1, $p_current );\n\t\telse\n\t\t\tprint_page_link( $p_page, $t_next );\n\t\tprint_page_link( $p_page, $t_last, $p_end, $p_current );\n\n print( \" ]\" );\n\t}", "function sprint_wp_link_pages_args_prevnext_add($args)\n{\n global $page, $numpages, $more, $pagenow;\n if (!$args['next_or_number'] == 'next_and_number')\n return $args; \n $args['next_or_number'] = 'number'; \n if (!$more)\n return $args; \n if($page-1) \n $args['before'] .= _wp_link_page($page-1)\n . $args['link_before']. $args['previouspagelink'] . $args['link_after'] . '</a>'\n ;\n if ($page<$numpages) \n \n $args['after'] = _wp_link_page($page+1)\n . $args['link_before'] . $args['nextpagelink'] . $args['link_after'] . '</a>'\n . $args['after']\n ;\n return $args;\n}", "function pager($margin=10)\n {\n $path = $_GET;\n $newpath = $PHP_SELF.\"?\";\n foreach($path as $key => $value)\n {\n if($key!=$this->getvar)\n {\n $newpath .= $key.\"=\".$value;\n $newpath .=\"&amp;\";\n }\n }\n $newpath .= $this->getvar;\n\n $linkpaths = array();\n $current = $this->start / $this->length + 1;\n $pages = ceil(($this->rows/$this->length));\n $pagerstart = $current-$margin;\n $pagerstart = ($pagerstart<1)?1:$pagerstart;\n $pagerend = $current+$margin;\n\t\t\n // echo \"//\".$current.\"//\".$pagerstart.\" // \".$pagerend;\n\t\t// if($margin>25)\n\t\t// {\n\t\t\t// $pagerstart=$current;\n\t\t\t// $pagerend=25;\t\t\t\n\t\t// }\n $pagerend = ( $pagerend > $pages ) ? ( ceil( ( $this->rows / $this->length ) ) ): $pagerend;\n\n for($i=$pagerstart;$i < ($pagerend+1);$i++)\n {\n $linkpaths[$i] = $newpath.\"=\".($i);\n }\n if($linkpaths[($current+1)]!=null)\n {\n $linkpaths['next']=$linkpaths[($current+1)];\n }\n if($linkpaths[($current-1)]!=null)\n {\n $linkpaths['last']=$linkpaths[($current-1)];\n }\n\t\t \n return $linkpaths;\n }", "protected function displayNavigationLinks() {\n\t\techo $this->getCalenderLink();\n\t\techo $this->getPrevLink();\n\t\techo $this->getNextLink();\n\t}", "function page_links() {\n\t$args = array(\n\t\t'type' => 'list',\n\t\t'total' => max( 1, get_query_var( 'paged' ) ) + 3,\n\t\t'prev_text' => __( 'Previous Posts Page', 'the-leader' ),\n\t\t'next_text' => __( 'Next Posts Page', 'the-leader' ),\n\t);\n\treturn paginate_links( $args );\n}", "public function pageLinks()\r {\r if ($this->total_pages < $this->roll) {\r $this->begin = 1;\r $this->end = $this->total_pages;\r }\r else {\r if (($this->current_page - ceil($this->roll / 2)) < 1) {\r $this->begin = 1;\r $this->end = $this->roll;\r }\r else {\r $this->begin = $this->current_page - ceil($this->roll / 2);\r if ($this->current_page >= $this->total_pages) {\r $this->end = $this->total_pages;\r $this->begin = $this->total_pages - $this->roll + 1;\r }\r else {\r $this->end = $this->begin + $this->roll - 1;\r if ($this->end == $this->current_page) {\r $this->begin = $this->begin + 1;\r $this->end = $this->end + 1;\r }\r }\r }\r }\r //Xuat so trang hien thi\r for ($i = $this->begin; $i <= $this->end; $i++) {\r if ($i == $this->current_page) {\r $this->page_link .= '<li class=\"active\">' . $i;\r }\r else {\r if ($this->tab) {\r $this->page_link .= '<li>' . \"<a href='\" . $this->name_page . \"?tab=$this->tab&page=$i' title='page \" . $i . \"'> \" . $i . \" </a>\";\r } elseif ($this->kw) {\r $this->page_link .= '<li>' . \"<a href='\" . $this->name_page . \"?kw=$this->kw&page=$i' title='page \" . $i . \"'> \" . $i . \" </a>\";\r } else {\r $this->page_link .= '<li>' . \"<a href='\" . $this->name_page . \"?page=$i' title='page \" . $i . \"'> \" . $i . \" </a>\";\r }\r }\r }\r\r return $this->page_link . '</li>';\r }", "private function buildPageLinks(): void\n {\n // If buildPageLinks has already been called, just return\n if (isset($this->values['links'])) {\n return;\n }\n\n // Make sure we have required variables\n if (!isset($this->totalResultsFound)) {\n throw new Exception('PitonPagination: Total rows in results not set in setTotalResultsFound()');\n }\n\n // Calculate the total number of pages in the result set\n $this->numberOfPageLinks = (int) ceil($this->totalResultsFound / $this->resultsPerPage);\n\n // Calcuate starting and ending page in the central set of links\n $startPage = ($this->currentPageLinkNumber - $this->numberOfAdjacentLinks > 0) ? $this->currentPageLinkNumber - $this->numberOfAdjacentLinks : 1;\n $endPage = ($this->currentPageLinkNumber + $this->numberOfAdjacentLinks <= $this->numberOfPageLinks) ? $this->currentPageLinkNumber + $this->numberOfAdjacentLinks : $this->numberOfPageLinks;\n\n // Start with Previous link\n if ($this->currentPageLinkNumber === 1) {\n $this->values['links'][] = ['href' => $this->pageUrl . 1, 'pageNumber' => ''];\n } else {\n $this->values['links'][] = ['href' => $this->pageUrl . ($this->currentPageLinkNumber - 1), 'pageNumber' => ''];\n }\n\n // Always include the page one link\n if ($startPage > 1) {\n $this->values['links'][] = ['href' => $this->pageUrl . 1, 'pageNumber' => 1];\n }\n\n // Do we need to add ellipsis after '1' and before the link series?\n if ($startPage >= 3) {\n $this->values['links'][] = ['href' => '', 'pageNumber' => 'ellipsis'];\n }\n\n // Build link series\n for ($i = $startPage; $i <= $endPage; ++$i) {\n $this->values['links'][] = ['href' => $this->pageUrl . $i, 'pageNumber' => $i];\n }\n\n // Do we need to add ellipsis after the link series?\n if ($endPage <= $this->numberOfPageLinks - 2) {\n $this->values['links'][] = ['href' => '', 'pageNumber' => 'ellipsis'];\n }\n\n // Always include last page link\n if ($endPage < $this->numberOfPageLinks) {\n $this->values['links'][] = ['href' => $this->pageUrl . $this->numberOfPageLinks, 'pageNumber' => $this->numberOfPageLinks];\n }\n\n // And finally, the Next link\n if ($endPage === $this->numberOfPageLinks) {\n $this->values['links'][] = ['href' => $this->pageUrl . $this->numberOfPageLinks, 'pageNumber' => ''];\n } else {\n $this->values['links'][] = ['href' => $this->pageUrl . ($this->currentPageLinkNumber + 1), 'pageNumber' => ''];\n }\n }", "function gengo_link_pages($before = '<br />', $after = '<br />', $next_or_number = 'number', $nextpagelink = 'next page', $previouspagelink = 'previous page', $pagelink = '%', $more_file = '') {\r\n \tglobal $gengo, $id, $page, $numpages, $multipage, $more, $pagenow;\r\n\r\n\tif ($multipage) {\r\n\t\t$file = $more_file ? $more_file : $pagenow;\r\n\t\t$permalinks = get_settings('permalink_structure');\r\n\r\n\t\tif ($permalinks) $link_base = ($gengo->language_supplied) ? substr(trailingslashit(get_permalink()), 0, -3) : get_permalink();\r\n\t\telse $link_base = get_permalink() . '&amp;page=';\r\n\r\n\t\tif ('number' == $next_or_number) {\r\n\t\t\techo $before;\r\n \t\t\tfor ($i = 1; $i < ($numpages + 1); $i++) {\r\n\t\t\t\t$j = str_replace('%', \"$i\", $pagelink);\r\n\t\t\t\tif (($i != $page) || ((!$more) && ($page == 1))) {\r\n\t\t\t\t\t$link = $link_base . $i;\r\n\t\t\t\t\tif ($gengo->language_preference && $permalinks) $link = $gengo->append_link_language($link, $gengo->language_preference[0]->code);\r\n\t\t\t\t\techo \"<a href=\\\"$link\\\">$j</a> \";\r\n\t\t\t\t}\r\n\t\t\t\telse echo \"$j \";\r\n\t\t\t}\r\n\t\t\techo $after;\r\n\t\t} elseif ($more) {\r\n\t\t\techo $before;\r\n\t\t\t$i = $page - 1;\r\n\t\t\tif ($i && $more) {\r\n\t\t\t\t$link = $link_base . $i;\r\n\t\t\t\tif ($gengo->language_preference && $permalinks) $link = $gengo->append_link_language($link, $gengo->language_preference[0]->code);\r\n\t\t\t\techo \"<a href=\\\"$link\\\">$previouspagelink</a>\";\r\n\t\t\t}\r\n\t\t\t$i = $page + 1;\r\n\t\t\tif ($i <= $numpages && $more) {\r\n\t\t\t\t$link = $link_base . $i;\r\n\t\t\t\tif ($gengo->language_preference && $permalinks) $link = $gengo->append_link_language($link, $gengo->language_preference[0]->code);\r\n\t\t\t\techo \"<a href=\\\"$link\\\">$nextpagelink</a>\";\r\n\t\t\t}\r\n\t\t\techo $after;\r\n\t\t}\r\n\t}\r\n}", "public function set_links(int $total, int $page)\n {\n // Base url\n $this->_set_base_url();\n\n // Page\n $this->_page = $page;\n\n // Count\n $this->_count = ceil($total / $this->_limit);\n\n // First\n $this->_links['first'] = ($this->_page - 1) > 1 ? ['page' => 1, 'url' => $this->_set_link(1)] : NULL;\n\n // Prev\n $this->_links['prev'] = $this->_page > 1 ? ['page' => $this->_page, 'url' => $this->_set_link($this->_page - 1)] : NULL;\n\n // Prevs\n $this->_links['prevs'] = $this->_page > 1 ? [] : NULL;\n\n if($this->_page > 1)\n {\n $this->IZY->output->add_canonical('prev', $this->IZY->url_helper->site_url($this->_set_link($page - 1)));\n\n $from = ($this->_page - $this->_range) <= 0 ? 1 : $this->_page - $this->_range;\n for($from; $from < $this->_page; $from ++)\n {\n array_push($this->_links['prevs'], ['page' => $from, 'url' => $this->_set_link($from)]);\n }\n }\n\n // Self\n $this->_links['self'] = ['page' => $this->_page, 'url' => $this->_set_link($this->_page)];\n $this->IZY->output->add_canonical('canonical', $this->IZY->url_helper->site_url($this->_set_link($page)));\n\n // Nexts\n $this->_links['nexts'] = $this->_page < $this->_count ? [] : NULL;\n\n if($this->_page < $this->_count)\n {\n $this->IZY->output->add_canonical('next', $this->IZY->url_helper->site_url($this->_set_link($page + 1)));\n\n $to = ($this->_page + $this->_range) > $this->_count ? $this->_count : ($this->_page + $this->_range);\n for($from = ($this->_page + 1); $from <= $to; $from ++)\n {\n array_push($this->_links['nexts'], ['page' => $from, 'url' => $this->_set_link($from)]);\n }\n }\n\n // Next\n $this->_links['next'] = $this->_page < $this->_count ? ['page' => $this->_page + 1, 'url' => $this->_set_link($this->_page + 1)] : NULL;\n\n // Last\n $this->_links['last'] = ($this->_page + 1) < $this->_count ? ['num' => $this->_count, 'url' => $this->_set_link($this->_count)] : NULL;\n }", "function productPageLinks() {\n if (isset($this->request->params['pname'])) {\n $this->Paginator->options['url'] = array('action'=>$this->request->params['pname']);\n $controls = \"{$this->Paginator->prev('Previous', null, null, array('class'=>'disabled'))} | {$this->Paginator->numbers()} | {$this->Paginator->next('Next', null, null, array('class'=>'disabled'))} <!-- THUMBNAIL PAGE SET NAVIGATION LINKS? -->\";\n } else {\n $controls = str_replace('view/', '', \"{$this->Paginator->prev('Previous', null, null, array('class'=>'disabled'))} | {$this->Paginator->numbers()} | {$this->Paginator->next('Next', null, null, array('class'=>'disabled'))} <!-- THUMBNAIL PAGE SET NAVIGATION LINKS? -->\");\n }\n \n return\"<div id='pagenav'>\n $controls\n </div>\";\n }", "public function ui_page_navigator()\n\t\t\t{\n\t\t\t\t/* add navigation if set */\n\t\t\t\tif( (isset( $this->pagenav ) || count( $this->pagenav )))\n\t\t\t\t{\n\t\t\t\t\t/**\n\t\t\t\t\t * [1] - Let convert an associative array into the ordinary array.\n\t\t\t\t\t * This is to make sure that we can index the array in numbers\n\t\t\t\t\t */\n\t\t\t\t\t$i = 0;\n\n\t\t\t\t\t// initiate numberedArray \n\t\t\t\t\t$numberedArray = array();\n\t\t\t\t\twhile( list($label, $url) = each($this->pagenav) ){\n\t\t\t\t\t\t// add page details to the array\n\t\t\t\t\t\t$numberedArray[$i] = array($url, $label);\n\n\t\t\t\t\t\t// increment 'i'\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n\n\t\t\t\t\t/**\n\t\t\t\t\t * [2] - Find 'next' page and the 'prev' page\n\t\t\t\t\t */\n\t\t\t\t\t$pagecount = count( $numberedArray );\n\n\t\t\t\t\t// find next and the prev url\n\t\t\t\t\t$prev = $next = false;\n\t\t\t\t\tfor($i = 0; $i < $pagecount; $i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Retrieve each detail of the page, url and label\n\t\t\t\t\t\t$c_url = $numberedArray[$i][0];\n\t\t\t\t\t\t$c_label = $numberedArray[$i][1];\n\n\t\t\t\t\t\t// If the current url matches the current \n\t\t\t\t\t\t// iterated url\n\t\t\t\t\t\tif($c_url == \"\") $c_url = \"index\";\n\n\t\t\t\t\t\t//if( $this->curl == $c_url.'.php' ){\n\t\t\t\t\t\t\t// find the 'next' and 'prev' index\n\t\t\t\t\t\t\t$nextIndex = $i + 1;\n\t\t\t\t\t\t\t$prevIndex = $i - 1;\n\n\t\t\t\t\t\t\t// correct the indexing\n\t\t\t\t\t\t\tif( $prevIndex == -1 ) $prevIndex = $pagecount - 1;\n\n\t\t\t\t\t\t\tif( $nextIndex > $pagecount - 1 ) $nextIndex = 0;\n\n\t\t\t\t\t\t\t// find 'next' item and the 'prev' item\n\t\t\t\t\t\t\t$next = $numberedArray[ $nextIndex ];\n\t\t\t\t\t\t\t$prev = $numberedArray[ $prevIndex ];\n\t\t\t\t\t\t//}\n\t\t\t\t\t}\n\n\t\t\t\t\t// next page\n\t\t\t\t\t$nexturl = $next[0];\n\t\t\t\t\t$nextlabel = ucwords( $next[1] );\n\n\t\t\t\t\t// previous page\n\t\t\t\t\t$prevurl = $prev[0];\n\t\t\t\t\t$prevlabel = ucwords( $prev[1] );\n\n\t\t\t\t\t/**\n\t\t\t\t\t * [3] - Return the 'html' will the 'next' button and 'prev'\n\t\t\t\t\t * button\n\t\t\t\t\t */\n\t\t\t\t\treturn '\n\t\t\t\t\t<div id=\"normal-ui-nav \" class=\"ui-page-navigator cf\">\n\t\t\t\t\t\t<a href=\"'.$prevurl.'\" title=\"'.$prevlabel.'\">\n\t\t\t\t\t\t\t<div class=\"left-button\">\n\t\t\t\t\t\t\t\t'.strtoupper($prevlabel).'\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<a href=\"'.$nexturl.'\" title=\"'.$nextlabel.'\">\n\t\t\t\t\t\t\t<div class=\"right-button\">\n\t\t\t\t\t\t\t\t'.strtoupper($nextlabel).'\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</div>';\n\t\t\t\t}\n\t\t\t}", "function front_pager_next($variables) {\n $text = $variables['text'];\n $element = $variables['element'];\n $interval = $variables['interval'];\n $parameters = $variables['parameters'];\n global $pager_page_array, $pager_total;\n $pager_type = empty($variables['pager_type']) ? NULL : $variables['pager_type'];\n $output = '';\n\n // If we are anywhere but the last page\n if ($pager_page_array[$element] < ($pager_total[$element] - 1)) {\n $page_new = pager_load_array($pager_page_array[$element] + $interval, $element, $pager_page_array);\n // If the next page is the last page, mark the link as such.\n if (!empty($pager_type)) {\n $output = theme('pager_link', array('next_le_pager_links' => TRUE, 'text' => $text, 'page_new' => $page_new, 'element' => $element, 'parameters' => $parameters));\n }\n else {\n if ($page_new[$element] == ($pager_total[$element] - 1)) {\n $output = theme('pager_last', array('text' => $text, 'element' => $element, 'parameters' => $parameters));\n }\n // The next page is not the last page.\n else {\n $output = theme('pager_link', array('text' => $text, 'page_new' => $page_new, 'element' => $element, 'parameters' => $parameters));\n }\n }\n }\n\n return $output;\n}", "public function setPagination($nextURL = null, $previousURL = null, $firstURL = null, $lastURL = null){\n\t\tif(empty($nextURL) && empty($previousURL) && empty($firstURL) && empty($lastURL)){\n\t\t\tdie('At least one URL must be specified for pagination to work.');\n\t\t}\n\t\tif(!empty($nextURL)){\n\t\t\t$this->setAtomLink($nextURL, 'next');\n\t\t}\n\t\tif(!empty($previousURL)){\n\t\t\t$this->setAtomLink($previousURL, 'previous');\n\t\t}\n\t\tif(!empty($firstURL)){\n\t\t\t$this->setAtomLink($firstURL, 'first');\n\t\t}\n\t\tif(!empty($lastURL)){\n\t\t\t$this->setAtomLink($lastURL, 'last');\n\t\t}\n\n\t\treturn $this;\n\t}", "function numbered_pages ($total_pages, $current_page, $command)\n{\n\t// If there are too many articles that can't fit in one page, show the pagination\n\tif ($total_pages >= 2)\n\t{\n\t\t// This is for the back page\t\n\t\tif ($current_page != 1)\n\t\t{\n\t\t\t$back_page = $current_page - 1;\n\t\t\t\n\t\t\t// The original, untouched\n\t\t\t//echo \"<a href='?{$command}={$back_page}'>back</a> \";\n\t\t\t\n\t\t\techo \"<a class='PaginationButton' href='?{$command}={$back_page}'>back</a> \";\n\t\t}\n\t\t\n\t\t/*\n\t\t\tFirst Half\n\t\t*/\t\t\n\t\t// If the current page is a 2 or below...\n\t\t// This is the default that's printed out first\n\t\tif ($current_page <= PAGE_PADDING) // <- this is for outputing the first page numbers\n\t\t{\n\t\t\t// The default starting point will be 1 (the first page)\n\t\t\t$first_page = 1;\n\t\t\t// ..start the counter at one and print the pages 1 to X \n\t\t\tfor($i = $first_page; $i <= $first_page + PAGE_PADDING + PAGE_PADDING; $i++) // the array is ready to spit out 5 numbers but will spit out less if there aren't 5\n\t\t\t{\n\t\t\t\tif ($i < $total_pages) // This prevents the page number from higher than the total_pages\n\t\t\t\t{\n\n\t\t\t\t\t// The original, untouched\n\t\t\t\t\t//echo \"<a href='?{$command}={$i}'>{$i}</a> | \";\t\n\n\t\t\t\t\techo \"<a class='PaginationButton' href='?{$command}={$i}'>{$i}</a> \";\n\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t// When you reach the last number, remove the bar\n\t\t\t\telse if ($i == $total_pages)\n\t\t\t\t{\n\t\t\t\t\t// The original, untouched\n\t\t\t\t\t//echo \"<a href='?{$command}={$i}'>{$i}</a> \";\t\n\t\t\t\t\t\n\t\t\t\t\techo \"<a class='PaginationButton' href='?{$command}={$i}'>{$i}</a> \";\t\n\t\t\t\t}\t\n\t\t\t}\t\t\n\t\t}\n\t\t/*\n\t\t\tSecond Half\n\t\t*/\n\t\t// If the page is more than the total amount of pages (minus 2)\n\t\t// note: 2 is the padding \n\t\t// example: [padding] [padding] [current_page] [padding] [padding]\n\t\t// in this situation, this is what will be printed out:\n\t\t// <1> [2] [3] [4] [5] or...\n\t\t// [1] <2> [3] [4] [5] \n\t\t// depending on the padding's value\n\t\t// That means the users is in half way through the pages\n\t\telse if ($current_page >= $total_pages - PAGE_PADDING) // <- this is for outputing the last remaining pages\n\t\t{\n\t\t\t// The default starting point will be the total_pages\n\t\t\t$last_pages = $total_pages;\n\t\t\t// Which will be subtracted by the padding * 2\n\t\t\tfor($i = $last_pages - PAGE_PADDING - PAGE_PADDING ; $i <= $last_pages; $i++)\n\t\t\t{\n\t\t\t\tif ($i > 0) // This prevent any zero values from being printed\n\t\t\t\t{\n\t\t\t\t\t// Remove | when you're at the last number\n\t\t\t\t\tif ($i == $last_pages )\n\t\t\t\t\t{\n\t\t\t\t\t\t// The original, untouched\n\t\t\t\t\t\t//echo \"<a href='?{$command}={$i}'>{$i}</a> \";\n\t\t\t\t\t\t\n\t\t\t\t\t\techo \"<a class='PaginationButton' href='?{$command}={$i}'>{$i}</a> \";\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// The original, untouched\n\t\t\t\t\t\t//echo \"<a href='?{$command}={$i}'>{$i}</a> | \";\n\t\t\t\t\t\t\n\t\t\t\t\t\techo \"<a class='PaginationButton' href='?{$command}={$i}'>{$i}</a> \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\n\t\t\t\t\n\t\t\t}\n\t\n\t\t}\n\t\t// This is the default action\n\t\t// It prints out the 5 numbers based on what page the person is on\n\t\t// ie. if they're on page 6 then this will happen:\n\t\t// [4] [5] <6> [7] [8]\n\t\t// and so on..\n\t\telse \n\t\t{\t\n\t\t\tfor($i = $current_page -PAGE_PADDING ; $i <= $current_page + PAGE_PADDING ; $i++)\n\t\t\t{\n\t\t\t\t// The original, untouched\n\t\t\t\t// echo \"<a href='?{$command}={$i}'>{$i}</a> | \";\t\t\t\t\n\t\t\t\t\n\t\t\t\techo \"<a class='PaginationButton' href='?{$command}={$i}'>{$i}</a>\";\t\n\t\t\t}\t\t\t\t\n\t\t}\t\n\t\n\t\t// This is for the forward page\n\t\tif ($current_page < $total_pages)\n\t\t{\n\t\t\t$forward_page = $current_page + 1;\n\t\t\t\n\t\t\t// The original, untouched\n\t\t\t//echo \"<a href='?{$command}={$forward_page}'> forward</a>\";\n\t\t\t\n\t\t\techo \"<a class='PaginationButton' href='?{$command}={$forward_page}'> forward</a>\";\n\t\t\t\n\t\t}\n\t}\n\n\t\t\n\t\n\n}", "function paging($total, $num, $call_addr, $prefix='../', $per_page=10, $end_call='', $delta=2)\r\n//$total - total number of elements\r\n//$num - currently selected mark\r\n//$call_addr - an address of link at mark\r\n//$per_page - elements per page\r\n//$end_call - an extra text in the address line of the mark link (...#search)\r\n//$delta - a delta for displaying paging\r\n{\r\nif($per_page < 1)\r\n\treturn;\r\n\t\r\n$tot=ceil($total/$per_page + $num-1);\r\n//echo $tot;\r\nif($tot <2)\r\n\treturn;\r\n\r\nif($num<=0 )\r\n\treturn;\r\n\r\nif($num==0)\r\n\t$num=1;\r\n\t\r\necho '<div class=\"pager\">\r\n';\r\n\r\n$i=1;\r\n\r\nif($num>1)\r\n\techo '<a href=\"'.$prefix.$call_addr.'pg/'.($num-1).$end_call.'\" class=\"arrow arrow_left\" title=\"предыдущая страница\">&larr;</a>\r\n\t';\r\n\r\n\r\n//$skip=$delta;\r\n\t\r\nif($num > $delta+1)\r\n\techo '<a href=\"'.$prefix.$call_addr.'pg/'.($num-$delta-1).$end_call.'\" title=\"предыдущий промежуток\">…</a>\r\n\t';\t\r\n\r\nfor($i=$num-$delta; $i<=$num+$delta; $i++)\r\n{\r\n\tif($i>0 && $i !=$num && $i<=$tot)\r\n\t\techo '<a href=\"'.$prefix.$call_addr.'pg/'.$i.$end_call.'\">'.$i.'</a>\r\n\t\t';\t\r\n\telseif($i ==$num)\r\n\t\techo '<span class=\"active\">'.$i.'</span>';\t\r\n}\r\n\t\r\nif($tot > $num+$delta)\r\n\techo '<a href=\"'.$prefix.$call_addr.'pg/'.($num+$delta+1).$end_call.'\" title=\"следующий промежуток\">…</a>\r\n\t';\t\r\n\t\r\nif($tot > $num )\r\necho '<a href=\"'.$prefix.$call_addr.'pg/'.($num+1).$end_call.'\" class=\"arrow arrow_right\" title=\"следующая страница\" >&rarr;</a>\r\n';\r\n\r\n\t\r\necho '</div>\r\n';\t\r\n}", "public function getPages() {\n\t\t$this->pages = ceil($this->total / $this->perPage);\n\t\t// Validate current page\n\t\tif($this->currentPage < 1) {\n\t\t\t$this->currentPage = 1;\n\t\t} elseif($this->currentPage > $this->pages) {\n\t\t\t$this->currentPage = $this->pages;\n\t\t}\n\t\t// Get our page cut off\n\t\t$pageNumbers = $this->getPagesCutOff();\n\t\t// Init\n\t\t$next = $previous = $first = $last = null;\n\t\t// If we have more than one page add the first and previous\n\t\tif($this->pages > 1 && $this->currentPage > 1) {\n\t\t\t$first = $this->buildLink($this->strings['first'], $this->start, $this->getLocation(), $this->getParams(), array_merge($this->getLinkHtmlOptions(), array('_class' => 'first')));\n\t\t\t$previous = $this->buildLink($this->strings['previous'], $this->currentPage-1, $this->getLocation(), $this->getParams(), array_merge($this->getLinkHtmlOptions(), array('_class' => 'previous')));\n\t\t}\n\t\t// Loop and create links\n\t\tforeach($pageNumbers as $i) {\n\t\t\t$this->links[] = $this->buildLink($i, $i, $this->getLocation(), $this->getParams(), $this->getLinkHtmlOptions());\n\t\t}\n\t\t// If we have more than one page add the next and last\n\t\tif($this->pages > 1 && $this->currentPage < $this->pages) {\n\t\t\t$next = $this->buildLink($this->strings['next'], $this->currentPage+1, $this->getLocation(), $this->getParams(), array_merge($this->getLinkHtmlOptions(), array('_class' => 'next')));\n\t\t\t$last = $this->buildLink($this->strings['last'], $this->pages, $this->getLocation(), $this->getParams(), array_merge($this->getLinkHtmlOptions(), array('_class' => 'last')));\n\t\t}\n\t\treturn str_replace(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'{\n\t\titems\n\t}\n\t', '{\n\t\ttotal\n\t}\n\t', '{\n\t\tpages\n\t}\n\t', '{\n\t\tcurrent\n\t}\n\t', '{\n\t\tfirst\n\t}\n\t', '{\n\t\tprevious\n\t}\n\t', '{\n\t\tnext\n\t}\n\t', '{\n\t\tlast\n\t}\n\t',\n\t\t\t\t\t\t'{\n\t\tdataStart\n\t}\n\t', '{\n\t\tdataCurrent\n\t}\n\t', '{\n\t\tdataRange\n\t}\n\t', '{\n\t\tdataEnd\n\t}\n\t', '{\n\t\tdataLast\n\t}\n\t'\n\t\t\t\t\t), \n\t\t\t\t\tarray(\n\t\t\t\t\t\timplode(' ', $this->links), $this->total, $this->pages, $this->currentPage, $first, $previous, $next, $last,\n\t\t\t\t\t\t$this->dataStart, $this->currentPage, $this->perPage, $this->dataEnd, $this->pages\n\t\t\t\t\t), \n\t\t\t\t$this->itemsTemplate);\n\t}", "function display_links($max_page_links, $parameters = '') {\n global $PHP_SELF, $request_type;\n\n $display_links_string = '';\n\n $class = 'class=\"pageResults\"';\n\n if (tep_not_null($parameters) && (substr($parameters, -1) != '&')) $parameters .= '&';\n\n// previous button - not displayed on first page\n if ($this->current_page_number > 1) $display_links_string .= '<a href=\"' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . ($this->current_page_number - 1), $request_type) . '\" class=\"pageResults\" title=\" ' . PREVNEXT_TITLE_PREVIOUS_PAGE . ' \">' . PREVNEXT_BUTTON_PREV . '</a>&nbsp;&nbsp;';\n\n// check if number_of_pages > $max_page_links\n $cur_window_num = intval($this->current_page_number / $max_page_links);\n if ($this->current_page_number % $max_page_links) $cur_window_num++;\n\n $max_window_num = intval($this->number_of_pages / $max_page_links);\n if ($this->number_of_pages % $max_page_links) $max_window_num++;\n\n// previous window of pages\n if ($cur_window_num > 1) $display_links_string .= '<a href=\"' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . (($cur_window_num - 1) * $max_page_links), $request_type) . '\" class=\"pageResults\" title=\" ' . sprintf(PREVNEXT_TITLE_PREV_SET_OF_NO_PAGE, $max_page_links) . ' \">...</a>';\n\n// page nn button\n for ($jump_to_page = 1 + (($cur_window_num - 1) * $max_page_links); ($jump_to_page <= ($cur_window_num * $max_page_links)) && ($jump_to_page <= $this->number_of_pages); $jump_to_page++) {\n if ($jump_to_page == $this->current_page_number) {\n $display_links_string .= '&nbsp;<strong class=\"current\">' . $jump_to_page . '</strong>&nbsp;';\n } else {\n $display_links_string .= '&nbsp;<a href=\"' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . $jump_to_page, $request_type) . '\" class=\"pageResults\" title=\" ' . sprintf(PREVNEXT_TITLE_PAGE_NO, $jump_to_page) . ' \">' . $jump_to_page . '</a>&nbsp;';\n }\n }\n\n// next window of pages\n if ($cur_window_num < $max_window_num) $display_links_string .= '<a href=\"' . tep_href_link(basename($PHP_SELF), $parameters . $this->page_name . '=' . (($cur_window_num) * $max_page_links + 1), $request_type) . '\" class=\"pageResults\" title=\" ' . sprintf(PREVNEXT_TITLE_NEXT_SET_OF_NO_PAGE, $max_page_links) . ' \">...</a>&nbsp;';\n\n// next button\n if (($this->current_page_number < $this->number_of_pages) && ($this->number_of_pages != 1)) $display_links_string .= '&nbsp;<a href=\"' . tep_href_link(basename($PHP_SELF), $parameters . 'page=' . ($this->current_page_number + 1), $request_type) . '\" class=\"pageResults\" title=\" ' . PREVNEXT_TITLE_NEXT_PAGE . ' \">' . PREVNEXT_BUTTON_NEXT . '</a>&nbsp;';\n\n return $display_links_string;\n }", "function nav_buttons($link_previous, $link_next, $align=\"center\") {\n\t$html = \"<ul class='pager'>\";\n\n\tif ($link_previous){\n\t\t$html .= previous_button($link_previous);\n\t}\n\n\tif ($link_next){\n\t\t$html .= next_button($link_next);\n\t}\n\n\t$html .= \"</ul>\";\n\n\treturn $html;\n}", "protected function setupPager()\n {\n if ($this->current_day) {\n $this->setupDayPager();\n } else if ($this->current_month) {\n $this->setupMonthPager();\n } else {\n $this->setupYearPager();\n }\n }", "public static function pagination_list() {\n\t\tglobal $wp_query;\n\n\t\t$total_pages = (int)$wp_query->max_num_pages;\n\n\t\tif ( $total_pages > 1 ) {\n\t\t\t$big = PHP_INT_MAX;\n\t\t\t$current_page = max( 1, get_query_var( 'paged' ) );\n\n\t\t\techo '<div class=\"wp-pagenavi\">';\n\n\t\t\techo '<span class=\"pages\">' . sprintf( __( 'Page %d of %d', 'construction' ), $current_page, $total_pages ) . '</span>'; // xss ok\n\n\t\t\techo paginate_links(\n\t\t\t\tarray(\n\t\t\t\t\t'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),\n\t\t\t\t\t'format' => '?paged=%#%',\n\t\t\t\t\t'current' => $current_page,\n\t\t\t\t\t'total' => $total_pages,\n\t\t\t\t\t'prev_text' => __( 'Prev', 'construction' ),\n\t\t\t\t\t'next_text' => __( 'Next', 'construction' ),\n\t\t\t\t)\n\t\t\t);\n\t\t\t// xss ok\n\n\t\t\techo '</div>';\n\t\t}\n\t}", "public function makePaginationFrontend($data,$links){\n echo '<!-- pagination -->\n <div class=\"v-pagination\">\n <ul class=\"list-inline\">'; // Start Pagination\n $itemsperpage = $data->metadata->{'items_per_page'};\n $pagenow = $data->metadata->{'page_now'};\n $pagetotal = $data->metadata->{'page_total'};\n\n\t\t\t if ($pagenow <= $pagetotal)\n {\n //Middle Pagination = If this page + 2 < total page\n if (($pagenow + 2) < $pagetotal && $pagenow >= 3)\n {\n echo '<li><a href=\"'.$links.'&page='.($pagenow-1).'&itemsperpage='.$itemsperpage.'\"><div class=\"pages\"><i class=\"cv cvicon-cv-previous\"></i></div></a></li>';\n for ($p=($pagenow-2);$p<=($pagenow+2);$p++)\n {\n echo '<li><a href=\"'.$links.'&page='.$p.'&itemsperpage='.$itemsperpage.'\"><div '.(($p == $pagenow)?'class=\"pages active\"':'').'>'.$p.'</div></a></li>';\n }\n echo '<li><a href=\"'.$links.'&page='.($pagenow+1).'&itemsperpage='.$itemsperpage.'\"><div class=\"pages\"><i class=\"cv cvicon-cv-next\"></i></div></a></li>';\n }\n //Last Pagination = total page >= 5 and if this page + 2 >= total page\n elseif (($pagenow + 2) >= $pagetotal && $pagetotal >= 5)\n {\n echo ((($pagenow-1)>0)?'<li><a href=\"'.$links.'&page='.($pagenow-1).'&itemsperpage='.$itemsperpage.'\"><div class=\"pages\"><i class=\"cv cvicon-cv-previous\"></i></div></a></li>':'');\n for ($p=($pagetotal-4);$p<=$pagetotal;$p++)\n {\n echo '<li><a href=\"'.$links.'&page='.$p.'&itemsperpage='.$itemsperpage.'\"><div '.(($p == $pagenow)?'class=\"pages active\"':'').'>'.$p.'</div></a></li>';\n }\n echo (($pagenow<$pagetotal)?'<li><a href=\"'.$links.'&page='.($pagenow+1).'&itemsperpage='.$itemsperpage.'\"><div class=\"pages\"><i class=\"cv cvicon-cv-next\"></i></div></a></li>':'');\n }\n //Last Pagination = total page < 5 and if this page + 2 >= total page\n elseif (($pagenow + 2) >= $pagetotal && $pagetotal < 5)\n {\n echo ((($pagenow-1)>0)?'<li><a href=\"'.$links.'&page='.($pagenow-1).'&itemsperpage='.$itemsperpage.'\"><div class=\"pages\"><i class=\"cv cvicon-cv-previous\"></i></div></a></li>':'');\n for ($p=($pagetotal-($pagetotal-1));$p<=$pagetotal;$p++)\n {\n echo '<li><a href=\"'.$links.'&page='.$p.'&itemsperpage='.$itemsperpage.'\"><div '.(($p == $pagenow)?'class=\"pages active\"':'').'>'.$p.'</div></a></li>';\n }\n echo (($pagenow<$pagetotal)?'<li><a href=\"'.$links.'&page='.($pagenow+1).'&itemsperpage='.$itemsperpage.'\"><div class=\"pages\"><i class=\"cv cvicon-cv-next\"></i></div></a></li>':'');\n }\n //First pagination and if total page <= 5\n elseif ($pagetotal <= 5) \n {\n echo ((($pagenow-1)>0)?'<li><a href=\"'.$links.'&page='.($pagenow-1).'&itemsperpage='.$itemsperpage.'\"><div class=\"pages\"><i class=\"cv cvicon-cv-previous\"></i></div></a></li>':'');\n for ($p=1;$p<=$pagetotal;$p++)\n {\n echo '<li><a href=\"'.$links.'&page='.$p.'&itemsperpage='.$itemsperpage.'\"><div '.(($p == $pagenow)?'class=\"pages active\"':'').'>'.$p.'</div></a></li>';\n }\n echo '<li><a href=\"'.$links.'&page='.($pagenow+1).'&itemsperpage='.$itemsperpage.'\"><div class=\"pages\"><i class=\"cv cvicon-cv-next\"></i></div></a></li>';\n }\n //First pagination and if total page > 5\n elseif ($pagetotal > 5 && $pagenow <=2) \n {\n echo ((($pagenow-1)>0)?'<li><a href=\"'.$links.'&page='.($pagenow-1).'&itemsperpage='.$itemsperpage.'\"><div class=\"pages\"><i class=\"cv cvicon-cv-previous\"></i></div></a></li>':'');\n for ($p=1;$p<=5;$p++)\n {\n echo '<li><a href=\"'.$links.'&page='.$p.'&itemsperpage='.$itemsperpage.'\"><div '.(($p == $pagenow)?'class=\"pages active\"':'').'>'.$p.'</div></a></li>';\n }\n echo '<li><a href=\"'.$links.'&page='.($pagenow+1).'&itemsperpage='.$itemsperpage.'\"><div class=\"pages\"><i class=\"cv cvicon-cv-next\"></i></div></a></li>';\n }\n }\t\n\t \t\techo '</ul>\n </div>\n <!-- /pagination -->'; // End Pagination\n }", "public function setPaginationArguments($pagination_arguments);", "function wp_link_pages_args_prevnext_add($args)\r\n{\r\n global $page, $numpages, $more, $pagenow;\r\n\r\n if (!$args['next_or_number'] == 'next_and_number') \r\n return $args; # exit early\r\n\r\n $args['next_or_number'] = 'number'; # keep numbering for the main part\r\n if (!$more)\r\n return $args; # exit early\r\n\r\n if($page-1) # there is a previous page\r\n $args['before'] .= _wp_link_page($page-1)\r\n . $args['link_before']. $args['previouspagelink'] . $args['link_after'] . '</a>'\r\n ;\r\n\r\n if ($page<$numpages) # there is a next page\r\n $args['after'] = _wp_link_page($page+1)\r\n . $args['link_before'] . $args['nextpagelink'] . $args['link_after'] . '</a>'\r\n . $args['after']\r\n ;\r\n\r\n return $args;\r\n}", "public function run() {\n foreach ($this->paginationOptions as $key => $item) {\n $this->pagination->$key = $item;\n }\n if ($this->showPageList) {\n echo (!is_array($this->header)) ? $this->header : implode('\\n', $this->header);\n echo '<div class=\"navbar-right soft-bottom\">';\n echo implode('\\n', $this->renderShowButton());\n echo '</div>';\n echo (!is_array($this->footer)) ? $this->header : implode('\\n', $this->footer);\n }\n \n parent::run();\n }", "public function paging($records, $pageURL, $start = 0, $maxshown = 50, $numpagesshown = 11, $arrows = true, $additional = array())\n {\n self::$pageURL = $pageURL;\n $this->queryString = $additional;\n if ($records > $maxshown) {\n self::$current = $start >= 1 ? intval($start) : 1;\n self::$totalPages = ceil(intval($records) / ($maxshown >= 1 ? intval($maxshown) : 1));\n self::$lastpage = self::$totalPages;\n $this->getPage($records, $maxshown, $numpagesshown);\n \n $paging = '<ul class=\"'.$this->getPaginationClass().'\">'.$this->preLinks($arrows);\n while (self::$page <= self::$lastpage) {\n $paging .= $this->buildLink(self::$page, self::$page, (self::$current == self::$page));\n self::$page = (self::$page + 1);\n }\n return $paging.$this->postLinks($arrows).'</ul>';\n }\n return false;\n }", "public function display_page_numbers() {\n $html = '';\n $topcount = count($this->items);\n $this->pagecount = (integer) ceil(($topcount + $this->offset)/ QUESTION_PAGE_LENGTH );\n if (!empty($this->page) && ($this->paged)) {\n $html = \"<div class=\\\"paging\\\">\".get_string('page').\":\\n\";\n foreach (range(1,$this->pagecount) as $currentpage) {\n if ($this->page == $currentpage) {\n $html .= \" $currentpage \\n\";\n }\n else {\n $html .= \"<a href=\\\"\".$this->pageurl->out(true, array($this->pageparamname => $currentpage)).\"\\\">\";\n $html .= \" $currentpage </a>\\n\";\n }\n }\n $html .= \"</div>\";\n }\n return $html;\n }", "function createLinks(){ \n\t\t// If total number of rows is zero, do not need to continue\n\t\tif ($this->totalRows == 0 OR $this->perPage == 0){\n\t\t return '';\n\t\t}\n\n\t\t// Calculate the total number of pages\n\t\t$numPages = ceil($this->totalRows / $this->perPage);\n\n\t\t// Is there only one page? will not need to continue\n\t\tif ($numPages == 1){\n\t\t\tif ($this->showCount){\n\t\t\t\t$info = 'Showing : ' . $this->totalRows;\n\t\t\t\treturn $info;\n\t\t\t}else{\n\t\t\t\treturn '';\n\t\t\t}\n\t\t}\n\n\t\t// Determine the current page\t\n\t\tif ( ! is_numeric($this->currentPage)){\n\t\t\t$this->currentPage = 0;\n\t\t}\n\t\t\n\t\t// Links content string variable\n\t\t$output = '';\n\t\t\n\t\t// Showing links notification\n\t\tif ($this->showCount){\n\t\t $currentOffset = $this->currentPage;\n\t\t $info = 'Showing ' . ( $currentOffset + 1 ) . ' to ' ;\n\t\t\n\t\t if( ( $currentOffset + $this->perPage ) < ( $this->totalRows -1 ) )\n\t\t\t $info .= $currentOffset + $this->perPage;\n\t\t else\n\t\t\t $info .= $this->totalRows;\n\t\t\n\t\t $info .= ' of ' . $this->totalRows . ' | ';\n\t\t\n\t\t $output .= $info;\n\t\t}\n\t\t\n\t\t$this->numLinks = (int)$this->numLinks;\n\t\t\n\t\t// Is the page number beyond the result range? the last page will show\n\t\tif ($this->currentPage > $this->totalRows){\n\t\t\t$this->currentPage = ($numPages - 1) * $this->perPage;\n\t\t}\n\t\t\n\t\t$uriPageNum = $this->currentPage;\n\t\t\n\t\t$this->currentPage = floor(($this->currentPage/$this->perPage) + 1);\n\n\t\t// Calculate the start and end numbers. \n\t\t$start = (($this->currentPage - $this->numLinks) > 0) ? $this->currentPage - ($this->numLinks - 1) : 1;\n\t\t$end = (($this->currentPage + $this->numLinks) < $numPages) ? $this->currentPage + $this->numLinks : $numPages;\n\n\t\t// Render the \"First\" link\n\t\tif ($this->currentPage > $this->numLinks){\n\t\t\t$output .= $this->firstTagOpen \n\t\t\t\t. $this->getAJAXlink( '' , $this->firstLink)\n\t\t\t\t. $this->firstTagClose; \n\t\t}\n\n\t\t// Render the \"previous\" link\n\t\tif ($this->currentPage != 1){\n\t\t\t$i = $uriPageNum - $this->perPage;\n\t\t\tif ($i == 0) $i = '';\n\t\t\t$output .= $this->prevTagOpen \n\t\t\t\t. $this->getAJAXlink( $i, $this->prevLink )\n\t\t\t\t. $this->prevTagClose;\n\t\t}\n\n\t\t// Write the digit links\n\t\tfor ($loop = $start -1; $loop <= $end; $loop++){\n\t\t\t$i = ($loop * $this->perPage) - $this->perPage;\n\t\t\t\t\t\n\t\t\tif ($i >= 0){\n\t\t\t\tif ($this->currentPage == $loop){\n\t\t\t\t\t$output .= $this->curTagOpen.$loop.$this->curTagClose;\n\t\t\t\t}else{\n\t\t\t\t\t$n = ($i == 0) ? '' : $i;\n\t\t\t\t\t$output .= $this->numTagOpen\n\t\t\t\t\t\t. $this->getAJAXlink( $n, $loop )\n\t\t\t\t\t\t. $this->numTagClose;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Render the \"next\" link\n\t\tif ($this->currentPage < $numPages){\n\t\t\t$output .= $this->nextTagOpen \n\t\t\t\t. $this->getAJAXlink( $this->currentPage * $this->perPage , $this->nextLink )\n\t\t\t\t. $this->nextTagClose;\n\t\t}\n\n\t\t// Render the \"Last\" link\n\t\tif (($this->currentPage + $this->numLinks) < $numPages){\n\t\t\t$i = (($numPages * $this->perPage) - $this->perPage);\n\t\t\t$output .= $this->lastTagOpen . $this->getAJAXlink( $i, $this->lastLink ) . $this->lastTagClose;\n\t\t}\n\n\t\t// Remove double slashes\n\t\t$output = preg_replace(\"#([^:])//+#\", \"\\\\1/\", $output);\n\n\t\t// Add the wrapper HTML if exists\n\t\t$output = $this->fullTagOpen.$output.$this->fullTagClose;\n\t\t\n\t\treturn $output;\t\t\n\t}", "public function pager($align = false)\n {\n $this->pager_aligned = $align;\n\n return '<ul class=\"pager\">'.$this->previous().$this->next().'</ul>';\n }", "function showPages($start, $total, $url) {\n\n $diff = $total;\n\n while ($diff > 0) {\n $diff -= $this->general[\"max_entries\"];\n $lk++;\n }\n\n if ($lk != 1) {\n\n $prev = $start - $this->general[\"max_entries\"];\n $next = $start + $this->general[\"max_entries\"];\n\n if ($prev > 0) {\n $result .= \"&nbsp;<a href=\\\"$url&start=$prev\\\">&lt;\" . $this->general[\"prev\"] . \"</a>&nbsp;\\n\";\n }\n if ($prev == 0) {\n $result .= \"&nbsp;<a href=\\\"$url\\\">&lt;\" . $this->general[\"prev\"] . \"</a>&nbsp;\\n\";\n }\n\n\n $page = 1;\n\n $pos = ceil($start/$this->general[\"max_entries\"]);\n if ($pos == 0) $pos = 1;\n\n if ($lk > 16) {\n\n $st = $pos-8; $en = $pos+8;\n if ($st < 0) { $st = 0; $en = 16; }\n if ($en > $lk) { $st = $lk-16; $en = $lk; }\n\n if ($st > 0) {\n $result .= \"...&nbsp;\";\n }\n\n $page = $st+1;\n for ($i = $st; $i < $en; $i++) {\n $add = $i * $this->general[\"max_entries\"];\n if ($add < $total) {\n if ($add == $start) { $result .= \"<b>$page</b> \\n\"; }\n else if ($add == 0) { $result .= \"<a href=\\\"$url\\\">$page</a> \\n\"; }\n else { $result .= \"<a href=\\\"$url&start=$add\\\">$page</a> \\n\"; }\n }\n $page++;\n }\n\n if ($en < $lk) {\n $result .= \"&nbsp;...\";\n }\n\n }\n else {\n for ($i = 0; $i < $lk ; $i++) {\n $add = $i * $this->general[\"max_entries\"];\n if ($add == $start) { $result .= \"<b>$page</b> \\n\"; }\n else if ($add == 0) { $result .= \"<a href=\\\"$url\\\">$page</a> \\n\"; }\n else { $result .= \"<a href=\\\"$url&start=$add\\\">$page</a> \\n\"; }\n $page++;\n }\n }\n\n if ($next < $total) { $result .= \"&nbsp;<a href=\\\"$url&start=$next\\\">\" . $this->general[\"next\"] . \"&gt;</a>\\n\"; }\n\n }\n\n return $result;\n }", "function link_pages($before = '<br />', $after = '<br />', $next_or_number = 'number', $nextpagelink = 'next page', $previouspagelink = 'previous page', $pagelink = '%', $more_file = '')\n{\n}", "function show_pages($total,$page,$status)\r\n\t{\r\n\t\tif ($total != NULL)\r\n\t\t{ \r\n\t\t\techo '<div style=\"padding-top:10px;\"></div><center><div class=\"pagination\">';\r\n\t\t\t\tfor ($i=1;$i<=$total;$i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif ($i == $page) echo '<a href=\"3_products.php?status='.$status.'&page='.$i.'\" class=\"number current\">'.$i.'</a>';\r\n\t\t\t\t\telse\t\t\t echo '<a href=\"3_products.php?status='.$status.'&page='.$i.'\" class=\"number\">'.$i.'</a>';\r\n\t\t\t\t\techo \"\\n\";\r\n\t\t\t\t}\r\n\t\t\techo '</div><div style=\"padding-top:10px;\"></div></center>';\r\n\t\t}\r\n\t}", "public function page_links($path = '?', $ext = null) {\r\r\n $adjacents = \"2\";\r\r\n $prev = $this->_page - 1;\r\r\n $next = $this->_page + 1;\r\r\n $lastpage = ceil($this->_totalRows / $this->_perPage);\r\r\n $lpm1 = $lastpage - 1;\r\r\n $pagination = \"\";\r\r\n if ($lastpage > 1) {\r\r\n $pagination .= \"<ul class='pagination'>\";\r\r\n if ($this->_page > 1)\r\r\n $pagination.= \"<li><a href='\" . $path . \"$this->_instance=$prev\" . \"$ext'>Previous</a></li>\";\r\r\n else\r\r\n $pagination.= \"<span class='disabled'>Previous</span>\";\r\r\n if ($lastpage < 7 + ($adjacents * 2)) {\r\r\n for ($counter = 1; $counter <= $lastpage; $counter++) {\r\r\n if ($counter == $this->_page)\r\r\n $pagination.= \"<li><span class='current'>$counter</span></li>\";\r\r\n else\r\r\n $pagination.= \"<li><a href='\" . $path . \"$this->_instance=$counter\" . \"$ext&query=\" . $_GET['query'] . \"'>$counter</a></li>\";\r\r\n }\r\r\n }\r\r\n elseif ($lastpage > 5 + ($adjacents * 2)) {\r\r\n if ($this->_page < 1 + ($adjacents * 2)) {\r\r\n for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++) {\r\r\n if ($counter == $this->_page)\r\r\n $pagination.= \"<li><span class='current'>$counter</span></li>\";\r\r\n else\r\r\n $pagination.= \"<li><a href='\" . $path . \"$this->_instance=$counter\" . \"$ext&query=\" . $_GET['query'] . \"'>$counter</a></li>\";\r\r\n }\r\r\n $pagination.= \"...\";\r\r\n $pagination.= \"<li><a href='\" . $path . \"$this->_instance=$lpm1\" . \"$ext&query=\" . $_GET['query'] . \"'>$lpm1</a></li>\";\r\r\n $pagination.= \"<li><a href='\" . $path . \"$this->_instance=$lastpage\" . \"$ext&query=\" . $_GET['query'] . \"'>$lastpage</a></li>\";\r\r\n }\r\r\n elseif ($lastpage - ($adjacents * 2) > $this->_page && $this->_page > ($adjacents * 2)) {\r\r\n $pagination.= \"<li><a href='\" . $path . \"$this->_instance=1\" . \"$ext&query=\" . $_GET['query'] . \"'>1</a></li>\";\r\r\n $pagination.= \"<li><a href='\" . $path . \"$this->_instance=2\" . \"$ext&query=\" . $_GET['query'] . \"'>2</a></li>\";\r\r\n $pagination.= \"...\";\r\r\n for ($counter = $this->_page - $adjacents; $counter <= $this->_page + $adjacents; $counter++) {\r\r\n if ($counter == $this->_page)\r\r\n $pagination.= \"<span class='current'>$counter</span>\";\r\r\n else\r\r\n $pagination.= \"<li><a href='\" . $path . \"$this->_instance=$counter\" . \"$ext&query=\" . $_GET['query'] . \"'>$counter</a></li>\";\r\r\n }\r\r\n $pagination.= \"..\";\r\r\n $pagination.= \"<li><a href='\" . $path . \"$this->_instance=$lpm1\" . \"$ext&query=\" . $_GET['query'] . \"'>$lpm1</a></li>\";\r\r\n $pagination.= \"<li><a href='\" . $path . \"$this->_instance=$lastpage\" . \"$ext&query=\" . $_GET['query'] . \"'>$lastpage</a></li>\";\r\r\n }\r\r\n else {\r\r\n $pagination.= \"<li><a href='\" . $path . \"$this->_instance=1\" . \"$ext&query=\" . $_GET['query'] . \"'>1</a></li>\";\r\r\n $pagination.= \"<li><a href='\" . $path . \"$this->_instance=2\" . \"$ext&query=\" . $_GET['query'] . \"'>2</a></li>\";\r\r\n $pagination.= \"..\";\r\r\n for ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++) {\r\r\n if ($counter == $this->_page)\r\r\n $pagination.= \"<span class='current'>$counter</span>\";\r\r\n else\r\r\n $pagination.= \"<li><a href='\" . $path . \"$this->_instance=$counter\" . \"$ext&query=\" . $_GET['query'] . \"'>$counter</a></li>\";\r\r\n }\r\r\n }\r\r\n }\r\r\n if ($this->_page < $counter - 1)\r\r\n $pagination.= \"<li><a href='\" . $path . \"$this->_instance=$next\" . \"$ext&query=\" . $_GET['query'] . \"'>Next</a></li>\";\r\r\n else\r\r\n $pagination.= \"<li><span class='disabled'>Next</span></li>\";\r\r\n $pagination.= \"</ul>\\n\";\r\r\n }\r\r\n return $pagination;\r\r\n }", "function future_loop_nav_next_prev() {\n?>\n<ul class=\"pager pagination-wrapper pagination-wrapper-np\">\n <li class=\"previous\">\n <?php echo get_previous_posts_link( __( '&larr; Newer', 'future' ) ); ?>\n </li>\n <li class=\"next\">\n <?php echo get_next_posts_link( __( 'Older &rarr;', 'future' ) ); ?>\n </li>\n</ul>\n<?php\n}", "function ShowPageNav($page, $count, $total, $length, $tempname, $stamplink) {\n\tglobal $template;\n\tglobal $lang;\n\tif ($total>$count) {\n\t\t$template->assign_block_vars($tempname, array(\n\t\t\t'text_gopage' => $lang[\"gopage\"]\n\t\t));\n\t\t$numpage = ceil($total/$count);\n\t\tfor ($i=0;$i<$numpage;$i++) {\n\t\t\t$selected=\"\";\n\t\t\tif ($page==$i) $selected=\" selected\";\n\t\t\t$template->assign_block_vars($tempname.\".optionpage\", array(\n\t\t\t\t'value' => str_replace(\"{page}\",$i,$stamplink),\n\t\t\t\t'text' => ($i+1),\n\t\t\t\t'selected' => $selected\n\t\t\t));\n\t\t}\n\t\t// Page\n\t\tif ($page > 0) {\n\t\t\t$template->assign_block_vars($tempname.'.page', array(\n\t\t\t\t'link' => str_replace(\"{page}\",($page-1),$stamplink),\n\t\t\t\t'text' => $lang[\"prevpage\"]\n\t\t\t));\n\t\t}\n\t\tif ($page-2 > 0) {\n\t\t\t$template->assign_block_vars($tempname.'.page', array(\n\t\t\t\t'link' => str_replace(\"{page}\",0,$stamplink),\n\t\t\t\t'text' => \"1 ...\"\n\t\t\t));\n\t\t\t$template->assign_block_vars($tempname.'.page.line', array(\n\t\t\t));\n\t\t}\n\t\tfor ($i=$page-$length;$i<=$page+$length;$i++) {\n\t\t\tif ($i>=0 && $i<$numpage) {\n\t\t\t\tif ($i == $page) {\n\t\t\t\t\t$template->assign_block_vars($tempname.'.page', array(\n\t\t\t\t\t\t'link' => str_replace(\"{page}\",$i,$stamplink),\n\t\t\t\t\t\t'text' => '<b class=\"pagered\">'.($i+1).'</b>'\n\t\t\t\t\t));\n\t\t\t\t\tif ($page > 0 || $i > 0 )\n\t\t\t\t\t\t$template->assign_block_vars($tempname.'.page.line', array(\n\t\t\t\t\t\t));\n\t\t\t\t} else {\n\t\t\t\t\t$template->assign_block_vars($tempname.'.page', array(\n\t\t\t\t\t\t'link' => str_replace(\"{page}\",$i,$stamplink),\n\t\t\t\t\t\t'text' => ($i+1)\n\t\t\t\t\t));\n\t\t\t\t\tif ($page > 0 || $i > 0) \n\t\t\t\t\t\t$template->assign_block_vars($tempname.'.page.line', array(\n\t\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ($page+2 < $numpage-1) {\n\t\t\t$template->assign_block_vars($tempname.'.page', array(\n\t\t\t\t'link' => str_replace(\"{page}\",($numpage-1),$stamplink),\n\t\t\t\t'text' => \"... \".$numpage\n\t\t\t));\n\t\t\t$template->assign_block_vars($tempname.'.page.line', array(\n\t\t\t));\n\t\t}\n\t\tif ($page < $numpage-1) {\n\t\t\t$template->assign_block_vars($tempname.'.page', array(\n\t\t\t\t'link' => str_replace(\"{page}\",($page+1),$stamplink),\n\t\t\t\t'text' => $lang[\"nextpage\"]\n\t\t\t));\n\t\t\t$template->assign_block_vars($tempname.'.page.line', array(\n\t\t\t));\n\t\t}\n\t}\n}", "function FG_post_pagination($args = array()) {\n $prev_link = (get_previous_post_link()) ? get_previous_post_link('%link', $args['prev_text']) : '<a class=\"prev home-link\" href=\"'.get_permalink(get_option('page_for_posts')).'\">BACK TO STORIES AND PROGRESS</a>';\n $next_link = (get_next_post_link()) ? get_next_post_link('%link', $args['next_text']) : '<a class=\"next home-link\" href=\"'.get_permalink(get_option('page_for_posts')).'\">BACK TO STORIES AND PROGRESS</a>';\n\n // Only add markup if there's somewhere to navigate to.\n if ( $prev_link || $next_link ) {\n echo _navigation_markup($prev_link . $next_link, ' ', ' ');\n }\n}", "public function show_pagination(){\n\t\t$url_pagination\t= htmlspecialchars(courante_page($this->name_get_page));\n\t\t$c=0;\n\t\tif (strpos($url_pagination,\"?\")==0) $url_pagination.=\"?1=1\";\n\n\t\tif (count($this->nombre_page_array) > 1){\n\t\t\techo '<div class=\"pagination\">';\n\t\t\tif (!$this->page_courant) {\n\n\t\t\t\tforeach($this->nombre_page_array as $key => $value){\n\t\t\t\t\t$c++;\n\t\t\t\t\tif ($c<=$this->maxpagevisibles) {\n\t\t\t\t\t\tif($key != $this->page_courant){\n\t\t\t\t\t\t\techo '<a href=\"'.$url_pagination.$this->url_pagination($key, $this->name_get_page).'\" title=\"'.$this->affiche_title($key+1).'\">'.$value.'</a>';\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\techo '<span>'.$value.'</span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\techo '<a href=\"'.$url_pagination.$this->url_pagination($this->page_courant+1, $this->name_get_page).'\" title=\"'.$this->affiche_title($this->page_courant+2).'\">'.$this->suivant.'</a>';\n\t\t\t\tif(!empty($this->fin))echo '<a href=\"'.$url_pagination.$this->url_pagination($this->nombre_page, $this->name_get_page).'\" title=\"'.$this->affiche_title($this->nombre_page+1).'\">'.$this->fin.' ('.($this->nombre_page+1).') </a>';\n\n\t\t\t} elseif ($this->page_courant == count($this->nombre_page_array)-1) {\n\t\t\t\t// cas on est � la fin\n\t\t\t\tif(!empty($this->debut)) echo '<a href=\"'.$url_pagination.$this->url_pagination(0, $this->name_get_page).'\" title=\"'.$this->affiche_title(1).'\">'.$this->debut.' </a>';\n\t\t\t\techo '<a href=\"'.$url_pagination.$this->url_pagination($this->page_courant-1, $this->name_get_page).'\" title=\"'.$this->affiche_title($this->page_courant-1+1).'\">'.$this->precedent.' </a>';\n\t\t\t\t$valmin=$this->page_courant-$this->maxpagevisibles;\n\n\t\t\t\tforeach($this->nombre_page_array as $key => $value){\n\t\t\t\t\tif ($c>=$valmin) {\n\t\t\t\t\t\tif ($key != $this->page_courant){\n\t\t\t\t\t\t\techo '<a href=\"'.$url_pagination.$this->url_pagination($key, $this->name_get_page).'\" title=\"'.$this->affiche_title($key+1).'\">'.$value.'</a>';\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\techo '<span>'.$value.'</span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$c++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(!empty($this->debut)) echo '<a href=\"'.$url_pagination.$this->url_pagination(0, $this->name_get_page).'\" title=\"'.$this->affiche_title(1).'\">'.$this->debut.' </a>';\n\t\t\t\techo '<a href=\"'.$url_pagination.$this->url_pagination($this->page_courant-1, $this->name_get_page).'\" title=\"'.$this->affiche_title($this->page_courant).'\">'.$this->precedent.'</a>';\n\t\t\t\tif ($this->nombre_page_array>$this->maxpagevisibles) {\n\t\t\t\t\t$valmin=$this->page_courant-($this->maxpagevisibles/2);\n\t\t\t\t\t$valmax=$this->page_courant+($this->maxpagevisibles/2);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$valmin=$this->page_courant;\n\t\t\t\t\t$valmax=$this->nombre_page_array;\n\t\t\t\t}\n\n\t\t\t\tforeach($this->nombre_page_array as $key => $value){\n\t\t\t\t\tif ($c>=$valmin && $c<=$valmax) {\n\t\t\t\t\t\tif($key != $this->page_courant){\n\t\t\t\t\t\t\techo '<a href=\"'.$url_pagination.$this->url_pagination($key, $this->name_get_page).'\" title=\"'.$this->affiche_title($key+1).'\">'.$value.'</a>';\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\techo '<span>'.$value.'</span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$c++;\n\t\t\t\t}\n\t\t\t\techo '<a href=\"'.$url_pagination.$this->url_pagination($this->page_courant+1, $this->name_get_page).'\" title=\"'.$this->affiche_title($this->page_courant+2).'\">'.$this->suivant.'</a>';\n\t\t\t\tif(!empty($this->fin))echo '<a href=\"'.$url_pagination.$this->url_pagination($this->nombre_page, $this->name_get_page).'\" title=\"'.$this->affiche_title($this->nombre_page+1).'\">'.$this->fin.' ('.($this->nombre_page+1).') </a>';\n\t\t\t}\n\t\t\techo '</div>';\n\t\t}\n\t}", "public function slcr_post_pagination_bar()\n {\n wp_link_pages( array(\n 'before' => '<div class=\"col-md-12 col-sm-12 col-xs-12 blog_pagination_type_1\"><div class=\"pagination__blog\"><nav class=\"pagination__nav\"> <div class=\"pagination__links\">',\n 'after' => '</div></nav></div></div>',\n 'link_before' => '',\n 'link_after' => '',\n ) );\n }", "function bpxl_wp_link_pages( $args = '' ) {\n\t$defaults = array(\n\t\t'before' => '<div class=\"pagination\" id=\"post-pagination\">' . __( '<p class=\"page-links-title\">Pages:</p>' ), \n\t\t'after' => '</div>',\n\t\t'text_before' => '',\n\t\t'text_after' => '',\n\t\t'next_or_number' => 'number', \n\t\t'nextpagelink' => __( 'Next page','bloompixel' ),\n\t\t'previouspagelink' => __( 'Previous page','bloompixel' ),\n\t\t'pagelink' => '%',\n\t\t'echo' => 1\n\t);\n\n\t$r = wp_parse_args( $args, $defaults );\n\t$r = apply_filters( 'wp_link_pages_args', $r );\n\textract( $r, EXTR_SKIP );\n\n\tglobal $page, $numpages, $multipage, $more, $pagenow;\n\n\t$output = '';\n\tif ( $multipage ) {\n\t\tif ( 'number' == $next_or_number ) {\n\t\t\t$output .= $before;\n\t\t\tfor ( $i = 1; $i < ( $numpages + 1 ); $i = $i + 1 ) {\n\t\t\t\t$j = str_replace( '%', $i, $pagelink );\n\t\t\t\t$output .= ' ';\n\t\t\t\tif ( $i != $page || ( ( ! $more ) && ( $page == 1 ) ) )\n\t\t\t\t\t$output .= _wp_link_page( $i );\n\t\t\t\telse\n\t\t\t\t\t$output .= '<span class=\"current current-post-page\">';\n\n\t\t\t\t$output .= $text_before . $j . $text_after;\n\t\t\t\tif ( $i != $page || ( ( ! $more ) && ( $page == 1 ) ) )\n\t\t\t\t\t$output .= '</a>';\n\t\t\t\telse\n\t\t\t\t\t$output .= '</span>';\n\t\t\t}\n\t\t\t$output .= $after;\n\t\t} else {\n\t\t\tif ( $more ) {\n\t\t\t\t$output .= $before;\n\t\t\t\t$i = $page - 1;\n\t\t\t\tif ( $i && $more ) {\n\t\t\t\t\t$output .= _wp_link_page( $i );\n\t\t\t\t\t$output .= $text_before . $previouspagelink . $text_after . '</a>';\n\t\t\t\t}\n\t\t\t\t$i = $page + 1;\n\t\t\t\tif ( $i <= $numpages && $more ) {\n\t\t\t\t\t$output .= _wp_link_page( $i );\n\t\t\t\t\t$output .= $text_before . $nextpagelink . $text_after . '</a>';\n\t\t\t\t}\n\t\t\t\t$output .= $after;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( $echo )\n\t\techo $output;\n\n\treturn $output;\n}", "function printPagination(int $currentPage, int $pages):void\n{\n for ($i = 1; $i <= $pages; $i++) :\n if ($i === $currentPage) : ?>\n <li class=\"page-item active\"><a class=\"page-link\" href=\"<?=getPaginationHref((string)$i)?>\"><?=$i?></a></li>\n <?php elseif (($i >= $currentPage - 5) && ($i <= $currentPage + 5)) : ?>\n <li class=\"page-item\"><a class=\"page-link\" href=\"<?=getPaginationHref((string)$i)?>\"><?=$i?></a></li>\n <?php endif;\n endfor;\n}", "function paging_navigation ($numrows, $rowsPerPage)\n{\n\n\tdefine('L_LINK_PREV','Prev');\n\tdefine('L_LINK_PREV_LAST','First');\n\tdefine('L_LINK_NEXT','Next');\n\tdefine('L_LINK_NEXT_LAST','Last');\n\n\t//if cant fit one page... just exit\n\tif ($numrows == 0 || ($numrows / $rowsPerPage) <= 1)\n\t{\n\t\techo '<table>\n\t\t\t <tr><td colspan=\\\"3\\\"><span class=\\\"description\\\">Page 1 of 1</span></td></tr>\n\t\t\t </table>';\n\t\treturn false;\n\t}\n\n\n\t//get current page number\n\t$pageNum = 1;\n\n\tif ($_GET['page']!= \"\")\n\t{\n\t\t$pageNum = $_GET['page'];\n\t}\n\n\t$self = 'index.php?';\n\n\t// print the link to access each page\n\tforeach ($_GET as $key=>$values)\n\t{\n\t\tif ($key != \"page\")\n\t\t{\n\t\t\t$self .= \"&\" . $key . \"=\" . $values;\n\t\t}\n\t}\n\n\t$nav = '';\n\t$x=0;\n\n\t// how many pages we have when using paging?\n\t$maxPage = ceil($numrows/$rowsPerPage);\n for($page = max(1, $pageNum - 10); $page <= min($pageNum + 10, $maxPage); $page++){\n \n\t\tif ($page == $pageNum)\n\t\t{\n\t\t\tif($maxPage != 1) {$nav .= \"<span style=\\\"padding:0px 6px; line-height:100%; font-family:verdana; font-size:12px; text-decoration:underline;\\\">\". $page .\"</span>\";} // no need to create a link to current page\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$nav .= \"<a style=\\\"padding:0px 6px; line-height:100%; font-family:verdana; font-size:12px;\\\" href=\\\"\".$self.\"&page=\".$page.\"\\\">$page</a>\"; // <option value=\\\"$self\".\"&page=$page\\\">$page</option>\n\t\t}\n\t}\n\n\t// creating previous and next link\n\t// plus the link to go straight to\n\t// the first and last page\n\n\tif ($pageNum > 1)\n\t{\n\t\t$page = $pageNum - 1;\n\t\t$prev = \" <a href=\\\"$self\".\"&page=$page\\\">\".L_LINK_PREV.\"</a> \";\n\n\n\t\t$first = \" <a href=\\\"$self\".\"&page=1\\\">[\".L_LINK_PREV_LAST.\"]</a> \";\n\t}\n\telse\n\t{\n\t\t$prev = ''.L_LINK_PREV.'&nbsp;'; // we're on page one, don't print previous link\n\t\t$first = '['.L_LINK_PREV_LAST.']&nbsp'; // nor the first page link\n\t}\n\n\tif ($pageNum < $maxPage)\n\t{\n\t\t$page = $pageNum + 1;\n\t\t$next = \" <a href=\\\"$self\".\"&page=$page\\\">\".L_LINK_NEXT.\"</a> \";\n\n\t\t$last = \" <a href=\\\"$self\".\"&page=$maxPage\\\">[\".L_LINK_NEXT_LAST.\"]</a> \";\n\t}\n\telse\n\t{\n\t\t$next = ''.L_LINK_NEXT.'&nbsp;'; // we're on the last page, don't print next link\n\t\t$last = '['.L_LINK_NEXT_LAST.']'; // nor the last page link\n\t}\n\n\n\t// print the navigation link\n\techo \"<table class=\\\"paging\\\">\n\t\t\t<tr>\n\n\t\t\t <td>\". $first . \"</td>\n\t\t\t <td style=\\\"line-height:10px;\\\"><div style=\\\"text-align:center;\\\">\".$nav.\"</div></td>\n\t\t\t <td>\" . $last . \"</td>\n\n\t\t\t</tr>\n\n\t\t\t <!--<tr><td colspan=\\\"3\\\"><span class=\\\"description\\\">Page $pageNum of $maxPage</span></td></tr>-->\n\n\t\t </table>\";\n}", "function list_results($results, $page){\r\n\techo \"<ol start=\\\"\".(($page*10)+1).\"\\\">\";\r\n\tfor($i = $page*10; $i < min(($page+1)*10, count($results)); $i++){\r\n\t\tif (trim($results[$i] != ''))\r\n\t\t\techo \"<li><span><a href=\\\"\".$results[$i].\"\\\">\".$results[$i].\"</a></span></li><br>\";\r\n\t}\r\n\techo \"</ol>\";\r\n\r\n\t#logic to determine if there should be a previous page button\r\n\tif ($page > 0) {\r\n\t\techo \"<button name=\\\"page\\\" value=\\\"\".($page).\"\\\"> Previous </button>\";\r\n\t}\r\n\r\n\t#logic if there should be a next page button\r\n\tif ( ($page+1)*10+1 < count($results)) {\r\n\t\techo \"<button name=\\\"page\\\" value=\\\"\".($page+2).\"\\\"> Next </button>\";\r\n\t}\r\n}", "function malinky_page_pagination()\n\t{\n\t\tglobal $post;\n\n\t\t$getPages = get_pages('child_of='.$post->post_parent);\n\t\t\n\t\t$pageCount = count($getPages);\n\t\t\n\t\tfor($p=0; $p < $pageCount; $p++) {\n\t\t \t// get the array key for our entry\n\t\t\tif ($post->ID == $getPages[$p]->ID) break;\n\t\t}\n\t\t\n\t\t// assign our prev key\n\t\t$prevKey = $p-1;\n\t\t$lastKey = $pageCount-1;\n\n\t\t// if there isn't a value assigned for the previous key, go all the way to the end\n\t\tif (isset($getPages[$prevKey])) {\n\t\t\t$anchorName = $getPages[$prevKey]->post_title;\n\t\t\t$prevOutput = '<a href=\"'.get_permalink($getPages[$prevKey]->ID).'\" title=\"'.esc_attr( $anchorName ).'\" class=\"button\">';\n\t\t} else {\n\t\t\t$anchorName = $getPages[$lastKey]->post_title;\t\t\n\t\t\t$prevOutput = '<a href=\"'.get_permalink($getPages[$lastKey]->ID).'\" title=\"'.esc_attr( $anchorName ).'\" class=\"button\">';\n\t\t} \n\t\t\n\t\t// determine if we have a link and assign some anchor text\n\t\tif (!empty($prevOutput)) {\n\t\t\t$prevOutput .= $anchorName;\n\t\t\t$prevOutput .= '</a>';\n\t\t}\t\n\n\t\t// assign our next key\n\t\t$nextKey = $p+1;\n\t\t\n\t\t// if there isn't a value assigned for the previous key, go all the way to the end\n\t\tif (isset($getPages[$nextKey])) {\n\t\t\t$anchorName = $getPages[$nextKey]->post_title;\n\t\t\t$nextOutput = '<a href=\"'.get_permalink($getPages[$nextKey]->ID).'\" title=\"'.$anchorName.'\" class=\"button\">';\n\t\t} else {\n\t\t\t$anchorName = $getPages[0]->post_title;\t\t\n\t\t\t$nextOutput = '<a href=\"'.get_permalink($getPages[0]->ID).'\" title=\"'.esc_attr( $anchorName ).'\" class=\"button\">';\n\t\t}\n\t\t\n\t\t// determine if we have a link and assign some anchor text\n\t\tif (!empty($nextOutput)) {\n\t\t\t$nextOutput .= $anchorName;\n\t\t\t$nextOutput .= '</a>';\n\t\t} ?>\n\n\t\t<nav class=\"col col--gutterless page-pagination\" role=\"navigation\">\n\n\t\t\t<div class=\"col-item col-item-full col-item-half--medium col-item-half--large col-item-half--xlarge page-pagination__link page-pagination__link--older\">\n\t\t\t\t<?php echo $prevOutput; ?>\n\t\t\t</div><!--\n\n\t\t\t--><div class=\"col-item col-item-full col-item-half--medium col-item-half--large col-item-half--xlarge col-item--align-right page-pagination__link page-pagination__link--newer\">\n\t\t\t\t<?php echo $nextOutput; ?>\n\t\t\t</div>\n\n\t\t</nav><!-- .page-pagination -->\t\n\t<?php }", "function ti_wp_link_pages( $args ){\n\n global $page, $numpages, $more;\n\n if ( !$args['next_or_number'] == 'next_and_number' ){\n return $args;\n }\n\t\n\t// Keep numbers for the main part\n $args['next_or_number'] = 'number'; \n if (!$more){\n return $args;\n }\n\t\n\t// If previous page exists\n if( $page-1 ){\n $args['before'] .= _wp_link_page($page-1) . $args['link_before']. $args['previouspagelink'] . $args['link_after'] . '</a>';\n }\n\n\t// If next page exists\n if ( $page<$numpages ){\n $args['after'] = _wp_link_page($page+1) . $args['link_before'] . $args['nextpagelink'] . $args['link_after'] . '</a>' . $args['after'];\n }\n\n return $args;\n}", "public function displayPageSelect($images) {\n if (isset($_GET['p']))\n $page = $_GET['p'];\n else\n $page = 0;\n\n $output = '<div style=\"clear:both; width: 100%; text-align: center; padding: 5px 0px;\">';\n if($page > 0)\n $output.= '<a href=\"?p=' . ($page-1) .'\" style=\"float:left; font-size:18px;\"><--Previous</a>';\n\n if(count($images) == self::IMG_PER_PAGE)\n $output .= '<a href=\"?p=' . ($page+1) . '\" style=\"float:right; font-size:18px;\">Next--></a>';\n $output .= '</div>';\n\n return $output;\n }", "public function printLinks($textCSS ='fontText', $linkCSS='pagingLinks') {\n global $REQUEST_DATA;\n // creation of page no\n self::$page = (!UtilityManager::IsNumeric($REQUEST_DATA['page']) || UtilityManager::isEmpty($REQUEST_DATA['page']) ) ? 1 : $REQUEST_DATA['page'];\n \n // creation of query string\n if(is_array($REQUEST_DATA)) {\n foreach($REQUEST_DATA as $key => $value) {\n if(strtolower($key)!='page') {\n self::$queryString .= \"&$key=$value\";\n }\n }\n }\n // echo '=='.self::$totalRecords.'='.self::$recordsPerPage ;\n $totalPages = ceil(self::$totalRecords/self::$recordsPerPage);\n // in case if someone try to enter page no than total pages\n if(self::$page>$totalPages)\n self::$page = $totalPages;\n //show paging links when total records are more than records per page\n if(self::$totalRecords > self::$recordsPerPage ) {\n\n $printLink = \"<span class=\\\"$textCSS\\\"><b>Pages:</b> $totalPages&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \";\n\n if(self::$page>1) {\n $printLink .= \" <a href=\\\"\".$_SERVER['PHP_SELF'].\"?page=1\".self::$queryString.\"\\\" class=\\\"$linkCSS\\\"><img src=\\\"\".IMG_HTTP_PATH.\"/first.gif\\\" border=\\\"0\\\" title=\\\"First\\\" align=\\\"absmiddle\\\" /></a>&nbsp;&nbsp;\";\n\n $printLink .= \" <a href=\\\"\".$_SERVER['PHP_SELF'].\"?page=\".(self::$page-1).self::$queryString.\"\\\" class=\\\"$linkCSS\\\"><img src=\\\"\".IMG_HTTP_PATH.\"/back.gif\\\" border=\\\"0\\\" title=\\\"Previous\\\" align=\\\"absmiddle\\\" /></a>&nbsp;&nbsp;\";\n }\n\n\n $half = floor(self::$linksPerPage/2);\n if(self::$page>$half) {\n $start = self::$page - $half;\n $limit = self::$page + $half;\n if($limit > $totalPages)\n $limit = $totalPages;\n }\n else {\n $start = 1;\n $limit = self::$linksPerPage;\n if($limit>$totalPages)\n $limit = $totalPages;\n }\n\n for($link=$start;$link<=$limit;$link++) {\n if($link==self::$page) {\n \n\t\t\t\t\t\t\t$printLink .= \" <b>$link</b>\";\n }\n else {\n $printLink .= \" <a href=\\\"\".$_SERVER['PHP_SELF'].\"?page=\".($link).self::$queryString.\"\\\" class=\\\"$linkCSS\\\"><u>$link</u></a>\";\n }\n\n }\n\n\n if(self::$totalRecords>((self::$page)*self::$recordsPerPage)) {\n $printLink .= \"&nbsp;&nbsp;<a href=\\\"\".$_SERVER['PHP_SELF'].\"?page=\".(self::$page+1).self::$queryString.\"\\\" class=\\\"$linkCSS\\\"><img src=\\\"\".IMG_HTTP_PATH.\"/next.gif\\\" border=\\\"0\\\" title=\\\"Next\\\" align=\\\"absmiddle\\\" /></a>&nbsp;\";\n $printLink .= \"<a href=\\\"\".$_SERVER['PHP_SELF'].\"?page=$totalPages\".self::$queryString.\"\\\" class=\\\"$linkCSS\\\"><img src=\\\"\".IMG_HTTP_PATH.\"/last.gif\\\" border=\\\"0\\\" title=\\\"Last\\\" align=\\\"absmiddle\\\" /></a></span>\";\n }\n }\n return $printLink;\n\n }", "function pages ($page, $total, $url, $head_links = false) {\n\tif ($total == 1) {\n\t\treturn false;\n\t}\n\t$Page = Page::instance();\n\t$original_url = $url;\n\t$base_url = Config::instance()->base_url();\n\t$url = function ($page) use ($original_url, $base_url) {\n\t\t$href = is_callable($original_url) ? $original_url($page) : sprintf($original_url, $page);\n\t\tif (is_string($href) && strpos($href, 'http') !== 0) {\n\t\t\t$href = ltrim($href, '/');\n\t\t\t$href = \"$base_url/$href\";\n\t\t}\n\t\treturn $href;\n\t};\n\t$output = [];\n\t$render_page_item = function ($i) use ($Page, $page, $url, $head_links, &$output) {\n\t\t$href = $url($i);\n\t\tif ($head_links) {\n\t\t\tswitch ($i) {\n\t\t\t\tcase $page - 1:\n\t\t\t\t\t$Page->link(['href' => $href, 'rel' => 'prev']);\n\t\t\t\t\tbreak;\n\t\t\t\tcase $page + 1:\n\t\t\t\t\t$Page->link(['href' => $href, 'rel' => 'next']);\n\t\t\t\t\tbreak;\n\t\t\t\tcase $page:\n\t\t\t\t\t$Page->canonical_url($href);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t$output[] = [\n\t\t\t$i,\n\t\t\t[\n\t\t\t\t'href' => $i == $page ? false : $href,\n\t\t\t\t'is' => 'cs-link-button',\n\t\t\t\t'primary' => $i == $page\n\t\t\t]\n\t\t];\n\t};\n\tif ($total <= 11) {\n\t\tarray_map($render_page_item, range(1, $total));\n\t} else {\n\t\tif ($page <= 6) {\n\t\t\tarray_map($render_page_item, range(1, 7));\n\t\t\t$output[] = [\n\t\t\t\t'...',\n\t\t\t\t[\n\t\t\t\t\t'disabled' => true\n\t\t\t\t]\n\t\t\t];\n\t\t\tarray_map($render_page_item, range($total - 2, $total));\n\t\t} elseif ($page >= $total - 5) {\n\t\t\tarray_map($render_page_item, range(1, 3));\n\t\t\t$output[] = [\n\t\t\t\t'...',\n\t\t\t\t[\n\t\t\t\t\t'disabled' => true\n\t\t\t\t]\n\t\t\t];\n\t\t\tarray_map($render_page_item, range($total - 6, $total));\n\t\t} else {\n\t\t\tarray_map($render_page_item, range(1, 2));\n\t\t\t$output[] = [\n\t\t\t\t'...',\n\t\t\t\t[\n\t\t\t\t\t'disabled' => true\n\t\t\t\t]\n\t\t\t];\n\t\t\tarray_map($render_page_item, range($page - 2, $page + 2));\n\t\t\t$output[] = [\n\t\t\t\t'...',\n\t\t\t\t[\n\t\t\t\t\t'disabled' => true\n\t\t\t\t]\n\t\t\t];\n\t\t\tarray_map($render_page_item, range($total - 1, $total));\n\t\t}\n\t}\n\treturn h::{'a[is=cs-link-button]'}($output);\n}", "public function _buildPagingLinks($range = 3, $currentpage, $totalpages, $divLinkClass = array(), $link = WEB_ROOT) {\n $linkClass = array('div' => '', 'link' => '', 'param'=>'');\n $divLinkClass = array_merge($linkClass,$divLinkClass);\n $div = \"<div class='\" . @$divLinkClass['div'] . \"'>\";\n // if not on page 1, don't show back links\n if ($currentpage > 1) {\n // show << link to go back to page 1\n $div .= \" <a href='{$link}?currentpage=1&{$divLinkClass['param']}' class='\" . @$divLinkClass['link'] . \"' currentpage=1><< First</a> \";\n // get previous page num\n $prevpage = $currentpage - 1;\n // show < link to go back to 1 page\n $div .= \" <a href='{$link}?currentpage=$prevpage&{$divLinkClass['param']}' class='\" . @$divLinkClass['link'] . \"' currentpage=$prevpage><</a> \";\n } // end if \n // loop to show links to range of pages around current page\n for ($x = ($currentpage - $range); $x < (($currentpage + $range) + 1); $x++) {\n // if it's a valid page number...\n if (($x > 0) && ($x <= $totalpages)) {\n // if we're on current page...\n if ($x == $currentpage) {\n $div .= \" [<b>$x of $totalpages</b>] \"; // 'highlight' it but don't make a link\n } else {\n $div .= \" <a href='{$link}?currentpage=$x&{$divLinkClass['param']}' class='\" . @$divLinkClass['link'] . \"' currentpage=$x>$x</a> \"; // make it a link\n } // end else\n } // end if \n } // end for\n // if not on last page, show forward and last page links \n if ($currentpage != $totalpages) {\n $nextpage = $currentpage + 1;\n // echo forward link for next page \n $div .= \" <a href='{$link}?currentpage=$nextpage&{$divLinkClass['param']}' class='\" . @$divLinkClass['link'] . \"' currentpage=$nextpage>></a> \";\n // echo forward link for lastpage\n $div .= \" <a href='{$link}?currentpage=$totalpages&{$divLinkClass['param']}' class='\" . @$divLinkClass['link'] . \"' currentpage=$totalpages>Last >></a> \";\n } // end if\n $div .= \"</div>\";\n return $div;\n }", "public function show() \n {\n $this->checkDataBeforeShow();\n \n $this->calcTotPages();\n \n $this->calcStartPage();\n \n $landingPage = $this->landingPage;\n $cssClass = $this->cssClass;\n $cssClassActivePage = $this->cssClassActivePage;\n $titlePage = $this->titlePage;\n $titleBeginning = $this->titleBeginning;\n $titleEnd = $this->titleEnd;\n $landingPageQueryString = $this->landingPageQueryString;\n \n if ($this->totPages>=1) {\n \n echo \"<ul class=\\\"$cssClass\\\">\";\n\n if ($this->maxVisiblePages>=1 && $this->totPages>=1) { \n echo \"<li title=\\\"\" . $titleBeginning . \"\\\"><a href=\\\"$landingPage?$landingPageQueryString\" . \"&page=1\" . \"\\\" style=\\\"cursor:pointer;\\\">&nbsp;<span class='glyphicon glyphicon-fast-backward' style='position: relative; top: +3px;'></span>&nbsp;</a></li>\"; \n }\n\n if ($this->currentPage>=($this->maxVisiblePages+1)) { \n echo \"<li title=\\\"\" . $titlePage . \"\\\"><a href=\\\"$landingPage?$landingPageQueryString\" . \"&page=\" . urlencode($this->startingPage-1) . \"\\\" style=\\\"cursor:pointer\\\">...</a></li>\"; \n }\n\n for ($i=$this->startingPage; $i<=($this->startingPage + $this->maxVisiblePages - 1); $i++) {\n if ($i > $this->totPages) {\n break;\n }\n if ($i==$this->currentPage) { \n echo \"<li class=\\\"$cssClassActivePage\\\" title=\\\"\" . $titlePage . \"\\\"><a href=\\\"$landingPage?$landingPageQueryString&page=\" . urlencode($i) . \"\\\" style=\\\"cursor:pointer\\\">$i</a></li>\";\n } else {\n echo \"<li title=\\\"\" . $titlePage . \"\\\"><a href=\\\"$landingPage?$landingPageQueryString&page=\" . urlencode($i) . \"\\\" style=\\\"cursor:pointer\\\">$i</a></li>\";\n }\t \n }\n\n if ($this->totPages > ($this->startingPage + $this->maxVisiblePages - 1)) {\n echo \"<li title=\\\"\" . $titlePage . \"\\\"><a href=\\\"$landingPage?$landingPageQueryString&page=\" . urlencode($this->startingPage + $this->maxVisiblePages) . \"\\\" style=\\\"cursor:pointer\\\">...</a></li>\";\t\n }\n\n if ($this->totPages>=1) { \n echo \"<li title=\\\"\" . $titleEnd . \"\\\"><a href=\\\"$landingPage?$landingPageQueryString\" . \"&page=\" . $this->totPages . \"\\\" style=\\\"cursor:pointer;\\\">&nbsp;<span class='glyphicon glyphicon-fast-forward' style='position: relative; top: +3px;'></span>&nbsp;</a></li>\"; \n }\n\n echo \"</ul>\";\n } \n }", "function afficher_pagination()\n\t {\n\t }", "function showPageLinks($aPath, $aNumFiles, $aThisPage, $aIdx, $aNumCols, $aNumRows)\n{\n global $files;\n $numPerPage = $aNumCols * $aNumRows;\n $numPages = ceil($aNumFiles / $numPerPage);\n\n /*\n * reverse finding '/' start from the second last char\n * since the last char must be '/'\n */\n $pdir = \"\";\n $plen = strlen($aPath);\n for($j=$plen-2; $j>0; $j--) {\n if($aPath[$j] == '/') {\n $pdir = substr($aPath, 0, $j+1);\n break;\n }\n }\n\n echo \"<br><center>\";\n echo \"<table border=\\\"0\\\" cellspacing=\\\"10\\\" cellpadding=\\\"0\\\">\";\n echo \"<tr>\";\n if($aIdx != \"\") {\n // Showing back link\n echo \"<td><a href=\\\"$PHP_SELF?path=$aPath&page=$aThisPage\\\">Back To Thumbs</a></td>\";\n // show prev, next link\n if($aIdx > 0) {\n $idx = $aIdx - 1;\n echo \"<td><a href=\\\"$PHP_SELF?path=$aPath&page=$aThisPage&idx=$idx\\\">&lt;</a></td>\";\n }\n if($aIdx + 1 < count($files)) {\n $idx = $aIdx + 1;\n echo \"<td><a href=\\\"$PHP_SELF?path=$aPath&page=$aThisPage&idx=$idx\\\">&gt;</a></td>\";\n }\n } else {\n // show the up link\n if($pdir != \"\") {\n echo \"<td><a href=\\\"$PHP_SELF?path=$pdir\\\">UP</a></td>\";\n }\n // show the page links\n if($numPages == 0) {\n echo \"<td>No image in this folder</td>\";\n } else { \n // show only 10 pages\n $minp = 0;\n $maxp = 10;\n if($numPages > 10) {\n $minp = floor($aThisPage/10) * 10;\n $maxp = ceil(($aThisPage+1)/10) * 10;\n }\n $maxp = min($maxp, $numPages);\n\n echo \"<td>page:</td>\";\n\n // show the prev link\n if($minp >= 10) {\n $prevp = $minp - 1;\n echo \"<td><a href=\\\"$PHP_SELF?path=$aPath&page=$prevp\\\">&lt;</a></td>\";\n }\n\n // show page no(s)\n for($i=$minp; $i<$maxp; $i++) {\n $p = $i + 1;\n if($aThisPage == $i) {\n echo \"<td><b>$p</b></td>\";\n } else {\n echo \"<td><a href=\\\"$PHP_SELF?path=$aPath&page=$i\\\">$p</a></td>\";\n }\n }\n\n // show the next link\n if($maxp < $numPages) {\n $nextp = $maxp;\n echo \"<td><a href=\\\"$PHP_SELF?path=$aPath&page=$nextp\\\">&gt;</a></td>\";\n }\n }\n }\n echo \"</tr>\";\n echo \"</table>\";\n echo \"</center>\";\n}", "function wct_talks_pagination_links() {\n\techo wct_talks_get_pagination_links();\n}", "function medicplus_paging_nav( $pages = '', $current_query = '' )\n\t{\n\t\tglobal $paged;\n\t\tif( $current_query == '' ) {\n\t\t\tif( empty( $paged ) ) $paged = 1;\n\t\t} else {\n\t\t\t$paged = $current_query->query_vars['paged'];\n\t\t}\n\t\t$prev = $paged - 1;\n\t\t$next = $paged + 1;\n\t\t$range = 1; // only edit this if you want to show more page-links\n\t\t$showitems = ($range * 2);\n\t\t\n\t\tif($pages == '') {\n\t\t\tglobal $wp_query;\n\t\t\t$pages = $wp_query->max_num_pages;\n\t\t\tif( ! $pages ) {\n\t\t\t\t$pages = 1;\n\t\t\t}\n\t\t}\n\t\t$method = \"get_pagenum_link\";\n\t\tif(is_single()) {\n\t\t\t$method = 'medicplus_post_pagination_link';\n\t\t}\n\t\t$output = $output_page = $showpages = $disable = '';\n\t\t$page_format = '<li class=\"pagi-inner\"><a href=\"%2$s\" class=\"pagi-link\" >%1$s</a></li>';\n\t\tif( 1 != $pages ) {\n\t\t\t$output_page .= '<ul class=\"pagination\">';\n\t\t\t// prev\n\t\t\tif( $paged == 1 ) {\n\t\t\t\t$disable = ' hide';\n\t\t\t}\n\t\t\t$output_page .= '<li class=\"pagi-inner '.$disable.'\"><a href=\"'.esc_url($method($prev)).'\" rel=\"prev\" class=\"pagi-link\"><span aria-hidden=\"true\">'.esc_html__('Prev', 'medicplus').'</span></a></li>';\n\t\t\t// first pages\n\t\t\tif( $paged > $showitems ) {\n\t\t\t\t$output_page .= sprintf( $page_format, 1, $method(1) );\n\t\t\t}\n\t\t\t// show ...\n\t\t\tif( $paged - $range > $showitems && $paged - $range > 2 ) {\n\t\t\t\t$output_page .= sprintf( $page_format, '&bull;&bull;&bull;', $method($paged - $range - 1) );'<li><a href=\"'.esc_url($method($prev)).'\">&bull;&bull;&bull;</a></li>';\n\t\t\t}\n\t\t\tfor ($i=1; $i <= $pages; $i++) {\n\t\t\t\tif (1 != $pages &&( !($i >= $paged+$showitems || $i <= $paged-$showitems) || $pages <= $showitems )) {\n\t\t\t\t\tif( $paged == $i ) {\n\t\t\t\t\t\t$output_page .= '<li class=\"active pagi-inner\"><span class=\"pagi-link\">'.$i.'</span></li>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$output_page .= sprintf( $page_format, $i, $method($i) );\n\t\t\t\t\t}\n\t\t\t\t\t$showpages = $i;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// show ...\n\t\t\tif( $paged < $pages-1 && $showpages < $pages -1 ){\n\t\t\t\t$showpages = $showpages + 1;\n\t\t\t\t$output_page .= sprintf( $page_format, '&bull;&bull;&bull;', $method($showpages) );\n\t\t\t}\n\t\t\t// end pages\n\t\t\tif( $paged < $pages && $showpages < $pages ) {\n\t\t\t\t$output_page .= sprintf( $page_format, $pages, $method($pages) );\n\t\t\t}\n\t\t\t//next\n\t\t\t$disable = '';\n\t\t\tif( $paged == $pages ) {\n\t\t\t\t$disable = ' hide';\n\t\t\t}\n\t\t\t$output_page .= '<li class=\"pagi-inner '.$disable.'\"><a href=\"'.esc_url($method($next)).'\" rel=\"next\" class=\"pagi-link\">'.esc_html__('Next', 'medicplus').'</a></li>';\n\t\t\t$output_page .= '</ul>'.\"\\n\";\n\t\t\t$output = sprintf('<nav class=\"pagination-wrapper\">%1$s</nav>', $output_page );\n\t\t}\n\t\treturn $output;\n\t}", "public function _buildPagingLinks($range = 3, $currentpage, $totalpages, $divLinkClass = array(), $link = WEB_ROOT) {\n //comment\n $linkClass = array('div' => '', 'link' => '', 'param'=>'');\n $divLinkClass = array_merge($linkClass,$divLinkClass);\n $div = \"<div class='\" . @$divLinkClass['div'] . \"'>\";\n // if not on page 1, don't show back links\n if ($currentpage > 1) {\n // show << link to go back to page 1\n $div .= \" <a href='{$link}?currentpage=1&{$divLinkClass['param']}' class='\" . @$divLinkClass['link'] . \"' currentpage=1><< First</a> \";\n // get previous page num\n $prevpage = $currentpage - 1;\n // show < link to go back to 1 page\n $div .= \" <a href='{$link}?currentpage=$prevpage&{$divLinkClass['param']}' class='\" . @$divLinkClass['link'] . \"' currentpage=$prevpage><</a> \";\n } // end if \n // loop to show links to range of pages around current page\n for ($x = ($currentpage - $range); $x < (($currentpage + $range) + 1); $x++) {\n // if it's a valid page number...\n if (($x > 0) && ($x <= $totalpages)) {\n // if we're on current page...\n if ($x == $currentpage) {\n $div .= \" [<b>$x of $totalpages</b>] \"; // 'highlight' it but don't make a link\n } else {\n $div .= \" <a href='{$link}?currentpage=$x&{$divLinkClass['param']}' class='\" . @$divLinkClass['link'] . \"' currentpage=$x>$x</a> \"; // make it a link\n } // end else\n } // end if \n } // end for\n // if not on last page, show forward and last page links \n if ($currentpage != $totalpages) {\n $nextpage = $currentpage + 1;\n // echo forward link for next page \n $div .= \" <a href='{$link}?currentpage=$nextpage&{$divLinkClass['param']}' class='\" . @$divLinkClass['link'] . \"' currentpage=$nextpage>></a> \";\n // echo forward link for lastpage\n $div .= \" <a href='{$link}?currentpage=$totalpages&{$divLinkClass['param']}' class='\" . @$divLinkClass['link'] . \"' currentpage=$totalpages>Last >></a> \";\n } // end if\n $div .= \"</div>\";\n return $div;\n }", "public function do_paging()\n {\n }", "public function generateLinks() {\n\n $query = $this->db->query(\"SELECT FOUND_ROWS() AS total\");\n\n $results = $query->results();\n $total = (int) $results[0]->total;\n $this->total_pages = ceil($total / $this->per_page);\n\n if ($this->total_pages > 0 && $this->total_pages != 1 && $this->current_page <= $this->total_pages) {\n\n $this->pagination .= '<ul class=\"pagination\">';\n $this->next = $this->current_page + Pagination::LINK_OFFSET;\n $this->previous = $this->current_page - Pagination::LINK_OFFSET;\n\n if ($this->current_page > 1) {\n $this->create_previous_links();\n }\n\n $this->create_active_link();\n\n if ($this->current_page < $this->total_pages) {\n $this->create_next_links();\n }\n\n $this->pagination .= '</ul>';\n }\n return $this->pagination;\n }", "function paginatelinks($intRecCount, $intRecordsPerPage, $intStartRecord, $strPHP, $strThisQVar, $strAdditionalTagPairs=\"\", $strIntroText=\"Go to Page: \")\n//Paginates a record set\n//$intRecCount is the total number of records in unpaginated record set\n{\n\t$out=\"\";\n \tif ($intStartRecord==\"\")\n\t{\n\t\t$intStartRecord=0;\n\t}\n\t$intPages=intval(($intRecCount-1)/$intRecordsPerPage);\n\tif ($intPages>0)\n\t{\n\t\tfor ($i=0; $i<=$intPages; $i++)\n\t\t{\n\t\t\t$url=$strPHP . \"?\" . replaceSpecificQueryVariable($strThisQVar, $i * $intRecordsPerPage);\n\t\t\tif (intval($intStartRecord)!= intval($i * $intRecordsPerPage) )\n\t\t\t{\n\t\t\t\t$out.=\"<a \" . $strAdditionalTagPairs .\" href=\\\"\" . $url . \"\\\">\" .intval($i +1) . \"</a>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$out.= \"<b \" . $strAdditionalTagPairs .\">\" . intval($i +1) . \"</b>\";\n\t\t\t}\n\t\t\tif (($i+1)* $intRecordsPerPage<$intRecCount)\n\t\t\t{\n\t\t\t\t$out.= \" | \";\n\t\t\t}\n\t\t}\t\n\t\treturn $strIntroText . $out;\n\t}\n}", "function buildNavigation($pageNum_Recordset1,$totalPages_Recordset1,$prev_Recordset1,$next_Recordset1,$separator=\" | \",$max_links=10, $show_page=true)\n{\n GLOBAL $maxRows_Recordset1,$totalRows_Recordset1;\n\t$pagesArray = \"\"; $firstArray = \"\"; $lastArray = \"\";\n\tif($max_links<2)$max_links=2;\n\tif($pageNum_Recordset1<=$totalPages_Recordset1 && $pageNum_Recordset1>=0)\n\t{\n\t\tif ($pageNum_Recordset1 > ceil($max_links/2))\n\t\t{\n\t\t\t$fgp = $pageNum_Recordset1 - ceil($max_links/2) > 0 ? $pageNum_Recordset1 - ceil($max_links/2) : 1;\n\t\t\t$egp = $pageNum_Recordset1 + ceil($max_links/2);\n\t\t\tif ($egp >= $totalPages_Recordset1)\n\t\t\t{\n\t\t\t\t$egp = $totalPages_Recordset1+1;\n\t\t\t\t$fgp = $totalPages_Recordset1 - ($max_links-1) > 0 ? $totalPages_Recordset1 - ($max_links-1) : 1;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$fgp = 0;\n\t\t\t$egp = $totalPages_Recordset1 >= $max_links ? $max_links : $totalPages_Recordset1+1;\n\t\t}\n\t\tif($totalPages_Recordset1 >= 1) {\n\t\t\t#\t------------------------\n\t\t\t#\tSearching for $_GET vars\n\t\t\t#\t------------------------\n\t\t\t$_get_vars = '';\t\t\t\n\t\t\tif(!empty($_GET) || !empty($HTTP_GET_VARS)){\n\t\t\t\t$_GET = empty($_GET) ? $HTTP_GET_VARS : $_GET;\n\t\t\t\tforeach ($_GET as $_get_name => $_get_value) {\n\t\t\t\t\tif ($_get_name != \"pageNum_Recordset1\") {\n\t\t\t\t\t\t$_get_vars .= \"&$_get_name=$_get_value\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$successivo = $pageNum_Recordset1+1;\n\t\t\t$precedente = $pageNum_Recordset1-1;\n\t\t\t$firstArray = ($pageNum_Recordset1 > 0) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_Recordset1=$precedente$_get_vars\\\">$prev_Recordset1</a>\" : \"$prev_Recordset1\";\n\t\t\t# ----------------------\n\t\t\t# page numbers\n\t\t\t# ----------------------\n\t\t\tfor($a = $fgp+1; $a <= $egp; $a++){\n\t\t\t\t$theNext = $a-1;\n\t\t\t\tif($show_page)\n\t\t\t\t{\n\t\t\t\t\t$textLink = $a;\n\t\t\t\t} else {\n\t\t\t\t\t$min_l = (($a-1)*$maxRows_Recordset1) + 1;\n\t\t\t\t\t$max_l = ($a*$maxRows_Recordset1 >= $totalRows_Recordset1) ? $totalRows_Recordset1 : ($a*$maxRows_Recordset1);\n\t\t\t\t\t$textLink = \"$min_l - $max_l\";\n\t\t\t\t}\n\t\t\t\t$_ss_k = floor($theNext/26);\n\t\t\t\tif ($theNext != $pageNum_Recordset1)\n\t\t\t\t{\n\t\t\t\t\t$pagesArray .= \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_Recordset1=$theNext$_get_vars\\\">\";\n\t\t\t\t\t$pagesArray .= \"$textLink</a>\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t} else {\n\t\t\t\t\t$pagesArray .= \"$textLink\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t$theNext = $pageNum_Recordset1+1;\n\t\t\t$offset_end = $totalPages_Recordset1;\n\t\t\t$lastArray = ($pageNum_Recordset1 < $totalPages_Recordset1) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_Recordset1=$successivo$_get_vars\\\">$next_Recordset1</a>\" : \"$next_Recordset1\";\n\t\t}\n\t}\n\treturn array($firstArray,$pagesArray,$lastArray);\n}", "public function create_links()\n\t{\n\t\t// If our item count or per-page total is zero there is no need to continue.\n\t\tif ($this->total_rows == 0 OR $this->per_page == 0)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t// Calculate the total number of pages\n\t\t$num_pages = ceil($this->total_rows / $this->per_page);\n\n\t\t// Is there only one page? Hm... nothing more to do here then.\n\t\tif ($num_pages == 1)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t// Determine the current page number.\n\t\t$CI =& get_instance();\n\n\t\tif ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE)\n\t\t{\n\t\t\tif ($CI->input->get($this->query_string_segment) != 0)\n\t\t\t{\n\t\t\t\t$this->cur_page = $CI->input->get($this->query_string_segment);\n\n\t\t\t\t// Prep the current page - no funny business!\n\t\t\t\t$this->cur_page = (int) $this->cur_page;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($CI->uri->segment($this->uri_segment) != 0)\n\t\t\t{\n\t\t\t\t$this->cur_page = $CI->uri->segment($this->uri_segment);\n\n\t\t\t\t// Prep the current page - no funny business!\n\t\t\t\t$this->cur_page = (int) $this->cur_page;\n\t\t\t}\n\t\t}\n\n\t\t$this->num_links = (int)$this->num_links;\n\n\t\tif ($this->num_links < 1)\n\t\t{\n\t\t\tshow_error('Your number of links must be a positive number.');\n\t\t}\n\n\t\tif ( ! is_numeric($this->cur_page))\n\t\t{\n\t\t\t$this->cur_page = 0;\n\t\t}\n\n\t\t// Is the page number beyond the result range?\n\t\t// If so we show the last page\n\t\tif ($this->cur_page > $this->total_rows)\n\t\t{\n\t\t\t$this->cur_page = ($num_pages - 1) * $this->per_page;\n\t\t}\n\n\t\t$uri_page_number = $this->cur_page;\n\t\t$this->cur_page = floor(($this->cur_page/$this->per_page) + 1);\n\n\t\t// Calculate the start and end numbers. These determine\n\t\t// which number to start and end the digit links with\n\t\t$start = (($this->cur_page - $this->num_links) > 0) ? $this->cur_page - ($this->num_links - 1) : 1;\n\t\t$end = (($this->cur_page + $this->num_links) < $num_pages) ? $this->cur_page + $this->num_links : $num_pages;\n\n\t\t// Is pagination being used over GET or POST? If get, add a per_page query\n\t\t// string. If post, add a trailing slash to the base URL if needed\n\t\tif ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE)\n\t\t{\n\t\t\t$this->base_url = rtrim($this->base_url).'&amp;'.$this->query_string_segment.'=';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->base_url = rtrim($this->base_url, '/') .'/';\n\t\t}\n\n\t\t// And here we go...\n\t\t$output = '<span class=\"pages\">Page '. $this->cur_page .' of '. $num_pages.'</span>';\n\t\t\n\t\t// Render the \"First\" link\n\t\tif\t($this->cur_page > ($this->num_links + 1))\n\t\t{\n\t\t\t$output .= $this->first_tag_open.'<a href=\"'.str_replace($this->pagination_selector, '', $this->base_url).'\">'.$this->first_link.'</a>'.$this->first_tag_close;\n\t\t}\n\n\t\t// Render the \"previous\" link\n\t\tif\t($this->cur_page != 1)\n\t\t{\n\t\t\t$i = $uri_page_number - $this->per_page;\n\t\t\tif ($i == 0)\n\t\t\t{\n\t\t\t\t$output .= $this->prev_tag_open.'<a href=\"'.str_replace($this->pagination_selector, '', $this->base_url).'\">'.$this->prev_link.'</a>'.$this->prev_tag_close;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$output .= $this->prev_tag_open.'<a href=\"'.$this->base_url.$i.'\">'.$this->prev_link.'</a>'.$this->prev_tag_close;\n\t\t\t}\n\t\t}\n\n\t\t// Write the digit links\n\t\tfor ($loop = $start -1; $loop <= $end; $loop++)\n\t\t{\n\t\t\t$i = ($loop * $this->per_page) - $this->per_page;\n\n\t\t\tif ($i >= 0)\n\t\t\t{\n\t\t\t\tif ($this->cur_page == $loop)\n\t\t\t\t{\n\t\t\t\t\t$output .= $this->cur_tag_open.$loop.$this->cur_tag_close; // Current page\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$n = ($i == 0) ? '' : $i;\n\t\t\t\t\tif ($i == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$output .= $this->num_tag_open.'<a href=\"'.str_replace($this->pagination_selector, '', $this->base_url).'\">'.$loop.'</a>'.$this->num_tag_close;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$output .= $this->num_tag_open.'<a href=\"'.$this->base_url.$n.'\">'.$loop.'</a>'.$this->num_tag_close;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Render the \"next\" link\n\t\tif ($this->cur_page < $num_pages)\n\t\t{\n\t\t\t$output .= $this->next_tag_open.'<a href=\"'.$this->base_url.($this->cur_page * $this->per_page).'\">'.$this->next_link.'</a>'.$this->next_tag_close;\n\t\t}\n\n\t\t// Render the \"Last\" link\n\t\tif (($this->cur_page + $this->num_links) < $num_pages)\n\t\t{\n\t\t\t$i = (($num_pages * $this->per_page) - $this->per_page);\n\t\t\t$output .= $this->last_tag_open.'<a href=\"'.$this->base_url.$i.'\">'.$this->last_link.'</a>'.$this->last_tag_close;\n\t\t}\n\n\t\t// Kill double slashes.\t Note: Sometimes we can end up with a double slash\n\t\t// in the penultimate link so we'll kill all double slashes.\n\t\t$output = preg_replace(\"#([^:])//+#\", \"\\\\1/\", $output);\n\n\t\t// Add the wrapper HTML if exists\n\t\t$output = $this->full_tag_open.$output.$this->full_tag_close;\n\n\t\treturn $output;\n\t}", "public function run() {\n foreach ($this->paginationOptions as $key => $item) {\n $this->pagination->$key = $item;\n }\n echo '<div class=\"panigation-div\">';\n echo (!is_array($this->header)) ? $this->header : implode('\\n', $this->header);\n if ($this->showPageList) {\n echo implode('\\n', $this->renderShowButton());\n }\n echo (!is_array($this->footer)) ? $this->header : implode('\\n', $this->footer);\n parent::run();\n echo '</div>';\n }", "function render_next($anchor=true)\n {\n global $PHP_SELF;\n\n if ($anchor) \n {\n ?>\n <a href=\"<?php echo $PHP_SELF,'?',$this->getString,$this->id,'_next_page=',$this->rs->AbsolutePage() + 1 ?>\"><?php echo $this->next;?></a> &nbsp; \n <?php\n } \n else \n {\n print \"$this->next &nbsp; \";\n }\n }", "protected function setupDayPager()\n {\n $first_date = $this->first_date;\n $current_date = $this->current_date;\n // previous\n if ($first_date->getTimestamp() < $current_date->getTimestamp()) {\n $previous_date = $current_date->copy();\n $previous_date->subDay(1);\n $this->previous_text = $previous_date->formatLocalized('%d') . ' ' . $previous_date->formatLocalized('%B') . ', ' . $previous_date->year;\n $this->previous_url = $this->makePagerUrl(array(\n 'year' => $previous_date->year,\n 'month' => $previous_date->month,\n 'day' => $previous_date->day,\n ));\n } else {\n $this->previous_text = $current_date->formatLocalized('%d') . ' ' . $current_date->formatLocalized('%B') . ', ' . $current_date->year;\n $this->previous_url = '';\n }\n // next\n $today = new Carbon();\n $today->setTime(0, 0);\n if ($this->current_date->getTimestamp() < $today->getTimestamp()) {\n $next_date = $current_date->copy();\n $next_date->addDay(1);\n $this->next_text = $next_date->formatLocalized('%d') . ' ' . $next_date->formatLocalized('%B') . ', ' . $next_date->year;\n $this->next_url = $this->makePagerUrl(array(\n 'year' => $next_date->year,\n 'month' => $next_date->month,\n 'day' => $next_date->day,\n ));\n } else {\n $this->next_text = $current_date->formatLocalized('%d') . ' ' . $current_date->formatLocalized('%B') . ', ' . $current_date->year;\n $this->next_url = '';\n }\n }", "function ajan_activity_pagination_links() {\n\techo ajan_get_activity_pagination_links();\n}", "function Paging($per_page=10, $max_page=100) {\n\t$page = (!isset($_GET['page']))? 1 : $_GET['page']; \n\t$prev = ($page - 1);\n\t$next = ($page + 1);\n\n\t/* Calculate the offset */\n\tif($per_page < 10) $per_page = 10;\n\t$jumPage = floor($max_page / $per_page);\n\t//echo $jumPage.\"<br>\";\n\t\n\t$html = \"\";\t\n\t// menampilkan link previous\n\tif ($page > 1) $html .= '<li><a href=\"'.currentUrl($prev).'\">&laquo;</a></li>';\n\n\t// memunculkan nomor halaman dan linknya\n\tfor($i = 1; $i <= $jumPage; $i++)\n\t{\n\t\tif ((($i >= $page - 2) && ($i <= $page + 5)) || ($i == 1) || ($i == $jumPage)){\n\t\t\t//if (($i == 1)) $html .= '<li class=\"active\"><a href=\"'.currentUrl($i).'\">'.$i.'</a></li>';\n\t\t\t//if (($showPage != ($jumPage - 1)) && ($i == $jumPage)) $html .= '...';\t\t\n\t\t\tif (($i == $page) && ($i > 1)) $html .= '<li class=\"active\"><a href=\"'.currentUrl($i).'\">'.$i.'</a></li>';\t\t\t\n\t\t\telse $html .= '<li><a href=\"'.currentUrl($i).'\">'.$i.'</a></li>';\n\t\t\t//if ($i > 1) $html .= '<span class=\"active\"><a href=\"'.$newUrl.$i.'\">'.$i.'</a></span>';\n\t\t\t//$showPage = $i;\n\t\t}\n\t}\n\n\t// menampilkan link next\n\tif ($page < $jumPage) $html .= '<li><a href=\"'.currentUrl($next).'\">&raquo;</a></li>';\n\t\n\treturn $html;\n}", "function wct_talks_get_pagination_links() {\n\t\t/**\n\t\t * @param string the pagination links to output\n\t\t */\n\t\treturn apply_filters( 'wct_talks_get_pagination_links', wct()->query_loop->pag_links );\n\t}", "function wpmanual_get_pagination_links() {\r\n\t\tglobal $wpmanual_template;\r\n\r\n\t\treturn apply_filters( 'wpmanual_get_pagination_links', $wpmanual_template->pag_links );\r\n\t}", "function _s_paginate_links( $args = [] ) {\n \n $defaults = array(\n 'prev_text' => __('<span>« Previous Page</span>', '_s'),\n 'next_text' => __('<span>Next Page »</span>', '_s'),\n 'type' => 'array'\n );\n \n $args = wp_parse_args( $args, $defaults );\n \n $links = paginate_links( $args );\n \n if( empty( $links ) ) {\n return false;\n }\n \n $out = [];\n \n $previous = $next = false;\n \n foreach( $links as $link ) {\n $class = 'number';\n if (strpos( $link, 'prev') !== false) {\n $previous = true;\n $class = 'nav-previous';\n } else if (strpos( $link, 'next') !== false) {\n $next = true;\n $class = 'nav-next';\n } else {\n $class = 'number'; \n }\n \n $out[] = sprintf( '<li class=\"%s\">%s</li>', $class, $link );\n }\n \n if( ! $previous ) {\n array_unshift( $out, sprintf( '<li class=\"nav-previous\"><a class=\"disable\">%s</a></li>', $args['prev_text'] ) );\n }\n \n if( ! $next ) {\n $out[] = sprintf( '<li class=\"nav-next\"><a class=\"disable\">%s</a></li>', $args['next_text'] );\n }\n \n return sprintf( '<div class=\"posts-pagination\"><ul class=\"nav-links\">%s</ul>', join( '', $out ) );\n}", "function bootstrap_paginate_links($args = '') {\n\t$defaults = array(\n\t\t'base' => '%_%', // http://example.com/all_posts.php%_% : %_% is replaced by format (below)\n\t\t'format' => '?page=%#%', // ?page=%#% : %#% is replaced by the page number\n\t\t'total' => 1,\n\t\t'current' => 0,\n\t\t'show_all' => false,\n\t\t'prev_next' => true,\n\t\t'prev_text' => __('&laquo; Previous'),\n\t\t'next_text' => __('Next &raquo;'),\n\t\t'end_size' => 1,\n\t\t'mid_size' => 2,\n\t\t'type' => 'plain',\n\t\t'add_args' => false, // array of query args to add\n\t\t'add_fragment' => ''\n\t);\n\n\t$args = wp_parse_args( $args, $defaults );\n\textract($args, EXTR_SKIP);\n\n\t// Who knows what else people pass in $args\n\t$total = (int) $total;\n\tif ($total < 2)\n\t\treturn;\n\t$current = (int) $current;\n\t$end_size = 0 < (int) $end_size ? (int) $end_size : 1; // Out of bounds? Make it the default.\n\t$mid_size = 0 <= (int) $mid_size ? (int) $mid_size : 2;\n\t$add_args = is_array($add_args) ? $add_args : false;\n\t$r = '';\n\t$page_links = array();\n\t$n = 0;\n\t$dots = false;\n\n\tif ($prev_next && $current && 1 < $current):\n\t\t$link = str_replace('%_%', 2 == $current ? '' : $format, $base);\n\t\t$link = str_replace('%#%', $current - 1, $link);\n\t\tif ( $add_args )\n\t\t\t$link = add_query_arg( $add_args, $link );\n\t\t$link .= $add_fragment;\n\t\t$page_links[] = '<li class=\"prev\"><a href=\"' . esc_url(apply_filters('paginate_links', $link)) . '\">' . $prev_text . '</a></li>';\n\telse:\n\t\t$page_links[] = '<li class=\"prev disabled\"><a href=\"#\">' . $prev_text . '</a></li>';\n\tendif;\n\n\tfor ($n = 1; $n <= $total; $n++) :\n\t\t$n_display = number_format_i18n($n);\n\t\tif ($n == $current):\n\t\t\t$page_links[] = \"<li class='active'><a href=\\\"#\\\" class='page-numbers'>$n_display</a></li>\";\n\t\t\t$dots = true;\n\t\telse:\n\t\t\tif ($show_all || ($n <= $end_size || ($current && $n >= $current - $mid_size && $n <= $current + $mid_size) || $n > $total - $end_size)):\n\t\t\t\t$link = str_replace('%_%', 1 == $n ? '' : $format, $base);\n\t\t\t\t$link = str_replace('%#%', $n, $link);\n\t\t\t\tif ($add_args)\n\t\t\t\t\t$link = add_query_arg( $add_args, $link );\n\t\t\t\t$link .= $add_fragment;\n\t\t\t\t$page_links[] = \"<li><a class='page-numbers' href='\" . esc_url( apply_filters( 'paginate_links', $link ) ) . \"'>$n_display</a></li>\";\n\t\t\t\t$dots = true;\n\t\t\telseif ($dots && !$show_all):\n\t\t\t\t$page_links[] = '<li class=\"disabled\"><a href=\"#\">...</a></li>';\n\t\t\t\t$dots = false;\n\t\t\tendif;\n\t\tendif;\n\tendfor;\n\n\tif ($prev_next && $current && ($current < $total || -1 == $total)):\n\t\t$link = str_replace('%_%', $format, $base);\n\t\t$link = str_replace('%#%', $current + 1, $link);\n\t\tif ($add_args)\n\t\t\t$link = add_query_arg($add_args, $link);\n\t\t$link .= $add_fragment;\n\t\t$page_links[] = '<li class=\"next\"><a href=\"' . esc_url(apply_filters('paginate_links', $link)) . '\">' . $next_text . '</a></li>';\n\telse:\n\t\t$page_links[] = '<li class=\"next disabled\"><a href=\"#\">' . $next_text . '</a></li>';\n\tendif;\n\n\tswitch ($type):\n\t\tcase 'array':\n\t\t\treturn $page_links;\n\t\tcase 'list':\n\t\t\t$r .= \"<ul class='page-numbers'>\\n\\t<li>\";\n\t\t\t$r .= join(\"</li>\\n\\t<li>\", $page_links);\n\t\t\t$r .= \"</li>\\n</ul>\\n\";\n\t\t\tbreak;\n\t\tdefault :\n\t\t\t$r = '<div class=\"pagination\"><ul>' . join(\"\\n\", $page_links) . '</ul></div>';\n\t\t\tbreak;\n\tendswitch;\n\treturn $r;\n}", "function display_links($max_page_links, $parameters = EMPTY_STRING)\n\t{\n\t\tglobal $PHP_SELF, $request_type;\n\n\t\tdefine('PAGE_LINK', HTML_A_START .\n\t\t\tolc_href_link(CURRENT_SCRIPT, $parameters . 'page=#p', $request_type) .\n\t\t\t'\" class = \"pageResults\" title=\"#t\">#d</a>&nbsp;&nbsp;');\n\t\t$max_pages = $this->number_of_pages;\n\t\t$display_links_string = EMPTY_STRING;\n\t\tif (olc_not_null($parameters) && (substr($parameters, -1) != AMP)) $parameters .= AMP;\n\n\t\t// previous button - not displayed on first page\n\t\tif ($this->current_page_number > 1)\n\t\t{\n\t\t\t$display_links_string .= setlink($this->current_page_number - 1, PREVNEXT_TITLE_PREVIOUS_PAGE, PREVNEXT_BUTTON_PREV);\n\t\t}\n\t\t// check if number_of_pages > $max_page_links\n\t\t$cur_window_num = intval($this->current_page_number / $max_page_links);\n\t\tif ($this->current_page_number % $max_page_links) $cur_window_num++;\n\n\t\t$max_window_num = intval($max_pages / $max_page_links);\n\t\tif ($max_pages % $max_page_links) $max_window_num++;\n\n\t\t// previous window of pages\n\t\tif ($cur_window_num > 1)\n\t\t{\n\t\t\t// first page button\n\t\t\t$display_links_string .= setlink($max_pages, PREVNEXT_TITLE_FIRST_PAGE, 1);\n\t\t\t$display_links_string .= setlink(($cur_window_num - 1) * $max_page_links,\n\t\t\tsprintf(PREVNEXT_TITLE_PREV_SET_OF_NO_PAGE, $max_page_links), '...');\n\t\t}\n\t\t// page nn button\n\t\tfor ($jump_to_page = 1 + (($cur_window_num - 1) * $max_page_links);\n\t\t\t($jump_to_page <= ($cur_window_num * $max_page_links)) && ($jump_to_page <= $max_pages); $jump_to_page++) {\n\t\t\tif ($jump_to_page == $this->current_page_number) {\n\t\t\t\t$display_links_string .= '&nbsp;<b>' . $jump_to_page . '</b>&nbsp;';\n\t\t\t} else {\n\t\t\t\t$display_links_string .= setlink($jump_to_page, sprintf(PREVNEXT_TITLE_PAGE_NO, $jump_to_page), $jump_to_page);\n\t\t\t}\n\t\t}\n\n\t\t// next window of pages\n\t\tif ($cur_window_num < $max_window_num)\n\t\t{\n\t\t\t$display_links_string .= setlink($cur_window_num * $max_page_links + 1,\n\t\t\tsprintf(PREVNEXT_TITLE_NEXT_SET_OF_NO_PAGE, $max_page_links), '...');\n\t\t\t// last page button\n\t\t\t$display_links_string .= setlink($max_pages, PREVNEXT_TITLE_LAST_PAGE, $max_pages);\n\t\t}\n\n\t\t// next button\n\t\tif ($max_pages > 1)\n\t\t{\n\t\t\tif (($this->current_page_number < $max_pages))\n\t\t\t{\n\t\t\t\t$display_links_string .= setlink($this->current_page_number + 1, PREVNEXT_TITLE_NEXT_PAGE, PREVNEXT_BUTTON_NEXT);\n\t\t\t}\n\t\t}\n\t\treturn $display_links_string;\n\t}", "function getPagesLinks()\r\n\t{\r\n\t\tglobal $mainframe;\r\n\r\n\t\t$lang =& JFactory::getLanguage();\r\n\r\n\t\t// Build the page navigation list\r\n\t\t$data = $this->_buildDataObject();\r\n\r\n\t\t$list = array();\r\n\r\n\t\t$itemOverride = false;\r\n\t\t$listOverride = false;\r\n\r\n\t\t$chromePath = JPATH_THEMES.DS.$mainframe->getTemplate().DS.'html'.DS.'pagination.php';\r\n\t\tif (file_exists($chromePath))\r\n\t\t{\r\n\t\t\trequire_once ($chromePath);\r\n\t\t\tif (function_exists('pagination_item_active') && function_exists('pagination_item_inactive')) {\r\n\t\t\t\t//cant allow this as the js code we use for the items is different\r\n\t\t\t//\t$itemOverride = true;\r\n\t\t\t}\r\n\t\t\tif (function_exists('pagination_list_render')) {\r\n\t\t\t\t$listOverride = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Build the select list\r\n\t\tif ($data->all->base !== null) {\r\n\t\t\t$list['all']['active'] = true;\r\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_active($data->all) : $this->_item_active($data->all);\r\n\t\t} else {\r\n\t\t\t$list['all']['active'] = false;\r\n\t\t\t$list['all']['data'] = ($itemOverride) ? pagination_item_inactive($data->all) : $this->_item_inactive($data->all);\r\n\t\t}\r\n\r\n\t\tif ($data->start->base !== null) {\r\n\t\t\t$list['start']['active'] = true;\r\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_active($data->start) : $this->_item_active($data->start);\r\n\t\t} else {\r\n\t\t\t$list['start']['active'] = false;\r\n\t\t\t$list['start']['data'] = ($itemOverride) ? pagination_item_inactive($data->start) : $this->_item_inactive($data->start);\r\n\t\t}\r\n\t\tif ($data->previous->base !== null) {\r\n\t\t\t$list['previous']['active'] = true;\r\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_active($data->previous) : $this->_item_active($data->previous);\r\n\t\t} else {\r\n\t\t\t$list['previous']['active'] = false;\r\n\t\t\t$list['previous']['data'] = ($itemOverride) ? pagination_item_inactive($data->previous) : $this->_item_inactive($data->previous);\r\n\t\t}\r\n\r\n\t\t$list['pages'] = array(); //make sure it exists\r\n\t\tforeach ($data->pages as $i => $page)\r\n\t\t{\r\n\t\t\tif ($page->base !== null) {\r\n\t\t\t\t$list['pages'][$i]['active'] = true;\r\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_active($page) : $this->_item_active($page);\r\n\t\t\t} else {\r\n\t\t\t\t$list['pages'][$i]['active'] = false;\r\n\t\t\t\t$list['pages'][$i]['data'] = ($itemOverride) ? pagination_item_inactive($page) : $this->_item_inactive($page);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($data->next->base !== null) {\r\n\t\t\t$list['next']['active'] = true;\r\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_active($data->next) : $this->_item_active($data->next);\r\n\t\t} else {\r\n\t\t\t$list['next']['active'] = false;\r\n\t\t\t$list['next']['data'] = ($itemOverride) ? pagination_item_inactive($data->next) : $this->_item_inactive($data->next);\r\n\t\t}\r\n\t\tif ($data->end->base !== null) {\r\n\t\t\t$list['end']['active'] = true;\r\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_active($data->end) : $this->_item_active($data->end);\r\n\t\t} else {\r\n\t\t\t$list['end']['active'] = false;\r\n\t\t\t$list['end']['data'] = ($itemOverride) ? pagination_item_inactive($data->end) : $this->_item_inactive($data->end);\r\n\t\t}\r\n\r\n\t\tif($this->total > $this->limit){\r\n\t\t\treturn ($listOverride) ? pagination_list_render($list) : $this->_list_render($list);\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn '';\r\n\t\t}\r\n\t}", "public static function next_link()\r\n\t{\r\n\t\tif (isset($_GET['p'])) {\r\n\t\t\t# Get the value from HTTP-GET\r\n\t\t $get_page = (int) $_GET['p'];\r\n\t\t}\r\n\t\t\r\n\t\tif (empty($get_page)) {\r\n\t\t\t$get_page = 1;\r\n\t\t}\r\n\r\n\t\tif (isset($get_page)) {\r\n\t\t\tself::$next_link = $get_page + 1;\r\n\t\t}\r\n\r\n\t\t$next = self::$next_link;\r\n\r\n\t\tif ($next > self::$num_page) {\r\n\t\t\t$next = self::$num_page;\r\n\t\t}\r\n\r\n\t\t$controller = Get_url::get_url('controller');\r\n\t\t$method = Get_url::get_url('method');\r\n \r\n $url = null;\r\n \r\n if ( ! isset($_GET['p'])) {\r\n \t$url = \"?{$controller}={$method}&p={$next}\";\r\n } else {\r\n $url = \"?{$controller}={$method}={$next}\";\r\n }\r\n\r\n\t\techo \"href='{$url}'>\";\r\n\t}", "public function slcr_blog_Pagination() { \n\t\t$prev_post = get_previous_post();\n\t\t$next_post = get_next_post(); \n\t\tif (!empty( $prev_post ) || !empty( $next_post )) { ?>\n\t\t\t<div class=\"blog-pagination\">\n\t\t\t\t<?php\n\t\t\t\tif (!empty( $prev_post )) { ?>\n\t\t\t\t\t<!-- Previous Post -->\n\t\t\t\t\t<a href=\"<?php echo get_permalink( $prev_post->ID ); ?>\" class=\"page-item prev\">\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 31.49 31.49\" style=\"enable-background:new 0 0 31.49 31.49;\" xml:space=\"preserve\">\n\t\t\t\t\t\t\t\t<path d=\"M21.205,5.007c-0.429-0.444-1.143-0.444-1.587,0c-0.429,0.429-0.429,1.143,0,1.571l8.047,8.047H1.111 C0.492,14.626,0,15.118,0,15.737c0,0.619,0.492,1.127,1.111,1.127h26.554l-8.047,8.032c-0.429,0.444-0.429,1.159,0,1.587 c0.444,0.444,1.159,0.444,1.587,0l9.952-9.952c0.444-0.429,0.444-1.143,0-1.571L21.205,5.007z\"/>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span><?php get_previous_posts_link( \"Prev\" ); ?><?php echo esc_html__('Prev','moppers')?></span>\n\t\t\t\t\t</a>\n\t\t\t\t\t<?php \n\t\t\t\t}\n\t\t\t\tif (!empty( $next_post )) { ?>\n\t\t\t\t\t<!-- Next Post -->\n\t\t\t\t\t<a href=\"<?php echo get_permalink( $next_post->ID ); ?>\" class=\"page-item next\">\n\t\t\t\t\t\t<span><?php get_previous_posts_link( \"Prev\" ); ?><?php echo esc_html__('Next','moppers')?></span>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 31.49 31.49\" style=\"enable-background:new 0 0 31.49 31.49;\" xml:space=\"preserve\">\n\t\t\t\t\t\t\t\t<path d=\"M21.205,5.007c-0.429-0.444-1.143-0.444-1.587,0c-0.429,0.429-0.429,1.143,0,1.571l8.047,8.047H1.111 C0.492,14.626,0,15.118,0,15.737c0,0.619,0.492,1.127,1.111,1.127h26.554l-8.047,8.032c-0.429,0.444-0.429,1.159,0,1.587 c0.444,0.444,1.159,0.444,1.587,0l9.952-9.952c0.444-0.429,0.444-1.143,0-1.571L21.205,5.007z\"/>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</a>\n\t\t\t\t\t<?php \n\t\t\t\t} ?>\n\t\t\t</div>\n\t\t<?php } \n }", "protected function _project_pager()\n\t{\n\t\t$this->test = new Model_Pager;\n\n\t\t$test = $this->test;\n\t\t$this->test_next_project = $test->next_project($this->page_slug, $this->project_slug);\n\t\t\n\t\t// and check for errors\n\t\tif ($this->test_next_project['status'] == Model_Project::SUCCESS)\n\t\t{\n\t\t\t$this->view->pager = $this->test_next_project;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->view->pager = NULL;\n\t\t}\n\t}", "function paginate($totalRows) {\n\t\tglobal $modx;\n\t\tif (!$this->config['paginate'])\n\t\t\treturn \"\";\n\n\t\t$pageUrl = !empty($this->config['id'])?$this->config['id'].'_page':'page';\n\t\t$page = isset($_GET[$pageUrl])?intval($_GET[$pageUrl]):1;\n\t\t$rowsPerPage = $this->config['show'];\n\t\t$totalPages = ceil($totalRows/$rowsPerPage);\n\t\t$previous = $page - 1;\n\t\t$next = $page + 1;\n\t\t$start = ($page-1)*$rowsPerPage;\n\t\tif ($start<0)\n\t\t\t$start = 0;\n\t\t$stop = $start + $rowsPerPage - 1;\n\t\tif ($stop>=$totalRows)\n\t\t\t$stop = $totalRows - 1;\n\n\t\t$split = \"\";\n\t\tif ($previous > 0 && $next <= $totalPages)\n\t\t\t$split = $paginateSplitterCharacter;\n\n\t\t$previoustpl = '';\n\t\t$previousplaceholder = '';\n\t\tif ($previous > 0)\n\t\t\t$previoustpl = 'tplPaginatePrevious';\n\t\telseif ($this->config['paginateAlwaysShowLinks'])\n\t\t\t$previoustpl = 'tplPaginatePreviousOff';\n\t\tif (!empty($previoustpl))\n\t\t\t$previousplaceholder = $this->processTemplate($this->config[$previoustpl],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray('url'=>$modx->makeUrl($modx->documentIdentifier,'',($previous!=1?\"$pageUrl=$previous\":\"\")),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'PaginatePreviousText'=>$this->config['paginatePreviousText']));\t\t\t\n\t\t$nexttpl = '';\n\t\t$nextplaceholder = '';\n\t\tif ($next <= $totalPages)\n\t\t\t$nexttpl = 'tplPaginateNext';\n\t\telseif ($this->config['paginateAlwaysShowLinks'])\n\t\t\t$nexttpl = 'tplPaginateNextOff';\n\t\tif (!empty($nexttpl))\n\t\t\t$nextplaceholder = $this->processTemplate($this->config[$nexttpl],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray('url'=>$modx->makeUrl($modx->documentIdentifier,'',($next!=1?\"$pageUrl=$next\":\"\")),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'PaginateNextText'=>$this->config['paginateNextText']));\t\t\t\n\n\t\t$pages = '';\n\t\tfor ($i=1;$i<=$totalPages;$i++) {\n\t\t\tif ($i != $page) {\n\t\t\t\t$pages .= $this->processTemplate($this->config['tplPaginatePage'],\n\t\t\t\t\t\t\t\t\t\t\t\tarray('url'=>$modx->makeUrl($modx->documentIdentifier,'',($i!=1?\"$pageUrl=$i\":\"\")),'page'=>$i));\n\t\t\t} else {\n\t\t\t\t$modx->setPlaceholder($this->config['id'].\"currentPage\", $i);\n\t\t\t\t$pages .= $this->processTemplate($this->config['tplPaginateCurrentPage'], array('page'=>$i));\n\t\t\t}\n\t\t}\n\t\t$modx->setPlaceholder($this->config['id'].\"next\", $nextplaceholder);\n\t\t$modx->setPlaceholder($this->config['id'].\"previous\", $previousplaceholder);\n\t\t$modx->setPlaceholder($this->config['id'].\"splitter\", $split);\n\t\t$modx->setPlaceholder($this->config['id'].\"start\", $start+1);\n\t\t$modx->setPlaceholder($this->config['id'].\"stop\", $stop+1);\n\t\t$modx->setPlaceholder($this->config['id'].\"total\", $totalRows);\n\t\t$modx->setPlaceholder($this->config['id'].\"pages\", $pages);\n\t\t$modx->setPlaceholder($this->config['id'].\"perPage\", $rowsPerPage);\n\t\t$modx->setPlaceholder($this->config['id'].\"totalPages\", $totalPages);\n\t\treturn $start.','.($stop-$start+1);\n\t}", "function rl_custom_pager() {\n\tglobal $wp_query;\n\t$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;\n\techo '<ul class=\"pager\">';\n\tif($paged == 1 && $paged < $wp_query->max_num_pages) {\n\t\techo '<li><a href=\"'. get_pagenum_link($paged+1) .'\">Older Posts</a></li>';\n\t}\n\telseif($paged == $wp_query->max_num_pages) {\n\t\techo '<li><a href=\"'. get_pagenum_link($paged-1) .'\">Newer Posts</a></li>';\n\t}\n\telse {\n\t\techo '<li><a href=\"'. get_pagenum_link($paged+1) .'\">Older Posts</a></li>';\n\t\techo '<li><a href=\"'. get_pagenum_link($paged-1) .'\">Newer Posts</a></li>';\n\t}\n\techo '</ul>';\n\n}", "function getPagingLink($sql, $itemPerPage = 10, $strGet = '')\n\n{\n\n\t$result = dbQuery($sql);\n\n\t$pagingLink = '';\n\n\t$totalResults = dbNumRows($result);\n\n\t$totalPages = ceil($totalResults / $itemPerPage);\n\n\t\n\n\t// how many link pages to show\n\n\t$numLinks = 10;\n\n\n\n\t\t\n\n\t// create the paging links only if we have more than one page of results\n\n\tif ($totalPages > 1) {\n\n\t\n\n\t\t$self = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] ;\n\n\t\t\n\n\n\n\t\tif (isset($_GET['page']) && (int)$_GET['page'] > 0) {\n\n\t\t\t$pageNumber = (int)$_GET['page'];\n\n\t\t} else {\n\n\t\t\t$pageNumber = 1;\n\n\t\t}\n\n\t\t\n\n\t\t// print 'previous' link only if we're not\n\n\t\t// on page one\n\n\t\tif ($pageNumber > 1) {\n\n\t\t\t$page = $pageNumber - 1;\n\n\t\t\tif ($page > 1) {\n\n\t\t\t\t$prev = \" <a href=\\\"$self?page=$page&$strGet/\\\">[Prev]</a> \";\n\n\t\t\t} else {\n\n\t\t\t\t$prev = \" <a href=\\\"$self?$strGet\\\">[Prev]</a> \";\n\n\t\t\t}\t\n\n\t\t\t\t\n\n\t\t\t$first = \" <a href=\\\"$self?$strGet\\\">[First]</a> \";\n\n\t\t} else {\n\n\t\t\t$prev = ''; // we're on page one, don't show 'previous' link\n\n\t\t\t$first = ''; // nor 'first page' link\n\n\t\t}\n\n\t\n\n\t\t// print 'next' link only if we're not\n\n\t\t// on the last page\n\n\t\tif ($pageNumber < $totalPages) {\n\n\t\t\t$page = $pageNumber + 1;\n\n\t\t\t$next = \" <a href=\\\"$self?page=$page&$strGet\\\">[Next]</a> \";\n\n\t\t\t$last = \" <a href=\\\"$self?page=$totalPages&$strGet\\\">[Last]</a> \";\n\n\t\t} else {\n\n\t\t\t$next = ''; // we're on the last page, don't show 'next' link\n\n\t\t\t$last = ''; // nor 'last page' link\n\n\t\t}\n\n\n\n\t\t$start = $pageNumber - ($pageNumber % $numLinks) + 1;\n\n\t\t$end = $start + $numLinks - 1;\t\t\n\n\t\t\n\n\t\t$end = min($totalPages, $end);\n\n\t\t\n\n\t\t$pagingLink = array();\n\n\t\tfor($page = $start; $page <= $end; $page++)\t{\n\n\t\t\tif ($page == $pageNumber) {\n\n\t\t\t\t$pagingLink[] = \" $page \"; // no need to create a link to current page\n\n\t\t\t} else {\n\n\t\t\t\tif ($page == 1) {\n\n\t\t\t\t\t$pagingLink[] = \" <a href=\\\"$self?$strGet\\\">$page</a> \";\n\n\t\t\t\t} else {\t\n\n\t\t\t\t\t$pagingLink[] = \" <a href=\\\"$self?page=$page&$strGet\\\">$page</a> \";\n\n\t\t\t\t}\t\n\n\t\t\t}\n\n\t\n\n\t\t}\n\n\t\t\n\n\t\t$pagingLink = implode(' | ', $pagingLink);\n\n\t\t\n\n\t\t// return the page navigation link\n\n\t\t$pagingLink = $first . $prev . $pagingLink . $next . $last;\n\n\t}\n\n\t\n\n\treturn $pagingLink;\n\n}", "public function paginate();", "public function paginate();", "public function run()\n\t{\n\t\t$pagerhtml=$this->createPageButtons();\n\t\tif(empty($pagerhtml))\n\t\t\treturn;\n\t\techo '<div class=\"fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix\"><div class=\"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_full_numbers\">';\n\t\techo $pagerhtml;\n\t\techo '</div></div>';\n\t}", "function zen_single_post_pagination() {\r\n\r\n $output = wp_link_pages(\r\n array(\r\n 'before' => '<ul class=\"pager\">',\r\n 'after' => '</ul>',\r\n 'next_or_number' =>'next',\r\n 'previouspagelink' => __(' &laquo; Previous Page',LANGUAGE_ZONE),\r\n 'nextpagelink' => __(' Next Page &raquo; ', LANGUAGE_ZONE),\r\n 'separator' => ' ', 'link_before' => '<li>',\r\n 'link_after' => '</li>',\r\n 'echo' => 0\r\n ));\r\n\r\n $output = str_replace('li></a>', 'a></li>', $output);\r\n $output = str_replace('<li>', '', $output);\r\n $output = str_replace('<a href', '<li><a href', $output);\r\n\r\n echo $output;\r\n\r\n }", "function _renderPagination($data, $numrows) {\n global $ID;\n // Add pagination controls\n if($data['limit']){\n $params = $this->dthlp->_a2ua('dataflt',$_REQUEST['dataflt']);\n //$params['datasrt'] = $_REQUEST['datasrt'];\n $offset = (int) $_REQUEST['dataofs'];\n if($offset){\n $prev = $offset - $data['limit'];\n if($prev < 0) $prev = 0;\n\n // keep url params\n $params['dataofs'] = $prev;\n\n $text .= '<a href=\"'.wl($ID,$params).\n '\" title=\"'.'Previous'.\n '\" class=\"prev\">'.'&larr; Previous Page'.'</a>';\n } else {\n $text .= '<span class=\"prev disabled\">&larr; Previous Page</span>';\n }\n\n for($i=1; $i <= ceil($numrows / $data['limit']); $i++) {\n $offs = ($i - 1) * $data['limit'];\n $params['dataofs'] = $offs;\n $selected = $offs == $_REQUEST['dataofs'] ? ' class=\"selected\"': '';\n $text .= '<a href=\"'.wl($ID, $params).'\"' . $selected . '>' . $i. '</a>';\n }\n\n if($numrows - $offset > $data['limit']){\n $next = $offset + $data['limit'];\n\n // keep url params\n $params['dataofs'] = $next;\n\n $text .= '<a href=\"'.wl($ID,$params).\n '\" title=\"'.'Next'.\n '\" class=\"next\">'.'Next Page &rarr;'.'</a>';\n } else {\n $text .= '<span class=\"next disabled\">Next Page &rarr;</span>';\n }\n return '<div class=\"prevnext\">' . $text . '</div>';\n }\n }" ]
[ "0.74017996", "0.7002959", "0.69373816", "0.685854", "0.67456806", "0.6650898", "0.6646796", "0.66458344", "0.6535953", "0.64414364", "0.6424784", "0.6402421", "0.63915426", "0.63713855", "0.6367318", "0.6363134", "0.6356917", "0.63479114", "0.63268286", "0.6295565", "0.6260407", "0.6254886", "0.62375104", "0.6231626", "0.623135", "0.6215753", "0.62154", "0.6210658", "0.6201074", "0.61700916", "0.61630136", "0.61422706", "0.6138521", "0.6133008", "0.6132903", "0.61301255", "0.61152005", "0.61096895", "0.6105978", "0.610537", "0.61030793", "0.61016864", "0.60995466", "0.6090558", "0.6086604", "0.60853803", "0.6081676", "0.6078147", "0.60555905", "0.60554254", "0.60482156", "0.60407215", "0.6035906", "0.6033628", "0.6027725", "0.6027022", "0.6023412", "0.6023383", "0.6010135", "0.6009109", "0.5991887", "0.5985605", "0.5984982", "0.59815156", "0.5975994", "0.59759694", "0.5956404", "0.5947142", "0.59464055", "0.5946204", "0.5944972", "0.59419554", "0.5923507", "0.5923373", "0.592153", "0.59159744", "0.59097254", "0.5904755", "0.59031355", "0.58930695", "0.5877553", "0.5870699", "0.5870576", "0.58688325", "0.5862516", "0.5860057", "0.585972", "0.58576345", "0.58544755", "0.5850339", "0.5835249", "0.58351415", "0.5833757", "0.5824639", "0.5820128", "0.58193654", "0.58193654", "0.5818391", "0.58089", "0.5796693" ]
0.71255296
1
Testting Shop_License::_canUpdate(); for malladmin
Testting Shop_License::_canUpdate(); для malladmin
public function testCanUpdateForNonMallAdmin() { $oSubj = $this->getProxyClass("Shop_License"); $this->getSession()->setVariable("malladmin", false); $oConfig = $this->getMock(\OxidEsales\Eshop\Core\Config::class, array("isDemoShop", "getConfigParam", "setConfigParam", "saveShopConfVar", "getBaseShopId")); $oConfig->expects($this->any())->method('isDemoShop')->will($this->returnValue(false)); $oView = $this->getMock(\OxidEsales\Eshop\Application\Controller\Admin\ShopLicense::class, array("getConfig"), array(), '', false); $oView->expects($this->any())->method('getConfig')->will($this->returnValue($oConfig)); $this->assertFalse($oSubj->UNITcanUpdate()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCanUpdateForDemoVersion()\n {\n $oSubj = $this->getProxyClass(\"Shop_License\");\n\n $this->getSession()->setVariable(\"malladmin\", true);\n\n $oConfig = $this->getMock(\\OxidEsales\\Eshop\\Core\\Config::class, array(\"isDemoShop\"));\n $oConfig->expects($this->any())->method('isDemoShop')->will($this->returnValue(true));\n $oView = $this->getMock(\\OxidEsales\\Eshop\\Application\\Controller\\Admin\\ShopLicense::class, array(\"getConfig\"), array(), '', false);\n $oView->expects($this->any())->method('getConfig')->will($this->returnValue($oConfig));\n\n $this->assertFalse($oView->UNITcanUpdate());\n }", "public function isUpdateSecurityRelevant() {}", "private function validateUpdate() {\n\t\t$this->context->checkPermission(\\Scrivo\\AccessController::WRITE_ACCESS);\n\t\t$this->checkUniquePhpSelector();\n\t}", "public function license_actions() {\n\n \tif ( !isset( $_POST['wpsl_licenses'] ) ) {\n return;\n }\n\n\t\tif ( !isset( $_POST['wpsl_licenses'][ $this->item_shortname ] ) || empty( $_POST['wpsl_licenses'][ $this->item_shortname ] ) ) {\n\t\t\treturn;\n }\n \n if ( !check_admin_referer( $this->item_shortname . '_license-nonce', $this->item_shortname . '_license-nonce' ) ) {\n return;\n }\n\n if ( !current_user_can( 'manage_wpsl_settings' ) ) {\n return;\n }\n \n if ( isset( $_POST[ $this->item_shortname . '_license_key_deactivate' ] ) ) {\n $this->deactivate_license();\n } else {\n $this->activate_license();\n }\n }", "private function validateUpdate() {\n\t\t$this->context->checkPermission(\\Scrivo\\AccessController::WRITE_ACCESS);\n\t}", "public function check_license_status() {\n\t\t\t$license_key = $this->get_license_key();\n\t\t\tif ( empty( $license_key ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$license_data = $this->api_request();\n\t\t\tif ( $license_data ) {\n\t\t\t\tupdate_option( $this->get_license_status_option_key(), $license_data );\n\t\t\t}\n\t\t}", "function beaver_extender_check_license() {\n\t\n\tif ( ! empty( $_POST['beaver_extender_license_key'] ) )\n\t\treturn; // Don't fire when saving settings\n\t\n\t$status = get_transient( 'beaver_extender_license_check' );\n\n\t// Run the license check a maximum of once per day\n\tif ( false === $status ) {\n\t\t\n\t\t// retrieve the license from the database\n\t\t$license = trim( get_option( 'beaver_extender_license_key' ) );\n\n\t\t// data to send in our API request\n\t\t$api_params = array(\n\t\t\t'edd_action'=> 'check_license',\n\t\t\t'license' \t=> $license,\n\t\t\t'item_name' => urlencode( BBEXT_BEAVER_EXTENDER ),\n\t\t\t'url' => home_url()\n\t\t);\n\n\t\t// Call the custom API.\n\t\t$response = wp_remote_post( BBEXT_COBALT_APPS_URL, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );\n\n\t\t// make sure the response came back okay\n\t\tif ( is_wp_error( $response ) )\n\t\t\treturn false;\n\n\t\t$license_data = json_decode( wp_remote_retrieve_body( $response ) );\n\n\t\tif ( $license_data->license !== false && $license_data->license == 'valid' )\n\t\t\tupdate_option( 'beaver_extender_license_status', 'valid' );\n\t\telse\n\t\t\tupdate_option( 'beaver_extender_license_status', 'invalid' );\n\n\t\tset_transient( 'beaver_extender_license_check', $license, DAY_IN_SECONDS );\n\n\t\t$status = $license;\n\t\t\n\t}\n\n\treturn $status;\n\t\n}", "public function form_is_available_to_update_a_permission()\n {\n\n }", "function canBeUpdated() ;", "function isValidLicense() {\n\t\ttry {\n\t\t\t$publicKey = system::getConfig()->getParam(\"mofilmmusic\", \"publickey\")->getParamValue();\n\t\t\t$privateKey = system::getConfig()->getParam(\"mofilmmusic\", \"privatekey\")->getParamValue();\t\t\n\t\t\t$server = system::getConfig()->getParam(\"mofilmmusic\", \"server\");\n\n\t\t\t$time = time();\n\t\t\t$hash = sha1(\n\t\t\t\thttp_build_query(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'apiKey' => $publicKey,\n\t\t\t\t\t\t'privateKey' => $privateKey,\n\t\t\t\t\t\t'time' => $time,\n\t\t\t\t\t\t'uri' => '/'.$this->getApiController().'/'.$this->getApiAction(),\n\t\t\t\t\t\t'licence_id' => $this->getLicenseID()\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$uri = sprintf('%s/%s/%s', $server, $this->getApiController(), $this->getApiAction());\n\t\t\t$query = sprintf('apiKey=%s&hash=%s&time=%d&licence_id=%s', $publicKey, $hash, $time, $this->getLicenseID());\n\t\t\tutilityCurl::$options = utilityCurl::$options + array(\n\t\t\t\tCURLOPT_SSL_VERIFYHOST => false,\n\t\t\t\tCURLOPT_SSL_VERIFYPEER => false,\n\t\t\t\tCURLOPT_TIMEOUT => 10,\n\t\t\t);\n\t\t\t$response = utilityCurl::fetchContent($uri.'?'.$query);\n\n\t\t\t$oXML = simplexml_load_string($response);\n\t\t\t$this->setResponseXML($oXML);\n\n\t\t\tif ( isset($oXML->response->messages->error) ) {\n\t\t\t\t$error = (string) $oXML->response->messages->error;\n\t\t\t} else {\n\t\t\t\t$error = '';\n\t\t\t}\n\n\t\t\tif ( $error == \"\" ) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\tthrow new mofilmException(\"Mofilm Music API Not Reachable\");\n\t\t}\n\t}", "public function checkUpdate()\n\t{\n\t}", "public function is_license_valid()\n {\n // TODO: Build out license functionality\n return true;\n }", "public function isUpdateSecurityRelevantReturnsFalseIfUpdateIsNotSecurityRelevant() {}", "function testFunctionalAllowAdd() {\n\t\t$this->markTestIncomplete('rewrite old test');\n\t\t// $product = $this->objFromFixture('Product', 'p2a');\n\t\t// $product->setCurrentCurrency('USD');\n\t\t// $this->assertTrue($product->canPurchase(), 'The flag for allow purchase is set to TRUE.');\n\t\t// $response = $this->get($product->addLink());\n\t\t// $this->assertEquals($response->getStatusCode(), 200, \n\t\t// \t'We are allowed to purchase this product, we get redirected back.'\n\t\t// );\n\t}", "public function canUpdate ()\n {\n return true;\n }", "public function mwb_upsell_bump_check_license() {\n\n\t\t$user_license_key = get_option( 'mwb_upsell_bump_license_key', '' );\n\n\t\t$api_params = array(\n\t\t\t'slm_action' => 'slm_check',\n\t\t\t'secret_key' => UPSELL_ORDER_BUMP_OFFER_FOR_WOOCOMMERCE_PRO_SPECIAL_SECRET_KEY,\n\t\t\t'license_key' => $user_license_key,\n\t\t\t'_registered_domain' => ! empty( $_SERVER['SERVER_NAME'] ) ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_NAME'] ) ) : '',\n\t\t\t'item_reference' => urlencode( UPSELL_ORDER_BUMP_OFFER_FOR_WOOCOMMERCE_PRO_ITEM_REFERENCE ),\n\t\t\t'product_reference' => 'MWBPK-23841',\n\t\t);\n\n\t\t$query = esc_url_raw( add_query_arg( $api_params, UPSELL_ORDER_BUMP_OFFER_FOR_WOOCOMMERCE_PRO_LICENSE_SERVER_URL ) );\n\n\t\t$mwb_response = wp_remote_get(\n\t\t\t$query,\n\t\t\tarray(\n\t\t\t\t'timeout' => 20,\n\t\t\t\t'sslverify' => false,\n\t\t\t)\n\t\t);\n\n\t\t$license_data = json_decode( wp_remote_retrieve_body( $mwb_response ) );\n\n\t\tif ( isset( $license_data->result ) && 'success' === $license_data->result && isset( $license_data->status ) && 'active' === $license_data->status ) {\n\n\t\t\tupdate_option( 'mwb_upsell_bump_license_check', true );\n\t\t} else {\n\n\t\t\tdelete_option( 'mwb_upsell_bump_license_check' );\n\t\t}\n\n\t}", "function update_work_license ($dbh, $work_id, $license) {\n $update_lic = 'UPDATE works SET license=' . $license\n . ' WHERE work_id=' . $work_id;\n $ok = $dbh->exec($update_lic);\n if ($ok) {\n $ok = license_changed_for_work($dbh, $work_id, $license);\n }\n return $ok;\n}", "function old_testFunctionalAllowAdd() {\n\t\t$product = $this->objFromFixture('Product', 'p2a');\n\t\t$product->setCurrentCurrency('USD');\n\t\t$this->assertTrue($product->canPurchase(), 'The flag for allow purchase is set to TRUE.');\n\t\t$response = $this->get($product->addLink());\n\t\t$this->assertEquals($response->getStatusCode(), 200,\n\t\t\t'We are allowed to purchase this product, we get redirected back.'\n\t\t);\n\t}", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Pronko_TaskManagement::TaskManagement_update');\n }", "function wp_plugin_update(){\n $license_key = get_option('ead_envato_key');\n if($license_key){\n require_once( $this->plugin_path . 'lib/plugin_update_check.php' );\n $ead_updates = new PluginUpdateChecker_2_0 ( $this->meta_url, __FILE__, $this->plugin_slug, 1 );\n $ead_updates->purchaseCode = $license_key; \n } \n }", "public function productUpdateRules()\n {\n }", "function testFunctionalDenyAdd() {\n\t\t$this->markTestIncomplete('rewrite old test');\n\t\t// $product = $this->objFromFixture('Product', 'p1a');\n\t\t// $product->setCurrentCurrency('USD');\n\t\t// $this->assertFalse($product->canPurchase(), 'The flag for allow purchase is set to FALSE.');\n\t\t// $response = $this->get($product->addLink());\n\t\t// $this->assertEquals($response->getStatusCode(), 403, \n\t\t// \t'Because we can\\'t purchase the product, we get a blank page with no content.'\n\t\t// );\n\t}", "public function testCrceCostControlUpdateCostLimit()\n {\n\n }", "public function update()\n {\n return \\Auth::user()->hasRight('update-settings');\n }", "public function canChangeCrates()\n {\n return $this->allowCrateChanges;\n }", "public function activate_license() {\n\n // listen for our activate button to be clicked\n if( isset( $_POST[ $this->product_id . '_license_activate' ] ) ) {\n\n // run a quick security check\n if( ! check_admin_referer( $this->product_id . '_license_nonce', $this->product_id . '_license_nonce' ) )\n return; // get out if we didn't click the Activate button\n\n // retrieve the license from the database\n $license_key = $_POST[ $this->product_id . '_license_key' ];\n\n // data to send in our API request\n $api_params = array(\n 'woo_sl_action' => 'activate',\n 'licence_key' => $license_key,\n );\n\n // Send query to the license manager server\n $response = $this->do_request( $api_params );\n\n // make sure the response came back okay\n if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {\n\n if ( is_wp_error( $response ) ) {\n $message = $response->get_error_message();\n } else {\n $message = __( 'Ocorreu um erro ao processar sua solicitação. Tente novamente.' );\n }\n\n } else {\n\n $license_data = json_decode( wp_remote_retrieve_body( $response ) );\n $license_data = array_shift( $license_data );\n\n if ( 'error' === $license_data->status ) {\n $message = $license_data->message;\n }\n }\n\n // Check if anything passed on a message constituting a failure\n if ( ! empty( $message ) ) {\n $base_url = admin_url( 'options-general.php?page=' . $this->get_settings_page_slug() );\n $redirect = add_query_arg( array( 'fa_activation' => 'false', 'message' => urlencode( $message ) ), $base_url );\n\n wp_redirect( $redirect );\n exit();\n }\n\n // $license_data->license will be either \"valid\" or \"invalid\"\n $this->set_license_key( $license_key );\n $this->set_license_status( $license_data->status );\n\n $base_url = admin_url( 'options-general.php?page=' . $this->get_settings_page_slug() );\n $redirect = add_query_arg( array( 'fa_activation' => 'true', 'message' => 'Licença ativada com sucesso' ), $base_url );\n\n wp_redirect( $redirect );\n exit();\n }\n }", "public static function checkLicenseValidity()\n {\n $headers = getallheaders();\n $licenseUser = $headers['X-License-User'] ?? null;\n $licenseKey = $headers['X-License-Key'] ?? null;\n $licenseObject = $headers['X-License-Object'] ?? null;\n $licenseHost = Helper::getIP();\n \n if ($licenseUser === null || $licenseKey === null) {\n HTTPHelper::jsonResponse([\n 'status' => 'error',\n 'message' => 'missing license data',\n ]);\n }\n \n $db = new DBHelper();\n $license = $db->get('license', '*', [\n 'license_key' => $licenseKey,\n ]);\n if ($license === false) {\n HTTPHelper::jsonResponse([\n 'status' => 'error',\n 'message' => 'License not found',\n ], 404);\n }\n if ($license['license_user'] !== $licenseUser) {\n HTTPHelper::jsonResponse([\n 'status' => 'error',\n 'message' => 'Invalid license user',\n ], 401);\n }\n \n if (!empty($license['license_host']) && $license['license_host'] !== $licenseHost) {\n HTTPHelper::jsonResponse([\n 'status' => 'error',\n 'message' => 'Invalid host',\n ], 401);\n }\n \n $valid = new \\DateTime($license['valid_until']);\n $now = new \\DateTime();\n if ($valid <= $now) {\n HTTPHelper::jsonResponse([\n 'status' => 'error',\n 'message' => 'License expired',\n ], 410);\n }\n \n if ($license['plugin_entry_id'] === null && $license['theme_entry_id'] === null) {\n HTTPHelper::jsonResponse([\n 'status' => 'error',\n 'message' => 'License not valid for any object',\n ], 400);\n }\n \n if ($license['plugin_entry_id'] !== null || $license['theme_entry_id'] !== null) {\n $objectParts = explode('_', $licenseObject);\n // 0 = pluginversion|themeversion\n // 1 = slug\n if ($objectParts[0] === 'pluginversion') {\n \n $base_plugin = $db->get('plugin', 'id', [\n 'slug' => $objectParts[1],\n ]);\n \n if ($base_plugin['id'] !== $license['plugin_entry_id']) {\n HTTPHelper::jsonResponse([\n 'status' => 'error',\n 'message' => 'License not valid for object (1)',\n ], 400);\n }\n } elseif ($objectParts[0] === 'themeversion') {\n\n $base_theme = $db->get('theme', 'id', [\n 'slug' => $objectParts[1],\n ]);\n \n if ($base_theme['id'] !== $license['theme_entry_id']) {\n HTTPHelper::jsonResponse([\n 'status' => 'error',\n 'message' => 'License not valid for object (2)',\n ], 400);\n }\n }\n }\n \n return true; // a formality\n }", "public function authorizePatch()\n {\n return $this->user()->can('disks.update');\n }", "public function testUcpPaymentMethodUpdate()\n {\n\n }", "public function canChangePaymentInformation()\n {\n return Mage::getModel('sheep_subscription/service')->canChangePaymentInformation($this->getSubscription());\n }", "function old_testFunctionalDenyAdd() {\n\t\t$product = $this->objFromFixture('Product', 'p1a');\n\t\t$product->setCurrentCurrency('USD');\n\t\t$this->assertFalse($product->canPurchase(), 'The flag for allow purchase is set to FALSE.');\n\t\t$response = $this->get($product->addLink());\n\t\t$this->assertEquals($response->getStatusCode(), 403,\n\t\t\t'Because we can\\'t purchase the product, we get a blank page with no content.'\n\t\t);\n\t}", "public function testCrceCostControlUpdateCostLimitStatus()\n {\n\n }", "public function adminWantsToUpdateProduct() {\n\t\tif(isset($_GET[self::$updateURLPrefix])) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static function check_update() {\n //Parameter validation\n //REQUIRED\n $params = self::validate_parameters(self::check_update_parameters(),\n array()); \n \n }", "function checkUpdate() {\n\t\treturn false;\n\t}", "function update_license($data = false)\n {\n if (false === $data) {\n $tmp = delete_option('wf_licensing_' . $this->prefix);\n } else {\n if (!isset($data['access_key'])) {\n $data['access_key'] = $this->get_license('access_key');\n }\n $tmp = update_option('wf_licensing_' . $this->prefix, $data);\n }\n\n return $tmp;\n }", "public function test_to_see_if_user_can_edit_a_customer()\n {\n\n $this->put('/customer/1', CustomerTestConstants::UPDATED_CUSTOMER_EXAMPLE);\n\n $this->assertDatabaseHas('customers', CustomerTestConstants::UPDATED_CUSTOMER_EXAMPLE);\n }", "public function define_license_manager() {\n //** Break if we already have errors to prevent fatal ones. */\n if( $this->has_errors() ) {\n return false;\n }\n //** Be sure we have license scheme to continue */\n $schema = $this->get_schema( 'extra.schemas.licenses.product' );\n if( !$schema ) {\n return false;\n }\n if( empty( $schema[ 'product_id' ] ) || ( empty( $schema[ 'referrer' ] ) && $this->type !== 'theme' ) ) {\n $this->errors->add( __( 'Product requires license, but product ID and (or) referrer is undefined. Please, be sure, that license schema has all required data.', $this->domain ), 'message' );\n }\n $schema = array_merge( (array)$schema, array(\n 'type' => $this->type,\n 'name' => $this->name,\n 'boot_file' => $this->boot_file,\n 'errors_callback' => array( $this->errors, 'add' )\n ) );\n //** Licenses Manager */\n if( !class_exists( '\\UsabilityDynamics\\UD_API\\Manager' ) ) {\n //$this->errors->add( __( 'Class \\UsabilityDynamics\\UD_API\\Manager does not exist. Be sure all required plugins installed and activated.', $this->domain ), 'message' );\n return false;\n }\n $this->license_manager = new \\UsabilityDynamics\\UD_API\\Manager( $schema );\n return true;\n }", "public function canCreateVehicleLicence(){\n\n return $this->checkPrivilege('Vehicle Licence','Create');\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('catalog/bs_coursecost/coursecost');\n }", "public function setup_licensing() {}", "public function testUpdateExternalProduct()\n {\n }", "public function testUpdateProduct()\n {\n }", "public function testProductUpdateAuthorizationSuccessfully()\n {\n dump('test_product_update_authorization_successfully_user_company_owner');\n\n $user = $this->product->company->user;\n\n $this->signIsUsingPassportAsUser($user);\n\n $response = $this->updateProduct();\n\n $response->assertStatus(200);\n\n $response->assertJsonFragment($this->validFields());\n\n dump('test_product_update_authorization_successfully_user_company_admin');\n\n $user = factory(User::class)->create();\n\n $user->userCompanyRole()->create([\n 'company_id' => $this->product->company->id,\n 'role_id' => $this->admin->id,\n ]);\n\n $this->signIsUsingPassportAsUser($user);\n\n $response = $this->updateProduct();\n\n $response->assertStatus(200);\n\n $response->assertJsonFragment($this->validFields());\n\n dump('test_product_update_authorization_successfully_company_update_permission');\n\n $user = factory(User::class)->create();\n\n $user->userCompanyPermission()->create([\n 'company_id' => $this->product->company->id,\n 'permission_id' => $this->updatePermission->id,\n ]);\n\n $this->signIsUsingPassportAsUser($user);\n\n $response = $this->updateProduct();\n\n $response->assertStatus(200);\n\n $response->assertJsonFragment($this->validFields());\n }", "public function action_update_check()\n\t{\n\t\tUpdate::add( $this->info->name, $this->info->guid, $this->info->version );\n\t}", "public function testProductUpdateAuthorizationUnsuccessfully()\n {\n dump('test_product_update_authorization_unsuccessfully_wrong_owner');\n\n $company = factory(Company::class)->create();\n\n $user = $company->user;\n\n $this->signIsUsingPassportAsUser($user);\n\n $response = $this->updateProduct();\n\n $response->assertStatus(403);\n\n dump('test_product_update_authorization_unsuccessfully_guest_role');\n\n $user = factory(User::class)->create();\n\n $user->userCompanyRole()->create([\n 'company_id' => $this->product->company->id,\n 'role_id' => $this->guest->id,\n ]);\n\n $this->signIsUsingPassportAsUser($user);\n\n $response = $this->updateProduct();\n\n $response->assertStatus(403);\n\n dump('test_product_update_authorization_unsuccessfully_view_permission');\n\n $user = factory(User::class)->create();\n\n $user->userCompanyPermission()->create([\n 'company_id' => $this->product->company->id,\n 'permission_id' => $this->viewPermission->id,\n ]);\n\n $this->signIsUsingPassportAsUser($user);\n\n $response = $this->updateProduct();\n\n $response->assertStatus(403);\n }", "public function update()\n {\n return \\Auth::user()->hasRight('update-tempo');\n }", "function admin_init()\n\t{\n\t\tif (isset($_GET['pclihs']))\n\t\t{\n\t\t\tif (!current_user_can('manage_options'))\n\t\t\t{\n\t\t\t\twp_die('Permission Denied.');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$license_hash = $_GET['pclihs'];\n\t\t\t\t$product = isset($_GET['pcprd']) ? $_GET['pcprd'] : null;\n\t\t\t\t$license_hash = trim($license_hash);\n\t\t\t\t$product = trim($product);\n\t\t\t\t$hash_decoded = base64_decode($license_hash);\n\t\t\t\t$product_decoded = base64_decode($product);\n\n\t\t\t\tif ($hash_decoded !== false)\n\t\t\t\t{\n\t\t\t\t\t$license_hash = $hash_decoded;\n\t\t\t\t}\n\n\t\t\t\tif ($product_decoded !== false)\n\t\t\t\t{\n\t\t\t\t\t$product = $product_decoded;\n\t\t\t\t}\n\n\t\t\t\t$product_list = explode(',', $product);\n\t\t\t\t$product = $product_list[0];\n\n\t\t\t\t$license = $this->get_license($product);\n\t\t\t\t$license_new = $this->install_license($license_hash, $product);\n\n\t\t\t\tif ($license_new != null && isset($license_new['license-key']))\n\t\t\t\t{\n\t\t\t\t\t$license_new = $license_new['license-key'];\n\n\t\t\t\t\tif ($license == null || $license != $license_new)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($product_list as $product_id)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->set_license($license_new, $product_id);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$autoupdate_admin = $this->object->get_registry()->get_module('photocrati-auto_update-admin');\n\n\t\t\t\t\t\tif ($autoupdate_admin != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twp_redirect($autoupdate_admin->get_update_page_url());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$error = null;\n\n\t\t\t\t\tif (isset($license_new['error']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$error = $license_new['error'];\n\t\t\t\t\t}\n\t\t\t\t\telse if (is_string($license_new))\n\t\t\t\t\t{\n\t\t\t\t\t\t$error = $license_new;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($error != null)\n\t\t\t\t\t{\n\t\t\t\t\t\t$error = ': ' . $error;\n\t\t\t\t\t}\n\n\t\t\t\t\t$error .= '.';\n\n\t\t\t\t\twp_die('Couldn\\'t activate membership' . $error);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function testComAdobeGraniteLicenseImplLicenseCheckFilter() {\n\n }", "public function superadmin_manage_added_license($license_id = null, $action = null) {\n $this->layout = 'ajax';\n $this->loadModel('LicenseDetail');\n //action set\n if (isset($action) && (!empty($action))) {\n $disabled = \"\";\n } else {\n $disabled = \"disabled\";\n }\n $this->set('disabled', $disabled);\n //unique ccompany id\n $haskKey = \"CMP\" . $this->generateKey();\n $this->loadModel('User');\n $checkIfAlready = $this->User->find('first', array('conditions' => array('User.company_id' => $haskKey, 'type' => 'company_license')));\n if ($checkIfAlready) {\n $haskKey = $this->generateKey();\n } else {\n $haskKey = $haskKey;\n }\n $this->set('rand_user_id', $haskKey);\n //licensed id\n if ((isset($license_id)) and ( !empty($license_id))) {\n $this->set(\"licensee_id\", $license_id);\n }\n //get license name and nmls from id:\n $getInfo = $this->LicenseDetail->find('first', array('conditions' => array('LicenseDetail.id' => $license_id)));\n $this->set('license_details', $getInfo);\n //get the states list for billing info page\n $this->loadModel('State');\n $stateList = $this->State->find('list', array('fields' => array('State.state_code')));\n $this->set('stateList', $stateList);\n //get the added company admin\n $getAdmins = $this->User->find('all', array('order' => array('User.id' => 'DESC'), 'conditions' => array('User.type' => 'company_admin', 'User.license_id' => $license_id), 'recursive' => -1));\n if ($getAdmins) {\n $this->set('all_company_admins', $getAdmins);\n }\n //get the fee defaults\n $this->loadModel('FeeDefault');\n $getDetailedFees = $this->FeeDefault->find('all', array('order' => array('FeeDefault.id' => 'ASC')));\n if ($getDetailedFees) {\n $this->set('feesDetails', $getDetailedFees);\n }\n //get the applicable fee defaults set for a particular company license\n $this->loadModel('LicenseApplicableFees');\n $getapplicableLicenseFees = $this->LicenseApplicableFees->find('all', array('order' => array('LicenseApplicableFees.id' => 'ASC'), 'conditions' => array('LicenseApplicableFees.license_id' => $license_id)));\n if ($getapplicableLicenseFees) {\n $this->set('getapplicableLicenseFees', $getapplicableLicenseFees);\n }\n //get the reports data (licensed users)\n $licensed_users = $this->User->find('all', array('conditions' => array('User.type' => 'company_admin'), 'fields' => array('User.total_time_spent')));\n if ($licensed_users) {\n $this->Set('licensed_users_activity', $licensed_users);\n }\n }", "public function upgrade() {\n\n\t\t$db_version = get_option( 'mc4wp_version', 0 );\n\t\tif( version_compare( MC4WP_VERSION, $db_version, '<=' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// upgrade from old custom stylesheet\n\t\t$stylesheet = get_option( 'mc4wp_custom_css_file', false );\n\t\tif( $stylesheet === false ) {\n\n\t\t\t// check if custom stylesheet exists\n\t\t\tif( file_exists( WP_CONTENT_DIR . '/mc4wp-custom-styles.css' ) ) {\n\t\t\t\tupdate_option( 'mc4wp_custom_css_file', WP_CONTENT_URL . '/mc4wp-custom-styles.css' );\n\t\t\t}\n\n\t\t}\n\n\t\t// upgrade from older license manager\n\t\t$product = new MC4WP_Product();\n\n\t\t$old_option_name = sanitize_title_with_dashes( $product->get_author() . '_' . $product->get_item_name() . '_license', null, 'save' );\n\t\t$old_option = get_option( $old_option_name, false );\n\t\tif( $old_option !== false ) {\n\t\t\t$new_option_name = sanitize_title_with_dashes( $product->get_item_name() . '_license', null, 'save' );\n\n\t\t\tupdate_option( $new_option_name, $old_option );\n\t\t\tdelete_option( $old_option_name );\n\t\t}\n\n\t\t// upgrade from even older license system\n\t\tif( get_option( 'mc4wp_license_status', false ) === 'valid' ) {\n\n\t\t\t// get current license key\n\t\t\t$opts = mc4wp_get_options('general');\n\t\t\t$license_key = $opts['license_key'];\n\n\t\t\t// set key and status\n\t\t\t$this->license_manager->set_license_status( 'valid' );\n\t\t\t$this->license_manager->set_license_key( $license_key );\n\n\t\t\t// delete old license status option\n\t\t\tdelete_option( 'mc4wp_license_status' );\n\t\t}\n\n\t\tupdate_option( 'mc4wp_version', MC4WP_VERSION );\n\t\treturn true;\n\t}", "public function testUpdateAction()\r\n\t{\r\n\t\t\r\n\t\t//TODO: failure to update partner 0 permissions\r\n\t\t\r\n\t\t//TODO: failure to update permission type\r\n\t\t\r\n\t\t//TODO: failure to update permission partner id\r\n\t\t\r\n\t\t//TODO: failure setting permission items that the partner doesn't have\r\n\t\t\r\n\t\t//TODO: failure updating to name that already exists\r\n\t\t\r\n\t\t//TODO: what to do when changing permission name ??\r\n\t\t\r\n\t\t//TODO: failure to update id\r\n\t\t\r\n\t\t//TODO: verify that only given parameters were updated and not other parameters\r\n\t\r\n\t\t//TODO: failure to update another partner's permissions\r\n\t\t\r\n\t\t$this->markTestIncomplete ( \"testUpdateAction test not implemented\" );\r\n\t}", "public function testInventoryProductAvailabilityPATCHRequestInventoryIDProductAvailabilitiesLogicalWarehouseIDUpdate()\n {\n }", "function activate_license() {\n\n\t\t// listen for our activate button to be clicked\n\t\tif( isset( $_POST[$this->prefix.\"submit_license\"] ) ) {\n\n\t\t\t// run a quick security check \n\t\t \tif( ! wp_verify_nonce( $_POST[$this->prefix . 'license_nonce_field'], $this->prefix . 'submit_license' ) ) \t\n\t\t\t\treturn;\n\n\t\t\tupdate_option( $this->prefix . 'license_key', trim( $_POST[$this->prefix . 'license_key'] ) );\n\n\t\t\t// retrieve the license from the database\n\t\t\t$license = trim( get_option( $this->prefix . 'license_key' ) );\n\n\t\t\t// data to send in our API request\n\t\t\t$api_params = array( \n\t\t\t\t'edd_action'=> 'activate_license', \n\t\t\t\t'license' \t=> $license, \n\t\t\t\t'item_name' => urlencode( $this->addon_name ), // the name of our product in EDD\n\t\t\t\t'url' => home_url()\n\t\t\t);\n\t\t\t\n\t\t\t// Call the custom API.\n\t\t\t$response = wp_remote_get( add_query_arg( $api_params, $this->oxygen_url ), array( 'timeout' => 15, 'sslverify' => false ) );\n\n\t\t\t// make sure the response came back okay\n\t\t\tif ( is_wp_error( $response ) )\n\t\t\t\treturn false;\n\n\t\t\t// decode the license data\n\t\t\t$license_data = json_decode( wp_remote_retrieve_body( $response ) );\n\t\t\t\n\t\t\t// $license_data->license will be either \"valid\" or \"invalid\"\n\n\t\t\tupdate_option( $this->prefix . 'license_status', $license_data->license );\n\n\t\t}\n\t}", "public function AllowPurchaseNice();", "protected function setupUpdateOperation()\n {\n $this->authorize('update', $this->crud->getEntryWithLocale($this->crud->getCurrentEntryId()));\n\n\n $this->setupCreateOperation();\n }", "function ajax_license() { ?>\n\t<script type=\"text/javascript\" >\n\tfunction checkLicense() {\n\t\tvar data = {\n\t\t\t'action': 'wolive_checkLicense',\n\t\t\t'license': jQuery(\"#wolive_license_key\").val()\n\t\t};\n\t\t\n\t\tjQuery.post(ajaxurl, data, function(response) {\n\t\t\tvar obj = jQuery.parseJSON(response);\n\t\t\tif ( obj.status === 0 ) {\n\t\t\t\t// Not valid\n\n\t\t\t}else if (obj.status === 1) {\n\t\t\t\t// Valid\n\n\t\t\t} else if (obj.status === -1) {\n\n\t\t\t} else {\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t}\n\n\tjQuery(document).ready(function($) {\n\t\tjQuery(\"#button_license\").click(checkLicense);\n\t});\n \n\t</script> <?php\n}", "function testDebtorUpdate() {\n $countries = array(\n 'Denmark',\n 'Norway',\n 'Sweden',\n );\n // Pick a random country from the dataset\n $test_value = $countries[rand(0, count($countries))];\n\n\t\t$debtor = debtor_find_by_name('Expotium GmbH');\n\t\t// This params should resembel a form POST\n\t\t$params = array(\n\t\t\t'VatZone' => 'HomeCountry',\n\t\t\t'Country' => $test_value,\n\t\t\t'Debtor' => $debtor,\n\t\t);\n\t\t\n\t\t$debtor = debtor_update_data($params);\n\t\t\n\t\t$this->assertTrue($debtor->Country == $test_value);\n\t}", "function bulkmodifications_component_checkversion()\n{\n if (!function_exists('get_product_release')) {\n return false;\n }\n \n // Requires greater than 2011R3.1\n if (get_product_release() < 215) {\n return false;\n }\n\n return true;\n}", "public function doesCheckModifyAccessListHookModifyAccessAllowed() {}", "public function test_does_not_update_equal_version() {\n\t\t// Setup\n\n\t\t\\WP_Mock::userFunction( 'get_option', array(\n\t\t\t'times' => 1,\n\t\t\t'args' => array( 'tenup_scaffold_version' ),\n\t\t\t'return' => '0.0.1'\n\t\t) );\n\n\t\t\\WP_Mock::userFunction( 'TenUpScaffold\\Core\\code_version', array(\n\t\t\t'times' => 1,\n\t\t\t'return' => '0.0.1'\n\t\t) );\n\n\t\t\\WP_Mock::userFunction( 'update_option', array(\n\t\t\t'times' => 0\n\t\t) );\n\n\n\t\t// NOTE To test that the before_update and after_update actions are not called would require WP_Mock to be in strict mode.\n\n\t\t// Act\n\t\t$updater = UpdateManager::get_instance();\n\t\t$updated = $updater->maybe_update();\n\n\t\t$this->assertFalse( $updated, 'maybe_update did not return false' );\n\t\t$this->assertConditionsMet();\n\t}", "protected function _canUpdatePrices()\n {\n $oConfig = $this->getConfig();\n $blCan = false;\n\n // crontab is off?\n if (!$oConfig->getConfigParam(\"blUseCron\")) {\n $iTimeToUpdate = $oConfig->getConfigParam(\"iTimeToUpdatePrices\");\n if (!$iTimeToUpdate || $iTimeToUpdate <= oxRegistry::get(\"oxUtilsDate\")->getTime()) {\n $blCan = true;\n }\n }\n\n return $blCan;\n }", "public function authorize()\n {\n return $this->user()->can('library.update');\n }", "function deactivate_license() {\n\n // listen for our activate button to be clicked\n if( isset( $_POST[ $this->product_id . '_license_deactivate' ] ) ) {\n // run a quick security check\n if( ! check_admin_referer( $this->product_id . '_license_nonce', $this->product_id . '_license_nonce' ) ) {\n return; // get out if we didn't click the Activate button\n }\n\n // retrieve the license from the database\n $license_key = $this->get_license_key();\n\n // data to send in our API request\n $api_params = array(\n 'woo_sl_action' => 'deactivate',\n 'licence_key' => $license_key,\n );\n\n // Send query to the license manager server\n $response = $this->do_request( $api_params );\n\n // make sure the response came back okay\n if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {\n\n if ( is_wp_error( $response ) ) {\n $message = $response->get_error_message();\n } else {\n $message = __( 'Ocorreu um erro ao processar sua solicitação. Tente novamente.' );\n }\n\n $base_url = admin_url( 'options-general.php?page=' . $this->get_settings_page_slug() );\n $redirect = add_query_arg( array( 'fa_activation' => 'false', 'message' => urlencode( $message ) ), $base_url );\n\n wp_redirect( $redirect );\n exit();\n } else {\n\n $license_data = json_decode( wp_remote_retrieve_body( $response ) );\n $license_data = array_shift( $license_data );\n\n if ( 'error' === $license_data->status ) {\n $message = $license_data->message;\n }\n\n\n // Check if anything passed on a message constituting a failure\n if ( ! empty( $message ) ) {\n $base_url = admin_url( 'options-general.php?page=' . $this->get_settings_page_slug() );\n $redirect = add_query_arg( array( 'fa_activation' => 'false', 'message' => urlencode( $message ) ), $base_url );\n\n wp_redirect( $redirect );\n exit();\n }\n\n // $license_data->license will be either \"deactivated\" or \"failed\"\n if( 'success' === $license_data->status ) {\n delete_transient( $this->product_id . '_license_status' );\n delete_option( $this->product_id . '_license_key' );\n }\n\n wp_redirect( admin_url( 'options-general.php?page=' . $this->get_settings_page_slug() ) );\n exit();\n\n }\n\n }\n }", "public function test_updates_when_new_version() {\n\t\t// Setup\n\t\t\\WP_Mock::userFunction( 'get_option', array(\n\t\t\t'times' => 1,\n\t\t\t'args' => array( 'tenup_scaffold_version' ),\n\t\t\t'return' => '0.0.1'\n\t\t) );\n\n\n\t\t\\WP_Mock::userFunction( 'TenUpScaffold\\Core\\code_version', array(\n\t\t\t'times' => 1,\n\t\t\t'return' => '0.2.0'\n\t\t) );\n\n\t\t\\WP_Mock::userFunction( 'update_option', array(\n\t\t\t'times' => 1,\n\t\t\t'args' => array( 'tenup_scaffold_version', '0.2.0' )\n\t\t) );\n\n\n\t\t// Fires actions\n\t\t\\WP_Mock::expectAction( 'tenup_scaffold_before_update' );\n\t\t\\WP_Mock::expectAction( 'tenup_scaffold_after_update' );\n\n\t\t// Act\n\t\t$updater = UpdateManager::get_instance();\n\t\t$updated = $updater->maybe_update();\n\n\t\t$this->assertTrue( $updated, 'maybe_update did not return true' );\n\t\t$this->assertConditionsMet();\n\t}", "public function setup_license()\n {\n // var_dump( get_option('ninja-drip-custom_fields') );\n if ( ! class_exists( 'NF_Extension_Updater' ) ) return;\n new NF_Extension_Updater( self::NAME, self::VERSION, self::AUTHOR, __FILE__, self::SLUG );\n }", "public function handleAjaxManageLicense() {\n\t\t// Get data from request\n\t\t$nonce = empty( $_GET['nonce'] )? null : sanitize_text_field( $_GET['nonce'] );\n\t\t$addon = empty( $_GET['addon'] )? null : sanitize_text_field( $_GET['addon'] );\n\t\t$event = empty( $_GET['event'] )? null : sanitize_text_field( $_GET['event'] );\n\t\t$licenseKey = empty( $_GET['license'] )? null : sanitize_text_field( $_GET['license'] );\n\n\t\t// If no nonce, stop\n\t\tif ( $nonce === null ) $this->_sendErrorResponse( __( 'No nonce', WPRSS_TEXT_DOMAIN ), $addon );\n\t\t// Generate the nonce id\n\t\t$nonce_id = sprintf( 'wprss_%s_license_nonce', $addon );\n\t\t// Verify the nonce. If verification fails, stop\n\t\tif ( ! wp_verify_nonce( $nonce, $nonce_id ) ) {\n\t\t\t$this->_sendErrorResponse( __( 'Bad nonce', WPRSS_TEXT_DOMAIN ), $addon );\n\t\t}\n\n\t\t// Check addon, event and license\n\t\tif ( $addon === null ) $this->_sendErrorResponse( __( 'No addon ID', WPRSS_TEXT_DOMAIN ) );\n\t\tif ( $event === null ) $this->_sendErrorResponse( __( 'No event specified', WPRSS_TEXT_DOMAIN ), $addon );\n\t\tif ( $licenseKey === null ) $this->_sendErrorResponse( __( 'No license', WPRSS_TEXT_DOMAIN ), $addon );\n\n $settings = $this->getSettingsController();\n $manager = $this->getManager();\n\n\t\t// Check if the license key was obfuscated on the client's end.\n\t\tif ( $settings->isLicenseKeyObfuscated( $licenseKey ) ) {\n\t\t\t// If so, use the stored license key since obfuscation signifies that the key was not modified\n\t\t\t// and is equal to the one saved in db\n\t\t\t$licenseKey = $manager->getLicense( $addon );\n\t\t} else {\n\t\t\t// Otherwise, update the value in db\n\t\t\t$license = $manager->getLicense( $addon );\n\t\t\tif ( $license === null ) {\n\t\t\t\t$license = $manager->createLicense( $addon );\n\t\t\t}\n\t\t\t$license->setKey( $licenseKey );\n\t\t\t$manager->saveLicenseKeys();\n\t\t}\n\n\t\t// uppercase first letter of event\n\t\t$event = ucfirst( $event );\n\t\t// Generate method name\n\t\t$eventMethod = sprintf( self::AJAX_MANAGE_LICENSE_METHOD_PATTERN, $event );\n\t\t// check if the event is handle-able\n\t\tif ( ! method_exists( $this, $eventMethod ) ) {\n\t\t\t$this->_sendErrorResponse( __( 'Invalid event specified', WPRSS_TEXT_DOMAIN ), $addon);\n\t\t}\n\n\t\t// Call the appropriate handler method\n\t\t$returnValue = call_user_func_array( array( $this, $eventMethod ), array( $addon ) );\n\n\t\t// Prepare the response\n\t\t$partialResponse = array(\n\t\t\t'addon'\t\t\t\t=>\t$addon,\n\t\t\t'html'\t\t\t\t=>\t$settings->getActivateLicenseButtonHtml( $addon ),\n\t\t\t'licensedAddons'\t=>\tarray_keys( $manager->getLicensesWithStatus( Status::VALID ) )\n\t\t);\n\t\t// Merge the returned value(s) from the handler method to generate the final resposne\n\t\t$response = array_merge( $partialResponse, $returnValue );\n\n\t\t// Return the JSON data.\n\t\techo json_encode( $response );\n\t\tdie();\n\t}", "function create_new_listing_commerce_order_update($order) {\r\n\r\n if ($order->status == \"pending\" && isset($order->uid)) {\r\n\r\n $licenses = commerce_license_get_order_licenses($order);\r\n\r\n foreach ($licenses as $license) {\r\n\r\n // If license_limit is not set\r\n if ($license->commerce_license_limit == array()) {\r\n\r\n // Find quota limit from commerce_product\r\n foreach ($order->commerce_line_items['und'] as $line) {\r\n $line_item = commerce_line_item_load($line['line_item_id']);\r\n $product_id = $line_item->commerce_product['und'];\r\n }\r\n $quota_limit = (commerce_product_load($product_id[0]['product_id'])->cl_node_quota['und'][0]['value']);\r\n\r\n // Save license with the quota limit as default limit value\r\n $license->wrapper->commerce_license_limit->set($quota_limit);\r\n $license->wrapper->save();\r\n }\r\n }\r\n }\r\n}", "public function _checkForUpdates()\n {\n $Update = new EditamUpdate();\n $this->credentials->set('has_checked_for_updates', true);\n if($message = $Update->getUpdateMessageIfNewVersionIsAvailable()){\n $SystemMessage = new SystemMessage();\n $SystemMessage->registerMessageForAdmins(array(\n 'value' => $message,\n 'message_key' => 'editam_update_pending',\n 'can_be_hidden' => true,\n 'seconds_to_expire' => 432000 // 5 days\n ));\n }\n }", "public function updateAsAdmin(): void\n {\n $admin = $this->adminUser();\n\n $this->assertTrue($admin->can('update', $admin));\n $this->assertTrue($admin->can('update', new User));\n }", "public function authorizePatch()\n {\n return $this->user()->can('roles.update') and $this->user()->level($this->role->level);\n }", "public function testUpdate()\n {\n $this->assertTrue(false);\n }", "public static function should_update_to_version($offered_ver)\n {\n }", "public static function canUpdateData() {\n if( current_user_can( static::$capability) ) {\n if( !isset( $_POST[ static::$nonce ] ) || !wp_verify_nonce( $_POST[ static::$nonce ], static::$nonce ) )\n return false;\n else\n return true;\n }\n return false;\n }", "public function testUpdateAdditionalCost()\n {\n }", "public function testUpdateSupplyInvalidCost()\n\t{\n\t\t$newInventoryItem = new SupplyType(\"pencil\", 20, \"office\", $this->urlms->getLab_index(0), 40);\n\t\t$this->urlms->getLab_index(0)->addInventoryItem($newInventoryItem);\n\t\t\n\t\t$_SESSION['urlms'] = $this->urlms ;\n\t\t$_SESSION['inventoryitem'] = $newInventoryItem;\n\t\t\n\t\t$this->assertEquals(1, count($this->urlms->getLab_index(0)->getInventoryItems()));\n\t\t\n\t\ttry {\n\t\t\t$this->controller->updateInventory(\"pencil\", \"forty\", \"essay tool\", null, 20);\n\t\t} catch (Exception $e) {\n\t\t\t$this->assertEquals(\"Please enter a valid cost.\", $e->getMessage());\n\t\t}\n\t\t\n\t\t// 2. Write all of the data\n\t\t$pers = $this->p;\n\t\t$pers->writeDataToStore($this->urlms);\n\t\t\n\t\t// 3. Clear the data from memory\n\t\t$this->urlms->delete();\n\t\t\n\t\t$this->assertEquals(0, $this->urlms->numberOfLabs());\n\t\t\n\t\t// 4. Load it back in\n\t\t$this->urlms = $pers->loadDataFromStore();\n\t\t\n\t\t// 5. Check that we got it back\n\t\t$this->assertEquals(1, count($this->urlms->getLab_index(0)->getInventoryItems()));\n\t}", "public\n\tstatic function ajax_verify_licence() {\n\n\t\t$option_licenses = new OptionLicenses();\n\t\t$licenses = $option_licenses->get_licenses();\n\n\t\t$license_package = isset( $_POST['data'] ) && isset( $_POST['data'][ self::FIELD_LICENSE_PACKAGE ] ) ? $_POST['data'][ self::FIELD_LICENSE_PACKAGE ] : null;\n\t\t$license_activation_uuid = $option_licenses->get_license_activation_uuid( $license_package );\n\n\t\tif ( empty( $license_activation_uuid ) ) {\n\n\t\t\t$licenses[ $license_package ] = array(\n\t\t\t\tself::FIELD_LICENSE_SUBSCRIPTION_NUMBER => $licenses[ $license_package ][ self::FIELD_LICENSE_SUBSCRIPTION_NUMBER ],\n\t\t\t);\n\t\t\tself::set_option_data( self::OPTION_LICENSES, $licenses );\n\n\t\t\techo json_encode( (object) array(\n\t\t\t\t'status' => (object) array(\n\t\t\t\t\t'state' => 'ERROR',\n\t\t\t\t\t'message' => 'This license activation code is missing. Try to unactivate manually, by signin to your subscription account.'\n\t\t\t\t)\n\t\t\t) );\n\n\t\t\tdie();\n\t\t}\n\n\t\t$managed_solr_server = new OptionManagedSolrServer();\n\t\t$response_object = $managed_solr_server->call_rest_verify_license( self::get_license_api_url(), $license_activation_uuid );\n\n\t\tif ( isset( $response_object ) && OptionManagedSolrServer::is_response_ok( $response_object ) ) {\n\n\t\t\tif ( isset( $licenses[ $license_package ] ) ) {\n\n\t\t\t\t// Remove the license type activation\n\t\t\t\t$licenses = self::get_option_data( self::OPTION_LICENSES, [] );\n\t\t\t\tforeach ( $licenses as $license_package_installed => $license ) {\n\n\t\t\t\t\tif ( $license_activation_uuid === $license[ self::FIELD_LICENSE_ACTIVATION_UUID ] ) {\n\t\t\t\t\t\tunset( $licenses[ $license_package_installed ][ self::FIELD_NEEDS_VERIFICATION ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tself::set_option_data( self::OPTION_LICENSES, $licenses );\n\t\t\t}\n\n\t\t}\n\n\t\t// Return the whole object\n\t\techo json_encode( $response_object );\n\n\t\tdie();\n\t}", "public function getRemote_license()\n {\n $request = wp_remote_post($this->update_path, array('body' => array('action' => 'license')));\n if (!is_wp_error($request) || wp_remote_retrieve_response_code($request) === 200) {\n\t\t\tif($request['body'] == \"false\" || $request['body'] == \"not_found\" || empty($request['body']))\n\t\t\t\tadd_action( 'admin_notices', array(&$this, 'admin_notice'));\n return $request['body'];\n \t }\n\t\t//add_action( 'admin_notices', array(&$this, 'admin_notice'));\n return true;\n }", "public function checkUserNeedToUpdateOnOffer() {\n $fields_array = array(\"first_name\",\n \"second_name\",\"phone\",\n \"address\",'birthday',\n 'city','gender',\n 'country',\n 'zipcode'\n );\n $is_update = false;\n foreach($fields_array as $field){\n if(trim($this->$field)==\"\"){\n $is_update = true;\n break;\n }\n }\n return $is_update;\n }", "function check_for_update(){\n return false;\n }", "public function testProductUpdatedSuccessfully()\n {\n dump('test_product_updated_successfully');\n\n $this->disableAuthorization();\n\n $response = $this->updateProduct();\n\n $response->assertStatus(200);\n\n $response->assertJsonFragment($this->validFields());\n }", "function activate_license() {\n\t\tif( isset( $_POST['edd_license_activate'] ) ) {\n\n\t\t\t// run a quick security check \n\t\t \tif( ! check_admin_referer( 'edd_sample_nonce', 'edd_sample_nonce' ) ) \t\n\t\t\t\treturn; // get out if we didn't click the Activate button\n\n\t\t\t// retrieve the license from the database\n\t\t\t$license = trim( get_option( $this->license_option_key ) );\n\n\t\t\t// data to send in our API request\n\t\t\t$api_params = array( \n\t\t\t\t'edd_action'=> 'activate_license', \n\t\t\t\t'license' \t=> $license, \n\t\t\t\t'item_name' => urlencode( $this->item_name ) // the name of our product in EDD\n\t\t\t);\n\t\t\t\n\t\t\t// Call the custom API.\n\t\t\t$response = wp_remote_get( add_query_arg( $api_params, $this->api_url ), array( 'timeout' => 15, 'sslverify' => false ) );\n\n\t\t\t// make sure the response came back okay\n\t\t\tif ( is_wp_error( $response ) )\n\t\t\t\treturn false;\n\n\t\t\t// decode the license data\n\t\t\t$license_data = json_decode( wp_remote_retrieve_body( $response ) );\n\t\t\t\n\t\t\t// $license_data->license will be either \"active\" or \"inactive\"\n\n\t\t\tupdate_option( $this->license_option_key . '_status', $license_data->license );\n\n\t\t}\n\t}", "function search_filter_activate_license()\r\n\t{\r\n\t\tif( isset( $_POST['search_filter_license_activate'] ) )\r\n\t\t{\r\n\t\t\t// run a quick security check\r\n\t\t\tif( ! check_admin_referer( 'search_filter_nonce', 'search_filter_nonce' ) )\r\n\t\t\t\treturn; // get out if we didn't click the Activate button\r\n\r\n\t\t\t// retrieve the license from the database\r\n\t\t\t$license = trim( get_option( 'search_filter_license_key' ) );\r\n\r\n\t\t\t// data to send in our API request\r\n\t\t\t$api_params = array(\r\n\t\t\t\t'edd_action'=> 'activate_license',\r\n\t\t\t\t'license' \t=> $license,\r\n\t\t\t\t'item_name' => urlencode( SEARCH_FILTER_ITEM_NAME ), // the name of our product in EDD\r\n\t\t\t\t'url' => home_url()\r\n\t\t\t);\r\n\r\n\t\t\t// Call the custom API.\r\n\t\t\t$response = wp_remote_get( add_query_arg( $api_params, SEARCH_FILTER_STORE_URL ), array( 'timeout' => 15, 'sslverify' => false ) );\r\n\r\n\t\t\t// make sure the response came back okay\r\n\t\t\tif ( is_wp_error( $response ) )\r\n\t\t\t\treturn false;\r\n\r\n\t\t\t// decode the license data\r\n\t\t\t$license_data = json_decode( wp_remote_retrieve_body( $response ) );\r\n\r\n\t\t\t// $license_data->license will be either \"valid\" or \"invalid\"\r\n\t\t\t$license_status = 'invalid';\r\n\t\t\tif ( property_exists( $license_data, 'license' ) ) {\r\n\t\t\t\t$license_status = $license_data->license;\r\n\t\t\t\tupdate_option( 'search_filter_license_status', $license_status );\r\n\t\t\t\tif( $license_status===\"invalid\" ) {\r\n\t\t\t\t\tupdate_option( 'search_filter_license_error', $license_data->error );\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tdelete_option( 'search_filter_license_error', '' );\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\t\t\t\tupdate_option( 'search_filter_license_status', $license_status );\r\n\t\t\t\tupdate_option( 'search_filter_license_error', __( 'Could not retreive license information.', 'search-filter-pro' ) );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ( property_exists( $license_data, 'expires' ) ) {\r\n\t\t\t\tupdate_option( 'search_filter_license_expires', $license_data->expires );\r\n\t\t\t} else {\r\n\t\t\t\tupdate_option( 'search_filter_license_expires', 0 );\r\n\t\t\t\tupdate_option( 'search_filter_license_error', __( 'Could not retreive expiry information.', 'search-filter-pro' ) );\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\r\n\r\n\t\t}\r\n\t}", "public static function saveLicense( $license )\n {\n //return true;\n\n $result = false;\n try {\n if ( self::isValidLicense( $license ) ) {\n if ( self::cleanSecure() ) {\n $db = empBD::globalBD( $GLOBALS[ \"DB_VWUSERS\" ], __FILE__, __LINE__ );\n\n // revocation reason is deleted (due to the new license)\n $q = \"INSERT INTO secure (hardware, licensee, request, expiration, activated, revocation_reason) VALUES\";\n $q .= '(\"' . $license[ 'hardware' ] . '\",\"' . $license[ 'licensee' ] . '\",\"'\n . $license[ 'request' ] . '\",\"' . $license[ 'expiration' ] . '\",' . $license[ 'activated' ] . ', null)';\n\n $licenseId = $db->insert_ID( $q, __FILE__, __LINE__ );\n\n if ( $licenseId !== '-1' ) {\n $q = \"INSERT INTO `secure_expire` ( `secure_id`, `interval`, `passed`) VALUES( $licenseId, 30, 0),($licenseId, 20, 0),($licenseId, 10, 0);\";\n $popupId = $db->insert_ID( $q, __FILE__, __LINE__ );\n\n $result = $popupId !== '-1';\n }\n }\n }\n } catch ( Exception $e ) {\n $result = false;\n }\n return $result;\n }", "public function test_updateLock() {\n\n }", "public function wpweb_upd_save_products_license() {\n\t\t\n\t\tif( !empty( $_POST['wpweb_upd_submit'] ) ) {//If click on save button\n\t\t\t\n\t\t\t//$wpwebupd_lickey\t= get_option( 'wpwebupd_lickey' );\n\t\t\t$wpwebupd_lickey\t= wpweb_all_plugins_purchase_code();\n\t\t\t$wpwebupd_email\t\t= wpweb_all_plugins_purchase_email();\n\t\t\t\n\t\t\t$post_lickey\t\t= $_POST['wpwebupd_lickey'];\n\t\t\t$post_email\t\t\t= $_POST['wpwebupd_email'];\n\t\t\t\n\t\t\tforeach ( $post_lickey as $plugin_key => $license_key ) {\n\t\t\t\t$wpwebupd_lickey[$plugin_key]\t= $license_key;\n\t\t\t}\n\t\t\twpweb_save_plugins_purchase_code( $wpwebupd_lickey );\n\t\t\t\n\t\t\tforeach ( $post_email as $plugin_key => $email_key ) {\n\t\t\t\t$wpwebupd_email[$plugin_key]\t= $email_key;\n\t\t\t}\n\t\t\twpweb_save_plugins_purchase_email( $wpwebupd_email );\n\t\t\t\n\t\t\twp_redirect( add_query_arg( array( 'message' => '1' ) ) );\n\t\t}\n\t\t\n\t\tif ( isset( $_GET['action'] ) && ( 'wpweb-upd-helper-dismiss' == $_GET['action'] ) && isset( $_GET['nonce'] ) && check_admin_referer( 'wpweb-upd-helper-dismiss', 'nonce' ) ) {\n\t\t\t\n\t\t\tupdate_site_option( 'wpwebupd_helper_dismiss_activation_notice', true );\n\t\t\t$redirect_url = remove_query_arg( 'action', remove_query_arg( 'nonce', $_SERVER['REQUEST_URI'] ) );\n\t\t\twp_safe_redirect( $redirect_url );\n\t\t\texit;\n\t\t}\n\t}", "public function testCrceOnlinePaymentUpdatePlan()\n {\n\n }", "public function editlicenceAction()\n {\n\n\t\t$sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n\t\t//$this->_helper->layout->disableLayout();\n \t\t$this->_helper->layout()->setLayout('layoutpublicesmcadmin');\n\t\t\n\tif (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');}\nif($sessionutilisateur->confirmation != \"\"){$this->_redirect('/administration/confirmation');}\n\n\tif (isset($_POST['ok']) && $_POST['ok']==\"ok\") {\n\tif (isset($_POST['num_licence']) && $_POST['num_licence']!=\"\" && isset($_POST['libelle_licence']) && $_POST['libelle_licence']!=\"\") {\n\t\t\n\t\tinclude(\"Transfert.php\");\n\t\tif(isset($_FILES['desc_licence']['name']) && $_FILES['desc_licence']['name']!=\"\"){\n\t\t$chemin\t= \"licences\";\n\t\t$file = $_FILES['desc_licence']['name'];\n\t\t$file1='desc_licence';\n\t\t$licence = $chemin.\"/\".transfert($chemin,$file1);\n\t\t} else {$licence = $_POST['desc_licence_old'];}\n\t\t\t\n $date_id = new Zend_Date(Zend_Date::ISO_8601);\n $a = new Application_Model_EuLicence();\n $ma = new Application_Model_EuLicenceMapper();\n\t\t$ma->find($_POST['id_licence'], $a);\n\t\t\t\n $a->setNum_licence($_POST['num_licence']);\n $a->setLibelle_licence($_POST['libelle_licence']);\n $a->setDesc_licence($licence);\n $ma->update($a);\n\t\t\t\n\t\t$this->_redirect('/administration/listlicence');\n\t\t} else { $this->view->error = \"Champs * obligatoire ...\"; \n\t\t \n $id = (int)$this->_request->getParam('id');\n if ($id != 0) {\n $a = new Application_Model_EuLicence();\n $ma = new Application_Model_EuLicenceMapper();\n\t\t$ma->find($id, $a);\n\t\t$this->view->licence = $a;\n }\n\t}\n\t\t \n\t} else {\n\n $id = (int)$this->_request->getParam('id');\n if ($id != 0) {\n $a = new Application_Model_EuLicence();\n $ma = new Application_Model_EuLicenceMapper();\n\t\t$ma->find($id, $a);\n\t\t$this->view->licence = $a;\n }\n\t}\n\t}", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('sales/niveus_requestproduct_requestnewproduct');\n }", "public function testRendersConditionsResultsOnUpdate() {\n\t\t\n\t\t$this->__testRendersConditionsResults('update');\n\t\t\n\t}", "public\n\tstatic function ajax_activate_licence() {\n\n\t\t$subscription_number = isset( $_POST['data'] ) && isset( $_POST['data'][ self::FIELD_LICENSE_SUBSCRIPTION_NUMBER ] ) ? $_POST['data'][ self::FIELD_LICENSE_SUBSCRIPTION_NUMBER ] : null;\n\t\t$license_package = isset( $_POST['data'] ) && isset( $_POST['data'][ self::FIELD_LICENSE_PACKAGE ] ) ? $_POST['data'][ self::FIELD_LICENSE_PACKAGE ] : null;\n\t\t$license_matching_reference = isset( $_POST['data'] ) && isset( $_POST['data'][ self::FIELD_LICENSE_MATCHING_REFERENCE ] ) ? $_POST['data'][ self::FIELD_LICENSE_MATCHING_REFERENCE ] : null;\n\n\t\t$managed_solr_server = new OptionManagedSolrServer();\n\t\t$response_object = $managed_solr_server->call_rest_activate_license( self::get_license_api_url(), $license_matching_reference, $subscription_number );\n\n\t\tif ( isset( $response_object ) && OptionManagedSolrServer::is_response_ok( $response_object ) ) {\n\n\t\t\t// Save the license type activation\n\t\t\t$licenses = self::get_option_data( self::OPTION_LICENSES, [] );\n\t\t\t$licenses[ $license_package ] = [\n\t\t\t\tself::FIELD_IS_ACTIVATED => true,\n\t\t\t\tself::FIELD_LICENSE_SUBSCRIPTION_NUMBER => $subscription_number,\n\t\t\t\tself::FIELD_LICENSE_ACTIVATION_UUID => OptionManagedSolrServer::get_response_result( $response_object, 'uuid' ),\n\t\t\t];\n\t\t\tself::set_option_data( self::OPTION_LICENSES, $licenses );\n\n\t\t} else {\n\n\t\t\t$response_object = $managed_solr_server->call_rest_activate_license( self::get_license_api_url(), 'wpsolr_package_multi', $subscription_number );\n\n\t\t\tif ( isset( $response_object ) && OptionManagedSolrServer::is_response_ok( $response_object ) ) {\n\n\t\t\t\t// Save the license type activation\n\t\t\t\t$licenses = self::get_option_data( self::OPTION_LICENSES, [] );\n\t\t\t\tforeach ( self::get_license_types() as $license_package => $license_definition ) {\n\n\t\t\t\t\t$licenses[ $license_package ] = [\n\t\t\t\t\t\tself::FIELD_IS_ACTIVATED => true,\n\t\t\t\t\t\tself::FIELD_LICENSE_SUBSCRIPTION_NUMBER => $subscription_number,\n\t\t\t\t\t\tself::FIELD_LICENSE_ACTIVATION_UUID => OptionManagedSolrServer::get_response_result( $response_object, 'uuid' ),\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\tself::set_option_data( self::OPTION_LICENSES, $licenses );\n\t\t\t}\n\t\t}\n\n\t\t// Return the whole object\n\t\techo json_encode( $response_object );\n\n\t\tdie();\n\t}", "public function testUpdateUserInventoryExpires()\n {\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Training_Vendor::index_save');\n }", "public function test_products_can_be_updated()\n {\n $shopper = Shopper::withoutEvents(function () {\n return Shopper::factory()->create();\n });\n\n $this->actingAs($shopper);\n\n $prdct = Product::factory()->create();\n\n $response = $this->patch(route('products.update', $prdct), $product = [\n 'name' => 'Samsung s21',\n 'SKU' => 'SDKJALD16089673882',\n 'price' => 999,\n 'image' => UploadedFile::fake()->image('avatar.jpg', 400, 400)->size(1000),\n ]);\n\n $response->assertSessionHasNoErrors([\n 'name',\n 'SKU',\n 'price',\n ]);\n\n $this->assertDatabaseHas(\n 'products',\n [\n 'name' => $product['name'],\n 'SKU' => $product['SKU'],\n 'price' => $product['price']*100,\n 'image' => '/storage/'.time().'.'.$product['image']->extension(),\n 'admin_created_id' => $shopper['admin_created_id'],\n 'admin_updated_id' => $shopper['admin_updated_id'],\n ]\n );\n\n $response->assertStatus(302);\n $response->assertRedirect(route('products.index'));\n }", "public function isUpdateable();", "public function authorize()\n {\n return $this->user()->can('update', $this->getSection());\n }", "public static function is_licensed() {\n\t\t\tif ( ! self::is_pro() ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ( ! isset( $GLOBALS['ithemes_updater_path'] ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tinclude_once( $GLOBALS['ithemes_updater_path'] . '/keys.php' );\n\t\t\tinclude_once( $GLOBALS['ithemes_updater_path'] . '/packages.php' );\n\n\t\t\tif ( ! class_exists( 'Ithemes_Updater_Packages' ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$package_details = Ithemes_Updater_Packages::get_full_details();\n\n\t\t\tif ( empty( $package_details['packages']['ithemes-security-pro/ithemes-security-pro.php']['status'] ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ( empty( $package_details['packages']['ithemes-security-pro/ithemes-security-pro.php']['user'] ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn 'active' === $package_details['packages']['ithemes-security-pro/ithemes-security-pro.php']['status'];\n\t\t}", "function checkAutomaticUpdates() {\n $settings = $this->getSettings();\n if ($settings && $settings->purchaseCode != \"\") {\n require_once('plugin_update_check.php');\n $updateCheckerWos = new PluginUpdateChecker_2_0(\n 'https://kernl.us/api/v1/updates/5718cb711e14737d770078b8/', $this->parent->file, 'wos', 1\n );\n $updateCheckerWos->purchaseCode = $settings->purchaseCode;\n }\n }", "public function authorize() {\n return Auth::user()->can('update', $this->route('campaign'));\n }", "public function setLicenceForbid() {\r\n $this->licenceForbid = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_libconnect.']['settings.']['dbislicenceforbid.'];\r\n }" ]
[ "0.7207222", "0.694073", "0.6748949", "0.6741384", "0.6712321", "0.6612847", "0.65507936", "0.63775116", "0.63078266", "0.6285761", "0.6275287", "0.6273681", "0.6266625", "0.61951834", "0.61556184", "0.6148787", "0.6112616", "0.6066141", "0.6059016", "0.60574996", "0.60351837", "0.5997969", "0.59904295", "0.5911875", "0.5907587", "0.5903406", "0.5901785", "0.59002805", "0.5894728", "0.5890305", "0.588822", "0.5882035", "0.58711827", "0.5859971", "0.585653", "0.58453095", "0.58404", "0.5824965", "0.58220243", "0.5811485", "0.58097255", "0.58069223", "0.58059704", "0.5801034", "0.580057", "0.57978904", "0.5789893", "0.5789193", "0.57865596", "0.57824284", "0.57812506", "0.5779578", "0.57763886", "0.5766579", "0.5756888", "0.57520473", "0.57435536", "0.5743166", "0.57404643", "0.57384014", "0.5734445", "0.5733012", "0.5732212", "0.5729186", "0.5721329", "0.5720357", "0.57183826", "0.5716321", "0.5716256", "0.5713591", "0.569383", "0.56882006", "0.56705743", "0.56605905", "0.5658637", "0.5654067", "0.56520724", "0.56518584", "0.5647755", "0.5640196", "0.5639669", "0.56306946", "0.56219393", "0.5620981", "0.56209767", "0.5620484", "0.56204695", "0.56132245", "0.5610424", "0.5605759", "0.5600957", "0.5597327", "0.55909824", "0.55900425", "0.55896384", "0.55884653", "0.55864346", "0.5585925", "0.55853075", "0.5585295" ]
0.7584837
0
Testting Shop_License::_canUpdate(); for demo shops (3870)
Тестирование Shop_License::_canUpdate(); для демонстрационных магазинов (3870)
public function testCanUpdateForDemoVersion() { $oSubj = $this->getProxyClass("Shop_License"); $this->getSession()->setVariable("malladmin", true); $oConfig = $this->getMock(\OxidEsales\Eshop\Core\Config::class, array("isDemoShop")); $oConfig->expects($this->any())->method('isDemoShop')->will($this->returnValue(true)); $oView = $this->getMock(\OxidEsales\Eshop\Application\Controller\Admin\ShopLicense::class, array("getConfig"), array(), '', false); $oView->expects($this->any())->method('getConfig')->will($this->returnValue($oConfig)); $this->assertFalse($oView->UNITcanUpdate()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCanUpdateForNonMallAdmin()\n {\n $oSubj = $this->getProxyClass(\"Shop_License\");\n\n $this->getSession()->setVariable(\"malladmin\", false);\n\n $oConfig = $this->getMock(\\OxidEsales\\Eshop\\Core\\Config::class, array(\"isDemoShop\", \"getConfigParam\", \"setConfigParam\", \"saveShopConfVar\", \"getBaseShopId\"));\n $oConfig->expects($this->any())->method('isDemoShop')->will($this->returnValue(false));\n $oView = $this->getMock(\\OxidEsales\\Eshop\\Application\\Controller\\Admin\\ShopLicense::class, array(\"getConfig\"), array(), '', false);\n $oView->expects($this->any())->method('getConfig')->will($this->returnValue($oConfig));\n\n $this->assertFalse($oSubj->UNITcanUpdate());\n }", "public function license_actions() {\n\n \tif ( !isset( $_POST['wpsl_licenses'] ) ) {\n return;\n }\n\n\t\tif ( !isset( $_POST['wpsl_licenses'][ $this->item_shortname ] ) || empty( $_POST['wpsl_licenses'][ $this->item_shortname ] ) ) {\n\t\t\treturn;\n }\n \n if ( !check_admin_referer( $this->item_shortname . '_license-nonce', $this->item_shortname . '_license-nonce' ) ) {\n return;\n }\n\n if ( !current_user_can( 'manage_wpsl_settings' ) ) {\n return;\n }\n \n if ( isset( $_POST[ $this->item_shortname . '_license_key_deactivate' ] ) ) {\n $this->deactivate_license();\n } else {\n $this->activate_license();\n }\n }", "public function isUpdateSecurityRelevant() {}", "function beaver_extender_check_license() {\n\t\n\tif ( ! empty( $_POST['beaver_extender_license_key'] ) )\n\t\treturn; // Don't fire when saving settings\n\t\n\t$status = get_transient( 'beaver_extender_license_check' );\n\n\t// Run the license check a maximum of once per day\n\tif ( false === $status ) {\n\t\t\n\t\t// retrieve the license from the database\n\t\t$license = trim( get_option( 'beaver_extender_license_key' ) );\n\n\t\t// data to send in our API request\n\t\t$api_params = array(\n\t\t\t'edd_action'=> 'check_license',\n\t\t\t'license' \t=> $license,\n\t\t\t'item_name' => urlencode( BBEXT_BEAVER_EXTENDER ),\n\t\t\t'url' => home_url()\n\t\t);\n\n\t\t// Call the custom API.\n\t\t$response = wp_remote_post( BBEXT_COBALT_APPS_URL, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );\n\n\t\t// make sure the response came back okay\n\t\tif ( is_wp_error( $response ) )\n\t\t\treturn false;\n\n\t\t$license_data = json_decode( wp_remote_retrieve_body( $response ) );\n\n\t\tif ( $license_data->license !== false && $license_data->license == 'valid' )\n\t\t\tupdate_option( 'beaver_extender_license_status', 'valid' );\n\t\telse\n\t\t\tupdate_option( 'beaver_extender_license_status', 'invalid' );\n\n\t\tset_transient( 'beaver_extender_license_check', $license, DAY_IN_SECONDS );\n\n\t\t$status = $license;\n\t\t\n\t}\n\n\treturn $status;\n\t\n}", "function testFunctionalAllowAdd() {\n\t\t$this->markTestIncomplete('rewrite old test');\n\t\t// $product = $this->objFromFixture('Product', 'p2a');\n\t\t// $product->setCurrentCurrency('USD');\n\t\t// $this->assertTrue($product->canPurchase(), 'The flag for allow purchase is set to TRUE.');\n\t\t// $response = $this->get($product->addLink());\n\t\t// $this->assertEquals($response->getStatusCode(), 200, \n\t\t// \t'We are allowed to purchase this product, we get redirected back.'\n\t\t// );\n\t}", "public function check_license_status() {\n\t\t\t$license_key = $this->get_license_key();\n\t\t\tif ( empty( $license_key ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$license_data = $this->api_request();\n\t\t\tif ( $license_data ) {\n\t\t\t\tupdate_option( $this->get_license_status_option_key(), $license_data );\n\t\t\t}\n\t\t}", "function old_testFunctionalAllowAdd() {\n\t\t$product = $this->objFromFixture('Product', 'p2a');\n\t\t$product->setCurrentCurrency('USD');\n\t\t$this->assertTrue($product->canPurchase(), 'The flag for allow purchase is set to TRUE.');\n\t\t$response = $this->get($product->addLink());\n\t\t$this->assertEquals($response->getStatusCode(), 200,\n\t\t\t'We are allowed to purchase this product, we get redirected back.'\n\t\t);\n\t}", "public function testCrceCostControlUpdateCostLimit()\n {\n\n }", "public function testCrceCostControlUpdateCostLimitStatus()\n {\n\n }", "public function testComAdobeGraniteLicenseImplLicenseCheckFilter() {\n\n }", "public function setup_licensing() {}", "protected function checkShopSells()\n\t{\n\n\t}", "function testFunctionalDenyAdd() {\n\t\t$this->markTestIncomplete('rewrite old test');\n\t\t// $product = $this->objFromFixture('Product', 'p1a');\n\t\t// $product->setCurrentCurrency('USD');\n\t\t// $this->assertFalse($product->canPurchase(), 'The flag for allow purchase is set to FALSE.');\n\t\t// $response = $this->get($product->addLink());\n\t\t// $this->assertEquals($response->getStatusCode(), 403, \n\t\t// \t'Because we can\\'t purchase the product, we get a blank page with no content.'\n\t\t// );\n\t}", "function wp_plugin_update(){\n $license_key = get_option('ead_envato_key');\n if($license_key){\n require_once( $this->plugin_path . 'lib/plugin_update_check.php' );\n $ead_updates = new PluginUpdateChecker_2_0 ( $this->meta_url, __FILE__, $this->plugin_slug, 1 );\n $ead_updates->purchaseCode = $license_key; \n } \n }", "public function mwb_upsell_bump_check_license() {\n\n\t\t$user_license_key = get_option( 'mwb_upsell_bump_license_key', '' );\n\n\t\t$api_params = array(\n\t\t\t'slm_action' => 'slm_check',\n\t\t\t'secret_key' => UPSELL_ORDER_BUMP_OFFER_FOR_WOOCOMMERCE_PRO_SPECIAL_SECRET_KEY,\n\t\t\t'license_key' => $user_license_key,\n\t\t\t'_registered_domain' => ! empty( $_SERVER['SERVER_NAME'] ) ? sanitize_text_field( wp_unslash( $_SERVER['SERVER_NAME'] ) ) : '',\n\t\t\t'item_reference' => urlencode( UPSELL_ORDER_BUMP_OFFER_FOR_WOOCOMMERCE_PRO_ITEM_REFERENCE ),\n\t\t\t'product_reference' => 'MWBPK-23841',\n\t\t);\n\n\t\t$query = esc_url_raw( add_query_arg( $api_params, UPSELL_ORDER_BUMP_OFFER_FOR_WOOCOMMERCE_PRO_LICENSE_SERVER_URL ) );\n\n\t\t$mwb_response = wp_remote_get(\n\t\t\t$query,\n\t\t\tarray(\n\t\t\t\t'timeout' => 20,\n\t\t\t\t'sslverify' => false,\n\t\t\t)\n\t\t);\n\n\t\t$license_data = json_decode( wp_remote_retrieve_body( $mwb_response ) );\n\n\t\tif ( isset( $license_data->result ) && 'success' === $license_data->result && isset( $license_data->status ) && 'active' === $license_data->status ) {\n\n\t\t\tupdate_option( 'mwb_upsell_bump_license_check', true );\n\t\t} else {\n\n\t\t\tdelete_option( 'mwb_upsell_bump_license_check' );\n\t\t}\n\n\t}", "public function is_license_valid()\n {\n // TODO: Build out license functionality\n return true;\n }", "private function validateUpdate() {\n\t\t$this->context->checkPermission(\\Scrivo\\AccessController::WRITE_ACCESS);\n\t\t$this->checkUniquePhpSelector();\n\t}", "function isValidLicense() {\n\t\ttry {\n\t\t\t$publicKey = system::getConfig()->getParam(\"mofilmmusic\", \"publickey\")->getParamValue();\n\t\t\t$privateKey = system::getConfig()->getParam(\"mofilmmusic\", \"privatekey\")->getParamValue();\t\t\n\t\t\t$server = system::getConfig()->getParam(\"mofilmmusic\", \"server\");\n\n\t\t\t$time = time();\n\t\t\t$hash = sha1(\n\t\t\t\thttp_build_query(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'apiKey' => $publicKey,\n\t\t\t\t\t\t'privateKey' => $privateKey,\n\t\t\t\t\t\t'time' => $time,\n\t\t\t\t\t\t'uri' => '/'.$this->getApiController().'/'.$this->getApiAction(),\n\t\t\t\t\t\t'licence_id' => $this->getLicenseID()\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$uri = sprintf('%s/%s/%s', $server, $this->getApiController(), $this->getApiAction());\n\t\t\t$query = sprintf('apiKey=%s&hash=%s&time=%d&licence_id=%s', $publicKey, $hash, $time, $this->getLicenseID());\n\t\t\tutilityCurl::$options = utilityCurl::$options + array(\n\t\t\t\tCURLOPT_SSL_VERIFYHOST => false,\n\t\t\t\tCURLOPT_SSL_VERIFYPEER => false,\n\t\t\t\tCURLOPT_TIMEOUT => 10,\n\t\t\t);\n\t\t\t$response = utilityCurl::fetchContent($uri.'?'.$query);\n\n\t\t\t$oXML = simplexml_load_string($response);\n\t\t\t$this->setResponseXML($oXML);\n\n\t\t\tif ( isset($oXML->response->messages->error) ) {\n\t\t\t\t$error = (string) $oXML->response->messages->error;\n\t\t\t} else {\n\t\t\t\t$error = '';\n\t\t\t}\n\n\t\t\tif ( $error == \"\" ) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\tthrow new mofilmException(\"Mofilm Music API Not Reachable\");\n\t\t}\n\t}", "public function testUcpPaymentMethodUpdate()\n {\n\n }", "public function AllowPurchaseNice();", "public function testUpdateExternalProduct()\n {\n }", "public function activate_license() {\n\n // listen for our activate button to be clicked\n if( isset( $_POST[ $this->product_id . '_license_activate' ] ) ) {\n\n // run a quick security check\n if( ! check_admin_referer( $this->product_id . '_license_nonce', $this->product_id . '_license_nonce' ) )\n return; // get out if we didn't click the Activate button\n\n // retrieve the license from the database\n $license_key = $_POST[ $this->product_id . '_license_key' ];\n\n // data to send in our API request\n $api_params = array(\n 'woo_sl_action' => 'activate',\n 'licence_key' => $license_key,\n );\n\n // Send query to the license manager server\n $response = $this->do_request( $api_params );\n\n // make sure the response came back okay\n if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {\n\n if ( is_wp_error( $response ) ) {\n $message = $response->get_error_message();\n } else {\n $message = __( 'Ocorreu um erro ao processar sua solicitação. Tente novamente.' );\n }\n\n } else {\n\n $license_data = json_decode( wp_remote_retrieve_body( $response ) );\n $license_data = array_shift( $license_data );\n\n if ( 'error' === $license_data->status ) {\n $message = $license_data->message;\n }\n }\n\n // Check if anything passed on a message constituting a failure\n if ( ! empty( $message ) ) {\n $base_url = admin_url( 'options-general.php?page=' . $this->get_settings_page_slug() );\n $redirect = add_query_arg( array( 'fa_activation' => 'false', 'message' => urlencode( $message ) ), $base_url );\n\n wp_redirect( $redirect );\n exit();\n }\n\n // $license_data->license will be either \"valid\" or \"invalid\"\n $this->set_license_key( $license_key );\n $this->set_license_status( $license_data->status );\n\n $base_url = admin_url( 'options-general.php?page=' . $this->get_settings_page_slug() );\n $redirect = add_query_arg( array( 'fa_activation' => 'true', 'message' => 'Licença ativada com sucesso' ), $base_url );\n\n wp_redirect( $redirect );\n exit();\n }\n }", "function old_testFunctionalDenyAdd() {\n\t\t$product = $this->objFromFixture('Product', 'p1a');\n\t\t$product->setCurrentCurrency('USD');\n\t\t$this->assertFalse($product->canPurchase(), 'The flag for allow purchase is set to FALSE.');\n\t\t$response = $this->get($product->addLink());\n\t\t$this->assertEquals($response->getStatusCode(), 403,\n\t\t\t'Because we can\\'t purchase the product, we get a blank page with no content.'\n\t\t);\n\t}", "public function productUpdateRules()\n {\n }", "private function validateUpdate() {\n\t\t$this->context->checkPermission(\\Scrivo\\AccessController::WRITE_ACCESS);\n\t}", "public function testCrceOnlinePaymentUpdatePlan()\n {\n\n }", "function ajax_license() { ?>\n\t<script type=\"text/javascript\" >\n\tfunction checkLicense() {\n\t\tvar data = {\n\t\t\t'action': 'wolive_checkLicense',\n\t\t\t'license': jQuery(\"#wolive_license_key\").val()\n\t\t};\n\t\t\n\t\tjQuery.post(ajaxurl, data, function(response) {\n\t\t\tvar obj = jQuery.parseJSON(response);\n\t\t\tif ( obj.status === 0 ) {\n\t\t\t\t// Not valid\n\n\t\t\t}else if (obj.status === 1) {\n\t\t\t\t// Valid\n\n\t\t\t} else if (obj.status === -1) {\n\n\t\t\t} else {\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t}\n\n\tjQuery(document).ready(function($) {\n\t\tjQuery(\"#button_license\").click(checkLicense);\n\t});\n \n\t</script> <?php\n}", "public function testUpdateProduct()\n {\n }", "function activate_license() {\n\n\t\t// listen for our activate button to be clicked\n\t\tif( isset( $_POST[$this->prefix.\"submit_license\"] ) ) {\n\n\t\t\t// run a quick security check \n\t\t \tif( ! wp_verify_nonce( $_POST[$this->prefix . 'license_nonce_field'], $this->prefix . 'submit_license' ) ) \t\n\t\t\t\treturn;\n\n\t\t\tupdate_option( $this->prefix . 'license_key', trim( $_POST[$this->prefix . 'license_key'] ) );\n\n\t\t\t// retrieve the license from the database\n\t\t\t$license = trim( get_option( $this->prefix . 'license_key' ) );\n\n\t\t\t// data to send in our API request\n\t\t\t$api_params = array( \n\t\t\t\t'edd_action'=> 'activate_license', \n\t\t\t\t'license' \t=> $license, \n\t\t\t\t'item_name' => urlencode( $this->addon_name ), // the name of our product in EDD\n\t\t\t\t'url' => home_url()\n\t\t\t);\n\t\t\t\n\t\t\t// Call the custom API.\n\t\t\t$response = wp_remote_get( add_query_arg( $api_params, $this->oxygen_url ), array( 'timeout' => 15, 'sslverify' => false ) );\n\n\t\t\t// make sure the response came back okay\n\t\t\tif ( is_wp_error( $response ) )\n\t\t\t\treturn false;\n\n\t\t\t// decode the license data\n\t\t\t$license_data = json_decode( wp_remote_retrieve_body( $response ) );\n\t\t\t\n\t\t\t// $license_data->license will be either \"valid\" or \"invalid\"\n\n\t\t\tupdate_option( $this->prefix . 'license_status', $license_data->license );\n\n\t\t}\n\t}", "public function setup_license()\n {\n // var_dump( get_option('ninja-drip-custom_fields') );\n if ( ! class_exists( 'NF_Extension_Updater' ) ) return;\n new NF_Extension_Updater( self::NAME, self::VERSION, self::AUTHOR, __FILE__, self::SLUG );\n }", "public function testInventoryProductAvailabilityPATCHRequestInventoryIDProductAvailabilitiesLogicalWarehouseIDUpdate()\n {\n }", "public function isUpdateSecurityRelevantReturnsFalseIfUpdateIsNotSecurityRelevant() {}", "function admin_init()\n\t{\n\t\tif (isset($_GET['pclihs']))\n\t\t{\n\t\t\tif (!current_user_can('manage_options'))\n\t\t\t{\n\t\t\t\twp_die('Permission Denied.');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$license_hash = $_GET['pclihs'];\n\t\t\t\t$product = isset($_GET['pcprd']) ? $_GET['pcprd'] : null;\n\t\t\t\t$license_hash = trim($license_hash);\n\t\t\t\t$product = trim($product);\n\t\t\t\t$hash_decoded = base64_decode($license_hash);\n\t\t\t\t$product_decoded = base64_decode($product);\n\n\t\t\t\tif ($hash_decoded !== false)\n\t\t\t\t{\n\t\t\t\t\t$license_hash = $hash_decoded;\n\t\t\t\t}\n\n\t\t\t\tif ($product_decoded !== false)\n\t\t\t\t{\n\t\t\t\t\t$product = $product_decoded;\n\t\t\t\t}\n\n\t\t\t\t$product_list = explode(',', $product);\n\t\t\t\t$product = $product_list[0];\n\n\t\t\t\t$license = $this->get_license($product);\n\t\t\t\t$license_new = $this->install_license($license_hash, $product);\n\n\t\t\t\tif ($license_new != null && isset($license_new['license-key']))\n\t\t\t\t{\n\t\t\t\t\t$license_new = $license_new['license-key'];\n\n\t\t\t\t\tif ($license == null || $license != $license_new)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($product_list as $product_id)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->set_license($license_new, $product_id);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$autoupdate_admin = $this->object->get_registry()->get_module('photocrati-auto_update-admin');\n\n\t\t\t\t\t\tif ($autoupdate_admin != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twp_redirect($autoupdate_admin->get_update_page_url());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$error = null;\n\n\t\t\t\t\tif (isset($license_new['error']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$error = $license_new['error'];\n\t\t\t\t\t}\n\t\t\t\t\telse if (is_string($license_new))\n\t\t\t\t\t{\n\t\t\t\t\t\t$error = $license_new;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($error != null)\n\t\t\t\t\t{\n\t\t\t\t\t\t$error = ': ' . $error;\n\t\t\t\t\t}\n\n\t\t\t\t\t$error .= '.';\n\n\t\t\t\t\twp_die('Couldn\\'t activate membership' . $error);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function search_filter_activate_license()\r\n\t{\r\n\t\tif( isset( $_POST['search_filter_license_activate'] ) )\r\n\t\t{\r\n\t\t\t// run a quick security check\r\n\t\t\tif( ! check_admin_referer( 'search_filter_nonce', 'search_filter_nonce' ) )\r\n\t\t\t\treturn; // get out if we didn't click the Activate button\r\n\r\n\t\t\t// retrieve the license from the database\r\n\t\t\t$license = trim( get_option( 'search_filter_license_key' ) );\r\n\r\n\t\t\t// data to send in our API request\r\n\t\t\t$api_params = array(\r\n\t\t\t\t'edd_action'=> 'activate_license',\r\n\t\t\t\t'license' \t=> $license,\r\n\t\t\t\t'item_name' => urlencode( SEARCH_FILTER_ITEM_NAME ), // the name of our product in EDD\r\n\t\t\t\t'url' => home_url()\r\n\t\t\t);\r\n\r\n\t\t\t// Call the custom API.\r\n\t\t\t$response = wp_remote_get( add_query_arg( $api_params, SEARCH_FILTER_STORE_URL ), array( 'timeout' => 15, 'sslverify' => false ) );\r\n\r\n\t\t\t// make sure the response came back okay\r\n\t\t\tif ( is_wp_error( $response ) )\r\n\t\t\t\treturn false;\r\n\r\n\t\t\t// decode the license data\r\n\t\t\t$license_data = json_decode( wp_remote_retrieve_body( $response ) );\r\n\r\n\t\t\t// $license_data->license will be either \"valid\" or \"invalid\"\r\n\t\t\t$license_status = 'invalid';\r\n\t\t\tif ( property_exists( $license_data, 'license' ) ) {\r\n\t\t\t\t$license_status = $license_data->license;\r\n\t\t\t\tupdate_option( 'search_filter_license_status', $license_status );\r\n\t\t\t\tif( $license_status===\"invalid\" ) {\r\n\t\t\t\t\tupdate_option( 'search_filter_license_error', $license_data->error );\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tdelete_option( 'search_filter_license_error', '' );\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\t\t\t\tupdate_option( 'search_filter_license_status', $license_status );\r\n\t\t\t\tupdate_option( 'search_filter_license_error', __( 'Could not retreive license information.', 'search-filter-pro' ) );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ( property_exists( $license_data, 'expires' ) ) {\r\n\t\t\t\tupdate_option( 'search_filter_license_expires', $license_data->expires );\r\n\t\t\t} else {\r\n\t\t\t\tupdate_option( 'search_filter_license_expires', 0 );\r\n\t\t\t\tupdate_option( 'search_filter_license_error', __( 'Could not retreive expiry information.', 'search-filter-pro' ) );\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\r\n\r\n\t\t}\r\n\t}", "public function check_product_offer()\n {\n\n }", "function canBeUpdated() ;", "public function testEditSuccessful()\n {\n $this->addFactoryProduct();\n $this->assertEditProduct(200);\n }", "function activate_license() {\n\t\tif( isset( $_POST['edd_license_activate'] ) ) {\n\n\t\t\t// run a quick security check \n\t\t \tif( ! check_admin_referer( 'edd_sample_nonce', 'edd_sample_nonce' ) ) \t\n\t\t\t\treturn; // get out if we didn't click the Activate button\n\n\t\t\t// retrieve the license from the database\n\t\t\t$license = trim( get_option( $this->license_option_key ) );\n\n\t\t\t// data to send in our API request\n\t\t\t$api_params = array( \n\t\t\t\t'edd_action'=> 'activate_license', \n\t\t\t\t'license' \t=> $license, \n\t\t\t\t'item_name' => urlencode( $this->item_name ) // the name of our product in EDD\n\t\t\t);\n\t\t\t\n\t\t\t// Call the custom API.\n\t\t\t$response = wp_remote_get( add_query_arg( $api_params, $this->api_url ), array( 'timeout' => 15, 'sslverify' => false ) );\n\n\t\t\t// make sure the response came back okay\n\t\t\tif ( is_wp_error( $response ) )\n\t\t\t\treturn false;\n\n\t\t\t// decode the license data\n\t\t\t$license_data = json_decode( wp_remote_retrieve_body( $response ) );\n\t\t\t\n\t\t\t// $license_data->license will be either \"active\" or \"inactive\"\n\n\t\t\tupdate_option( $this->license_option_key . '_status', $license_data->license );\n\n\t\t}\n\t}", "function update_license($data = false)\n {\n if (false === $data) {\n $tmp = delete_option('wf_licensing_' . $this->prefix);\n } else {\n if (!isset($data['access_key'])) {\n $data['access_key'] = $this->get_license('access_key');\n }\n $tmp = update_option('wf_licensing_' . $this->prefix, $data);\n }\n\n return $tmp;\n }", "public function define_license_manager() {\n //** Break if we already have errors to prevent fatal ones. */\n if( $this->has_errors() ) {\n return false;\n }\n //** Be sure we have license scheme to continue */\n $schema = $this->get_schema( 'extra.schemas.licenses.product' );\n if( !$schema ) {\n return false;\n }\n if( empty( $schema[ 'product_id' ] ) || ( empty( $schema[ 'referrer' ] ) && $this->type !== 'theme' ) ) {\n $this->errors->add( __( 'Product requires license, but product ID and (or) referrer is undefined. Please, be sure, that license schema has all required data.', $this->domain ), 'message' );\n }\n $schema = array_merge( (array)$schema, array(\n 'type' => $this->type,\n 'name' => $this->name,\n 'boot_file' => $this->boot_file,\n 'errors_callback' => array( $this->errors, 'add' )\n ) );\n //** Licenses Manager */\n if( !class_exists( '\\UsabilityDynamics\\UD_API\\Manager' ) ) {\n //$this->errors->add( __( 'Class \\UsabilityDynamics\\UD_API\\Manager does not exist. Be sure all required plugins installed and activated.', $this->domain ), 'message' );\n return false;\n }\n $this->license_manager = new \\UsabilityDynamics\\UD_API\\Manager( $schema );\n return true;\n }", "public function testProductUpdateAuthorizationSuccessfully()\n {\n dump('test_product_update_authorization_successfully_user_company_owner');\n\n $user = $this->product->company->user;\n\n $this->signIsUsingPassportAsUser($user);\n\n $response = $this->updateProduct();\n\n $response->assertStatus(200);\n\n $response->assertJsonFragment($this->validFields());\n\n dump('test_product_update_authorization_successfully_user_company_admin');\n\n $user = factory(User::class)->create();\n\n $user->userCompanyRole()->create([\n 'company_id' => $this->product->company->id,\n 'role_id' => $this->admin->id,\n ]);\n\n $this->signIsUsingPassportAsUser($user);\n\n $response = $this->updateProduct();\n\n $response->assertStatus(200);\n\n $response->assertJsonFragment($this->validFields());\n\n dump('test_product_update_authorization_successfully_company_update_permission');\n\n $user = factory(User::class)->create();\n\n $user->userCompanyPermission()->create([\n 'company_id' => $this->product->company->id,\n 'permission_id' => $this->updatePermission->id,\n ]);\n\n $this->signIsUsingPassportAsUser($user);\n\n $response = $this->updateProduct();\n\n $response->assertStatus(200);\n\n $response->assertJsonFragment($this->validFields());\n }", "function deactivate_license() {\n\n // listen for our activate button to be clicked\n if( isset( $_POST[ $this->product_id . '_license_deactivate' ] ) ) {\n // run a quick security check\n if( ! check_admin_referer( $this->product_id . '_license_nonce', $this->product_id . '_license_nonce' ) ) {\n return; // get out if we didn't click the Activate button\n }\n\n // retrieve the license from the database\n $license_key = $this->get_license_key();\n\n // data to send in our API request\n $api_params = array(\n 'woo_sl_action' => 'deactivate',\n 'licence_key' => $license_key,\n );\n\n // Send query to the license manager server\n $response = $this->do_request( $api_params );\n\n // make sure the response came back okay\n if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {\n\n if ( is_wp_error( $response ) ) {\n $message = $response->get_error_message();\n } else {\n $message = __( 'Ocorreu um erro ao processar sua solicitação. Tente novamente.' );\n }\n\n $base_url = admin_url( 'options-general.php?page=' . $this->get_settings_page_slug() );\n $redirect = add_query_arg( array( 'fa_activation' => 'false', 'message' => urlencode( $message ) ), $base_url );\n\n wp_redirect( $redirect );\n exit();\n } else {\n\n $license_data = json_decode( wp_remote_retrieve_body( $response ) );\n $license_data = array_shift( $license_data );\n\n if ( 'error' === $license_data->status ) {\n $message = $license_data->message;\n }\n\n\n // Check if anything passed on a message constituting a failure\n if ( ! empty( $message ) ) {\n $base_url = admin_url( 'options-general.php?page=' . $this->get_settings_page_slug() );\n $redirect = add_query_arg( array( 'fa_activation' => 'false', 'message' => urlencode( $message ) ), $base_url );\n\n wp_redirect( $redirect );\n exit();\n }\n\n // $license_data->license will be either \"deactivated\" or \"failed\"\n if( 'success' === $license_data->status ) {\n delete_transient( $this->product_id . '_license_status' );\n delete_option( $this->product_id . '_license_key' );\n }\n\n wp_redirect( admin_url( 'options-general.php?page=' . $this->get_settings_page_slug() ) );\n exit();\n\n }\n\n }\n }", "public function test_to_see_if_user_can_edit_a_customer()\n {\n\n $this->put('/customer/1', CustomerTestConstants::UPDATED_CUSTOMER_EXAMPLE);\n\n $this->assertDatabaseHas('customers', CustomerTestConstants::UPDATED_CUSTOMER_EXAMPLE);\n }", "function update_work_license ($dbh, $work_id, $license) {\n $update_lic = 'UPDATE works SET license=' . $license\n . ' WHERE work_id=' . $work_id;\n $ok = $dbh->exec($update_lic);\n if ($ok) {\n $ok = license_changed_for_work($dbh, $work_id, $license);\n }\n return $ok;\n}", "public function form_is_available_to_update_a_permission()\n {\n\n }", "public\n\tstatic function ajax_activate_licence() {\n\n\t\t$subscription_number = isset( $_POST['data'] ) && isset( $_POST['data'][ self::FIELD_LICENSE_SUBSCRIPTION_NUMBER ] ) ? $_POST['data'][ self::FIELD_LICENSE_SUBSCRIPTION_NUMBER ] : null;\n\t\t$license_package = isset( $_POST['data'] ) && isset( $_POST['data'][ self::FIELD_LICENSE_PACKAGE ] ) ? $_POST['data'][ self::FIELD_LICENSE_PACKAGE ] : null;\n\t\t$license_matching_reference = isset( $_POST['data'] ) && isset( $_POST['data'][ self::FIELD_LICENSE_MATCHING_REFERENCE ] ) ? $_POST['data'][ self::FIELD_LICENSE_MATCHING_REFERENCE ] : null;\n\n\t\t$managed_solr_server = new OptionManagedSolrServer();\n\t\t$response_object = $managed_solr_server->call_rest_activate_license( self::get_license_api_url(), $license_matching_reference, $subscription_number );\n\n\t\tif ( isset( $response_object ) && OptionManagedSolrServer::is_response_ok( $response_object ) ) {\n\n\t\t\t// Save the license type activation\n\t\t\t$licenses = self::get_option_data( self::OPTION_LICENSES, [] );\n\t\t\t$licenses[ $license_package ] = [\n\t\t\t\tself::FIELD_IS_ACTIVATED => true,\n\t\t\t\tself::FIELD_LICENSE_SUBSCRIPTION_NUMBER => $subscription_number,\n\t\t\t\tself::FIELD_LICENSE_ACTIVATION_UUID => OptionManagedSolrServer::get_response_result( $response_object, 'uuid' ),\n\t\t\t];\n\t\t\tself::set_option_data( self::OPTION_LICENSES, $licenses );\n\n\t\t} else {\n\n\t\t\t$response_object = $managed_solr_server->call_rest_activate_license( self::get_license_api_url(), 'wpsolr_package_multi', $subscription_number );\n\n\t\t\tif ( isset( $response_object ) && OptionManagedSolrServer::is_response_ok( $response_object ) ) {\n\n\t\t\t\t// Save the license type activation\n\t\t\t\t$licenses = self::get_option_data( self::OPTION_LICENSES, [] );\n\t\t\t\tforeach ( self::get_license_types() as $license_package => $license_definition ) {\n\n\t\t\t\t\t$licenses[ $license_package ] = [\n\t\t\t\t\t\tself::FIELD_IS_ACTIVATED => true,\n\t\t\t\t\t\tself::FIELD_LICENSE_SUBSCRIPTION_NUMBER => $subscription_number,\n\t\t\t\t\t\tself::FIELD_LICENSE_ACTIVATION_UUID => OptionManagedSolrServer::get_response_result( $response_object, 'uuid' ),\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\tself::set_option_data( self::OPTION_LICENSES, $licenses );\n\t\t\t}\n\t\t}\n\n\t\t// Return the whole object\n\t\techo json_encode( $response_object );\n\n\t\tdie();\n\t}", "public function testCrceCostControlDisableCostLimit()\n {\n\n }", "private static function _woo_core_update_available()\n {\n }", "public function test_products_can_be_updated()\n {\n $shopper = Shopper::withoutEvents(function () {\n return Shopper::factory()->create();\n });\n\n $this->actingAs($shopper);\n\n $prdct = Product::factory()->create();\n\n $response = $this->patch(route('products.update', $prdct), $product = [\n 'name' => 'Samsung s21',\n 'SKU' => 'SDKJALD16089673882',\n 'price' => 999,\n 'image' => UploadedFile::fake()->image('avatar.jpg', 400, 400)->size(1000),\n ]);\n\n $response->assertSessionHasNoErrors([\n 'name',\n 'SKU',\n 'price',\n ]);\n\n $this->assertDatabaseHas(\n 'products',\n [\n 'name' => $product['name'],\n 'SKU' => $product['SKU'],\n 'price' => $product['price']*100,\n 'image' => '/storage/'.time().'.'.$product['image']->extension(),\n 'admin_created_id' => $shopper['admin_created_id'],\n 'admin_updated_id' => $shopper['admin_updated_id'],\n ]\n );\n\n $response->assertStatus(302);\n $response->assertRedirect(route('products.index'));\n }", "function IAP_Check_License() {\r\n\r\n\t$_REQUEST['ModTrace'][] = basename(__FILE__).\"-(\".__FUNCTION__.\")-(\".__LINE__.\")\";\r\n\r\n\tif ($_REQUEST['UserData']['Mode'] == \"expired\") {\r\n\t\techo \"<span class=iapError>Error - Your current subscription has expired. You can view your data but make no changes.</span>\";\r\n\t\techo \"&nbsp;&nbsp;&nbsp;<img src='MyHelp/LHCQuestionMark.png' class='tooltip' title='Your subscription can be renewed in the store.'>\";\r\n\t\techo \"<br><br>\";\r\n\t} elseif ($_REQUEST['UserData']['Mode'] == \"warn\") {\r\n\t\techo \"<span class=iapWarning>WARNING - Your current subscription will expire on \".date(\"m/d/Y\", strtotime($_REQUEST['UserData']['Expires'])).\"</span>\";\r\n\t\techo \"&nbsp;&nbsp;&nbsp;<img src='MyHelp/LHCQuestionMark.png' class='tooltip' title='Your subscription can be renewed in the store.'>\";\t\r\n\t\techo \"<br><br>\";\r\n\t}\r\n}", "public\n\tstatic function ajax_verify_licence() {\n\n\t\t$option_licenses = new OptionLicenses();\n\t\t$licenses = $option_licenses->get_licenses();\n\n\t\t$license_package = isset( $_POST['data'] ) && isset( $_POST['data'][ self::FIELD_LICENSE_PACKAGE ] ) ? $_POST['data'][ self::FIELD_LICENSE_PACKAGE ] : null;\n\t\t$license_activation_uuid = $option_licenses->get_license_activation_uuid( $license_package );\n\n\t\tif ( empty( $license_activation_uuid ) ) {\n\n\t\t\t$licenses[ $license_package ] = array(\n\t\t\t\tself::FIELD_LICENSE_SUBSCRIPTION_NUMBER => $licenses[ $license_package ][ self::FIELD_LICENSE_SUBSCRIPTION_NUMBER ],\n\t\t\t);\n\t\t\tself::set_option_data( self::OPTION_LICENSES, $licenses );\n\n\t\t\techo json_encode( (object) array(\n\t\t\t\t'status' => (object) array(\n\t\t\t\t\t'state' => 'ERROR',\n\t\t\t\t\t'message' => 'This license activation code is missing. Try to unactivate manually, by signin to your subscription account.'\n\t\t\t\t)\n\t\t\t) );\n\n\t\t\tdie();\n\t\t}\n\n\t\t$managed_solr_server = new OptionManagedSolrServer();\n\t\t$response_object = $managed_solr_server->call_rest_verify_license( self::get_license_api_url(), $license_activation_uuid );\n\n\t\tif ( isset( $response_object ) && OptionManagedSolrServer::is_response_ok( $response_object ) ) {\n\n\t\t\tif ( isset( $licenses[ $license_package ] ) ) {\n\n\t\t\t\t// Remove the license type activation\n\t\t\t\t$licenses = self::get_option_data( self::OPTION_LICENSES, [] );\n\t\t\t\tforeach ( $licenses as $license_package_installed => $license ) {\n\n\t\t\t\t\tif ( $license_activation_uuid === $license[ self::FIELD_LICENSE_ACTIVATION_UUID ] ) {\n\t\t\t\t\t\tunset( $licenses[ $license_package_installed ][ self::FIELD_NEEDS_VERIFICATION ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tself::set_option_data( self::OPTION_LICENSES, $licenses );\n\t\t\t}\n\n\t\t}\n\n\t\t// Return the whole object\n\t\techo json_encode( $response_object );\n\n\t\tdie();\n\t}", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('catalog/bs_coursecost/coursecost');\n }", "public function superadmin_manage_added_license($license_id = null, $action = null) {\n $this->layout = 'ajax';\n $this->loadModel('LicenseDetail');\n //action set\n if (isset($action) && (!empty($action))) {\n $disabled = \"\";\n } else {\n $disabled = \"disabled\";\n }\n $this->set('disabled', $disabled);\n //unique ccompany id\n $haskKey = \"CMP\" . $this->generateKey();\n $this->loadModel('User');\n $checkIfAlready = $this->User->find('first', array('conditions' => array('User.company_id' => $haskKey, 'type' => 'company_license')));\n if ($checkIfAlready) {\n $haskKey = $this->generateKey();\n } else {\n $haskKey = $haskKey;\n }\n $this->set('rand_user_id', $haskKey);\n //licensed id\n if ((isset($license_id)) and ( !empty($license_id))) {\n $this->set(\"licensee_id\", $license_id);\n }\n //get license name and nmls from id:\n $getInfo = $this->LicenseDetail->find('first', array('conditions' => array('LicenseDetail.id' => $license_id)));\n $this->set('license_details', $getInfo);\n //get the states list for billing info page\n $this->loadModel('State');\n $stateList = $this->State->find('list', array('fields' => array('State.state_code')));\n $this->set('stateList', $stateList);\n //get the added company admin\n $getAdmins = $this->User->find('all', array('order' => array('User.id' => 'DESC'), 'conditions' => array('User.type' => 'company_admin', 'User.license_id' => $license_id), 'recursive' => -1));\n if ($getAdmins) {\n $this->set('all_company_admins', $getAdmins);\n }\n //get the fee defaults\n $this->loadModel('FeeDefault');\n $getDetailedFees = $this->FeeDefault->find('all', array('order' => array('FeeDefault.id' => 'ASC')));\n if ($getDetailedFees) {\n $this->set('feesDetails', $getDetailedFees);\n }\n //get the applicable fee defaults set for a particular company license\n $this->loadModel('LicenseApplicableFees');\n $getapplicableLicenseFees = $this->LicenseApplicableFees->find('all', array('order' => array('LicenseApplicableFees.id' => 'ASC'), 'conditions' => array('LicenseApplicableFees.license_id' => $license_id)));\n if ($getapplicableLicenseFees) {\n $this->set('getapplicableLicenseFees', $getapplicableLicenseFees);\n }\n //get the reports data (licensed users)\n $licensed_users = $this->User->find('all', array('conditions' => array('User.type' => 'company_admin'), 'fields' => array('User.total_time_spent')));\n if ($licensed_users) {\n $this->Set('licensed_users_activity', $licensed_users);\n }\n }", "public function testUpdateSupplyInvalidCost()\n\t{\n\t\t$newInventoryItem = new SupplyType(\"pencil\", 20, \"office\", $this->urlms->getLab_index(0), 40);\n\t\t$this->urlms->getLab_index(0)->addInventoryItem($newInventoryItem);\n\t\t\n\t\t$_SESSION['urlms'] = $this->urlms ;\n\t\t$_SESSION['inventoryitem'] = $newInventoryItem;\n\t\t\n\t\t$this->assertEquals(1, count($this->urlms->getLab_index(0)->getInventoryItems()));\n\t\t\n\t\ttry {\n\t\t\t$this->controller->updateInventory(\"pencil\", \"forty\", \"essay tool\", null, 20);\n\t\t} catch (Exception $e) {\n\t\t\t$this->assertEquals(\"Please enter a valid cost.\", $e->getMessage());\n\t\t}\n\t\t\n\t\t// 2. Write all of the data\n\t\t$pers = $this->p;\n\t\t$pers->writeDataToStore($this->urlms);\n\t\t\n\t\t// 3. Clear the data from memory\n\t\t$this->urlms->delete();\n\t\t\n\t\t$this->assertEquals(0, $this->urlms->numberOfLabs());\n\t\t\n\t\t// 4. Load it back in\n\t\t$this->urlms = $pers->loadDataFromStore();\n\t\t\n\t\t// 5. Check that we got it back\n\t\t$this->assertEquals(1, count($this->urlms->getLab_index(0)->getInventoryItems()));\n\t}", "public function checkUpdate()\n\t{\n\t}", "function create_new_listing_commerce_order_update($order) {\r\n\r\n if ($order->status == \"pending\" && isset($order->uid)) {\r\n\r\n $licenses = commerce_license_get_order_licenses($order);\r\n\r\n foreach ($licenses as $license) {\r\n\r\n // If license_limit is not set\r\n if ($license->commerce_license_limit == array()) {\r\n\r\n // Find quota limit from commerce_product\r\n foreach ($order->commerce_line_items['und'] as $line) {\r\n $line_item = commerce_line_item_load($line['line_item_id']);\r\n $product_id = $line_item->commerce_product['und'];\r\n }\r\n $quota_limit = (commerce_product_load($product_id[0]['product_id'])->cl_node_quota['und'][0]['value']);\r\n\r\n // Save license with the quota limit as default limit value\r\n $license->wrapper->commerce_license_limit->set($quota_limit);\r\n $license->wrapper->save();\r\n }\r\n }\r\n }\r\n}", "public function testAppVerificationUpdate()\n {\n }", "public function testCompanySettingsRequestCollegialListingAuthorization()\n {\n }", "public static function is_licensed() {\n\t\t\tif ( ! self::is_pro() ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ( ! isset( $GLOBALS['ithemes_updater_path'] ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tinclude_once( $GLOBALS['ithemes_updater_path'] . '/keys.php' );\n\t\t\tinclude_once( $GLOBALS['ithemes_updater_path'] . '/packages.php' );\n\n\t\t\tif ( ! class_exists( 'Ithemes_Updater_Packages' ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$package_details = Ithemes_Updater_Packages::get_full_details();\n\n\t\t\tif ( empty( $package_details['packages']['ithemes-security-pro/ithemes-security-pro.php']['status'] ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ( empty( $package_details['packages']['ithemes-security-pro/ithemes-security-pro.php']['user'] ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn 'active' === $package_details['packages']['ithemes-security-pro/ithemes-security-pro.php']['status'];\n\t\t}", "function give_v250_upgrades() {\n\tglobal $wpdb;\n\n\t$old_license = array();\n\t$new_license = array();\n\t$give_licenses = get_option( 'give_licenses', array() );\n\t$give_options = give_get_settings();\n\n\t// Get add-ons license key.\n\t$addons = array();\n\tforeach ( $give_options as $key => $value ) {\n\t\tif ( false !== strpos( $key, '_license_key' ) ) {\n\t\t\t$addons[ $key ] = $value;\n\t\t}\n\t}\n\n\t// Bailout: We do not have any add-on license data to upgrade.\n\tif ( empty( $addons ) ) {\n\t\treturn false;\n\t}\n\n\tforeach ( $addons as $key => $license_key ) {\n\n\t\t// Get addon shortname.\n\t\t$addon_shortname = str_replace( '_license_key', '', $key );\n\n\t\t// Addon license option name.\n\t\t$addon_shortname = \"{$addon_shortname}_license_active\";\n\t\t$addon_license_data = get_option( \"{$addon_shortname}_license_active\", array() );\n\n\t\tif (\n\t\t\t! $license_key\n\t\t\t|| array_key_exists( $license_key, $give_licenses )\n\t\t) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$old_license[ $license_key ] = $addon_license_data;\n\t}\n\n\t// Bailout.\n\tif ( empty( $old_license ) ) {\n\t\treturn false;\n\t}\n\n\t/* @var stdClass $data */\n\tforeach ( $old_license as $key => $data ) {\n\t\t$tmp = Give_License::request_license_api( array(\n\t\t\t'edd_action' => 'check_license',\n\t\t\t'license' => $key,\n\t\t), true );\n\n\t\tif ( is_wp_error( $tmp ) || ! $tmp['success'] ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$new_license[ $key ] = $tmp;\n\t}\n\n\t// Bailout.\n\tif ( empty( $new_license ) ) {\n\t\treturn false;\n\t}\n\n\t$give_licenses = array_merge( $give_licenses, $new_license );\n\n\tupdate_option( 'give_licenses', $give_licenses );\n\n\t/**\n\t * Delete data.\n\t */\n\n\t// 1. license keys\n\tforeach ( get_option( 'give_settings' ) as $index => $setting ) {\n\t\tif ( false !== strpos( $index, '_license_key' ) ) {\n\t\t\tgive_delete_option( $index );\n\t\t}\n\t}\n\n\t// 2. license api data\n\t$wpdb->query( \"DELETE FROM {$wpdb->options} WHERE option_name like '%_license_active%' AND option_name like 'give_%'\" );\n\n\t// 3. subscriptions data\n\tdelete_option( '_give_subscriptions_edit_last' );\n\tdelete_option( 'give_subscriptions' );\n\n\t// 4. misc\n\tdelete_option( 'give_is_addon_activated' );\n\n\tgive_refresh_licenses();\n}", "public function testCrceTariffChangeGetAvailable()\n {\n\n }", "public function testUpdateSupplyNullCost()\n\t{\n\t\t$newInventoryItem = new SupplyType(\"pencil\", 20, \"office\", $this->urlms->getLab_index(0), 40);\n\t\t$this->urlms->getLab_index(0)->addInventoryItem($newInventoryItem);\n\t\t\n\t\t$_SESSION['urlms'] = $this->urlms ;\n\t\t$_SESSION['inventoryitem'] = $newInventoryItem;\n\t\t\n\t\t$this->assertEquals(1, count($this->urlms->getLab_index(0)->getInventoryItems()));\n\t\t\n\t\ttry {\n\t\t\t$this->controller->updateInventory(\"pencil\", null, \"essay tool\", null, 20);\n\t\t} catch (Exception $e) {\n\t\t\t$this->assertEquals(\"Please enter a valid cost.\", $e->getMessage());\n\t\t}\n\t\t\n\t\t// 2. Write all of the data\n\t\t$pers = $this->p;\n\t\t$pers->writeDataToStore($this->urlms);\n\t\t\n\t\t// 3. Clear the data from memory\n\t\t$this->urlms->delete();\n\t\t\n\t\t$this->assertEquals(0, $this->urlms->numberOfLabs());\n\t\t\n\t\t// 4. Load it back in\n\t\t$this->urlms = $pers->loadDataFromStore();\n\t\t\n\t\t// 5. Check that we got it back\n\t\t$this->assertEquals(1, count($this->urlms->getLab_index(0)->getInventoryItems()));\n\t}", "public function testCrceOnlinePaymentUpdateBundleSubscription()\n {\n\n }", "function checkAutomaticUpdates() {\n $settings = $this->getSettings();\n if ($settings && $settings->purchaseCode != \"\") {\n require_once('plugin_update_check.php');\n $updateCheckerWos = new PluginUpdateChecker_2_0(\n 'https://kernl.us/api/v1/updates/5718cb711e14737d770078b8/', $this->parent->file, 'wos', 1\n );\n $updateCheckerWos->purchaseCode = $settings->purchaseCode;\n }\n }", "public function test_updates_when_new_version() {\n\t\t// Setup\n\t\t\\WP_Mock::userFunction( 'get_option', array(\n\t\t\t'times' => 1,\n\t\t\t'args' => array( 'tenup_scaffold_version' ),\n\t\t\t'return' => '0.0.1'\n\t\t) );\n\n\n\t\t\\WP_Mock::userFunction( 'TenUpScaffold\\Core\\code_version', array(\n\t\t\t'times' => 1,\n\t\t\t'return' => '0.2.0'\n\t\t) );\n\n\t\t\\WP_Mock::userFunction( 'update_option', array(\n\t\t\t'times' => 1,\n\t\t\t'args' => array( 'tenup_scaffold_version', '0.2.0' )\n\t\t) );\n\n\n\t\t// Fires actions\n\t\t\\WP_Mock::expectAction( 'tenup_scaffold_before_update' );\n\t\t\\WP_Mock::expectAction( 'tenup_scaffold_after_update' );\n\n\t\t// Act\n\t\t$updater = UpdateManager::get_instance();\n\t\t$updated = $updater->maybe_update();\n\n\t\t$this->assertTrue( $updated, 'maybe_update did not return true' );\n\t\t$this->assertConditionsMet();\n\t}", "public function supportsPurchase(): bool\n {\n }", "function ciniki_products_supplierUpdate(&$ciniki) {\n // \n // Find all the required and optional arguments\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), \n 'supplier_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Supplier'), \n 'name'=>array('required'=>'no', 'trimblanks'=>'yes', 'blank'=>'no', 'name'=>'Name'),\n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n\n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'products', 'private', 'checkAccess');\n $rc = ciniki_products_checkAccess($ciniki, $args['tnid'], 'ciniki.products.supplierUpdate', 0); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n //\n // Add the supplier\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectUpdate');\n $rc = ciniki_core_objectUpdate($ciniki, $args['tnid'], 'ciniki.products.supplier', \n $args['supplier_id'], $args, 0x07);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n return $rc;\n}", "protected function _beforeToHtml()\r\n {\r\n //----------------------------\r\n $license['mode'] = Mage::getModel('M2ePro/License_Model')->getMode();\r\n $license['key'] = Mage::helper('M2ePro')->escapeHtml(Mage::getModel('M2ePro/License_Model')->getKey());\r\n $license['expired_date'] = Mage::getModel('M2ePro/License_Model')->getTextExpiredDate();\r\n\r\n $license['component'] = Mage::getModel('M2ePro/License_Model')->getComponent();\r\n $license['domain'] = Mage::getModel('M2ePro/License_Model')->getDomain();\r\n $license['ip'] = Mage::getModel('M2ePro/License_Model')->getIp();\r\n $license['directory'] = Mage::getModel('M2ePro/License_Model')->getDirectory();\r\n\r\n $this->license = $license;\r\n\r\n $system['name'] = Mage::helper('M2ePro/Server')->getSystem();\r\n\r\n $this->system = $system;\r\n\r\n $location['host'] = Mage::helper('M2ePro/Server')->getHost();\r\n $location['domain'] = Mage::helper('M2ePro/Server')->getDomain();\r\n $location['ip'] = Mage::helper('M2ePro/Server')->getIp();\r\n\r\n $this->location = $location;\r\n\r\n $platform['mode'] = Mage::helper('M2ePro')->__(ucwords(Mage::helper('M2ePro/Magento')->getEditionName()));\r\n $platform['version'] = Mage::helper('M2ePro/Magento')->getVersion();\r\n $platform['is_secret_key'] = Mage::helper('M2ePro/Magento')->isSecretKeyToUrl();\r\n\r\n $this->platform = $platform;\r\n\r\n $php['version'] = Mage::helper('M2ePro/Server')->getPhpVersion();\r\n $php['api'] = Mage::helper('M2ePro/Server')->getPhpApiName();\r\n $php['settings'] = Mage::helper('M2ePro/Server')->getPhpSettings();\r\n\r\n $this->php = $php;\r\n\r\n $mySql['database_name'] = Mage::helper('M2ePro/Magento')->getDatabaseName();\r\n $mySql['version'] = Mage::helper('M2ePro/Server')->getMysqlVersion();\r\n $mySql['api'] = Mage::helper('M2ePro/Server')->getMysqlApiName();\r\n $mySql['prefix'] = Mage::helper('M2ePro/Magento')->getDatabaseTablesPrefix();\r\n $mySql['settings'] = Mage::helper('M2ePro/Server')->getMysqlSettings();\r\n $mySql['total'] = Mage::helper('M2ePro/Server')->getMysqlTotals();\r\n\r\n $this->mySql = $mySql;\r\n\r\n $module['name'] = Mage::helper('M2ePro/Module')->getName();\r\n $module['version'] = Mage::helper('M2ePro/Module')->getVersion();\r\n $module['revision'] = Mage::helper('M2ePro/Module')->getRevision();\r\n $module['application_key'] = Mage::helper('M2ePro/Module')->getApplicationKey();\r\n\r\n $this->module = $module;\r\n\r\n $moduleDbTables = Mage::helper('M2ePro/Module')->getMySqlTables();\r\n $magentoDbTables = Mage::helper('M2ePro/Magento')->getMySqlTables();\r\n\r\n $connRead = Mage::getSingleton('core/resource')->getConnection('core_read');\r\n \r\n $mysql['tables'] = array();\r\n foreach ($moduleDbTables as $moduleTable) {\r\n\r\n $arrayKey = $moduleTable;\r\n $arrayValue = array(\r\n 'is_exist' => false,\r\n 'count_items' => 0,\r\n 'manage_link' => $this->getUrl('*/*/manageDbTable',array('table'=>$arrayKey)),\r\n 'has_model' => false\r\n );\r\n\r\n // Find model\r\n //--------------------\r\n $tempModels = Mage::getConfig()->getNode('global/models/M2ePro_mysql4/entities');\r\n foreach ($tempModels->asArray() as $tempTable) {\r\n if ($tempTable['table'] == $arrayKey) {\r\n $arrayValue['has_model'] = true;\r\n break;\r\n }\r\n }\r\n //--------------------\r\n\r\n $moduleTable = Mage::getSingleton('core/resource')->getTableName($moduleTable);\r\n\t\t\t$arrayValue['is_exist'] = in_array($moduleTable, $magentoDbTables);\r\n \r\n if ($arrayValue['is_exist']) {\r\n $dbSelect = $connRead->select()->from($moduleTable,new Zend_Db_Expr('COUNT(*)'));\r\n $arrayValue['count_items'] = (int)$connRead->fetchOne($dbSelect);\r\n }\r\n\r\n $mysql['tables'][$arrayKey] = $arrayValue;\r\n\t\t}\r\n\r\n $this->mysql = $mysql;\r\n //----------------------------\r\n\r\n //----------------------------\r\n $this->show_manage_db_table = !is_null($this->getRequest()->getParam('show_manage_db_table'));\r\n //----------------------------\r\n \r\n return parent::_beforeToHtml();\r\n }", "public function testProductUpdatedSuccessfully()\n {\n dump('test_product_updated_successfully');\n\n $this->disableAuthorization();\n\n $response = $this->updateProduct();\n\n $response->assertStatus(200);\n\n $response->assertJsonFragment($this->validFields());\n }", "protected function setUp()\n {\n parent::setUp();\n \n // TODO Auto-generated LicenseTest::setUp()\n \n $this->license = new License();\n $this->data=new SystemLicenseBO();\n $this->deleteObj=new SystemLicenseDL();\n //prepare test data\n \n $arr_addr=array();\n $arr_addr[\"AddressType\"]=1;\n $arr_addr[\"AddressLine1\"]=\"C13 Windmills, Muller South Street\";\n $arr_addr[\"Surburb\"]=\"Buccleuch\";\n $arr_addr[\"City\"]=\"Johannesburg\";\n $arr_addr[\"Country\"]=\"South Africa\";\n $arr_addr[\"PostalCode\"]=\"2066\";\n $arr_add=array();\n $arr_add[\"companyName\"]=\"CSIR\";\n $arr_add[\"postalAddressArray\"]=$arr_addr;\n $arr_add[\"licenseLimit\"]=5;\n $arr_add[\"staffNumber\"]=\"305941\";\n $this->arr_add=$arr_add;\n //prepare update test data\n $arr_addr[\"AddressType\"]=1;\n $arr_addr[\"AddressLine1\"]=\"193 Fenniscowles Rd\";\n $arr_addr[\"Surburb\"]=\"Umbilo\";\n $arr_addr[\"City\"]=\"Durban\";\n $arr_addr[\"Country\"]=\"South Africa\";\n $arr_addr[\"PostalCode\"]=\"4001\"; \n $arr_update=array();\n $arr_update[\"licenseID\"]=1; //defailt Primary Key value\n $arr_update[\"companyName\"]=\"Gqunsu Engineering Pty Ltd\";\n $arr_update[\"postalAddressArray\"]=$arr_addr;\n $arr_update[\"licenseLimit\"]=5;\n $arr_update[\"staffNumber\"]=\"305941\";\n $this->arr_update=$arr_update;\n }", "function bulkmodifications_component_checkversion()\n{\n if (!function_exists('get_product_release')) {\n return false;\n }\n \n // Requires greater than 2011R3.1\n if (get_product_release() < 215) {\n return false;\n }\n\n return true;\n}", "public function testUcpOnlinePaymentProfileUpdate()\n {\n\n }", "public function test_updateReplenishmentPlanCustomFields() {\n\n }", "public function testUpdateAdditionalCost()\n {\n }", "function testDebtorUpdate() {\n $countries = array(\n 'Denmark',\n 'Norway',\n 'Sweden',\n );\n // Pick a random country from the dataset\n $test_value = $countries[rand(0, count($countries))];\n\n\t\t$debtor = debtor_find_by_name('Expotium GmbH');\n\t\t// This params should resembel a form POST\n\t\t$params = array(\n\t\t\t'VatZone' => 'HomeCountry',\n\t\t\t'Country' => $test_value,\n\t\t\t'Debtor' => $debtor,\n\t\t);\n\t\t\n\t\t$debtor = debtor_update_data($params);\n\t\t\n\t\t$this->assertTrue($debtor->Country == $test_value);\n\t}", "public function wpweb_upd_save_products_license() {\n\t\t\n\t\tif( !empty( $_POST['wpweb_upd_submit'] ) ) {//If click on save button\n\t\t\t\n\t\t\t//$wpwebupd_lickey\t= get_option( 'wpwebupd_lickey' );\n\t\t\t$wpwebupd_lickey\t= wpweb_all_plugins_purchase_code();\n\t\t\t$wpwebupd_email\t\t= wpweb_all_plugins_purchase_email();\n\t\t\t\n\t\t\t$post_lickey\t\t= $_POST['wpwebupd_lickey'];\n\t\t\t$post_email\t\t\t= $_POST['wpwebupd_email'];\n\t\t\t\n\t\t\tforeach ( $post_lickey as $plugin_key => $license_key ) {\n\t\t\t\t$wpwebupd_lickey[$plugin_key]\t= $license_key;\n\t\t\t}\n\t\t\twpweb_save_plugins_purchase_code( $wpwebupd_lickey );\n\t\t\t\n\t\t\tforeach ( $post_email as $plugin_key => $email_key ) {\n\t\t\t\t$wpwebupd_email[$plugin_key]\t= $email_key;\n\t\t\t}\n\t\t\twpweb_save_plugins_purchase_email( $wpwebupd_email );\n\t\t\t\n\t\t\twp_redirect( add_query_arg( array( 'message' => '1' ) ) );\n\t\t}\n\t\t\n\t\tif ( isset( $_GET['action'] ) && ( 'wpweb-upd-helper-dismiss' == $_GET['action'] ) && isset( $_GET['nonce'] ) && check_admin_referer( 'wpweb-upd-helper-dismiss', 'nonce' ) ) {\n\t\t\t\n\t\t\tupdate_site_option( 'wpwebupd_helper_dismiss_activation_notice', true );\n\t\t\t$redirect_url = remove_query_arg( 'action', remove_query_arg( 'nonce', $_SERVER['REQUEST_URI'] ) );\n\t\t\twp_safe_redirect( $redirect_url );\n\t\t\texit;\n\t\t}\n\t}", "public function testAttributeCategoryUpdateSecurityEntry()\r\n {\r\n\r\n }", "public function testProductUpdateAuthorizationUnsuccessfully()\n {\n dump('test_product_update_authorization_unsuccessfully_wrong_owner');\n\n $company = factory(Company::class)->create();\n\n $user = $company->user;\n\n $this->signIsUsingPassportAsUser($user);\n\n $response = $this->updateProduct();\n\n $response->assertStatus(403);\n\n dump('test_product_update_authorization_unsuccessfully_guest_role');\n\n $user = factory(User::class)->create();\n\n $user->userCompanyRole()->create([\n 'company_id' => $this->product->company->id,\n 'role_id' => $this->guest->id,\n ]);\n\n $this->signIsUsingPassportAsUser($user);\n\n $response = $this->updateProduct();\n\n $response->assertStatus(403);\n\n dump('test_product_update_authorization_unsuccessfully_view_permission');\n\n $user = factory(User::class)->create();\n\n $user->userCompanyPermission()->create([\n 'company_id' => $this->product->company->id,\n 'permission_id' => $this->viewPermission->id,\n ]);\n\n $this->signIsUsingPassportAsUser($user);\n\n $response = $this->updateProduct();\n\n $response->assertStatus(403);\n }", "public function testProductUpdate()\n {\n $this->service->addProduct(new NostoProductMock());\n $result = $this->service->update();\n\n $this->specify('successful product update', function () use ($result) {\n $this->assertTrue($result);\n });\n }", "public function test_updateReplenishmentPlan() {\n\n }", "function licensetest_check_license($licensekey, $localkey='') {\n\n // -----------------------------------\n // -- Configuration Values --\n // -----------------------------------\n\n // Enter the url to your WHMCS installation here\n $whmcsurl = 'https://hostable.xyz/billing/';\n // Must match what is specified in the MD5 Hash Verification field\n // of the licensing product that will be used with this check.\n $licensing_secret_key = 'dhdhsgfd';\n // The number of days to wait between performing remote license checks\n $localkeydays = 15;\n // The number of days to allow failover for after local key expiry\n $allowcheckfaildays = 5;\n\n // -----------------------------------\n // -- Do not edit below this line --\n // -----------------------------------\n\n $check_token = time() . md5(mt_rand(1000000000, 9999999999) . $licensekey);\n $checkdate = date(\"Ymd\");\n $domain = $_SERVER['SERVER_NAME'];\n $usersip = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : $_SERVER['LOCAL_ADDR'];\n $dirpath = dirname(__FILE__);\n $verifyfilepath = 'modules/servers/licensing/verify.php';\n $localkeyvalid = false;\n if ($localkey) {\n $localkey = str_replace(\"\\n\", '', $localkey); # Remove the line breaks\n $localdata = substr($localkey, 0, strlen($localkey) - 32); # Extract License Data\n $md5hash = substr($localkey, strlen($localkey) - 32); # Extract MD5 Hash\n if ($md5hash == md5($localdata . $licensing_secret_key)) {\n $localdata = strrev($localdata); # Reverse the string\n $md5hash = substr($localdata, 0, 32); # Extract MD5 Hash\n $localdata = substr($localdata, 32); # Extract License Data\n $localdata = base64_decode($localdata);\n $localkeyresults = unserialize($localdata);\n $originalcheckdate = $localkeyresults['checkdate'];\n if ($md5hash == md5($originalcheckdate . $licensing_secret_key)) {\n $localexpiry = date(\"Ymd\", mktime(0, 0, 0, date(\"m\"), date(\"d\") - $localkeydays, date(\"Y\")));\n if ($originalcheckdate > $localexpiry) {\n $localkeyvalid = true;\n $results = $localkeyresults;\n $validdomains = explode(',', $results['validdomain']);\n if (!in_array($_SERVER['SERVER_NAME'], $validdomains)) {\n $localkeyvalid = false;\n $localkeyresults['status'] = \"Invalid\";\n $results = array();\n }\n $validips = explode(',', $results['validip']);\n if (!in_array($usersip, $validips)) {\n $localkeyvalid = false;\n $localkeyresults['status'] = \"Invalid\";\n $results = array();\n }\n $validdirs = explode(',', $results['validdirectory']);\n if (!in_array($dirpath, $validdirs)) {\n $localkeyvalid = false;\n $localkeyresults['status'] = \"Invalid\";\n $results = array();\n }\n }\n }\n }\n }\n if (!$localkeyvalid) {\n $responseCode = 0;\n $postfields = array(\n 'licensekey' => $licensekey,\n 'domain' => $domain,\n 'ip' => $usersip,\n 'dir' => $dirpath,\n );\n if ($check_token) $postfields['check_token'] = $check_token;\n $query_string = '';\n foreach ($postfields AS $k=>$v) {\n $query_string .= $k.'='.urlencode($v).'&';\n }\n if (function_exists('curl_exec')) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $whmcsurl . $verifyfilepath);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $query_string);\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $data = curl_exec($ch);\n $responseCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n curl_close($ch);\n } else {\n $responseCodePattern = '/^HTTP\\/\\d+\\.\\d+\\s+(\\d+)/';\n $fp = @fsockopen($whmcsurl, 80, $errno, $errstr, 5);\n if ($fp) {\n $newlinefeed = \"\\r\\n\";\n $header = \"POST \".$whmcsurl . $verifyfilepath . \" HTTP/1.0\" . $newlinefeed;\n $header .= \"Host: \".$whmcsurl . $newlinefeed;\n $header .= \"Content-type: application/x-www-form-urlencoded\" . $newlinefeed;\n $header .= \"Content-length: \".@strlen($query_string) . $newlinefeed;\n $header .= \"Connection: close\" . $newlinefeed . $newlinefeed;\n $header .= $query_string;\n $data = $line = '';\n @stream_set_timeout($fp, 20);\n @fputs($fp, $header);\n $status = @socket_get_status($fp);\n while (!@feof($fp)&&$status) {\n $line = @fgets($fp, 1024);\n $patternMatches = array();\n if (!$responseCode\n && preg_match($responseCodePattern, trim($line), $patternMatches)\n ) {\n $responseCode = (empty($patternMatches[1])) ? 0 : $patternMatches[1];\n }\n $data .= $line;\n $status = @socket_get_status($fp);\n }\n @fclose ($fp);\n }\n }\n if ($responseCode != 200) {\n $localexpiry = date(\"Ymd\", mktime(0, 0, 0, date(\"m\"), date(\"d\") - ($localkeydays + $allowcheckfaildays), date(\"Y\")));\n if ($originalcheckdate > $localexpiry) {\n $results = $localkeyresults;\n } else {\n $results = array();\n $results['status'] = \"Invalid\";\n $results['description'] = \"Remote Check Failed\";\n return $results;\n }\n } else {\n preg_match_all('/<(.*?)>([^<]+)<\\/\\\\1>/i', $data, $matches);\n $results = array();\n foreach ($matches[1] AS $k=>$v) {\n $results[$v] = $matches[2][$k];\n }\n }\n if (!is_array($results)) {\n die(\"Invalid License Server Response\");\n }\n if ($results['md5hash']) {\n if ($results['md5hash'] != md5($licensing_secret_key . $check_token)) {\n $results['status'] = \"Invalid\";\n $results['description'] = \"MD5 Checksum Verification Failed\";\n return $results;\n }\n }\n if ($results['status'] == \"Active\") {\n $results['checkdate'] = $checkdate;\n $data_encoded = serialize($results);\n $data_encoded = base64_encode($data_encoded);\n $data_encoded = md5($checkdate . $licensing_secret_key) . $data_encoded;\n $data_encoded = strrev($data_encoded);\n $data_encoded = $data_encoded . md5($data_encoded . $licensing_secret_key);\n $data_encoded = wordwrap($data_encoded, 80, \"\\n\", true);\n $results['localkey'] = $data_encoded;\n }\n $results['remotecheck'] = true;\n }\n unset($postfields,$data,$matches,$whmcsurl,$licensing_secret_key,$checkdate,$usersip,$localkeydays,$allowcheckfaildays,$md5hash);\n return $results;\n}", "public function canChangePaymentInformation()\n {\n return Mage::getModel('sheep_subscription/service')->canChangePaymentInformation($this->getSubscription());\n }", "function handle_support_credits($_key,$details,$product)\n{\n\tunset($product);\n\n\t$row=$GLOBALS['SITE_DB']->query_select('credit_purchases',array('member_id','num_credits'),array('purchase_validated'=>0,'purchase_id'=>intval($_key)),'',1);\n\tif (count ($row) != 1) return;\n\t$member_id=$row[0]['member_id'];\n\tif (is_null($member_id)) return;\n\t$num_credits=$row[0]['num_credits'];\n\n\n\trequire_code('mantis');\n\t$cpf_id = strval(get_credits_profile_field_id());\n\tif(is_null($cpf_id)) return;\n\n\t// Increment the number of credits this customer has\n\trequire_code('ocf_members_action2');\n\t$fields=ocf_get_custom_field_mappings($member_id);\n\tocf_set_custom_field($member_id,$cpf_id,intval($fields['field_'.$cpf_id])+intval($num_credits));\n\n\t// Update the row in the credit_purchases table\n\t$GLOBALS['SITE_DB']->query_update('credit_purchases',array('purchase_validated'=>1),array('purchase_id'=>intval($_key)));\n\n}", "public static function checkLicenseValidity()\n {\n $headers = getallheaders();\n $licenseUser = $headers['X-License-User'] ?? null;\n $licenseKey = $headers['X-License-Key'] ?? null;\n $licenseObject = $headers['X-License-Object'] ?? null;\n $licenseHost = Helper::getIP();\n \n if ($licenseUser === null || $licenseKey === null) {\n HTTPHelper::jsonResponse([\n 'status' => 'error',\n 'message' => 'missing license data',\n ]);\n }\n \n $db = new DBHelper();\n $license = $db->get('license', '*', [\n 'license_key' => $licenseKey,\n ]);\n if ($license === false) {\n HTTPHelper::jsonResponse([\n 'status' => 'error',\n 'message' => 'License not found',\n ], 404);\n }\n if ($license['license_user'] !== $licenseUser) {\n HTTPHelper::jsonResponse([\n 'status' => 'error',\n 'message' => 'Invalid license user',\n ], 401);\n }\n \n if (!empty($license['license_host']) && $license['license_host'] !== $licenseHost) {\n HTTPHelper::jsonResponse([\n 'status' => 'error',\n 'message' => 'Invalid host',\n ], 401);\n }\n \n $valid = new \\DateTime($license['valid_until']);\n $now = new \\DateTime();\n if ($valid <= $now) {\n HTTPHelper::jsonResponse([\n 'status' => 'error',\n 'message' => 'License expired',\n ], 410);\n }\n \n if ($license['plugin_entry_id'] === null && $license['theme_entry_id'] === null) {\n HTTPHelper::jsonResponse([\n 'status' => 'error',\n 'message' => 'License not valid for any object',\n ], 400);\n }\n \n if ($license['plugin_entry_id'] !== null || $license['theme_entry_id'] !== null) {\n $objectParts = explode('_', $licenseObject);\n // 0 = pluginversion|themeversion\n // 1 = slug\n if ($objectParts[0] === 'pluginversion') {\n \n $base_plugin = $db->get('plugin', 'id', [\n 'slug' => $objectParts[1],\n ]);\n \n if ($base_plugin['id'] !== $license['plugin_entry_id']) {\n HTTPHelper::jsonResponse([\n 'status' => 'error',\n 'message' => 'License not valid for object (1)',\n ], 400);\n }\n } elseif ($objectParts[0] === 'themeversion') {\n\n $base_theme = $db->get('theme', 'id', [\n 'slug' => $objectParts[1],\n ]);\n \n if ($base_theme['id'] !== $license['theme_entry_id']) {\n HTTPHelper::jsonResponse([\n 'status' => 'error',\n 'message' => 'License not valid for object (2)',\n ], 400);\n }\n }\n }\n \n return true; // a formality\n }", "public function testPrivateDesignProcessorUpdate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function hopeareunus_theme_activate_license() {\n\n\tif( isset( $_POST['hopeareunus_theme_license_activate'] ) ) { \n\t \tif( ! check_admin_referer( 'hopeareunus_license_nonce', 'hopeareunus_license_nonce' ) ) \t\n\t\t\treturn; // get out if we didn't click the Activate button\n\n\t\tglobal $wp_version;\n\n\t\t$license = trim( hybrid_get_setting( 'hopeareunus_license_key' ) );\n\t\t\t\t\n\t\t$api_params = array( \n\t\t\t'edd_action' => 'activate_license', \n\t\t\t'license' => $license, \n\t\t\t'item_name' => urlencode( HOPEAREUNUS_SL_THEME_NAME ) \n\t\t);\n\t\t\n\t\t$response = wp_remote_get( add_query_arg( $api_params, HOPEAREUNUS_SL_STORE_URL ), array( 'timeout' => 15, 'sslverify' => false ) );\n\n\t\tif ( is_wp_error( $response ) )\n\t\t\treturn false;\n\n\t\t$license_data = json_decode( wp_remote_retrieve_body( $response ) );\n\t\t\n\t\t// $license_data->license will be either \"active\" or \"inactive\"\n\n\t\tupdate_option( 'hopeareunus_license_key_status', $license_data->license );\n\n\t}\n}", "function activate_license() {\n if( isset( $_POST['supercharts_license_activate'] ) ) {\n\n // run a quick security check \n if( ! check_admin_referer( 'supercharts_nonce', 'supercharts_nonce' ) ) \n return; // get out if we didn't click the Activate button\n\n // retrieve the license from the database\n $license = trim( get_option( 'supercharts_license_key' ) );\n \n\n // data to send in our API request\n $api_params = array( \n // 'supercharts_action'=> 'activate_license', \n // 'license' => $license, \n // 'item_name' => urlencode( EDD_SL_ITEM_NAME ),\n 'url' => home_url()\n );\n \n // Call the custom API.\n $response = wp_remote_get( add_query_arg( $api_params, \"http://api.numberpicture.com\" ) );\n $response = wp_remote_get(\"http://api.numberpicture.com\");\n echo '<pre>';\n print_r($response);\n echo '</pre>';\n exit;\n\n // make sure the response came back okay\n if ( is_wp_error( $response ) )\n return false;\n\n // decode the license data\n $license_data = json_decode( wp_remote_retrieve_body( $response ) );\n \n // $license_data->license will be either \"active\" or \"inactive\"\n\n update_option( 'supercharts_license_status', $license_data->license );\n\n }\n }", "function beaver_extender_activate_license() {\n\t\n\t// listen for our activate button to be clicked\n\tif ( isset( $_POST['beaver_extender_license_activate'] ) ) {\n\t\t\n\t\t// run a quick security check \n\t \tif ( ! check_admin_referer( 'edd_beaver_extender_nonce', 'edd_beaver_extender_nonce' ) ) \t\n\t\t\treturn; // get out if we didn't click the Activate button\n\n\t\t// retrieve the license from the database\n\t\t$license = trim( get_option( 'beaver_extender_license_key' ) );\n\n\t\t// data to send in our API request\n\t\t$api_params = array( \n\t\t\t'edd_action'=> 'activate_license', \n\t\t\t'license' \t=> $license, \n\t\t\t'item_name' => urlencode( BBEXT_BEAVER_EXTENDER ), // the name of our product in EDD\n\t\t\t'url' => home_url()\n\t\t);\n\t\t\n\t\t// Call the custom API.\n\t\t$response = wp_remote_post( BBEXT_COBALT_APPS_URL, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );\n\n\t\t// make sure the response came back okay\n\t\tif ( is_wp_error( $response ) )\n\t\t\treturn false;\n\n\t\t// decode the license data\n\t\t$license_data = json_decode( wp_remote_retrieve_body( $response ) );\n\t\t\n\t\t// $license_data->license will be either \"active\" or \"inactive\"\n\n\t\tupdate_option( 'beaver_extender_license_status', $license_data->license );\n\t\t\n\t}\n\t\n}", "public function getRemote_license()\n {\n $request = wp_remote_post($this->update_path, array('body' => array('action' => 'license')));\n if (!is_wp_error($request) || wp_remote_retrieve_response_code($request) === 200) {\n\t\t\tif($request['body'] == \"false\" || $request['body'] == \"not_found\" || empty($request['body']))\n\t\t\t\tadd_action( 'admin_notices', array(&$this, 'admin_notice'));\n return $request['body'];\n \t }\n\t\t//add_action( 'admin_notices', array(&$this, 'admin_notice'));\n return true;\n }", "public function testThatProductCanBeSaved()\n\t{\n\t}", "function update_test_code($type='')\r\r\n\t{\r\r\n\t\tglobal $sql,$ns, $pref;\r\r\n\t\t$just_check = $type == 'do' ? FALSE : TRUE;\t\t// TRUE if we're just seeing whether an update is needed\r\r\n\t\t//--------------**************---------------\r\r\n\t\t// Add your test code in here\r\r\n\t\t//--------------**************---------------\r\r\n\r\r\n\t\t//--------------**************---------------\r\r\n\t\t// End of test code\r\r\n\t\t//--------------**************---------------\r\r\n\t\treturn $just_check;\r\r\n\t}", "public function adminWantsToUpdateProduct() {\n\t\tif(isset($_GET[self::$updateURLPrefix])) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function securityUpdateAvailabilityProvider() {\n $test_cases = [\n // Security release available for site minor release 0.\n // No releases for next minor.\n '0.0, 0.2' => [\n 'site_patch_version' => '0.0',\n 'expected_security_releases' => ['0.2'],\n 'expected_update_message_type' => static::SECURITY_UPDATE_REQUIRED,\n 'fixture' => 'sec.0.2',\n ],\n // Site on latest security release available for site minor release 0.\n // Minor release 1 also has a security release, and the current release\n // is marked as insecure.\n '0.2, 0.2' => [\n 'site_patch_version' => '0.2',\n 'expected_security_release' => ['1.2', '2.0-rc2'],\n 'expected_update_message_type' => static::UPDATE_AVAILABLE,\n 'fixture' => 'sec.2.0-rc2',\n ],\n // Two security releases available for site minor release 0.\n // 0.1 security release marked as insecure.\n // No releases for next minor.\n '0.0, 0.1 0.2' => [\n 'site_patch_version' => '0.0',\n 'expected_security_releases' => ['0.2'],\n 'expected_update_message_type' => static::SECURITY_UPDATE_REQUIRED,\n 'fixture' => 'sec.0.1_0.2',\n ],\n // Security release available for site minor release 1.\n // No releases for next minor.\n '1.0, 1.2' => [\n 'site_patch_version' => '1.0',\n 'expected_security_releases' => ['1.2'],\n 'expected_update_message_type' => static::SECURITY_UPDATE_REQUIRED,\n 'fixture' => 'sec.1.2',\n ],\n // Security release available for site minor release 0.\n // Security release also available for next minor.\n '0.0, 0.2 1.2' => [\n 'site_patch_version' => '0.0',\n 'expected_security_releases' => ['0.2', '1.2', '2.0-rc2'],\n 'expected_update_message_type' => static::SECURITY_UPDATE_REQUIRED,\n 'fixture' => 'sec.2.0-rc2',\n ],\n // No newer security release for site minor 1.\n // Previous minor has security release.\n '1.2, 0.2 1.2' => [\n 'site_patch_version' => '1.2',\n 'expected_security_releases' => [],\n 'expected_update_message_type' => static::UPDATE_NONE,\n 'fixture' => 'sec.2.0-rc2',\n ],\n // No security release available for site minor release 0.\n // Security release available for next minor.\n '0.0, 1.2, insecure' => [\n 'site_patch_version' => '0.0',\n 'expected_security_releases' => ['1.2'],\n 'expected_update_message_type' => static::SECURITY_UPDATE_REQUIRED,\n 'fixture' => 'sec.1.2_insecure',\n ],\n // No security release available for site minor release 0.\n // Site minor is not a supported branch.\n // Security release available for next minor.\n '0.0, 1.2, insecure-unsupported' => [\n 'site_patch_version' => '0.0',\n 'expected_security_releases' => ['1.2'],\n 'expected_update_message_type' => static::SECURITY_UPDATE_REQUIRED,\n 'fixture' => 'sec.1.2_insecure-unsupported',\n ],\n // All releases for minor 0 are secure.\n // Security release available for next minor.\n '0.0, 1.2, secure' => [\n 'site_patch_version' => '0.0',\n 'expected_security_release' => ['1.2'],\n 'expected_update_message_type' => static::UPDATE_AVAILABLE,\n 'fixture' => 'sec.1.2',\n ],\n '0.2, 1.2, secure' => [\n 'site_patch_version' => '0.2',\n 'expected_security_release' => ['1.2'],\n 'expected_update_message_type' => static::UPDATE_AVAILABLE,\n 'fixture' => 'sec.1.2',\n ],\n // Site on 2.0-rc2 which is a security release.\n '2.0-rc2, 0.2 1.2' => [\n 'site_patch_version' => '2.0-rc2',\n 'expected_security_releases' => [],\n 'expected_update_message_type' => static::UPDATE_NONE,\n 'fixture' => 'sec.2.0-rc2',\n ],\n // Ensure that 8.0.2 security release is not shown because it is earlier\n // version than 1.0.\n '1.0, 0.2 1.2' => [\n 'site_patch_version' => '1.0',\n 'expected_security_releases' => ['1.2', '2.0-rc2'],\n 'expected_update_message_type' => static::SECURITY_UPDATE_REQUIRED,\n 'fixture' => 'sec.2.0-rc2',\n ],\n ];\n $pre_releases = [\n '2.0-alpha1',\n '2.0-alpha2',\n '2.0-beta1',\n '2.0-beta2',\n '2.0-rc1',\n '2.0-rc2',\n ];\n\n foreach ($pre_releases as $pre_release) {\n // If the site is on an alpha/beta/RC of an upcoming minor and none of the\n // alpha/beta/RC versions are marked insecure, no security update should\n // be required.\n $test_cases[\"Pre-release:$pre_release, no security update\"] = [\n 'site_patch_version' => $pre_release,\n 'expected_security_releases' => [],\n 'expected_update_message_type' => $pre_release === '2.0-rc2' ? static::UPDATE_NONE : static::UPDATE_AVAILABLE,\n 'fixture' => 'sec.2.0-rc2-b',\n ];\n // If the site is on an alpha/beta/RC of an upcoming minor and there is\n // an RC version with a security update, it should be recommended.\n $test_cases[\"Pre-release:$pre_release, security update\"] = [\n 'site_patch_version' => $pre_release,\n 'expected_security_releases' => $pre_release === '2.0-rc2' ? [] : ['2.0-rc2'],\n 'expected_update_message_type' => $pre_release === '2.0-rc2' ? static::UPDATE_NONE : static::SECURITY_UPDATE_REQUIRED,\n 'fixture' => 'sec.2.0-rc2',\n ];\n }\n return $test_cases;\n }", "public function testLandedCostBookInPATCHRequestBookInIDUpdate()\n {\n }", "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('sales/niveus_requestproduct_requestnewproduct');\n }", "public function testUpdateSubscription()\n {\n }", "public function testUpdateSubscription()\n {\n }", "public function testInventorySellingPricePATCHRequestInventoryIDSellingPricesUpdate()\n {\n }", "public function testUpdateSaleUsingPut()\n {\n }", "public function canUpdate ()\n {\n return true;\n }" ]
[ "0.72696173", "0.6706471", "0.66052234", "0.6578759", "0.6522961", "0.64821273", "0.64000684", "0.6368954", "0.625861", "0.6237605", "0.62141514", "0.616994", "0.61662287", "0.61536324", "0.6142796", "0.61397564", "0.6139261", "0.61324394", "0.6100358", "0.6099699", "0.6078275", "0.60696644", "0.60613906", "0.60182256", "0.6002011", "0.6000414", "0.59911346", "0.59767324", "0.59522057", "0.5950583", "0.5947436", "0.59459794", "0.5940854", "0.59294695", "0.5926594", "0.59226125", "0.59134424", "0.5880706", "0.5857245", "0.5851961", "0.58492154", "0.5839005", "0.5821294", "0.58186656", "0.58095384", "0.5806802", "0.58024216", "0.57997704", "0.5796364", "0.57922184", "0.57788116", "0.5776124", "0.5764314", "0.5762753", "0.57580394", "0.57533115", "0.57440203", "0.5741406", "0.5740608", "0.57398206", "0.57380253", "0.5735155", "0.57332164", "0.57313275", "0.5730722", "0.5727735", "0.5727734", "0.57262444", "0.5717157", "0.57170326", "0.57149994", "0.57137597", "0.57116514", "0.5708605", "0.5708506", "0.5703792", "0.5693536", "0.5684255", "0.5681367", "0.56700003", "0.56581646", "0.5653618", "0.5650486", "0.56492424", "0.56492", "0.56476027", "0.5644892", "0.56378955", "0.5635472", "0.5634397", "0.5632529", "0.5631239", "0.5626872", "0.5611964", "0.5608133", "0.5605444", "0.5605444", "0.5602507", "0.56013757", "0.55994964" ]
0.74414676
0
Returns all schema names in the database. This method should be overridden by child classes in order to support this feature because the default implementation simply throws an exception.
Возвращает все имена схем в базе данных. Этот метод должен быть переопределен дочерними классами для поддержки этой функции, поскольку реализация по умолчанию просто вызывает исключение.
protected function findSchemaNames() { // throw new \Exception( "{get_class( $this )} does not support fetching all schema names." ); return ['']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSchemaNames();", "public function getSchemas()\n {\n $sql = <<<SQL\nselect\n n.nspname as \"name\",\n n.oid as \"oid\",\n d.description as \"comment\",\n count(c) as \"relations\"\nfrom pg_catalog.pg_namespace n\n left join pg_catalog.pg_description d on n.oid = d.objoid\n left join pg_catalog.pg_class c on\n c.relnamespace = n.oid and c.relkind in ('r', 'v')\nwhere {condition}\ngroup by 1, 2, 3\norder by 1;\nSQL;\n $condition = new Where(\n 'n.nspname !~ $* and n.nspname <> $*',\n ['^pg_', 'information_schema']\n );\n\n return $this->executeSql($sql, $condition);\n }", "public function getSchemaNames(): array\n {\n throw new \\Exception(__METHOD__ . \" has not been implemented.\");\n }", "public function getSchema(): array\n {\n return $this->dba->getSchema();\n }", "protected function findTableNames($schema='')\n\t{\n\t\tthrow new CDbException(Yii::t('yii','{class} does not support fetching all table names.',\n\t\t\tarray('{class}'=>get_class($this))));\n\t}", "public function databaseList()\n {\n return $this->schemaManager->databaseList();\n }", "public function getTableNames($schema='')\n\t{\n\t\tif(!isset($this->_tableNames[$schema]))\n\t\t\t$this->_tableNames[$schema]=$this->findTableNames($schema);\n\t\treturn $this->_tableNames[$schema];\n\t}", "protected function findTableNames(\n /** @noinspection PhpUnusedParameterInspection */\n $schema = ''\n ) {\n throw new NotImplementedException(\"Database or driver does not support fetching all table names.\");\n }", "public function getDatabaseNames()\n {\n if ($this->_databases == null) {\n $this->getDatabases();\n }\n return array_keys($this->_databases);\n }", "public function getSchemas();", "protected function getCurrentSchema()\n {\n $schema = [];\n\n if (empty($this->tables)) {\n return $schema;\n }\n\n $collection = ConnectionManager::get($this->connection)->schemaCollection();\n foreach ($this->tables as $table) {\n if (preg_match(\"/^.*phinxlog$/\", $table) === 1) {\n continue;\n }\n\n $schema[$table] = $collection->describe($table);\n }\n\n return $schema;\n }", "abstract protected function getSchemaName();", "function getSchema() {\r\n $results = array();\r\n $statement = $this->connection->prepare(\"show tables\");\r\n $statement->execute();\r\n\r\n $tableList = $statement->fetchAll(\\PDO::FETCH_NUM);\r\n\r\n foreach ($tableList as $tableRow) {\r\n $columns = $this->connection->query(\"show columns in \" . $tableRow[0]);\r\n foreach ($columns as $row) {\r\n list($colType, $colPrecision, $colExtra) = $this->parentObject->examineColumnType($row[\"Type\"]);\r\n if (!isset($results[$tableRow[0]])) {\r\n $results[$tableRow[0]] = Array(\r\n \"schema_name\" => $this->database,\r\n \"columns\" => Array()\r\n );\r\n }\r\n $results[$tableRow[0]][\"columns\"][count($results[$tableRow[0]][\"columns\"])] = Array(\r\n \"column_name\" => $row[\"Field\"],\r\n \"data_type\" => $colType,\r\n \"max_length\" => \"\",\r\n \"precision\" => $colPrecision,\r\n \"scale\" => \"\",\r\n \"extra\" => $colExtra,\r\n \"is_nullable\" => ($row[\"Null\"] == \"YES\" ? 1 : 0),\r\n \"is_ansi_padded\" => \"\",\r\n \"is_identity\" => ($row[\"Key\"] == \"PRI\" ? 1 : 0),\r\n \"is_autoincrement\" => (strpos($row[\"Extra\"], \"auto_increment\") === true ? 1 : 0)\r\n );\r\n }\r\n }\r\n\r\n return $results;\r\n }", "public function getSchemas( $dbName )\n {\n\n $sql = <<<SQL\n SELECT \n ns.nspname as schema_name,\n db.datname as db_name\n FROM \n pg_namespace as ns\n join\n pg_database db on ns.nspowner = db.datdba\nSQL;\n\n if( $dbName )\n {\n $sql .= <<<SQL\n WHERE db.datname = '{$dbName}'\nSQL;\n }\n \n $sql .= \";\";\n\n return $this->con->select( $sql );\n\n }", "public function getSchemas()\n {\n return $this->schemas;\n }", "protected function findTableNames($schema = null)\n\t{\n\t\tif (!$schema)\n\t\t{\n\t\t\t$connection = $this->getDbConnection();\n\t\t\t$likeSql = ($connection->tablePrefix ? ' LIKE \\''.$connection->tablePrefix.'%\\'' : '');\n\t\t\treturn $connection->createCommand()->setText('SHOW TABLES'.$likeSql)->queryColumn();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn parent::findTableNames();\n\t\t}\n\t}", "public function listAll(): array\n {\n $schema = $this->connection->getSchemaCollection();\n $tables = $schema->listTables();\n if (empty($tables)) {\n throw new RuntimeException('Your database does not have any tables.');\n }\n sort($tables);\n\n return array_combine($tables, $tables);\n }", "private function getAllDatabases()\n {\n if ('mysql' === $this->dbType) {\n return $this->getConnection()->query('SHOW DATABASES')->fetchAll(PDO::FETCH_COLUMN);\n }\n\n\n $sql = \"SELECT datname FROM pg_database WHERE datistemplate = false\";\n return $this->getConnection()->query($sql)->fetchAll(PDO::FETCH_COLUMN);\n\n }", "public function getSchemaEntities() {\r\n\t\treturn $this->getConnection()->getSchemaEntities($this);\r\n\t}", "public function get_schema()\r\n\t{\r\n\t\t return $this->sql_select_exe('SELECT * FROM sys.Tables', NULL);\r\n\t}", "public function getDatabaseSchema(): array;", "public function getTableNames()\n\t{\n\t\t$result = $this->nativeQuery('SHOW TABLES');\n\t\tif (!$result) throw new DB_QueryException(\"Show tables query failed: \" . $this->native->error);\n\t\tif ($result->num_rows == 0) return null;\n\t\t\n\t\t$tables = array();\n\t\twhile (($row = $result->fetch_row())) $tables[] = $row[0];\n\t\treturn $tables;\n\t}", "public static function getDatabaseSchema()\n {\n $installClass = self::getInstallSqlClass();\n $instObj = new $installClass();\n return $instObj->getFieldDefinitions_database(TYPO3_db);\n }", "public function getTableList($schema = null)\n {\n if (!$this->isConnected()) $this->connect();\n if ($schema === null)\n {\n if ($this->getEngine() == 'OCI') $schema = $this->idsn['username'];\n else $schema = $this->idsn['dbname'];\n }\n return $this->column($this->sql->tableList($schema));\n }", "protected function getTableNames()\n {\n $results = DB::table('information_schema.tables')\n ->select('table_name')\n ->where('table_schema', '=', env('DB_DATABASE'))\n ->where('table_name', '!=', 'migrations')\n ->get();\n\n return array_map(function ($result) {\n return $result->table_name;\n }, $results);\n }", "public function getDbSchemaName()\n {\n return $this->dbSchemaName;\n }", "public function getTables()\n {\n $tables = [];\n $table_schemas = $this->schema_db()->get('*.schema');\n foreach ($table_schemas as $key => $table_info) {\n $tables[] = $table_info['table_name'];\n }\n\n return $tables;\n }", "public function getSchemaName() {\n return $this->schema_name;\n }", "function getSchemaName()\n {\n return $this->table_schema;\n }", "protected function getSchema()\n {\n return DB::getConfig('schema');\n }", "public function getSchemaName() {\n\t\treturn null;\n\t}", "public function getAppDatabases()\n {\n try {\n $stmt = $this->_conn->execute('SHOW DATABASES');\n $rows = Hash::extract($stmt->fetchall(), '{n}.{n}');\n $stripped = array_diff($rows, $this->databaseMeta['mysql']['system_databases']);\n $result = [];\n foreach ($stripped as $databaseName) {\n $result[] = ['name' => $databaseName];\n }\n } catch (\\Exception $e) {\n throw new \\Exception(\"Error generating database list: \" . $e->getMessage());\n }\n\n return $result;\n }", "protected function getDatabaseColumnNames()\n {\n return Schema::getColumnListing($this->builder->getModel()->getTable());\n }", "public function getTableNames()\n {\n $query = 'SHOW TABLES';\n $statement = $this->pdo->prepare($query);\n $statement->execute();\n\n $tableNames = [];\n while (($tableName = $statement->fetchColumn(0))) {\n $tableNames[] = $tableName;\n }\n\n return $tableNames;\n }", "protected function getSchemaFromDatabase()\n {\n $manager = $this->locator->connection()->schema();\n\n if (!$manager instanceof SchemaManagerInterface) {\n throw new \\InvalidArgumentException('The default connection do not support schema loading');\n }\n\n // TODO parcourir les connections (database unique) et merger les tables ?\n return $manager->loadSchema();\n }", "public function getTableNames($schema = '', $refresh = false)\n {\n // go ahead and reset all schemas if needed\n $this->getCachedTableNames($refresh);\n if (empty($schema)) {\n // return all\n return $this->tables;\n } else {\n $names = [];\n foreach ($this->tables as $key => $value) {\n if ($value->schemaName === $schema) {\n $names[$key] = $value;\n }\n }\n\n return $names;\n }\n }", "public function getExpectedDatabaseSchema() {}", "public function getSchemaCollection();", "public function getSchemaIndices() {\r\n\t\treturn $this->getConnection()->getSchemaIndices($this);\r\n\t}", "public function get()\r\n {\r\n $data = $this->connection\r\n ->fetchAll('\r\n SELECT\r\n TABLE_NAME AS `name`\r\n FROM information_schema.TABLES as db\r\n WHERE table_schema = ?\r\n ORDER BY table_name ASC\r\n ', [\r\n $this->connection->getDatabase(),\r\n ]);\r\n\r\n return array_column($data, 'name');\r\n }", "public function getSchemas(): array\n {\n if (is_null($this->schemas)) {\n $this->loadFromConfig();\n }\n\n return $this->schemas ?? [];\n }", "protected function findTableNames( $schema = '', $include_views = true )\n {\n if ( $include_views )\n {\n $condition = \"object_type in ('TABLE','VIEW')\";\n }\n else\n\n {\n $condition = \"object_type = 'TABLE'\";\n }\n\n//SELECT table_name, '{$schema}' as table_schema FROM user_tables\n\n $sql = <<<EOD\nSELECT object_name as table_name, owner as table_schema FROM all_objects WHERE $condition\nEOD;\n\n if ( !empty( $schema ) )\n {\n $sql .= \" AND owner = '$schema'\";\n }\n\n $defaultSchema = $this->getDefaultSchema();\n\n $rows = $this->getDbConnection()->createCommand( $sql )->queryAll();\n\n $names = array();\n foreach ( $rows as $row )\n {\n $ts = isset( $row['TABLE_SCHEMA'] ) ? $row['TABLE_SCHEMA'] : '';\n $tn = isset( $row['TABLE_NAME'] ) ? $row['TABLE_NAME'] : '';\n $names[] = ( $defaultSchema == $ts ) ? $tn : $ts . '.' . $tn;\n }\n\n return $names;\n }", "public function getSchema();", "public function getSchema();", "public function getSchema();", "public function getDatabases() {\n return new SoapFault('Server', 'Service operation getDatabases() not implemented');\n }", "public static function getTablesNames($schemaName)\n {\n $sql = sprintf(\"\nselect TABLE_NAME as table_name\nfrom information_schema.TABLES\nwhere TABLE_SCHEMA = %s\nand TABLE_TYPE = 'BASE TABLE'\norder by TABLE_NAME\", parent::quoteString($schemaName));\n\n return self::executeRows($sql);\n }", "public function getDDL()\n {\n $ddl = [];\n\n foreach ($this->databases as $database) {\n if ($database->name !== '') {\n $ddl = array_merge($ddl, $database->getDDL());\n $ddl[] = \"USE \" . Token::escapeIdentifier($database->name);\n }\n foreach ($database->tables as $table) {\n $ddl = array_merge($ddl, $table->getDDL());\n }\n }\n\n return $ddl;\n }", "public function getTableNames()\n {\n return array_keys($this->tables);\n }", "protected function getTables() {\n\t\t$tables = Yii::app()->db->schema->tableNames;\n\t\t$tables[] = '*';\n\t\treturn $tables;\n\t}", "public function getSchema(): array {\n return $this->schema;\n }", "public function getDataContainerNames(){\n\t\ttry{\n\t\t\t$query=$this->driver->query('SHOW TABLES');\n\t\t\t$names=$query->fetchAll(\\PDO::FETCH_COLUMN);\n\t\t\t$query->closeCursor();\n\t\t}\n\t\tcatch(\\Exception $e){\n\t\t\tthrow new Exception($e->getMessage());\n\t\t}\n\t\treturn $names;\n\t}", "protected function getMigrationsTableSchema()\n\t{\n\t\t$sql = 'SELECT sql\n\t\t\t\tFROM sqlite_master\n\t\t\t\tWHERE type = :type AND name = :name';\n\n\t\treturn $this->database->fetchValue($sql, array(\n\t\t\t'type' => 'table',\n\t\t\t'name' => 'Migrations',\n\t\t));\n\t}", "public function tableNames()\n {\n return collect(DB::select($this->getQuery()))\n ->pluck('name')->reject(function ($name) {\n return $this->skips()->contains($name);\n });\n }", "public function query_schema()\n\t{\n\t\t$table = array();\n\t\t$view = array();\n\n\t\tforeach ($this->query('SHOW FULL TABLES', ARRAY_N) as $row) {\n\t\t\tlist ($table_or_view, $type) = $row;\n\t\t\tswitch ($type) {\n\t\t\tcase 'BASE TABLE':\n\t\t\t\t$table[] = $table_or_view;\n\t\t\t\tbreak;\n\t\t\tcase 'VIEW':\n\t\t\t\t$view[] = $table_or_view;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new FW_Backup_Exception(\"Invalid table type: $type\");\n\t\t\t}\n\t\t}\n\n\t\t// Use only tables starting with $table_prefix\n\t\t$table = $this->filter_by_table_prefix($table);\n\t\t$view = $this->filter_by_table_prefix($view);\n\n\t\treturn array($table, $view);\n\t}", "public function getTableNames()\n {\n $tableNames = array();\n if (isset($this->tables)) {\n foreach ($this->tables as $table) {\n $tableNames[] = $table->getName();\n }\n }\n return $this->tableNames;\n }", "protected function getTables($schema)\n {\n $sql = <<<'SQL'\nSELECT tablename AS object_name\n FROM pg_catalog.pg_tables \n WHERE schemaname = ?\nSQL;\n\n return $this->select($sql, $schema);\n }", "public function getSchemaName(): string\n {\n return $this->schemaName;\n }", "public function getTableNames()\n\t{\n\t\treturn $this->_backend->getTableNames();\n\t}", "public function getTableList() {\n $sql = 'SHOW TABLES';\n\n $result = $this->connection->execute($sql);\n\n $key = 'Tables_in_' . $this->connection->getDsn()->getDatabase();\n $tables = array();\n foreach ($result as $row) {\n $tables[] = $row[$key];\n }\n\n return $tables;\n }", "public static function getConnectionNames()\n {\n /** @var \\LaravelDoctrine\\ORM\\IlluminateRegistry $instance */\n return $instance->getConnectionNames();\n }", "public function GetDatabases() {\n\t\t$ignore = self::$meta[$this->type]['ignoredbs']; // ignore dbs like information_schema etc\n\t\t$sql = self::$meta[$this->type]['databases'];\n\t\t\n $data = array();\n\n\t\ttry{\n\n\t\t\t$this->db->query($sql);\n while($row = $this->db->fetch()) {\n $allVals = array_values($row);\n $val = $allVals[0];\n if(!in_array($val, $ignore)) \n $data[] = $val;\n }\n } catch ( Exception $e ) {\n error_log('Exception: ' . var_export($e, true));\n $this->error = $e->getMessage();\n }\n\n return $data;\n }", "public function getTranslatedSchema()\n {\n return $this->translate($this->db->getDbSchema());\n }", "function databases()\r\n {\r\n if ($this->_connection==null)\r\n {\r\n $this->open();\r\n }\r\n return($this->_connection->MetaDatabases());\r\n }", "function get_database_schema()\n {\n return $this->config->item('database_schema');\n }", "public function getSchemaName() {\n\t\treturn $this->config['schema'];\n\t}", "public function listDatabases()\n {\n return $this->queryAndValid('GET', '/_all_dbs', [200]);\n }", "public function getSchema()\n\t\t{\t\t\n\t\t\t$this->_enableSysQuery();\n\t\t\t$sql = \"DESCRIBE `\".$this->_name.\"`\";\n\t\t\t$result = $this->run($sql);\n\n\t\t\treturn $result;\n\t\t}", "public static function getAllTables()\n {\n /** @var \\Illuminate\\Database\\Schema\\PostgresBuilder $instance */\n return $instance->getAllTables();\n }", "public function getTableNames () {\n return $this->tablenames;\n }", "public function get_db_schema() {\n\n\t\tif ( ! isset( $this->db_schema ) ) {\n\n\t\t\tglobal $wpdb;\n\n\t\t\t$installer = new WordPoints_Points_Installable( 'points' );\n\t\t\t$db_tables = $installer->get_db_tables();\n\n\t\t\tforeach ( $db_tables['global'] as $table_name => $table_schema ) {\n\t\t\t\t$this->db_schema .= \"CREATE TABLE {$wpdb->base_prefix}{$table_name} (\n\t\t\t\t\t{$table_schema}\n\t\t\t\t);\\n\";\n\t\t\t}\n\t\t}\n\n\t\treturn $this->db_schema;\n\t}", "public function get_tables_sanitized () {\n\n $this->__test_config_initialized();\n\n if ( isset($this->database_config['conn_schema']['sanitized_table_names'])) {\n\n return $this->database_config['conn_schema']['sanitized_table_names'];\n }\n\n return [];\n }", "public static function listTables()\r\n {\r\n $sql = \"SELECT tablename AS name,\r\n pg_catalog.obj_description(pg_catalog.pg_class.oid) AS label\r\n FROM pg_catalog.pg_tables\r\n LEFT JOIN pg_catalog.pg_class\r\n ON pg_catalog.pg_tables.tablename = pg_catalog.pg_class.relname\r\n WHERE schemaname NOT IN ('pg_catalog', 'information_schema');\";\r\n\r\n return \\Db\\Conn::getInstance()->query($sql);\r\n }", "public function tables()\n {\n return array_map(\n array('Horde_String', 'lower'),\n $this->selectValues('SELECT table_name FROM USER_TABLES')\n );\n }", "public function schema()\n {\n return $this->schema;\n }", "public function listTables($schemaName = null)\r\n {\r\n //$sql = \"SELECT name FROM sysobjects WHERE type = 'U' ORDER BY name\";\r\n $sql = \"SELECT table_name FROM [INFORMATION_SCHEMA].[TABLES] \";\r\n if ($schemaName) {\r\n $sql = $sql . \" WHERE TABLE_SCHEMA = '$schemaName'\";\r\n }\r\n return $sql;\r\n }", "public function schema_tables($schema = NULL);", "static function schema()\n {\n $class = get_called_class();\n $db = $class::db;\n $table = $class::table;\n return \"{$db}.{$table}\";\n }", "protected function schema()\n {\n return $this->connection()->getSchemaBuilder();\n }", "protected function schema()\n {\n return $this->connection()->getSchemaBuilder();\n }", "protected function schema()\n {\n return $this->connection()->getSchemaBuilder();\n }", "protected function schema()\n {\n return $this->connection()->getSchemaBuilder();\n }", "protected function schema()\n {\n return $this->connection()->getSchemaBuilder();\n }", "protected function schema()\n {\n return $this->connection()->getSchemaBuilder();\n }", "protected function schema()\n {\n return $this->connection()->getSchemaBuilder();\n }", "public function getTableSchema()\n {\n return self::getDefaultTableSchema();\n }", "public function getAllTables() {\n \t return $this->connection->select($this->grammar->compileGetAllTables());\n\t}", "public function get_db_tables() {\n\n\t\tif ( ! isset( $this->db_tables ) ) {\n\t\t\tpreg_match_all( '/CREATE TABLE (.*) \\(/', $this->get_db_schema(), $matches );\n\t\t\t$this->db_tables = $matches[1];\n\t\t}\n\n\t\treturn $this->db_tables;\n\t}", "public function getSchema()\n {\n return $this->_server->getSchema();\n }", "private static function get_schema()\n {\n }", "public function getTableNames(): array\n {\n return array_keys($this->tableBlueprints);\n }", "public function getTableNames(): array\n {\n return $this->tableNames;\n }", "protected function findTableNames($schema = '', $includeViews=true)\n {\n if ($schema === '') {\n $schema = $this->defaultSchemaName;\n }\n $condition = ($includeViews) ? \"TABLE_TYPE in ('BASE','VIEW')\" : \"TABLE_TYPE ='BASE'\";\n\n switch($this->AsaVersion) {\n case 9:\n $table_shift =\"sys.sysuserperms\";\n break;\n case 11:\n case 12:\n case 16:\n case 17:\n $table_shift =\"sys.sysuser\";\n break;\n default:\n throw new NotSupportedException('This version ASA( Ver.'.$this->AsaVersion.') is not supported.');\n }\n\n $sql = <<<SQL\nSELECT trim(table_name) as table_name, trim(user_name) as TABLE_SCHEMA\nFROM sys.systable\nLEFT OUTER JOIN {$table_shift} ON\n creator=user_id\nWHERE\n UPPER(user_name)=UPPER(:schema) AND\n creator <> 0 AND\n user_name NOT IN('rs_systabgroup') AND\n {$condition}\nSQL;\n\n return $this->db->createCommand($sql, [':schema' => $schema])->queryColumn();\n }", "public function showDatabases()\n {\n $array = array();\n $sth = $this->dbh->prepare('SHOW databases'); \n $sth->execute(); \n $tableinfo = $sth->fetchAll(\\PDO::FETCH_ASSOC); \n foreach ($tableinfo as $key => $value) { \n $array[] = $value['Database'];\n } \n return $array;\n }", "static public function getAllTableNames() {\n\t\tself::retrieveTableNames();\n\n\t\treturn array_keys(self::$tableNameCache);\n\t}", "public function getTables()\r\n\t{\r\n\t\treturn db::fetchPairs(\"\r\n\t\t\tSELECT table_name FROM information_schema.tables\r\n\t\t\tWHERE table_schema = 'public' AND table_type = 'BASE TABLE'\r\n\t\t\"); \r\n\t}", "public function getDatabaseTableDefinitions() {}", "public function getSchema()\n\t{\n\t\treturn $this->columns;\n\t}", "public function getSchema()\n\t{\n\t\treturn $this->columns;\n\t}", "public function tables(): array {\n\t\t$logger = $this->application->logger;\n\t\t$schema = $this->schema();\n\t\t$tables = [];\n\t\t$db = $this->database();\n\t\tforeach ($schema as $table_name => $table_schema) {\n\t\t\tif (is_numeric($table_name)) {\n\t\t\t\tthrow new SyntaxException(get_class($this) . \" should contain an array of table schemas\\n\" . var_export($table_schema, true));\n\t\t\t}\n\t\t\tif ($this->debug()) {\n\t\t\t\t$logger->debug('Schema: ' . $this->class_object->class . \" \\\"$table_name\\\"\");\n\t\t\t}\n\t\t\t$tables[$table_name] = $table = self::schema_to_database_table($db, $this->map($table_name), $table_schema);\n\n\t\t\tif (array_key_exists('on create', $table_schema)) {\n\t\t\t\t// Make this first class TODO KMD 2023\n\t\t\t\t$table->setOptionPath(['on', 'create'], $table_schema['on create']);\n\t\t\t}\n\t\t}\n\t\treturn $tables;\n\t}" ]
[ "0.7905484", "0.711643", "0.69550043", "0.6948586", "0.6708437", "0.6675946", "0.65812707", "0.6562322", "0.6558979", "0.65319586", "0.65310824", "0.6511747", "0.6505352", "0.6502782", "0.6470381", "0.644045", "0.64040947", "0.6395796", "0.63822407", "0.6342322", "0.63224226", "0.6307871", "0.6291107", "0.6288979", "0.62873614", "0.6276576", "0.62744385", "0.62260514", "0.62190074", "0.6164032", "0.6160641", "0.61549133", "0.6138129", "0.61318356", "0.61090994", "0.61061954", "0.6065787", "0.60373074", "0.6025653", "0.60255", "0.6010452", "0.5993096", "0.5985251", "0.5985251", "0.5985251", "0.59768", "0.5973873", "0.59738284", "0.59681016", "0.5964855", "0.59646386", "0.5958539", "0.59570247", "0.59482694", "0.59409654", "0.59403217", "0.59391004", "0.5937747", "0.5937699", "0.59355444", "0.5931712", "0.58988005", "0.58942574", "0.5893273", "0.587658", "0.5874767", "0.5868194", "0.58657247", "0.5862353", "0.5846683", "0.5843133", "0.58178484", "0.58086866", "0.58076495", "0.5807253", "0.58069766", "0.5801774", "0.5797128", "0.5797041", "0.5797041", "0.5797041", "0.5797041", "0.5797041", "0.5797041", "0.5797041", "0.57888836", "0.5763182", "0.5762508", "0.57619905", "0.5746058", "0.57371", "0.5728848", "0.5727017", "0.5718893", "0.5717085", "0.5714167", "0.5696319", "0.56883085", "0.56883085", "0.5684785" ]
0.78486514
1
Return an array of supported schema resource types.
Вернуть массив поддерживаемых схем ресурсов.
public function getSupportedResourceTypes() { return [DbResourceTypes::TYPE_TABLE]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getResourceTypes(): array\n {\n return $this->resourceTypes;\n }", "public function getResourceTypes()\n {\n return $this->types;\n }", "public function getSupportedTypes();", "public static function swaggerTypes()\n {\n return [\n 'resource_id' => 'string',\n 'resource_server_id' => 'string',\n 'scope_type' => 'string'\n ];\n }", "public function supportedTypes(): array\n {\n $types = [];\n\n foreach ($this->factories as $factory) {\n $types[] = $factory->supportedTypes();\n }\n\n return array_merge(...$types);\n }", "public static function swaggerTypes()\n {\n return [\n 'scope_type' => 'string',\n 'permissions' => 'string[]'\n ];\n }", "public static function swaggerTypes()\n {\n return [\n 'name' => 'string',\n 'location_id' => 'string',\n 'url' => 'string',\n 'capabilities' => '\\Acronis\\Cloud\\Client\\Model\\Infra\\InfraCap[]',\n 'content_url' => 'string',\n 'content_mobile_url' => 'string',\n 'backend_type' => 'object',\n 'version' => 'int'\n ];\n }", "public static function getValidRecordTypes(): array;", "public static function swaggerTypes()\n {\n return [\n 'application' => '\\Acronis\\Cloud\\Client\\Model\\Version\\VersionApplication',\n 'components' => '\\Acronis\\Cloud\\Client\\Model\\Version\\VersionComponent[]'\n ];\n }", "static function get_supported_types() {\n $result = array();\n $result[] = \\repository\\content_object\\announcement\\Announcement::get_type_name();\n //$result[] = \\repository\\content_object\\description\\Description::get_type_name();\n $result[] = \\repository\\content_object\\story\\Story::get_type_name();\n $result[] = \\repository\\content_object\\note\\Note::get_type_name();\n\n return $result;\n }", "private function types()\r\n\t\t{\r\n\t\t\t$arrTypes = array();\r\n\t\t\t\r\n\t\t\t// get types from metalib\r\n\r\n\t\t\t$objXml = new DOMDocument();\r\n\t\t\t$objXml = $this->objSearch->types($this->configInstitute);\r\n\t\t\t\r\n\t\t\t// extract just the type names\r\n\t\t\t\r\n\t\t\t$objXPath = new DOMXPath($objXml);\r\n\t\t\t$objTypes = $objXPath->query(\"//resource_type/@name\");\r\n\t\t\t\r\n\t\t\t$x = 1;\r\n\t\t\t\r\n\t\t\t// cycle thru and add them to array of objects\r\n\r\n\t\t\tforeach ( $objTypes as $objType )\r\n\t\t\t{\r\n\t\t\t\t$objDataType = new Xerxes_Data_Type();\r\n\t\t\t\t\r\n\t\t\t\t$objDataType->id = $x;\r\n\t\t\t\t$objDataType->name = $objType->nodeValue;\r\n\t\t\t\t$objDataType->normalized = $this->normalize($objType->nodeValue);\r\n\t\t\t\t\r\n\t\t\t\tarray_push($arrTypes, $objDataType);\r\n\t\t\t\t\r\n\t\t\t\t$x++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $arrTypes;\r\n\t\t}", "public static function swaggerTypes()\n {\n return [\n 'tenant' => 'string',\n 'settings' => '\\Acronis\\Cloud\\Client\\Model\\Settings\\Setting[]'\n ];\n }", "public static function swaggerTypes(): array\n {\n return self::$swaggerTypes;\n }", "public function get_supported_datatypes() {\n return array();\n }", "public function types()\n {\n $types = array();\n foreach ($this->all('rdf:type') as $uri) {\n $type = EasyRdf_Namespace::shorten($uri);\n array_push($types, $type);\n }\n return $types;\n }", "#[Pure] public function getAcceptedContentTypes(): array;", "public function get_supported_types() {\n\n\t\treturn $this->supported_types;\n\t}", "static public function getThemeResourceTypes()\n {\n return array('css');\n }", "public function getSupportedContentTypes() {\n return array_map(function ($encoder) {\n return $encoder->getMediaType();\n }, $this->encoders);\n }", "public static function swaggerTypes()\n {\n return [\n 'tenant_id' => 'string',\n 'level' => '\\Acronis\\Cloud\\Client\\Model\\Reports\\ReportPostLevel',\n 'kind' => '\\Acronis\\Cloud\\Client\\Model\\Reports\\ReportPostKind',\n 'formats' => '\\Acronis\\Cloud\\Client\\Model\\Reports\\ReportPostItems[]',\n 'period' => '\\Acronis\\Cloud\\Client\\Model\\Reports\\ReportPostPeriod'\n ];\n }", "function _getSupportedTypes() {\n\t\tstatic $_supportedTypes = array(\n\t\t\tMETADATA_ELEMENT_TYPE_STRING,\n\t\t\tMETADATA_ELEMENT_TYPE_DATE,\n\t\t\tMETADATA_ELEMENT_TYPE_INTEGER,\n\t\t\tMETADATA_ELEMENT_TYPE_OBJECT\n\t\t);\n\t\treturn $_supportedTypes;\n\t}", "public function supportedMimeTypes(): array\n {\n return $this->actualResource->supportedMimeTypes();\n }", "public function getTypes(): array;", "public function getValidTypes() {\n return [];\n }", "public function getTypes(): array\n {\n return $this->types;\n }", "public function getSupportedEntityTypesList() {\n $definitions = $this->entityTypeManager->getDefinitions();\n\n $supported = [];\n\n foreach ($definitions as $definition) {\n // Only support fieldable entity types.\n if (!$definition->get('field_ui_base_route')) {\n continue;\n }\n\n $supported[$definition->id()] = $definition->getLabel();\n }\n\n return $supported;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes + parent::swaggerTypes();\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes + parent::swaggerTypes();\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes + parent::swaggerTypes();\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes + parent::swaggerTypes();\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes + parent::swaggerTypes();\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes + parent::swaggerTypes();\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes + parent::swaggerTypes();\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes + parent::swaggerTypes();\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes + parent::swaggerTypes();\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes + parent::swaggerTypes();\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes + parent::swaggerTypes();\n }", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public static function swaggerTypes() {\n\t\treturn self::$swaggerTypes;\n\t}", "public static function swaggerTypes() {\n\t\treturn self::$swaggerTypes;\n\t}", "public function getResourceTypeAllowableValues()\n {\n return [\n self::RESOURCE_TYPE_IMAGE,\n ];\n }", "public function getTypes(): array\n\t{\n\t\treturn array_map(function ($name) { return self::fromString($name); }, $this->types);\n\t}", "public function getConstraintTypes() {}", "public function getDataTypeResources() {\n\t\t$dataTypeGroups = Core::$dataTypePlugins;\n\t\t$resources = array();\n\t\twhile (list($group, $dataTypes) = each($dataTypeGroups)) {\n\t\t\tforeach ($dataTypes as $dataType) {\n\t\t\t\t$resources[] = array(\n\t\t\t\t\t\"folder\" => $dataType->folder,\n\t\t\t\t\t\"examples\" => $dataType->getExampleColumnHTML(),\n\t\t\t\t\t\"options\" => $dataType->getOptionsColumnHTML(),\n\t\t\t\t\t\"help\" => $dataType->getHelpHTML()\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn $resources;\n\t}", "public static function swaggerTypes();", "public static function swaggerTypes();", "public static function swaggerTypes();", "public static function swaggerTypes();", "public static function swaggerTypes();", "public static function swaggerTypes();", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }", "public static function swaggerTypes()\n {\n return self::$swaggerTypes;\n }" ]
[ "0.7827827", "0.724964", "0.7176245", "0.71546954", "0.69019246", "0.6822001", "0.68036675", "0.67474115", "0.6685379", "0.66807824", "0.66746265", "0.66689897", "0.6667343", "0.6664922", "0.66569567", "0.66390204", "0.65525496", "0.6534113", "0.6509327", "0.6479794", "0.64631706", "0.6458352", "0.64556634", "0.63917106", "0.6387893", "0.63856333", "0.6373847", "0.6373847", "0.6373847", "0.6373847", "0.6373847", "0.6373847", "0.6373847", "0.6373847", "0.6373847", "0.6373847", "0.6373847", "0.63594496", "0.63594496", "0.63594496", "0.63594496", "0.63594496", "0.63521826", "0.63521826", "0.63432676", "0.6339329", "0.6331261", "0.6328882", "0.6299888", "0.6299888", "0.6299888", "0.6299888", "0.6299888", "0.6299888", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786", "0.6271786" ]
0.7830322
0
Returns all table references in the database. This method should be overridden by child classes in order to support this feature because the default implementation simply throws an exception.
Возвращает все ссылки на таблицы в базе данных. Этот метод должен быть переопределен дочерними классами для поддержки этой функции, так как реализация по умолчанию просто генерирует исключение.
protected function findTableReferences() { return []; // throw new NotImplementedException("Database or driver does not support fetching all table references."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function referencing_tables()\n\t{\n\t\tif ($this->_referencing_tables === NULL)\n\t\t{\n\t\t\t$this->_referencing_tables = DB::select(array('TABLE_NAME', 'table'), array('COLUMN_NAME', 'column'))\n\t\t\t\t->from('INFORMATION_SCHEMA.KEY_COLUMN_USAGE')\n\t\t\t\t->where('TABLE_SCHEMA', '=', $this->_table_schema)\n\t\t\t\t->where('REFERENCED_TABLE_NAME', '=', $this->_table)\n\t\t\t\t->execute()\n\t\t\t\t->as_array();\n\t\t}\n\t\treturn $this->_referencing_tables;\n\t}", "protected function findTableReferences()\n {\n $schemas = implode(\"','\", $this->getSchemas());\n $sql = <<<MYSQL\nSELECT table_schema, table_name, column_name, referenced_table_schema, referenced_table_name, referenced_column_name\nFROM information_schema.KEY_COLUMN_USAGE \nWHERE referenced_table_name IS NOT NULL AND table_schema IN ('{$schemas}');\nMYSQL;\n\n return $this->connection->select($sql);\n }", "protected function getReferencedTables()\n {\n return DB::table('information_schema.KEY_COLUMN_USAGE')\n ->where('table_schema', env('DB_DATABASE'))\n ->where('referenced_table_name', $this->getTable())\n ->where('referenced_column_name', $this->getColumn())\n ->get(['table_name', 'constraint_name', 'column_name']);\n }", "public function get_table_relations() {\n \t\treturn $this->table->get_table_relations();\n \t}", "public function tableReferenceList();", "public function getAllTables() {\n \t return $this->connection->select($this->grammar->compileGetAllTables());\n\t}", "public function getAll()\n {\n return $this->tables;\n }", "public static function getAllTables()\n {\n /** @var \\Illuminate\\Database\\Schema\\PostgresBuilder $instance */\n return $instance->getAllTables();\n }", "public function get_tables() {\n $data = array();\n $sql = \"SELECT table_name, referenced_table_name\n FROM information_schema.key_column_usage\n WHERE referenced_table_name IS NOT NULL\n AND table_schema = '\".$this->database.\"'\";\n\n // Get all table names\n $query = $this->show_tables();\n $total_rows = $query->rowCount();\n\n // Put table names into $data array\n for ($i=0; $i < $total_rows; $i++) {\n $row = $query->fetch(PDO::FETCH_NUM);\n $data[$i] = $row[0];\n }\n\n // Get a all tables with foreign key constraints\n $query = $this->query($sql);\n\n while ($row = $query->fetch(PDO::FETCH_ASSOC)) {\n // Find the table name and referenced table name positions in the array\n $table = array_search($row['table_name'], $data);\n $ref = array_search($row['referenced_table_name'], $data);\n\n // If the referenced table's position is greater than the table's position\n // in the array then swap them.\n if ($ref > $table) {\n $temp = $data[$table];\n $data[$table] = $data[$ref];\n $data[$ref] = $temp;\n }\n }\n\n return $data;\n }", "function tables()\r\n {\r\n if ($this->_connection==null)\r\n {\r\n $this->open();\r\n }\r\n return($this->_connection->MetaTables());\r\n }", "public function getTables() {\n return $this->dbDao->getTables();\n }", "public function getDatabaseTableDefinitions() {}", "public function getRefTable()\n {\n return $this->_context->getRefTable();\n }", "public function getTables($dbName = null) {\n $sql = \"SELECT TABLE_NAME\nFROM information_schema.tables\nWHERE table_schema=DATABASE() and table_type = 'BASE TABLE'\n AND TABLE_NAME NOT IN (\n SELECT DISTINCT TABLE_NAME\n FROM information_schema.key_column_usage WHERE table_schema=DATABASE()\n AND referenced_table_name IS NOT NULL)\n \n union all\n \n SELECT DISTINCT TABLE_NAME\nFROM information_schema.referential_constraints\nWHERE CONSTRAINT_SCHEMA=DATABASE()\n AND referenced_table_name NOT IN\n (SELECT DISTINCT TABLE_NAME\n FROM information_schema.table_constraints\n WHERE constraint_type = 'FOREIGN KEY')\n AND TABLE_NAME NOT IN\n (SELECT DISTINCT TABLE_NAME\n FROM information_schema.referential_constraints\n WHERE referenced_table_name IN\n (SELECT DISTINCT TABLE_NAME\n FROM information_schema.table_constraints\n WHERE constraint_type = 'FOREIGN KEY'))\n \n union all \n SELECT DISTINCT TABLE_NAME\nFROM information_schema.referential_constraints\nWHERE CONSTRAINT_SCHEMA=DATABASE()\n AND referenced_table_name IN\n (SELECT DISTINCT TABLE_NAME\n FROM information_schema.table_constraints\n WHERE constraint_type = 'FOREIGN KEY'); \";\n \t\t$cmd = Yii::$app->db->createCommand ( $sql );\n \t\t$tables = $cmd->queryColumn ();\n// Yii::warning($tables);\n \t\treturn $tables;\n \t}", "public static abstract function\r\n get_foreign_key_table_names();", "final public function tables():Tables\n {\n return $this->db()->tables();\n }", "public function getTables()\n {\n return $this->query->setTable($this->database . '.TABLES')\n ->setCondition([\n 'TABLE_CATALOG' => $this->connectionDatabase,\n 'TABLE_TYPE' => 'BASE TABLE'\n ])\n ->setColumn(['table_name' => 'TABLE_NAME'])\n ->get();\n }", "public function getTables()\n {\n return $this->query->setTable($this->database . '.TABLES')\n ->setCondition([\n 'TABLE_SCHEMA' => $this->connectionDatabase,\n 'TABLE_TYPE' => 'BASE TABLE'\n ])\n ->setColumn(['tableName' => 'TABLE_NAME'])\n ->get();\n }", "public function getForeignKeys($table);", "protected function tableForeignKeys()\n {\n return [];\n }", "public static function getDeclaredSQLTables();", "public static function getTables(){\n return static::$tables;\n }", "public function getTables()\n {\n return $this->tables;\n }", "public function getTables()\n {\n return $this->tables;\n }", "public function getTables()\n {\n return $this->tables;\n }", "public function getTables()\n {\n return $this->_tables;\n }", "public function getTables()\n {\n\n return $this->tables;\n }", "public function getTables() {\n return $this->tables;\n }", "public function findAll()\n\t{\n\t\treturn $this->getTable();\n\t}", "protected function getAllForeignKey($tableName, $byReferencedTable = true) {\n\n\t\t$where = 'TABLE_NAME = :referenced_table_name AND REFERENCED_TABLE_NAME IS NOT NULL';\n\n\t\tif ( $byReferencedTable ) {\n\t\t\t$where = 'REFERENCED_TABLE_NAME = :referenced_table_name';\n\t\t}\n\n\t\t$sql = \"SELECT\n\t\t\t\t\tTABLE_NAME,\n\t\t\t\t\tCONSTRAINT_NAME,\n\t\t\t\t\tCOLUMN_NAME,\n\t\t\t\t\tREFERENCED_COLUMN_NAME,\n\t\t\t\t\tREFERENCED_TABLE_NAME\n\t\t\t\tFROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE\n\t\t\t\tWHERE {$where} AND CONSTRAINT_SCHEMA = :schema_name\";\n\n\t\t$query = $this->driver->getDriver()->query($sql,\n\t\t\tarray(':referenced_table_name' => $tableName, ':schema_name' => $this->dataBaseName));\n\n\t\t$result = $query->fetchAll();\n\t\treturn $result;\n\t}", "public function databaseTables()\n {\n $arrTables = array();\n $arrTablesHidden = $this->getTablesHidden();\n\n foreach ($this->Database->listTables() as $key => $value)\n {\n // Check if table is a hidden one.\n if (in_array($value, $arrTablesHidden) || preg_match(\"/synccto_temp_.*/\", $value))\n {\n continue;\n }\n\n $arrTables[] = $value;\n }\n\n return $arrTables;\n }", "public function getAllTableAliases()\n {\n $queryParts = $this->getQueryParts();\n $froms = $queryParts['from'];\n $tables = [];\n foreach ($froms as $item) {\n $tables[$item['table']][] = $item['alias'];\n }\n\n foreach ($queryParts['join'] as $join) {\n foreach ($join as $joinPart) {\n $tables[$joinPart['joinTable']][] = $joinPart['joinAlias'];\n }\n }\n\n return $tables;\n }", "public function getTables()\n {\n return($this->tables);\n }", "public function getReferences($tableName)\n {\n return [];\n }", "public function getTables()\n\t{\n\t\treturn $this->tables;\n\t}", "public function getTables()\n\t{\n\t\treturn $this->tables;\n\t}", "public function getTableList() {\n $sql = 'SHOW TABLES';\n\n $result = $this->connection->execute($sql);\n\n $key = 'Tables_in_' . $this->connection->getDsn()->getDatabase();\n $tables = array();\n foreach ($result as $row) {\n $tables[] = $row[$key];\n }\n\n return $tables;\n }", "public function getTables() {\n\t\treturn $this->tables;\n\t}", "public function getChildTables($table)\n {\n # As INFORMATION_SCHEMA does not provides self column name, we\n # are using sys.\n $this->query->setTable('sys.foreign_key_columns');\n return $this->setSysConstraintColumnJoin()\n ->setColumn([\n 'column_name' => 'refcolumn.name',\n 'child_schema' => 'selfschema.name',\n 'child_table' => 'selftable.name',\n 'child_column' => 'selfcolumn.name'\n ])\n ->setCondition('reftable.name', $table)\n ->get();\n }", "public static function getTables() {\n }", "public function tables()\n {\n return $this->hasMany('App\\Table');\n }", "public function getTables() {\n\t\t$this->connect();\n\n\t\tif(method_exists('DB', 'table_list')) {\n\t\t\treturn DB::table_list();\n\t\t} else {\n\t\t\treturn DB::tableList();\n\t\t}\n\t}", "static public function getAllTableNames() {\n\t\tself::retrieveTableNames();\n\n\t\treturn array_keys(self::$tableNameCache);\n\t}", "public function fk_list($table)\n\t{\n\t\treturn <<<SQL\n\t\t\tSELECT `TABLE_NAME`,`COLUMN_NAME`,`CONSTRAINT_NAME`,\n\t\t\t`REFERENCED_TABLE_NAME`,`REFERENCED_COLUMN_NAME`\n\t\t\tFROM `INFORMATION_SCHEMA`.`KEY_COLUMN_USAGE`\n\t\t\tWHERE `REFERENCED_TABLE_NAME` = '{$table}';\nSQL;\n\t}", "public function getTables();", "public function getTables();", "function getReferenceTablesList($tableName,$rootPath=\"\") {\n\t$ret = array();\n\t$ext_list = getExtensionsByDB($rootPath);\n\tforeach($ext_list as $current_name => $current_dir) {\n\t\t$current_obj = new Extension($current_name,$current_dir);\n\t\t$current_ret = $current_obj->getReferenceTables($tableName);\n\t\t$ret = array_merge($ret,$current_ret);\n\t}\n\treturn $ret;\n}", "public function getReferencingKeys($table) {\n switch ($this->connection->getAttribute(PDO::ATTR_DRIVER_NAME)) {\n case 'pgsql':\n if (strpos(\".\", $table) === false) {\n $table = $this->lookupQualifiedTablename($table);\n }\n case 'mysql':\n $meta = array();\n foreach ($this->loadKeys() as $info) {\n if ($info['referenced_table_name'] === $table) {\n $meta[] = array(\n 'table' => $info['table_name'],\n 'column' => $info['column_name'],\n 'referenced_table' => $info['referenced_table_name'],\n 'referenced_column' => $info['referenced_column_name'],\n );\n }\n }\n return $meta;\n case 'sqlite':\n $meta = array();\n foreach ($this->getTables() as $tbl) {\n if ($tbl != $table) {\n foreach ($this->getForeignKeys($tbl) as $info) {\n if ($info['referenced_table'] == $table) {\n $meta[] = $info;\n }\n }\n }\n }\n return $meta;\n case 'sqlsrv':\n $meta = array();\n foreach ($this->getTables() as $tbl) {\n if ($tbl != $table) {\n foreach ($this->getForeignKeys($tbl) as $info) {\n if ($info['referenced_table'] == $table) {\n $meta[] = $info;\n }\n }\n }\n }\n return $meta;\n default:\n throw new pdoext_MetaNotSupportedException();\n }\n }", "function getForeignKeys($table);", "public static function get_tables()\n {\n }", "public function getTableList() {\n $sql = 'SELECT name FROM sqlite_master WHERE type = ' . $this->connection->quoteValue('table');\n\n $result = $this->connection->execute($sql);\n\n $tables = array();\n foreach ($result as $row) {\n $tables[] = $row['name'];\n }\n\n return $tables;\n }", "protected function getTables() {\n\t\t$tables = Yii::app()->db->schema->tableNames;\n\t\t$tables[] = '*';\n\t\treturn $tables;\n\t}", "protected function getQueriedTables() : array {}", "public function getTables(){\n return $this->table;\n }", "function getTables()\n\t{\n\t\treturn $this->tables;\n\t}", "final public function tables():Tables\n {\n return $this->tables;\n }", "public function tables(): array {\n\t\t$logger = $this->application->logger;\n\t\t$schema = $this->schema();\n\t\t$tables = [];\n\t\t$db = $this->database();\n\t\tforeach ($schema as $table_name => $table_schema) {\n\t\t\tif (is_numeric($table_name)) {\n\t\t\t\tthrow new SyntaxException(get_class($this) . \" should contain an array of table schemas\\n\" . var_export($table_schema, true));\n\t\t\t}\n\t\t\tif ($this->debug()) {\n\t\t\t\t$logger->debug('Schema: ' . $this->class_object->class . \" \\\"$table_name\\\"\");\n\t\t\t}\n\t\t\t$tables[$table_name] = $table = self::schema_to_database_table($db, $this->map($table_name), $table_schema);\n\n\t\t\tif (array_key_exists('on create', $table_schema)) {\n\t\t\t\t// Make this first class TODO KMD 2023\n\t\t\t\t$table->setOptionPath(['on', 'create'], $table_schema['on create']);\n\t\t\t}\n\t\t}\n\t\treturn $tables;\n\t}", "public function tableNames()\n {\n return collect(DB::select($this->getQuery()))\n ->pluck('name')->reject(function ($name) {\n return $this->skips()->contains($name);\n });\n }", "public function getAll()\n {\n return DB::findAll($this->table);\n }", "public function getForeignKeys(Table $table): array;", "public function getRootTables()\n {\n return($this->rootTables);\n }", "public function getTableNames () {\n return $this->tablenames;\n }", "public function findAll()\n\t{\n\t\treturn $this->connection->{$this->tableName}();\n\t}", "protected static function _getTables()\r\n\t{\r\n\t\treturn array();\r\n\t}", "function getTables() {\n\t\treturn array_keys($this->tables);\n\t}", "public function findAllNoRef() {\n\t\t$query = \"SELECT * FROM $this->table\";\n\t\treturn $this->database->getSelection($query);\n\t}", "public static function getSystemDBTables()\r\n {\r\n static $tables = null;\r\n\r\n if ($tables == null)\r\n $tables = array('biz__relation', 'biz__list', 'biz__search');\r\n\r\n return $tables;\r\n }", "public function getTableNames()\n\t{\n\t\treturn $this->_backend->getTableNames();\n\t}", "public function refreashTables(){\n $this->curQuery = 'show Tables'; // to get all tables\n $this->tables = $this->executeQuery(false, true); // set all tables in table varible\n }", "public function getRelationRefs()\n\t{\n\t\t$refs = [];\n\t\tforeach ($this->tableSchema->foreignKeys as $fk)\n\t\t{\n\t\t\t$tmp = array_keys($fk);\n\t\t\t$fkId = end($tmp);\n\n\t\t\t$refs[$fkId] = lcfirst(Inflector::id2camel($fk[0], '_'));\n\t\t}\n\n\t\treturn $refs;\n\t}", "public function get_dependant_tables() {\n return [];\n }", "public function allTables(): array\n {\n $cached = $this->cache->claim(self::ALL_TABLES_CACHE_KEY);\n if ($cached && is_array($cached)) {\n return $cached;\n }\n\n $query = $this->db->prepare(\n \"SHOW TABLES LIKE '%s'\",\n \"{$this->db->base_prefix}%\"\n );\n\n return (array)$this->db->get_col($query);\n }", "public function getReferencingForeignKeys($schema, $table_name = null);", "public function getTables()\r\n\t{\r\n\t\treturn db::fetchPairs(\"\r\n\t\t\tSELECT table_name FROM information_schema.tables\r\n\t\t\tWHERE table_schema = 'public' AND table_type = 'BASE TABLE'\r\n\t\t\"); \r\n\t}", "public function list_tables()\n {\n return $this->fetch_all('SELECT c.relname AS table FROM pg_class c, pg_user u '\n .\"WHERE c.relowner = u.usesysid AND c.relkind = 'r' \"\n .'AND NOT EXISTS (SELECT 1 FROM pg_views WHERE viewname = c.relname) '\n .\"AND c.relname !~ '^(pg_|sql_)' UNION \"\n .'SELECT c.relname AS table_name FROM pg_class c '\n .\"WHERE c.relkind = 'r' \"\n .'AND NOT EXISTS (SELECT 1 FROM pg_views WHERE viewname = c.relname) '\n .'AND NOT EXISTS (SELECT 1 FROM pg_user WHERE usesysid = c.relowner) '\n .\"AND c.relname !~ '^pg_'\");\n }", "public function listAll(): array\n {\n $schema = $this->connection->getSchemaCollection();\n $tables = $schema->listTables();\n if (empty($tables)) {\n throw new RuntimeException('Your database does not have any tables.');\n }\n sort($tables);\n\n return array_combine($tables, $tables);\n }", "public function getTables() {\n return $this->getPDO()->query('SHOW TABLES')->fetchAll(PDO::FETCH_COLUMN, 0);\n }", "public function getTableNames()\n\t{\n\t\t$result = $this->nativeQuery('SHOW TABLES');\n\t\tif (!$result) throw new DB_QueryException(\"Show tables query failed: \" . $this->native->error);\n\t\tif ($result->num_rows == 0) return null;\n\t\t\n\t\t$tables = array();\n\t\twhile (($row = $result->fetch_row())) $tables[] = $row[0];\n\t\treturn $tables;\n\t}", "public function getReferenceTables($tableName) {\n\t\t$res = array();\n\t\tforeach($this->extend_tables as $key => $value) {\n\t\t\tif( is_array($value) && isset($value[2][$tableName]))\n\t\t\t\t$res[$this->Name.'_'.$key] = $value[2][$tableName];\n\t\t}\n\t\treturn $res;\n\t}", "public function getTables()\n {\n return $this->scheme;\n }", "public function all()\n\t{\n\t\t$this->query = \"SELECT * FROM \".$this->table;\n\t\t$tableList = array();\n\t\t$this->data = $this->query($this->query);\n\t\twhile($row = $this->data->fetch_assoc())\n\t\t{\n\t\t\tarray_push($tableList,$row);\n\t\t}\n\t\treturn $tableList;\n\t}", "public function getTableNames()\n {\n return array_keys($this->tables);\n }", "public function getTables()\n {\n $this->tables = [];\n $query = $this->dbms->queryStrictObject('SELECT TABLE_NAME, TABLE_COMMENT FROM information_schema.TABLES '\n . 'WHERE TABLE_SCHEMA = \"' . $this->escapeSQL($this->database) . '\"');\n while ($row = $query->fetch_row()) {\n if ($row[0] === TAB_PREFIX . 'admin') {\n continue; // admin table (or its rows) MUST NOT be accessed through admin.php\n }\n $this->tables[$row[0]] = $row[1];\n }\n }", "public function getTableNames()\n {\n return $this->tables->getItemKeys();\n }", "public function get_db_tables() {\n\n\t\tif ( ! isset( $this->db_tables ) ) {\n\t\t\tpreg_match_all( '/CREATE TABLE (.*) \\(/', $this->get_db_schema(), $matches );\n\t\t\t$this->db_tables = $matches[1];\n\t\t}\n\n\t\treturn $this->db_tables;\n\t}", "public function getTableList()\n\t{\n\t\treturn $this->_tableList;\n\t}", "public function getTableList()\n\t{\n\t\t$query = $this->getQuery()\n\t\t\t->select('name')\n\t\t\t->from('sqlite_master')\n\t\t\t->whereEquals('type', 'table')\n\t\t\t->order('name', 'asc')\n\t\t\t->toString();\n\n\t\t$this->setQuery($query);\n\n\t\treturn $this->loadColumn();\n\t}", "public function getForeignKeys($table) {\n switch ($this->connection->getAttribute(PDO::ATTR_DRIVER_NAME)) {\n case 'pgsql':\n if (strpos(\".\", $table) === false) {\n $table = $this->lookupQualifiedTablename($table);\n }\n case 'mysql':\n $meta = array();\n foreach ($this->loadKeys() as $info) {\n if ($info['table_name'] === $table) {\n $meta[] = array(\n 'table' => $info['table_name'],\n 'column' => $info['column_name'],\n 'referenced_table' => $info['referenced_table_name'],\n 'referenced_column' => $info['referenced_column_name'],\n );\n }\n }\n return $meta;\n case 'sqlite':\n $sql = \"PRAGMA foreign_key_list(\".$this->connection->quoteName($table).\")\";\n $result = $this->connection->query($sql);\n $result->setFetchMode(PDO::FETCH_ASSOC);\n $meta = array();\n foreach ($result as $row) {\n $meta[] = array(\n 'table' => $table,\n 'column' => $row['from'],\n 'referenced_table' => $row['table'],\n 'referenced_column' => $row['to'],\n );\n }\n return $meta;\n case 'sqlsrv':\n $result = $this->connection->query(\n \"SELECT KF.TABLE_NAME AS TABLE_NAME, KF.COLUMN_NAME AS COLUMN_NAME, KP.TABLE_NAME AS REFERENCED_TABLE_NAME, KP.COLUMN_NAME AS REFERENCED_COLUMN_NAME FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS RC JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE KF ON RC.CONSTRAINT_NAME = KF.CONSTRAINT_NAME JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE KP ON RC.UNIQUE_CONSTRAINT_NAME = KP.CONSTRAINT_NAME WHERE KF.TABLE_NAME = '$table'\");\n $result->setFetchMode(PDO::FETCH_ASSOC);\n $meta = array();\n foreach ($result as $row) {\n $meta[] = array(\n 'table' => $row['TABLE_NAME'],\n 'column' => $row['COLUMN_NAME'],\n 'referenced_table' => $row['REFERENCED_TABLE_NAME'],\n 'referenced_column' => $row['REFERENCED_COLUMN_NAME'],\n );\n }\n return $meta;\n break;\n default:\n throw new pdoext_MetaNotSupportedException();\n }\n }", "public function getTableNames()\n {\n $tableNames = array();\n if (isset($this->tables)) {\n foreach ($this->tables as $table) {\n $tableNames[] = $table->getName();\n }\n }\n return $this->tableNames;\n }", "public function listTables() {\n\t\treturn $this->tables;\n\t}", "public function list_tables()\n {\n // get tables if not cached\n if ($this->tables === null) {\n // first fetch current database name\n $d = $this->query(\"SELECT database()\");\n $d = $this->fetch_array($d);\n\n // get list of tables in current database\n $q = $this->query(\"SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES\"\n . \" WHERE TABLE_SCHEMA = ? AND TABLE_TYPE = 'BASE TABLE'\"\n . \" ORDER BY TABLE_NAME\", $d ? $d[0] : '');\n\n $this->tables = $q ? $q->fetchAll(PDO::FETCH_COLUMN, 0) : array();\n }\n\n return $this->tables;\n }", "public function getChildTables($table)\n {\n return $this->query->setTable($this->database . '.KEY_COLUMN_USAGE')\n ->setColumn([\n 'columnName' => 'REFERENCED_COLUMN_NAME',\n 'childSchema' => 'TABLE_SCHEMA',\n 'childTable' => 'TABLE_NAME',\n 'childColumn' => 'COLUMN_NAME',\n ])\n ->setCondition([\n 'KEY_COLUMN_USAGE.REFERENCED_TABLE_SCHEMA' => $this->connectionDatabase,\n 'KEY_COLUMN_USAGE.REFERENCED_TABLE_NAME' => $table,\n ])\n ->get();\n }", "final public static function getForeignReferences() {\n\t\t$calledClass = get_called_class();\n\n\t\tif ( !isset( self::$foreignReferences[ $calledClass ] ) ) { // runs once per recordClass\n\t\t\tif (self::$useCache === NULL) {\n\t\t\t\tself::initCache();\n\t\t\t}\n\t\t\t\t\n\t\t\tself::fillForeignReferences( $calledClass );\n\t\t}\n\n\t\treturn self::$foreignReferences[ $calledClass ];\n\t}", "abstract public function tables(): array;", "public function getTablesToJoin();", "public function getReferencedForeignKeys($schema, $table_name = null);", "public function getRelations()\n {\n return array_keys($this->schema);\n }", "public function getForeigns();", "public function tables()\n {\n return array_map(\n array('Horde_String', 'lower'),\n $this->selectValues('SELECT table_name FROM USER_TABLES')\n );\n }", "public function listTableRelations($table)\n {\n throw new Doctrine_Import_Exception(__FUNCTION__ . ' not supported by this driver.');\n }" ]
[ "0.76209027", "0.7535545", "0.70031935", "0.6887242", "0.67739403", "0.67376417", "0.67241174", "0.6643978", "0.66378784", "0.6624705", "0.6559107", "0.65467024", "0.6537173", "0.6509166", "0.6501071", "0.6476108", "0.64541376", "0.6438828", "0.633657", "0.63191944", "0.6312366", "0.62767273", "0.6265996", "0.6265996", "0.6265996", "0.6258891", "0.62342006", "0.6230345", "0.6219575", "0.62115836", "0.61836904", "0.61826485", "0.6182503", "0.61808157", "0.61787266", "0.61787266", "0.6173578", "0.61677706", "0.6163599", "0.6148285", "0.61354095", "0.6120685", "0.61176646", "0.60959095", "0.6084645", "0.6084645", "0.6073882", "0.6065776", "0.6065244", "0.6057902", "0.60530233", "0.60390466", "0.6029319", "0.60258275", "0.60136193", "0.6002099", "0.6001989", "0.5986212", "0.59858084", "0.59835404", "0.5973627", "0.5969636", "0.5969329", "0.59685695", "0.5968453", "0.59624195", "0.5961897", "0.59589684", "0.59352547", "0.59342045", "0.59270203", "0.59171134", "0.5916127", "0.5912692", "0.59125936", "0.5908889", "0.58808625", "0.5873727", "0.58707637", "0.58657306", "0.58626467", "0.5861109", "0.58590883", "0.5845552", "0.5840649", "0.5838855", "0.5838753", "0.58376753", "0.58373165", "0.583524", "0.5832341", "0.582889", "0.58234495", "0.5816074", "0.5809138", "0.58079636", "0.5807181", "0.57965606", "0.5791102", "0.57850033" ]
0.8172348
0
Compares two table names. The table names can be either quoted or unquoted. This method will consider both cases.
Сравнивает два имени таблиц. Имена таблиц могут быть как оформлены кавычками, так и без них. Этот метод учитывает оба случая.
public function compareTableNames($name1, $name2) { $name1 = str_replace(['"', '`', "'"], '', $name1); $name2 = str_replace(['"', '`', "'"], '', $name2); if (($pos = strrpos($name1, '.')) !== false) { $name1 = substr($name1, $pos + 1); } if (($pos = strrpos($name2, '.')) !== false) { $name2 = substr($name2, $pos + 1); } if ($this->connection->getTablePrefix() !== null) { if (strpos($name1, '{') !== false) { $name1 = $this->connection->getTablePrefix() . str_replace(['{', '}'], '', $name1); } if (strpos($name2, '{') !== false) { $name2 = $this->connection->getTablePrefix() . str_replace(['{', '}'], '', $name2); } } return $name1 === $name2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function compareTableNames($name1,$name2)\n\t{\n\t\t$name1=str_replace(array('\"','`',\"'\"),'',$name1);\n\t\t$name2=str_replace(array('\"','`',\"'\"),'',$name2);\n\t\tif(($pos=strrpos($name1,'.'))!==false)\n\t\t\t$name1=substr($name1,$pos+1);\n\t\tif(($pos=strrpos($name2,'.'))!==false)\n\t\t\t$name2=substr($name2,$pos+1);\n\t\tif($this->_connection->tablePrefix!==null)\n\t\t{\n\t\t\tif(strpos($name1,'{')!==false)\n\t\t\t\t$name1=$this->_connection->tablePrefix.str_replace(array('{','}'),'',$name1);\n\t\t\tif(strpos($name2,'{')!==false)\n\t\t\t\t$name2=$this->_connection->tablePrefix.str_replace(array('{','}'),'',$name2);\n\t\t}\n\t\treturn $name1===$name2;\n\t}", "public function compareTableNames($name1,$name2)\n\t{\n $name1=str_replace(array('[',']'),'',$name1);\n $name2=str_replace(array('[',']'),'',$name2);\n return parent::compareTableNames(strtolower($name1),strtolower($name2));\n }", "public function compareTableNames($name1, $name2)\n {\n return parent::compareTableNames(strtolower($name1), strtolower($name2));\n }", "public function getJointureTableName(string $table1, string $table2): string;", "public function testAdapterQuoteTableAs()\n {\n $string = \"foo\";\n $alias = \"bar\";\n $value = $this->_db->quoteTableAs($string, $alias);\n $this->assertEquals('\"foo\" \"bar\"', $value);\n }", "public function testAdapterQuoteTableAs()\n {\n $string = \"foo\";\n $alias = \"bar\";\n $value = $this->_db->quoteTableAs($string, $alias);\n $this->assertEquals('\"foo\" \"bar\"', $value);\n }", "function swapTable($_table_name_1,$_table_name_2,$_table_name_swap=\"\")\n\t{\n\t\tif(!$_table_name_swap)\n\t\t{\n\t\t\t$_table_name_swap = \"swap_\" . $_table_name_1 . \"_\". $_table_name_2;\n\t\t\tif(strlen($_table_name_swap) > 50) $_table_name_swap = substr($_table_name_swap,0,50);\n\t\t\t$_table_name_swap .= \"_\" . time();\n\t\t}\n\t\t\n\t\t$this->dropTable($_table_name_swap);\n\t\t\n\t\t$arr_sql_rename = array();\n\t\t$arr_sql_rename[] = \"`$_table_name_1` to `$_table_name_swap`\";\n\t\t$arr_sql_rename[] = \"`$_table_name_2` to `$_table_name_1`\";\n\t\t$arr_sql_rename[] = \"`$_table_name_swap` to `$_table_name_2`\";\n\t\t$sql = \"rename table \" . implode(\",\",$arr_sql_rename);\n\t\treturn $this->query($sql);\n\t}", "public function getJointureTableName(string $table1, string $table2): string\n {\n return $table1.'_'.$table2;\n }", "function is_table($name) {\n $q = \"SHOW TABLES\";\n $nr = $this->query($q);\n while($TAB = $this->fetch($nr))\n \t\tif (strtoupper($name) == strtoupper($TAB[0])) return true;\n return false;\n }", "protected function cleanTableNames() {}", "public function safeTable($name, $noQuotes = false) {\n\t\t$name = $this->check($name);\n\t\tif (!$noQuotes) $name = $this->noKW($name);\n\t\treturn $name;\n\t}", "function checkTableName($a_name)\n\t{\n\t\tif (!preg_match (\"/^[a-z]+[_a-z0-9]*$/\", $a_name))\n\t\t{\n\t\t\t$this->error_str = \"Table name must only contain _a-z0-9 and must start with a-z.\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif ($this->isReservedWord($a_name))\n\t\t{\n\t\t\t$this->error_str = \"Invalid table name '\".$a_name.\"' (Reserved Word).\";\n\t\t\treturn false;\n\t\t}\n\n\t\tif (strtolower(substr($a_name, 0, 4)) == \"sys_\")\n\t\t{\n\t\t\t$this->error_str = \"Invalid table name '\".$a_name.\"'. Name must not start with 'sys_'.\";\n\t\t\treturn false;\n\t\t}\n\n\t\tif (strlen($a_name) > 22)\n\t\t{\n\t\t\t$this->error_str = \"Invalid table name '\".$a_name.\"'. Maximum table identifer lenght is 22 bytes.\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "function isValidName($table_name)\n {\n if ($table_name !== trim($table_name)) {\n // trailing spaces\n return false;\n }\n\n if (! strlen($table_name)) {\n // zero length\n return false;\n }\n\n if (preg_match('/[.\\/\\\\\\\\]+/i', $table_name)) {\n // illegal char . / \\\n return false;\n }\n\n return true;\n }", "public function validTableName($name) {\n if(!preg_match('/^[a-z][a-z0-9_]*$/', $name)) {\n return false;\n }\n return true;\n }", "public function getTableName($table_name): string;", "function checkTableExist($table_name);", "public function testEscapeTable($expected, $name) {\n $connection = new Connection($this->mockPdo, $this->options);\n\n $this->assertEquals($expected, $connection->escapeTable($name));\n }", "public static function is_table($name)\n\t{\n\t\tforeach(Cloudmanic\\Database\\DB::list_tables() AS $key => $row)\n\t\t{\n\t\t\tif($row == $name)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "protected function compareTable(Table $expected, Table $actual)\n {\n $this->assertEquals(\n $expected->getColumns(),\n $actual->getColumns()\n );\n $this->assertEquals(\n $expected->getOptions(),\n $actual->getOptions()\n );\n }", "public function validateTableName()\n {\n if (strpos($this->tableName, '*') !== false && substr($this->tableName, -1) !== '*') {\n $this->addError('tableName', 'Asterisk is only allowed as the last character.');\n\n return;\n }\n $tables = $this->getTableNames();\n if (empty($tables)) {\n $this->addError('tableName', \"Table '{$this->tableName}' does not exist.\");\n } else {\n foreach ($tables as $table) {\n $class = $this->generateClassName($table);\n if ($this->isReservedKeyword($class)) {\n $this->addError('tableName', \"Table '$table' will generate a class which is a reserved PHP keyword.\");\n break;\n }\n }\n }\n }", "private static function migration_compare($a, $b)\n {\n return strcmp($a[\"name\"], $b[\"name\"]);\n }", "function getTablename($table_name)\n {\n $lang = $this->hasLang();\n if (!$lang)\n return $table_name;\n else\n {\n if ($this->checkExistTable($table_name . \"_\" . $lang))\n return $table_name . \"_\" . $lang;\n else\n return $table_name;\n }\n }", "public function testUpperCaseTableName() {\n $table_name = 'A_UPPER_CASE_TABLE_NAME';\n\n // Create the tables.\n $table_specification = [\n 'description' => 'Test table.',\n 'fields' => [\n 'id' => [\n 'type' => 'int',\n 'default' => NULL,\n ],\n ],\n ];\n $this->schema->createTable($table_name, $table_specification);\n\n $this->assertTrue($this->schema->tableExists($table_name), 'Table with uppercase table name exists');\n $this->assertContains($table_name, $this->schema->findTables('%'));\n $this->assertTrue($this->schema->dropTable($table_name), 'Table with uppercase table name dropped');\n }", "function is_table($table) {\r\n\tglobal $database;\r\n\t$tables = $database->getTableList();\r\n\t$table = str_replace(\"#__\",$database->_table_prefix,$table);\r\n\treturn (strpos(implode(\";\",$tables),$table) > 0);\r\n}", "abstract public function getSqlTableExists(string $tableName): string;", "public function tableName()\n {\n $this->assertEquals('foo', $this->tableRow->getTableName());\n }", "protected abstract function getTableName();", "public function dbCompare()\n {\n $query_text = \"SELECT TABLE_NAME, TABLE_ROWS FROM `information_schema`.`tables` WHERE\n `table_schema` = '\".$this->DB->connSettings['CONN_DB'].\"';\";\n $query_res = $this->DB->query($query_text);\n while ($query_row = $query_res->fetch(PDO::FETCH_ASSOC)) {\n $trimTableName = $query_row['TABLE_NAME'];\n if($this->tables[\"options\"][\"lower_case_table_names\"]){\n $trimTableName = strtolower($trimTableName);\n }\n if($this->tables[\"tables\"][$trimTableName][\"list\"]){\n $this->tables[\"tables\"][$trimTableName]['exist'] = true;\n $this->tables[\"tables\"][$trimTableName]['qty'] = $query_row['TABLE_ROWS'];\n }else{\n $this->tables[\"tables\"][$query_row['TABLE_NAME']][\"list\"] = false;\n $this->tables[\"tables\"][$query_row['TABLE_NAME']]['exist'] = true;\n $this->tables[\"tables\"][$query_row['TABLE_NAME']]['qty'] = $query_row['TABLE_ROWS'];\n }\n }\n }", "public function testWithSameTable()\n {\n $col1 = new stdClass;\n $col1->table = 'table1';\n $col2 = new stdClass;\n $col2->table = 'table1';\n $col3 = new stdClass;\n $col3->table = 'table1';\n $fields_meta = array($col1, $col2, $col3);\n\n $this->assertTrue(PMA_resultSetHasJustOneTable($fields_meta));\n }", "public function testGetTableNames()\n {\n /** @var \\Migrations\\Test\\TestCase\\Command\\TestClassWithSnapshotTrait|\\PHPUnit\\Framework\\MockObject\\MockObject $class */\n $class = $this->getMockBuilder(TestClassWithSnapshotTrait::class)\n ->onlyMethods(['findTables', 'fetchTableName'])\n ->getMock();\n\n $class->expects($this->any())\n ->method('findTables')\n ->with('TestBlog')\n ->will($this->returnValue(['ArticlesTable.php', 'TagsTable.php']));\n\n $class->method('fetchTableName')\n ->will($this->onConsecutiveCalls(['articles_tags', 'articles'], ['articles_tags', 'tags']));\n\n $results = $class->getTableNames('TestBlog');\n $expected = ['articles_tags', 'articles', 'tags'];\n $this->assertEquals(array_values($expected), array_values($results));\n }", "abstract protected function getTableName();", "static private function compare_name($a, $b)\r\n {\r\n return strcasecmp($a['name'], $b['name']);\r\n }", "public function table(string $table);", "public function isTable(string $name): bool\n {\n $lowerCaseName = mb_strtolower($name);\n return isset($this->tables[$lowerCaseName]);\n }", "function equals($table1=null, $table2=null){\n\t\t\n\t\t$this->init($table1,$table2);\n\t\techo \"Now here\";\n\t\tprint_r($this->table1Data);\n\t\tprint_r($this->table2Data);\n\t\treturn ( $this->table1Data == $this->table2Data );\n\t\t\n\t}", "public function tableNames();", "protected function resolveTableNames( $table, $name )\n {\n $parts = explode( '.', str_replace( '\"', '', $name ) );\n if ( isset( $parts[1] ) )\n {\n $schemaName = $parts[0];\n $tableName = $parts[1];\n }\n else\n {\n $schemaName = $this->getDefaultSchema();\n $tableName = $parts[0];\n }\n\n $table->name = $tableName;\n $table->schemaName = $schemaName;\n if ( $schemaName === $this->getDefaultSchema() )\n {\n $table->rawName = $this->quoteTableName( $tableName );\n }\n else\n {\n $table->rawName = $this->quoteTableName( $schemaName ) . '.' . $this->quoteTableName( $tableName );\n }\n }", "public static function validate_table_name( $table_name ){\n\t\tglobal $wpdb;\n\n\t\tif ( empty( $table_name ) ){\n\t\t\tthrow new Exception( __METHOD__ . ': $table_name cannot be empty.');\n\t\t}\n\n\t\tif ( strpos( $table_name, $wpdb->prefix ) !== 0 ){\n\t\t\t$table_name = $wpdb->prefix . $table_name;\n\t\t}\n\n\t\treturn $table_name;\n\t}", "protected static function actualTableName($tableName) {\r\n\t\t$xoopsDB =& Database::getInstance();\r\n\t\treturn $xoopsDB -> prefix($GLOBALS['mydirname'] . '_' . $tableName);\r\n\t}", "protected function check($table) {\n\t\tif ($this->quoteCharacter && strpos($table, $this->quoteCharacter)!==false) {\n\t\t throw new Redbean_Exception_Security('Illegal chars in table name');\n\t }\n\t\treturn $this->adapter->escape($table);\n\t}", "public function getMatchTableName() {\n if ($this->found) {\n if ($this->found_in_army_updates)\n return ArmyUpdates::TABLE_NAME;\n elseif ($this->found_in_found_people)\n return FoundPeople::TABLE_NAME;\n else\n return NULL; // this should never happen (by design)\n }\n return NULL; // this should never happen (by assumption)\n }", "private function getTableCheckSql($tableName): string {\n return \"SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = '\" .DatabaseHelper::DB_DATABSE .\"' AND table_name='\" .$tableName .\"';\";\n }", "public function compileTableExists(): string\n {\n return 'select * from syspublic.all_tables where table_schema = upper(?) and table_name = upper(?)';\n }", "function strEquivalenceSearch(DBConnection $dbConn, string $queryBase, string $searchTerms, array $columnNames,\n string $matchColName) {\n $param = \"'\".$searchTerms.\"'\";\n $queryString = $queryBase.' WHERE '.$matchColName.' = '.$param;\n $result = $dbConn->executeSimpleQuery($queryString);\n return buildTableString($result, $columnNames);\n}", "public function assertTablesEqual(\\PHPUnit_Extensions_Database_DataSet_ITable $expected, \\PHPUnit_Extensions_Database_DataSet_ITable $actual, $message = '')\n {\n $constraint = new \\PHPUnit_Extensions_Database_Constraint_TableIsEqual($expected);\n\n self::assertThat($actual, $constraint, $message);\n }", "function compare_name($a, $b) {\n return strnatcasecmp($a[1], $b[1]);\n }", "public function stlHandleTable(){\n\t\t$table = $this->getTable();\n\t\tif( $prefix = $this->getPrefix() ){\n\t\t\t$table = str_replace($prefix, '', $table);\n\t\t}\n\t\treturn strtolower($table);\n\t}", "public function test_equality_between_names() : void\n {\n $q1 = NameDigit::fromString('John');\n $q2 = NameDigit::fromString('John');\n \n self::assertNotSame($q1, $q2);\n self::assertTrue($q1->equals($q2));\n self::assertTrue($q2->equals($q1));\n }", "protected function _prepare_table_name( $table_name ) {\n\t\treturn $this->get_table_name( str_replace( '`', '', $table_name ) );\n\t}", "public function areEqual($stringA, $stringB);", "protected function resolveTableNames($table, $name)\n {\n $parts = explode('.', str_replace(['[', ']'], '', $name));\n $partCount = count($parts);\n/* // no catalog in ASA\n if ($partCount === 3) {\n // catalog name, schema name and table name passed\n $table->catalogName = $parts[0];\n $table->schemaName = $parts[1];\n $table->name = $parts[2];\n $table->fullName = $table->catalogName . '.' . $table->schemaName . '.' . $table->name;\n } else\n*/\n if ($partCount === 2) {\n // only schema name and table name passed\n $table->schemaName = $parts[0];\n $table->name = $parts[1];\n //$table->rawName=$this->quoteTableName($table->schemaName).'.'.$this->quoteTableName($table->name);\n $table->fullName = $table->schemaName !== $this->defaultSchemaName ? $table->schemaName . '.' . $table->name : $table->name;\n } else {\n // only table name passed\n $table->schemaName = $this->defaultSchemaName;\n $table->name = $parts[0];\n //$table->rawName=$this->quoteTableName($table->schemaName).'.'.$this->quoteTableName($table->name);\n $table->fullName = $table->name = $parts[0];\n }\n }", "function table_exists($db, $name) {\n\n $sql = \"select 1 from {$name}\";\n $query = $db->prepare($sql);\n return $query->execute() !== FALSE;\n\n }", "abstract protected function _getTableName();", "protected function checkTable()\n {\n if (is_null($this->table)) {\n if (!is_null($this->json)) {\n if (array_key_exists('table', $this->json) && !empty($this->json['table'])) {\n $this->table = $this->json['table'];\n }\n }\n }\n \n if (is_null($this->table)) {\n echo \"\\033[0;31mERROR:\\n\";\n echo \"No database table provided\\n\";\n echo \"Aborting\\033[0m\\n\";\n exit(1);\n }\n \n $this->table = preg_replace(\"/[^A-Za-z0-9_]/\", '', $this->table);\n }", "public function has_table(string $table_name, string $connection = 'default'): bool;", "private function validateTableName($table){\n $queryString = \"SELECT COUNT(*) as count FROM tables WHERE table_schema = :database AND table_name = :table;\";\n $query = $this->mysqlDb->prepare($queryString);\n $query->bindValue(':table', $table, PDO::PARAM_STR);\n $query->bindValue(':database', $this->database, PDO::PARAM_STR);\n $query->execute();\n $result = $query->fetchAll(PDO::FETCH_ASSOC);\n if ($result[0]['count'] === \"1\") {\n return true;\n } else {\n return false;\n }\n }", "function isTable($conceptName) {\n\t$qry = \"select table_name, concept_class_id as concept_class, concept_datatype_id as data_type from staticConcepts \n\t\twhere column_name = '\" . $conceptName . \"'\";\n\t$result = dbQuery($qry);\n\t$row = psRowFetch($result); \n\tif (!empty($row)) {\n\t\t$table = $row['table_name'];\n\t\t$conceptClass = $row['concept_class'];\n\t\t$conceptDatatype = $row['data_type'];\n\t\treturn ($table . \":\" . $tableClass['$table'] . \":\" . $dt);\t\n\t\t// TODO: also check whether this is coming from a normalized table \n\t} \n\telse return(\"\");\t \n}", "public function setTable($tableName, $realTableName);", "protected function checkReferenceTableName($table, $tablename)\n {\n return ($table && $table->getRawTableName() === $tablename) ? true : false;\n }", "public function table( $table_name );", "public function isTableExist($tableName);", "private function __verify_table_name ($table, $force_clean = false) {\n\n if ($force_clean or !isset($this->database_config['data_schema'][$table]) \n or !isset($this->database_config['data_schema'][$table]['sanitized'])) {\n\n return strtolower(preg_replace('/[^a-z0-9_\\-]+/i', '_', $table));\n }\n\n return $this->__clean_db_name($this->database_config['data_schema'][$table]['sanitized']);\n }", "function TableExists($tableName, $connection, $dbName) {\n $t = mysqli_real_escape_string($connection, $tableName);\n $d = mysqli_real_escape_string($connection, $dbName);\n\n $checktable = mysqli_query($connection,\n \"SELECT HEALTH_SURVEY FROM sample.TABLES WHERE TABLE_NAME = '$t' AND TABLE_SCHEMA = '$d'\");\n\n if(mysqli_num_rows($checktable) > 0) return true;\n\n return false;\n}", "public static function hasTableWithSamePrefix($server, $user, $pwd, $db, $prefix)\n {\n }", "function g16_get_tableName($name)\n{\n return OPT_DB_TBLPREFIX.$name;\n}", "protected abstract function tableName();", "public function hasTableNamesOrPrefixes(){\n return $this->_has(2);\n }", "abstract public function getTableName();", "abstract public function getTableName();", "abstract public function getTableName();", "abstract public function getTableName();", "abstract public function\r\n\t\tget_table_name();", "public static function generatePivotTableName($firstTableName, $secondTableName)\n {\n $stringState = strcmp($firstTableName, $secondTableName);\n if ($stringState > 0) {\n return $secondTableName.'_'.$firstTableName;\n }\n elseif ($stringState < 0) {\n return $firstTableName.'_'.$secondTableName;\n }\n else {\n return $firstTableName.'_'.$secondTableName.'_pivot';\n // throw new PhotonException('PIVOT_TABLE_NAMES_THE_SAME', ['first' => $firstTableName, 'second' => $secondTableName]);\n }\n }", "public function quoteTableName($name)\n\t{\n\t\treturn $this->getSchema()->quoteTableName($name);\n\t}", "public function quoteTableName($name)\n {\n return $this->quoteColumnName($name);\n }", "public function checkTablesSubqueriesSupport( $dataSourceTName1, $dataSourceTName2 )\n\t{\n\t\t$connId1 = $this->_tablesConnectionIds[ $dataSourceTName1 ];\n\t\t$connId2 = $this->_tablesConnectionIds[ $dataSourceTName2 ];\n\t\t\n\t\tif( $connId1 != $connId2 )\n\t\t\treturn false;\n\n\t\tif( $this->_connectionsData[ $connId1 ][\"dbType\"] == nDATABASE_Access && $dataSourceTName1 == $dataSourceTName2 )\n\t\t\treturn false;\n\t\t\t\n\t\treturn true;\t\n\t}", "protected function normalizeTablename($tableName)\n {\n return str_replace(['{', '%', '}'], '', $tableName);\n }", "public function get_table_name_for_original_strings(){\n return sanitize_text_field( $this->db->prefix . 'trp_original_strings' );\n }", "public function assertDBTableExists( $table_name ) {\n\n\t\tglobal $wpdb;\n\n\t\t$this->assertSame(\n\t\t\t$table_name\n\t\t\t, $wpdb->get_var(\n\t\t\t\t$wpdb->prepare(\n\t\t\t\t\t'SHOW TABLES LIKE %s'\n\t\t\t\t\t, $wpdb->esc_like( $table_name )\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}", "public function getTableNames();", "public function getTableNames();", "public function getJoinTableName($first, $second) {\n $tables = array();\n $tables[\"one\"] = $first;\n $tables[\"many\"] = $second;\n @asort($tables);\n return $this->tablelize(@implode(\"_\", $tables));\n }", "public function quoteSimpleTableName($name)\n\t{\n\t\treturn \"'\".$name.\"'\";\n\t}", "abstract protected function loadTable($name);", "abstract public function getTable($internalTableName);", "function query_tb($db_name,$tb_name)\n\t{\n\t $result = mysql_list_tables($db_name);\t\t \n\t\t$i=0; \n\t\twhile($i<mysql_num_rows($result))\n\t\t{\n\t\t\tif ($tb_name == mysql_tablename($result,$i)) \n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\t\t\t\t\t\t \n\t\t\t$i++; \n\t\t}\n\t\treturn 0;\n\t}", "abstract function tableExists($tablename);", "abstract function tableExists($tablename);", "public function testWithMultipleTables()\n {\n $col1 = new stdClass;\n $col1->table = 'table1';\n $col2 = new stdClass;\n $col2->table = 'table1';\n $col3 = new stdClass;\n $col3->table = 'table3';\n\n $fields_meta = array($col1, $col2, $col3);\n $this->assertFalse(PMA_resultSetHasJustOneTable($fields_meta));\n\n // should not matter on where the odd column occurs\n $fields_meta = array($col2, $col3, $col1);\n $this->assertFalse(PMA_resultSetHasJustOneTable($fields_meta));\n\n $fields_meta = array($col3, $col1, $col2);\n $this->assertFalse(PMA_resultSetHasJustOneTable($fields_meta));\n }", "public function updateTableName($oldTableName,$newTableName) {\n\n\t}", "public function check_original_table(){\n\n $table_name = $this->get_table_name_for_original_strings();\n if ( $this->db->get_var( \"SHOW TABLES LIKE '$table_name'\" ) != $table_name ) {\n // table not in database. Create new table\n $charset_collate = $this->db->get_charset_collate();\n\n $sql = \"CREATE TABLE `\" . $table_name . \"`(\n id bigint(20) AUTO_INCREMENT NOT NULL PRIMARY KEY,\n original TEXT NOT NULL )\n $charset_collate;\";\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n dbDelta( $sql );\n\n $sql_index = \"CREATE INDEX index_original ON `\" . $table_name . \"` (original(100));\";\n $this->db->query( $sql_index );\n }\n }", "protected\tfunction\thasTable($name)\n\t\t{\n\t\t\t$this->_table\t=\t$name;\n\t\t}", "public static function getTableName();", "public static function getTableName();", "public static function getTableName();", "function checkTables($conn, $dbname, $tbname) {\n $tables = mysqli_query($conn, \"SHOW TABLES FROM {$dbname}\");\n //stores table names in row array\n while ($row = mysqli_fetch_row($tables)) {\n $arr[] = $row[0];\n }\n //checks if table exists\n if (in_array($tbname, $arr) == FALSE) {\n $output = false;\n } else {\n $output = true;\n }\n return $output;\n}", "public function getTable($tableName);", "public function testFetchTableNames()\n {\n $class = new TestClassWithSnapshotTrait();\n $class->connection = 'alternative';\n $expected = ['alternative.special_tags'];\n $this->assertEquals($expected, $class->fetchTableName('SpecialTagsTable.php', 'TestBlog'));\n\n ConnectionManager::setConfig('alternative', [\n 'database' => 'alternative',\n ]);\n $class->connection = 'alternative';\n $expected = ['special_tags'];\n $this->assertEquals($expected, $class->fetchTableName('SpecialTagsTable.php', 'TestBlog'));\n\n ConnectionManager::drop('alternative');\n ConnectionManager::setConfig('alternative', [\n 'schema' => 'alternative',\n ]);\n $class->connection = 'alternative';\n $expected = ['special_tags'];\n $this->assertEquals($expected, $class->fetchTableName('SpecialTagsTable.php', 'TestBlog'));\n }", "public static function get_table_name()\n {\n }", "public function testFindTables() {\n // We will be testing with three tables, two of them using the default\n // prefix and the third one with an individually specified prefix.\n // Set up a new connection with different connection info.\n $connection_info = Database::getConnectionInfo();\n\n // Add per-table prefix to the second table.\n $new_connection_info = $connection_info['default'];\n $new_connection_info['prefix'] = [\n 'default' => $connection_info['default']['prefix'],\n 'test_2_table' => $connection_info['default']['prefix'] . '_shared_',\n ];\n Database::addConnectionInfo('test', 'default', $new_connection_info);\n Database::setActiveConnection('test');\n $test_schema = Database::getConnection()->schema();\n\n // Create the tables.\n $table_specification = [\n 'description' => 'Test table.',\n 'fields' => [\n 'id' => [\n 'type' => 'int',\n 'default' => NULL,\n ],\n ],\n ];\n $test_schema->createTable('test_1_table', $table_specification);\n $test_schema->createTable('test_2_table', $table_specification);\n $test_schema->createTable('the_third_table', $table_specification);\n\n // Check the \"all tables\" syntax.\n $tables = $test_schema->findTables('%');\n sort($tables);\n $expected = [\n // The 'config' table is added by\n // \\Drupal\\KernelTests\\KernelTestBase::containerBuild().\n 'config',\n 'test_1_table',\n // This table uses a per-table prefix, yet it is returned as un-prefixed.\n 'test_2_table',\n 'the_third_table',\n ];\n $this->assertEquals($expected, $tables, 'All tables were found.');\n\n // Check the restrictive syntax.\n $tables = $test_schema->findTables('test_%');\n sort($tables);\n $expected = [\n 'test_1_table',\n 'test_2_table',\n ];\n $this->assertEquals($expected, $tables, 'Two tables were found.');\n\n // Check '_' and '%' wildcards.\n $test_schema->createTable('test3table', $table_specification);\n $test_schema->createTable('test4', $table_specification);\n $test_schema->createTable('testTable', $table_specification);\n $test_schema->createTable('test', $table_specification);\n\n $tables = $test_schema->findTables('test%');\n sort($tables);\n $expected = [\n 'test',\n 'test3table',\n 'test4',\n 'testTable',\n 'test_1_table',\n 'test_2_table',\n ];\n $this->assertEquals($expected, $tables, 'All \"test\" prefixed tables were found.');\n\n $tables = $test_schema->findTables('test_%');\n sort($tables);\n $expected = [\n 'test3table',\n 'test4',\n 'testTable',\n 'test_1_table',\n 'test_2_table',\n ];\n $this->assertEquals($expected, $tables, 'All \"/^test..*?/\" tables were found.');\n\n $tables = $test_schema->findTables('test%table');\n sort($tables);\n $expected = [\n 'test3table',\n 'testTable',\n 'test_1_table',\n 'test_2_table',\n ];\n $this->assertEquals($expected, $tables, 'All \"/^test.*?table/\" tables were found.');\n\n $tables = $test_schema->findTables('test_%table');\n sort($tables);\n $expected = [\n 'test3table',\n 'test_1_table',\n 'test_2_table',\n ];\n $this->assertEquals($expected, $tables, 'All \"/^test..*?table/\" tables were found.');\n\n $tables = $test_schema->findTables('test_');\n sort($tables);\n $expected = [\n 'test4',\n ];\n $this->assertEquals($expected, $tables, 'All \"/^test./\" tables were found.');\n\n // Go back to the initial connection.\n Database::setActiveConnection('default');\n }" ]
[ "0.7959545", "0.7505912", "0.7344048", "0.6285363", "0.5853026", "0.5853026", "0.58144814", "0.5746134", "0.57410246", "0.57121384", "0.5704712", "0.56493455", "0.5556714", "0.55466044", "0.55307883", "0.54883873", "0.5473513", "0.54701376", "0.54686207", "0.53968537", "0.53760755", "0.5373033", "0.5362592", "0.5342893", "0.5316293", "0.52939343", "0.52859396", "0.5284553", "0.52739376", "0.52726436", "0.52481496", "0.52282107", "0.5225958", "0.5223548", "0.52205616", "0.52174765", "0.5216043", "0.5205588", "0.52042586", "0.5194641", "0.5189029", "0.5178347", "0.5174466", "0.51702875", "0.5167556", "0.5152378", "0.5151288", "0.5137008", "0.5130535", "0.5124621", "0.51093656", "0.5079774", "0.5078363", "0.5074884", "0.50743365", "0.50731", "0.5069431", "0.50645554", "0.50644463", "0.5060584", "0.50602585", "0.5052668", "0.5047478", "0.5034193", "0.5031267", "0.5031", "0.50257313", "0.50174093", "0.50174093", "0.50174093", "0.50174093", "0.50132823", "0.4995875", "0.49892187", "0.49826235", "0.4977455", "0.497379", "0.4964806", "0.4958763", "0.4957942", "0.4957942", "0.4953725", "0.493025", "0.4926326", "0.4925195", "0.4922226", "0.49216697", "0.49216697", "0.49212942", "0.491605", "0.49153268", "0.49053127", "0.49027473", "0.49027473", "0.49027473", "0.49024105", "0.49003646", "0.48986015", "0.48966688", "0.48936707" ]
0.7819888
1
Converts the input value to the type that this column is of.
Преобразует входное значение в тип, который имеет эта колонка.
public function typecast(ColumnSchema $field, $value) { if (gettype($value) === $field->phpType || $value === null || $value instanceof Expression) { return $value; } if ($value === '' && $field->allowNull) { return ($field->phpType === 'string') ? '' : null; } switch ($field->phpType) { case 'string': return (string)$value; case 'integer': return (integer)$value; case 'boolean': return (boolean)$value; case 'double': default: return $value; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function valueType() {\n\t\treturn $this->column('value_type');\n\t}", "public function cast() {\n\t\t$type = $this->getDefinition()->getType();\n\t\tif ($type == 'multiple') {\n\t\t\t// TODO\n\t\t}\n\t\telseif ($type == 'text') {\n\t\t\tsettype($this->value, 'string');\n\t\t}\n\t\telse {\n\t\t\tsettype($this->value, $type);\n\t\t}\n\t}", "private function convertDataType($value)\n {\n switch ($this->type) {\n case VariableType::INT:\n return filter_var($value, FILTER_VALIDATE_INT) ? (int) $value : $value;\n case VariableType::DOUBLE:\n case VariableType::FLOAT:\n return filter_var($value, FILTER_VALIDATE_FLOAT) ? doubleval($value) : $value;\n case VariableType::STRING:\n return (string) $value;\n case VariableType::BOOLEAN:\n return is_bool($value) ? $value : null;\n case VariableType::DATE:\n case VariableType::DATETIME:\n return $value;\n default:\n return null;\n }\n }", "public function castValueColumnAttribute()\n {\n $cast = $this->getAttributeFromArray($this->getTypeColumn()) ?: 'string';\n $value = $this->getAttributeFromArray($this->getValueColumn());\n\n switch ($cast) {\n case 'array':\n case 'json':\n case 'object':\n case 'collection':\n $value = json_encode($this->attributes[ $this->getValueColumn() ]);\n break;\n case 'datetime':\n case 'date':\n case 'timestamp':\n if ($value instanceof DateTime) {\n $value = $value->format('Y-m-d H:i:s');\n } else {\n $value = $this->asDateTime($this->attributes[ $this->getValueColumn() ])->format('Y-m-d H:i:s');\n }\n break;\n }\n $this->attributes[ $this->getValueColumn() ] = $value;\n }", "public function castValueFromDb($value);", "public function dbTypecast(mixed $value): mixed\n {\n return $this->typecast($value);\n }", "private static function convertDataType(string $value)\n {\n switch (\\strtolower($value)) {\n case 't':\n case 'true':\n $value = true;\n break;\n\n case 'f':\n case 'false':\n $value = false;\n break;\n\n case 'null':\n $value = null;\n break;\n\n case ((string)(int)$value === $value):\n $value = (int)$value;\n break;\n\n case ((string)(float)$value === $value):\n $value = (float)$value;\n break;\n }\n\n return $value;\n }", "protected function _introspectType($value) {\n\t\tswitch (true) {\n\t\t\tcase (is_bool($value)):\n\t\t\t\treturn 'boolean';\n\t\t\tcase (is_float($value) || preg_match('/^\\d+\\.\\d+$/', $value)):\n\t\t\t\treturn 'float';\n\t\t\tcase (is_int($value) || preg_match('/^\\d+$/', $value)):\n\t\t\t\treturn 'integer';\n\t\t\tcase (is_string($value) && strlen($value) <= $this->_columns['string']['length']):\n\t\t\t\treturn 'string';\n\t\t\tdefault:\n\t\t\t\treturn 'text';\n\t\t}\n\t}", "protected function _cast($type, $value, $column, $schema = []) {\n\t\t$column += ['formatter' => null, 'format' => null];\n\n\t\tif ($value === null) {\n\t\t\treturn 'NULL';\n\t\t}\n\t\tif (is_object($value)) {\n\t\t\treturn $value;\n\t\t}\n\t\tif (!$formatter = $column['formatter']) {\n\t\t\treturn $this->connection->quote($value);\n\t\t}\n\t\tif (!$format = $column['format']) {\n\t\t\treturn $formatter($value);\n\t\t}\n\t\tif (($value = $formatter($format, $value)) === false) {\n\t\t\t$value = $formatter($format, $schema['default']);\n\t\t}\n\t\treturn $value !== false ? $value : 'NULL';\n\t}", "protected function convertToDatabaseValue($value, $type)\n {\n if (is_string($type)) {\n $type = Type::getType($type);\n }\n if ($type instanceof Type) {\n $value = $type->convertToDatabaseValue($value, $this->connection->getDatabasePlatform());\n }\n\n return $value;\n }", "public function convertValue($value);", "public function convertValueFromDB($value);", "function type($new_value = null){\r\n\t /* 'string'(default),'date','datetime','text','int','real','boolean','reference','password','list' */\r\n /*\r\n\t\t\tif (!in_array($new_value,array(\r\n\t\t\t\t\t'string','date','datetime','text','readonly',\r\n\t\t\t\t\t'int','real','money','boolean','reference','reference_id','password','list',\r\n\t\t\t\t\t'daytime','daytime_total','image','radio','file'\r\n */\r\n\r\n\t\tif (is_null($new_value)){\r\n\t\t\treturn (empty($this->datatype))?'string':$this->datatype;\r\n } else {\r\n\t\t\t$this->datatype = $new_value;\r\n\t\t\treturn $this;\r\n\t\t}\r\n\t}", "public function prep_for_database($value) {\n if ($value === null) {\n return null;\n }\n\n switch ($this->datatype) {\n case 'boolean':\n return $value ? 't' : 'f';\n case 'date':\n return $value->to_s();\n default:\n try {\n $value = Types::out($this->datatype, $value);\n } catch (UnsupportedTypeException $e) {\n }\n return (string) $value;\n }\n }", "protected function _castType(&$val, $ftype) {\n\n switch($ftype) {\n\n case epFieldMap::DT_BOOL:\n case epFieldMap::DT_BOOLEAN:\n case epFieldMap::DT_BIT:\n $val = (boolean)$val;\n break;\n\n case epFieldMap::DT_DECIMAL:\n case epFieldMap::DT_CHAR:\n case epFieldMap::DT_CLOB:\n $val = (string)$val;\n break;\n\n case epFieldMap::DT_BLOB:\n //case epFieldMap::DT_TEXT:\n //$val = (string)epHex2Str($val);\n $val = $this->db->castBlob($val);\n break;\n\n case epFieldMap::DT_INT:\n case epFieldMap::DT_INTEGER:\n $val = (integer)$val;\n break;\n\n case epFieldMap::DT_FLOAT:\n case epFieldMap::DT_REAL:\n $val = (float)$val;\n break;\n\n case epFieldMap::DT_DATE:\n case epFieldMap::DT_TIME:\n case epFieldMap::DT_DATETIME:\n $val = (integer)$val;\n break;\n }\n\n return $val;\n }", "public function castValue($value, $data_type)\n {\n switch ($data_type){\n case 'integer':\n return (int)($value);\n break;\n case 'smallInteger':\n return (int)($value);\n break;\n case 'numeric':\n return (double)($value);\n break;\n case 'string':\n return ($value);\n break;\n case 'text':\n return ($value);\n break;\n }\n\n }", "public function scanType( $value ) {\n\n\t\tif (is_null($value)) {\n\t\t\treturn RedBean_QueryWriter_MySQL::C_DATATYPE_BOOL;\n\t\t}\n\t\t$orig = $value;\n\t\t$value = strval($value);\n\t\tif ($value==\"1\" || $value==\"\" || $value==\"0\") {\n\t\t\treturn RedBean_QueryWriter_MySQL::C_DATATYPE_BOOL;\n\t\t}\n\t\tif (is_numeric($value) && (floor($value)==$value) && $value >= 0 && $value <= 255 ) {\n\t\t\treturn RedBean_QueryWriter_MySQL::C_DATATYPE_UINT8;\n\t\t}\n\t\tif (is_numeric($value) && (floor($value)==$value) && $value >= 0 && $value <= 4294967295 ) {\n\t\t\treturn RedBean_QueryWriter_MySQL::C_DATATYPE_UINT32;\n\t\t}\n\t\tif (is_numeric($value)) {\n\t\t\treturn RedBean_QueryWriter_MySQL::C_DATATYPE_DOUBLE;\n\t\t}\n\t\tif (strlen($value) <= 255) {\n\t\t\treturn RedBean_QueryWriter_MySQL::C_DATATYPE_TEXT8;\n\t\t}\n\t\treturn RedBean_QueryWriter_MySQL::C_DATATYPE_TEXT16;\n\t}", "protected static function getPrepareValueType($value){\n if(is_double($value)){\n return 'd';}\n if(is_integer($value)){\n return 'i';}\n if(is_string($value)){\n return 's';}\n //blob\n return 'b';\n }", "public function process_value($value) {\n if (($value === '') || ($value === null)) {\n return null;\n }\n\n switch ($this->datatype) {\n case 'boolean':\n if ($value === 'null') {\n return null;\n }\n else if ($value === 'f' || $value === 0 ||\n $value === false || $value === 'false' ||\n !$value) {\n return false;\n }\n else {\n return true;\n }\n case 'double precision':\n case 'numeric':\n return (double) $value;\n case 'integer':\n return (integer) $value;\n case 'date':\n if (is_object($value) &&\n ((string) get_class($value)) == 'Date') {\n return $value;\n }\n\n return Date::parse($value);\n default:\n try {\n return Types::in($this->datatype, $value);\n } catch (UnsupportedTypeException $e) {\n return $value == '' ? null : $value;\n }\n }\n }", "public function defaultPhpTypecast($value)\n {\n if ($value !== null) {\n // convert from MSSQL column_default format, e.g. ('1') -> 1, ('string') -> string\n $value = substr(substr($value, 2), 0, -2);\n }\n\n return parent::phpTypecast($value);\n }", "private function defaultDataTypeForField($value)\n {\n if (isset($value['type'])){\n\n switch($value['type']){\n case 'select' :\n return 'enum';\n break;\n\n case 'checkbox' :\n return 'checkbox';\n break;\n\n case 'email' :\n return 'email';\n break;\n\n case 'text' :\n case 'textarea' :\n case 'number' :\n return 'exact';\n break;\n\n default:\n return $value['type'];\n }\n }\n\n return 'exact';\n }", "public static function castValue($value) {\n return $value;\n }", "function cast($val, $type)\r\n{\r\n settype($val, $type);\r\n return $val;\r\n}", "public function scanType( $value ) {\n\n\t\tif (is_null($value)) {\n\t\t\treturn RedBean_QueryWriter_MySQL::C_DATATYPE_UINT8;\n\t\t}\n\t\t$orig = $value;\n\t\t$value = strval($value);\n\t\tif ($value==\"1\" || $value==\"\" || $value==\"0\") {\n\t\t\treturn RedBean_QueryWriter_MySQL::C_DATATYPE_UINT8; //RedBean_QueryWriter_MySQL::C_DATATYPE_BOOL;\n\t\t}\n\t\tif (is_numeric($value) && (floor($value)==$value) && $value >= 0 && $value <= 255 ) {\n\t\t\treturn RedBean_QueryWriter_MySQL::C_DATATYPE_UINT8;\n\t\t}\n\t\tif (is_numeric($value) && (floor($value)==$value) && $value >= 0 && $value <= 4294967295 ) {\n\t\t\treturn RedBean_QueryWriter_MySQL::C_DATATYPE_UINT32;\n\t\t}\n\t\tif (is_numeric($value)) {\n\t\t\treturn RedBean_QueryWriter_MySQL::C_DATATYPE_DOUBLE;\n\t\t}\n\t\tif (strlen($value) <= 255) {\n\t\t\treturn RedBean_QueryWriter_MySQL::C_DATATYPE_TEXT8;\n\t\t}\n\t\treturn RedBean_QueryWriter_MySQL::C_DATATYPE_TEXT16;\n\t}", "public function getValueType()\n {\n return $this->value_type;\n }", "public static function type($value) {\n\t\tif (is_null($value))\n\t\t\treturn PDO::PARAM_NULL;\n\t\telseif (is_bool($value))\n\t\t\treturn PDO::PARAM_BOOL;\n\t\telseif (is_int($value))\n\t\t\treturn PDO::PARAM_INT;\n\t\telseif (is_string($value))\n\t\t\treturn PDO::PARAM_STR;\n\t\treturn PDO::PARAM_LOB;\n\t}", "public function cast($value)\n {\n $this->attribute('type',$value);\n return $this;\n }", "protected static function getPrepareValueType($value){\n if(is_double($value)){return 'd';}\n if(is_integer($value)){return 'i';}\n if(is_string($value)){return 's';}\n return 'b';//blob\n }", "protected function handleTypeConversions($value, $typeOfField)\n {\n return $value;\n }", "public function getColumnType()\n {\n return $this->columnType;\n }", "abstract public function cast($value);", "public function coerce(mixed $value): mixed\n {\n if (is_string($value) || is_int($value)) {\n return $value;\n }\n\n return parent::coerce($value);\n }", "private function fieldType ( $column ) {\r // TODO - Implement all types\r if ( strpos( strtolower( $column->getDataType( ) ), 'char' ) !== FALSE ) {\r return 'text';\r } else {\r return $column->getDataType( );\r }\r }", "public function getColType();", "protected function phpTypecastValue($value)\n {\n if ($value === null) {\n return null;\n }\n\n switch ($this->type) {\n case Schema::TYPE_BOOLEAN:\n switch (strtolower($value)) {\n case 't':\n case 'true':\n return true;\n case 'f':\n case 'false':\n return false;\n }\n return (bool) $value;\n case Schema::TYPE_JSON:\n return json_decode($value, true);\n }\n\n return parent::phpTypecast($value);\n }", "public function getValueElementType()\n {\n if (!is_object($this->getAttributeObject())) {\n return 'text';\n }\n $input = $this->getAttributeObject()->getFrontendInput();\n switch ($input) {\n case 'boolean':\n return 'select';\n case 'select':\n case 'multiselect':\n case 'date':\n return $input;\n default:\n return 'text';\n }\n }", "function typed($value)\n {\n if (!is_string($value)) {\n return $value;\n }\n\n if (1 < $len = strlen($value)) {\n switch ($value[0] . $value[$len - 1]) {\n case \"''\":\n case '\"\"':\n return substr($value, 1, -1);\n }\n }\n\n if (false !== $int = filter_var($value, FILTER_VALIDATE_INT)) {\n return $int;\n }\n\n if (false !== $float = filter_var($value, FILTER_VALIDATE_FLOAT)) {\n return $float;\n }\n\n // because FILTER_VALIDATE_BOOLEAN sucks...\n switch (strtolower($value)) {\n case 'true':\n case 'on':\n case 'yes':\n return true;\n case 'false':\n case 'off':\n case 'no':\n return false;\n case 'null':\n return;\n }\n\n return $value;\n }", "private function castValue($value)\n {\n if ($value === 'null') {\n return null;\n }\n if ($value === 'false') {\n return false;\n }\n if ($value === 'true') {\n return true;\n }\n if (preg_match('/^\\d+$/', $value)) {\n return (int) $value;\n }\n\n return $value;\n }", "public static function cast($value, $type = 'string')\n {\n switch (static::resolveTypeAliases($type)) {\n case 'bool':\n $value = ($value == 'false') ? 0 : $value;\n\n return (bool) $value;\n break;\n case 'array':\n return unserialize($value);\n break;\n case 'json':\n return json_decode($value, true);\n break;\n case 'json_object':\n return json_decode($value);\n break;\n case 'date':\n return Carbon::parse($value);\n break;\n case 'int':\n case 'integer':\n return (int) $value;\n break;\n case 'float':\n return (float) $value;\n case 'string':\n default:\n return $value;\n }\n }", "function getTypeConverter() ;", "private function getDataType(mixed $value): string\n {\n if (null === $value) {\n return DataType::TYPE_NULL;\n }\n\n if (\\is_bool($value)) {\n return DataType::TYPE_BOOL;\n }\n\n if ($this->getDateTime($value) instanceof \\DateTimeInterface) {\n return DataType::TYPE_NUMERIC;\n }\n\n if (\\is_string($value)) {\n return DataType::TYPE_STRING;\n }\n\n return DataType::TYPE_NUMERIC;\n }", "public function setDatatype($value)\n {\n return $this->set(self::DATATYPE, $value);\n }", "static function prepare_column($type){\n\n \tif(in_array($type, array('datetime', 'year', 'bool', 'time', 'longblob', 'mediumblob', 'tinyblob', 'longtext', 'mediumtext', 'tinytext', 'bigint', 'mediumint', 'smallint', 'tinyint', 'int', 'numeric', 'fixed', 'dec', 'double', 'double precision', 'real', 'char', 'varchar'))){\n\n\t\t\t\t$type = (in_array($type, array('char', 'varchar'))) ? 'string' : $type;\n\t\t\t\t$type = (in_array($type, array('datetime', 'year'))) ? 'date' : $type;\n\t\t\t\t$type = (in_array($type, array('bool'))) ? 'boolean' : $type;\n\t\t\t\t$type = (in_array($type, array('time'))) ? 'timestamp' : $type;\n\t\t\t\t$type = (in_array($type, array('longblob', 'mediumblob', 'tinyblob'))) ? 'blob' : $type;\n\t\t\t\t$type = (in_array($type, array('longtext', 'mediumtext', 'tinytext'))) ? 'text' : $type;\n\t\t\t\t$type = (in_array($type, array('bigint', 'mediumint', 'smallint', 'tinyint', 'int'))) ? 'integer' : $type;\n\t\t\t\t$type = (in_array($type, array('numeric', 'fixed', 'dec', 'double', 'double precision', 'real'))) ? 'decimal' : $type;\n\t\t}\n\n\t\treturn $type;\n }", "function coerce_type( $value, $exemplar )\n {\n if( !is_null($exemplar) )\n {\n if( is_array($exemplar) )\n {\n is_array($value) or $value = (array)$value;\n }\n elseif( is_bool($exemplar) )\n {\n $lower = strtolower($value);\n \n if( $value === \"1\" || $value === \"true\" || $lower === \"on\" || $lower === \"yes\" )\n {\n $value = true;\n }\n elseif( $value === \"0\" || $value === \"false\" || $lower === \"off\" || $lower === \"no\" )\n {\n $value = false;\n }\n else\n {\n $value = (bool)$value;\n }\n }\n elseif( is_float($exemplar) )\n {\n $value = (float)$value;\n }\n elseif( is_int($exemplar) )\n {\n $value = (integer)$value;\n }\n elseif( is_string($exemplar) && empty($value) )\n {\n $value = \"\";\n }\n elseif( is_object($exemplar) )\n {\n $value = (object)$value;\n }\n }\n\n return $value;\n }", "public function getTypeValue();", "public static function getValueOrType($value) {\n if (is_scalar($value)) {\n return (string) \"'\".$value.\"'\";\n }\n if (is_object($value)) {\n return \"*\".get_class($value).\"*\";\n }\n\n return \"*\".gettype($value).\"*\";\n }", "static function coerce_type( $value, $exemplar )\n {\n return coerce_type($value, $exemplar);\n }", "public function valueType() { }", "public static function convertType($value, string $type)\n\t{\n\t\tif (is_scalar($value)) {\n\t\t\t$norm = ($value === false ? '0' : (string) $value);\n\t\t\tif ($type === 'float') {\n\t\t\t\t$norm = preg_replace('#\\.0*$#D', '', $norm);\n\t\t\t}\n\n\t\t\t$orig = $norm;\n\t\t\tsettype($norm, $type);\n\t\t\tif ($orig === ($norm === false ? '0' : (string) $norm)) {\n\t\t\t\treturn $norm;\n\t\t\t}\n\t\t}\n\n\t\tthrow new Nette\\InvalidStateException(sprintf(\n\t\t\t'Cannot convert %s to %s.',\n\t\t\tis_scalar($value) ? \"'$value'\" : gettype($value),\n\t\t\t$type\n\t\t));\n\t}", "public function getTypeFromValue($value): string {\n if (\\is_array($value)) {\n if (empty($value) || \\array_keys($value) === \\range(0, \\count($value) - 1)) {\n return self::TYPE_ARRAY;\n }\n return self::TYPE_OBJECT;\n }\n if (\\is_object($value)) {\n return self::TYPE_OBJECT;\n }\n if (NULL === $value) {\n return self::TYPE_NULL;\n }\n if (\\is_bool($value)) {\n return self::TYPE_BOOLEAN;\n }\n if (\\is_int($value) || \\is_float($value)) {\n return self::TYPE_NUMBER;\n }\n return self::TYPE_STRING;\n }", "public function formatType($value, $type);", "function toValue($col,$format = null) \n {\n if (is_null($format)) {\n return $this->$col;\n }\n $cols = $this->table();\n switch (true) {\n case (($cols[$col] & DB_DATAOBJECT_DATE) && ($cols[$col] & DB_DATAOBJECT_TIME)):\n if (!$this->$col) {\n return '';\n }\n $guess = strtotime($this->$col);\n if ($guess != -1) {\n return strftime($format, $guess);\n }\n // eak... - no way to validate date time otherwise...\n return $this->$col;\n case ($cols[$col] & DB_DATAOBJECT_DATE):\n if (!$this->$col) {\n return '';\n } \n $guess = strtotime($this->$col);\n if ($guess != -1) {\n return strftime($format,$guess);\n }\n // try date!!!!\n require_once 'Date.php';\n $x = new Date($this->$col);\n return $x->format($format);\n \n case ($cols[$col] & DB_DATAOBJECT_TIME):\n if (!$this->$col) {\n return '';\n }\n $guess = strtotime($this->$col);\n if ($guess > -1) {\n return strftime($format, $guess);\n }\n // otherwise an error in type...\n return $this->$col;\n \n case ($cols[$col] & DB_DATAOBJECT_MYSQLTIMESTAMP):\n if (!$this->$col) {\n return '';\n }\n require_once 'Date.php';\n \n $x = new Date($this->$col);\n \n return $x->format($format);\n \n \n case ($cols[$col] & DB_DATAOBJECT_BOOL):\n \n if ($cols[$col] & DB_DATAOBJECT_STR) {\n // it's a 't'/'f' !\n return ($this->$col === 't');\n }\n return (bool) $this->$col;\n \n \n default:\n return sprintf($format,$this->col);\n }\n \n\n }", "public function valueType() {}", "public function get_type($val = '')\n {\n return is_int($val) ? 'INTEGER' : (is_string($val) ? 'VARCHAR(255)' : (is_float($val) ? 'REAL' : 'MEDIUMBLOB'));\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 convertToType($type, $value) {\n switch($type) {\n\n case \"DateTime\" : \n return TypeConverter::convertToDate($value);\n \n case \"string\" :\n \n if(gettype($value) === \"object\") \n {\n $class = get_class($value);\n\n if($class === \"DateTime\") return TypeConverter::stringifyDate($value);\n\n } \n else\n {\n return strval($value);\n }\n \n default : \n return $value;\n }\n \n }", "public function data_type_1s($ColumnName, $DBMStype) {\r\n $fpfDataType = substr($ColumnName, 1, 1);\r\n switch ($fpfDataType) {\r\n case '0':\r\n switch ($DBMStype) {\r\n case 'MDB2':\r\n return 'float'; // If integer is used here, it maps to signed integer in MySQL with upper limit of 2147483647\r\n case 'mssql':\r\n return 'bigint not null';\r\n case 'mysqli':\r\n return 'BIGINT NOT NULL';\r\n case 'oci8':\r\n return 'NUMBER NOT NULL'; // TO DO 2019-05-29 Need to verify if this is a proper Oracle datatype.\r\n }\r\n case '1':\r\n switch ($DBMStype) {\r\n case 'MDB2':\r\n return 'float';\r\n case 'mssql':\r\n return 'float';\r\n case 'mysqli':\r\n return 'DOUBLE';\r\n case 'oci8':\r\n return 'NUMBER'; // TO DO 2019-05-29 Need to verify if this is a proper Oracle datatype.\r\n }\r\n case '2':\r\n switch ($DBMStype) {\r\n case 'MDB2':\r\n return 'text';\r\n case 'mssql':\r\n return 'varchar(255)';\r\n case 'mysqli':\r\n return 'VARCHAR(255)';\r\n case 'oci8':\r\n return 'VARCHAR(255)'; // TO DO 2019-05-29 Need to verify if this is a proper Oracle datatype.\r\n }\r\n case '3':\r\n switch ($DBMStype) {\r\n case 'MDB2':\r\n return 'clob';\r\n case 'mssql':\r\n return 'text';\r\n case 'mysqli':\r\n return 'LONGTEXT';\r\n case 'oci8':\r\n return 'CLOB';\r\n }\r\n // CHAR(1), a subset of c4, is mapped below; see comment above.\r\n case '4':\r\n switch ($DBMStype) {\r\n case 'MDB2':\r\n return 'text';\r\n case 'mssql':\r\n return 'char(1)';\r\n case 'mysqli':\r\n return 'CHAR(1)';\r\n case 'oci8':\r\n return 'CHAR(1)';\r\n }\r\n case '5':\r\n switch ($DBMStype) {\r\n case 'MDB2':\r\n return 'text'; // VARBINARY treated like text. Potentially DBMS SPECIFIC INSTRUCTION\r\n case 'mssql':\r\n return 'image';\r\n case 'mysqli':\r\n return 'BLOB';\r\n case 'oci8':\r\n return 'BLOB';\r\n }\r\n case '6':\r\n switch ($DBMStype) {\r\n case 'MDB2':\r\n return 'blob';\r\n case 'mssql':\r\n return 'image';\r\n case 'mysqli':\r\n return 'LONGBLOB';\r\n case 'oci8':\r\n return 'BLOB';\r\n }\r\n }\r\n error_log(@$this->error_prefix_1c().__FILE__.':'.__LINE__.' CoreZfpf::data_type_1s');\r\n exit('<br />An error occurred. Contact your supervisor or an app admin for assistance.<br />');\r\n }", "public function convertValue($value)\n {\n if ($value === null || ($value === \"\" && $this->type !== self::TYPE_STRING)) {\n return;\n }\n\n if (self::isScalarType($this->type) || $this->type === self::TYPE_ARRAY) {\n // Scalar and array\n\n if ($this->type === self::TYPE_BOOLEAN && strtolower($value) === \"false\") {\n return false;\n }\n\n if (is_scalar($value) || $this->type === self::TYPE_ARRAY) {\n if (settype($value, $this->type)) {\n return $value;\n }\n }\n } elseif ($this->type === self::TYPE_DATETIME\n || $this->type === self::TYPE_DATE\n ) {\n // DateTime\n\n if ($value instanceof \\DateTime) {\n return $value;\n } elseif (is_array($value) && isset($value[\"date\"])) {\n $date = $value[\"date\"];\n } elseif (is_object($value) && isset($value->date)) {\n $date = $value->date;\n } else {\n $date = $value;\n }\n\n if (isset($date)) {\n try {\n return new \\DateTime($date);\n } catch (\\Exception $e) {\n\n }\n }\n } elseif ($this->type === self::TYPE_COLLECTION\n && Validator::isTraversable($value)\n ) {\n // Collection\n\n return new Entity\\Collection($this->typeOption, $value);\n } elseif ($this->type === self::TYPE_ENTITY\n && Validator::isTraversable($value)\n ) {\n // Entity\n\n return Entity\\Reflection::load($this->typeOption)->createEntity($value);\n }\n\n throw new Exception\\InvalidArgumentException(\n \"Can not convert value on property '\" . $this->name\n . \"' automatically!\",\n $value\n );\n }", "function detect_extender_valuetype($value, $value_type = \"\") {\n\tif ($value_type != \"\" && ($value_type == 'integer' || $value_type == 'text')) {\n\t\treturn $value_type;\n\t}\n\n\t// This is crude\n\tif (is_int($value)) {\n\t\treturn 'integer';\n\t}\n\t// Catch floating point values which are not integer\n\tif (is_numeric($value)) {\n\t\treturn 'text';\n\t}\n\n\treturn 'text';\n}", "public function coerceValueForField($field, $value) {\n\t\t\n\t\t$field = (string)$field;\n\t\t\n\t\t// this model doesn't contain the supplied field\n\t\tif(!$this->hasField($field))\n\t\t\treturn NULL;\n\t\t\n\t\t$context = $this->_fields[$field];\n\t\t\n\t\t// return the default value if none is given\n\t\tif(empty($value)) {\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\t$type = $context['type'];\n\t\t$enum = FALSE;\n\t\tif($type & self::TYPE_ENUM) {\n\t\t\t$type &= ~self::TYPE_ENUM;\n\t\t\t$enum = TRUE;\n\t\t}\n\t\t\n\t\t$ret = NULL;\n\t\tswitch($type) {\n\t\t\t\n\t\t\tcase self::TYPE_INT:\t\t\t\t\n\t\t\t\t$ret = (int)$value;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase self::TYPE_BOOLEAN:\n\t\t\t\t$ret = (int)(bool)$value;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase self::TYPE_FLOAT:\n\t\t\t\t$ret = (float)$value;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase self::TYPE_BINARY:\n\t\t\tcase self::TYPE_STRING:\n\t\t\t\tif(is_object($value) || is_array($value))\n\t\t\t\t\t$value = serialize($value);\n\t\t\t\t\n\t\t\t\t$ret = (string)$value;\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t// todo: better checking on ENUMs?\n\t\tif($enum && !in_array($ret, $context['validate']['default']))\n\t\t\t$ret = NULL;\n\t\t\n\t\treturn $ret;\n\t}", "private function normalizeFieldType()\n {\n switch ($this->type)\n {\n case \"FIELD_TYPE_TEXT\":\n $this->type = \"text\";\n break;\n case \"FIELD_TYPE_NUMBER\":\n $this->type = \"number\";\n break;\n case \"FIELD_TYPE_COLOR\":\n $this->type = \"color\";\n break;\n case \"FIELD_TYPE_DATE\":\n $this->type = \"date\";\n break;\n case \"FIELD_TYPE_IMAGE\":\n // $this->type = \"file\";\n \n break;\n }\n }", "public static function convertToPhp($type, $value) {\n\n switch ($type) {\n\n case 'date':\n case 'datetime':\n case 'time':\n return new \\Datetime($value);\n\n case 'primaryKey':\n case 'foreignKey':\n case 'integer':\n return (integer) $value;\n\n case 'boolean':\n return (boolean) $value;\n\n case 'decimal':\n case 'numeric':\n case 'real':\n case 'float':\n return (float) $value;\n \n default:\n return $value;\n }\n }", "public static function guessAndCastValue($value, &$type = '')\n {\n // matched values array\n $matchesTrue = ['true','yes','ja'];\n $matchesFalse = ['false','no','nein'];\n $matchesNull = ['null'];\n\n if (in_array(strtolower($value), $matchesTrue)) {\n $type = 'boolean';\n\n return true;\n } elseif (in_array(strtolower($value), $matchesFalse)) {\n $type = 'boolean';\n\n return false;\n } elseif (in_array(strtolower($value), $matchesNull)) {\n $type = 'null';\n\n return null;\n } else {\n // check for numerical string and cast if necessary\n if (strstr($value, ',') !== false) {\n $checkStr = str_replace(',', '.', $value);\n if (is_numeric($checkStr)) {\n $value = $checkStr;\n }\n }\n //numbers\n if (is_numeric($value) && strstr($value, '.') !== false && substr_count($value, '.') == 1) { //float\n $type = 'float';\n\n return (float) $value;\n } elseif (is_numeric($value)) { //int\n $type = 'integer';\n\n return (int) $value;\n } else {\n $type = 'string';\n\n return $value;\n }\n }\n }", "private function coerceValue(&$value) {\r\n if (self::isTrueWord($value)) {\r\n $value = true;\r\n } else if (self::isFalseWord($value)) {\r\n $value = false;\r\n } else if (self::isNullWord($value)) {\r\n $value = null;\r\n }\r\n }", "public function getValueType()\n {\n return $this->valueType;\n }", "abstract protected function getType(&$value);", "public function getCastFromValue(mixed $value)\n {\n if ($value instanceof Carbon) {\n return 'datetime';\n }\n\n return gettype($value);\n }", "public function getFieldValueType() {\n return $this->field_value_type;\n }", "protected function cast()\n\t{\n\t\t$this->_val = (string) $this->_val;\n\t}", "public function getValueElementType()\n {\n if ($this->_isCurrentAttributeDefaultAddress()) {\n return 'select';\n }\n if (!is_object($this->getAttributeObject())) {\n return 'text';\n }\n $input = $this->getAttributeObject()->getFrontendInput();\n switch ($input) {\n case 'boolean':\n return 'select';\n case 'select':\n case 'multiselect':\n case 'date':\n return $input;\n default:\n return 'text';\n }\n }", "public function GetValue($value)\n {\n $integer_types = array(\"tinyint\", \"smallint\", \"mediumint\", \"bigint\", \"serial\", \"int\", \"bit\");\n $float_types = array(\"decimal\", \"float\", \"real\", \"double\", \"numeric\");\n if (in_array($this->data_type, $integer_types))\n return is_null($value) ? 0 : intval($value);\n else if (in_array($this->data_type, $float_types))\n return is_null($value) ? 0.0 : floatval($value);\n else if ($this->data_type == \"boolean\")\n return is_null($value) ? FALSE : boolval($value);\n else\n return is_null($value) ? \"\" : $value;\n }", "protected function castValue($value, $source)\n {\n // If the value has already been cast, is null, or is a non-string scalar\n if (is_object($value) || is_null($value) || (is_scalar($value) && !is_string($value))) {\n return $value;\n }\n\n // Get provided or default cast\n $casting = empty($source['casting'])\n ? ViewableData::config()->uninherited('default_cast')\n : $source['casting'];\n\n return DBField::create_field($casting, $value);\n }", "protected function typeEnum(Fluent $column) {\n return \"STRING\"; // TODO: CHECK!\n }", "public static function getTypeOf($value): ValueType\n {\n if (null === $value) {\n return new DefaultValueType('string');\n }\n if (\\is_array($value)) {\n if ($value) {\n $first = \\reset($value);\n return new DefaultValueType(self::guessTypeOf($first), true);\n }\n return new DefaultValueType('string', true);\n }\n return new DefaultValueType(self::guessTypeOf($value), \\is_array($value));\n }", "public function getValueAttribute()\n {\n $value = $this->attributes['value'];\n switch ($this->type->type) {\n case 'boolean':\n return (bool)$value;\n case 'string':\n case 'text':\n return (string)$value;\n case 'integer':\n return (int)$value;\n case 'float':\n return (float)$value;\n default:\n return $value;\n }\n }", "private function guessInput($value)\n {\n if (is_array($value)) {\n if (count($value) > 1) {\n throw new DataGridColumnException(\n 'If you want to use more that one mapping fields you need to set \"input\" option value \"array\".'\n );\n }\n $value = current($value);\n }\n\n if ($value instanceof \\DateTime) {\n return 'datetime';\n }\n\n if (is_numeric($value)) {\n return 'timestamp';\n }\n\n if (is_string($value) || empty($value)) {\n return 'string';\n }\n\n return null;\n }", "public function getTypeConverter() {}", "function GetSQLValueString($getColumn)\n\t{\n\t\t//return;\n\t\t$dataSchema = $this->dataSchema['data'];\n\t\t$structure = $this->SearchDataType($dataSchema, 'Field', $getColumn);\n\t\t$type = $structure[0]['Type'];\n\t\t$valueIn = $this->_[$getColumn];\n\t\t$valueOut = \"NULL\";\n\t\t\n\t\t// for debug and checking,\n\t\t// i don't kown why it must coding as $type===, otherwise $type='datetime' will cased as float/double\n\t\t$typeCaseAs = \"\";\n\t\t\n\t\tswitch (true) {\n\t\t\tcase strpos($type, \"char\") !== FALSE:\n\t\t\tcase strpos($type, \"varchar\") !== FALSE:\n\t\t\tcase strpos($type, \"text\") !== FALSE:\n\t\t\t\tif(strpos($valueIn, \"'\")==0 && strrpos($valueIn, \"'\")==strlen($valueIn)-1 && strlen($valueIn) != 1){\n\t\t\t\t\t$valueOut = $valueIn;\n\t\t\t\t}else{\n\t\t\t\t\t$valueOut = ($valueIn != \"\") ? \"'\" . $valueIn . \"'\" : NULL;\n\t\t\t\t}\n\n\t\t\t\t// $valueOut = $this->dbc->real_escape_string($valueIn);\n\n\t\t\t\t$typeCaseAs = \"text\";\n\n\t\t\t\tbreak;\n\t\t\t\t//http://dev.mysql.com/doc/refman/5.0/en/integer-types.html\n\t\t\tcase $type === \"tinyint\": // -128 to 127, 0 to 255\n\t\t\tcase $type === \"smallint\": // -32768 to 32767, 0 to 65535\n\t\t\tcase $type === \"mediumint\": // -8388608 to 8388607, 0 to 16777215\n\t\t\tcase strpos($type, \"int\") !== FALSE: // -2147483648 to 2147483647, 0 to 4294967295\n\t\t\tcase $type === \"bigint\": // -9223372036854775808 to 9223372036854775807, 0 to 18446744073709551615\n\t\t\tcase strpos($type, \"year\") !== FALSE: // 1901 to 2155\n // both are cannot identify the $valueIn is NULL, always convert the NULL to 0 and return\n// $valueOut = ($valueIn != \"\" && $valueIn != null) ? intval($valueIn) : \"NULL\";\n//\t\t\t\t$valueOut = (is_null($valueIn) || $valueIn == \"\" || $valueIn == null) ? echo \"NULL\" : intval($valueIn);\n $valueOut = is_int($valueIn) || gettype($valueIn)==\"string\" ? intval($valueIn) : \"NULL\";\n \n\t\t\t\t$typeCaseAs = \"integer\";\n\t\t\t\tbreak;\n\t\t\t\t//http://dev.mysql.com/doc/refman/5.0/en/fixed-point-types.html\n\t\t\t\t//http://dev.mysql.com/doc/refman/5.0/en/floating-point-types.html\n\t\t\tcase strpos($type, \"float\") !== FALSE:\n\t\t\tcase strpos($type, \"double\") !== FALSE:\n\t\t\tcase strpos($type, \"decimal\") !== FALSE:\n//\t\t\t\t$valueOut = ($valueIn != \"\") ? doubleval($valueIn) : NULL;\n $valueOut = is_float($valueIn) ? doubleval($valueIn) : \"NULL\";\n\t\t\t\t$typeCaseAs = \"decimal\";\n\t\t\t\tbreak;\n\t\t\tcase $type===\"date\":\n\t\t\t\tif($this->IsNullOrEmptyString($valueIn)){\n\t\t\t\t\t//$valueOut = date(\"Y-m-d\");\n\t\t\t\t\t$valueOut = NULL;\n\t\t\t\t\treturn $valueOut;\n\t\t\t\t\tbreak;\n\t\t\t\t}else{\n\t\t\t\t\t$valueIn = trim($valueIn, \"'\");\n\t\t\t\t\t// convert string to date\n\t\t\t\t\t$tmpDate = date_parse($valueIn);\n\t\t\t\t\tif(count($tmpDate[\"errors\"]) > 0)\n\t\t\t\t\t\t$valueOut = date(\"Y-m-d\"); // if convert with error, use the current date\n\t\t\t\t\telse\n\t\t\t\t\t\t//$valueOut = $tmpDate->format(\"Y-m-d H:i:s\");\n\t\t\t\t\t\t// mktime(hour,minute,second,month,day,year)\n\t\t\t\t\t\t$valueOut = date(\"Y-m-d\", mktime(\n\t\t\t\t\t\t\t0, \n\t\t\t\t\t\t\t0, \n\t\t\t\t\t\t\t0, \n\t\t\t\t\t\t\t$tmpDate[\"month\"], \n\t\t\t\t\t\t\t$tmpDate[\"day\"], \n\t\t\t\t\t\t\t$tmpDate[\"year\"])\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t$valueOut = \"'\" . $valueOut . \"'\";\n\t\t\t\t/*\n\t\t\t\tif(is_string($valueIn)){\n\t\t\t\t\t$valueOut = $valueIn;\n\t\t\t\t}else{\n\t\t\t\t\t$valueOut = ($valueIn != \"\") ? \"'\" . $valueIn . \"'\" : \"NULL\";\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\t$typeCaseAs = \"date\";\n\t\t\t\tbreak;\n\t\t\tcase $type===\"datetime\":\n\t\t\tcase $type===\"timestamp\":\n\t\t\t\t$valueOut = NULL;\n\t\t\t\tif($this->IsNullOrEmptyString($valueIn)){\n\t\t\t\t\t//$valueOut = date(\"Y-m-d H:i:s\");\n\t\t\t\t\treturn $valueOut;\n\t\t\t\t\tbreak;\n\t\t\t\t}else{\n\t\t\t\t\t$valueIn = trim($valueIn, \"'\");\n\t\t\t\t\t// convert string to date\n\t\t\t\t\t$tmpDate = date_parse($valueIn);\n\t\t\t\t\tif(count($tmpDate[\"errors\"]) > 0)\n\t\t\t\t\t\t$valueOut = date(\"Y-m-d H:i:s\"); // if convert with error, use the current date\n\t\t\t\t\telse\n\t\t\t\t\t\t//$valueOut = $tmpDate->format(\"Y-m-d H:i:s\");\n\t\t\t\t\t\t// mktime(hour,minute,second,month,day,year)\n\t\t\t\t\t\t$valueOut = date(\"Y-m-d H:i:s\", mktime(\n\t\t\t\t\t\t\t$tmpDate[\"hour\"], \n\t\t\t\t\t\t\t$tmpDate[\"minute\"], \n\t\t\t\t\t\t\t$tmpDate[\"second\"], \n\t\t\t\t\t\t\t$tmpDate[\"month\"], \n\t\t\t\t\t\t\t$tmpDate[\"day\"], \n\t\t\t\t\t\t\t$tmpDate[\"year\"])\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif(!is_null($valueOut) && !empty($valueOut))\n\t\t\t\t\t$valueOut = \"'\" . $valueOut . \"'\";\n\n\t\t\t\t$typeCaseAs = \"datetime\";\n\n\t\t\t\tbreak;\n\t\t\tcase $type===\"time\":\n\t\t\t\tif($this->IsNullOrEmptyString($valueIn)){\n\t\t\t\t\t$valueOut = date(\"H:i:s\");\n\t\t\t\t}else{\n\t\t\t\t\t$valueIn = trim($valueIn, \"'\");\n\t\t\t\t\t// convert string to date\n\t\t\t\t\t$tmpDate = date_parse($valueIn);\n\t\t\t\t\tif(count($tmpDate[\"errors\"]) > 0)\n\t\t\t\t\t\t$valueOut = date(\"H:i:s\"); // if convert with error, use the current date\n\t\t\t\t\telse\n\t\t\t\t\t\t//$valueOut = $tmpDate->format(\"Y-m-d H:i:s\");\n\t\t\t\t\t\t// mktime(hour,minute,second,month,day,year)\n\t\t\t\t\t\t$valueOut = date(\"H:i:s\", mktime(\n\t\t\t\t\t\t\t$tmpDate[\"hour\"], \n\t\t\t\t\t\t\t$tmpDate[\"minute\"], \n\t\t\t\t\t\t\t$tmpDate[\"second\"])\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t$valueOut = \"'\" . $valueOut . \"'\";\n\t\t\t\t$typeCaseAs = \"time\";\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t// echo \"value in:$valueIn, type:$type, entryType:$typeCaseAs, value out:$valueOut \\r\\n\";\n\t\treturn $valueOut;\n\t}", "public function getTypeColumn()\n {\n return (property_exists($this, 'typeColumn')) ? $this->{'typeColumn'} : 'type';\n }", "public function uncast() {\n\t\tif ($this->value === false) { // force boolean false to 0 instead of ''\n\t\t\t$this->value = '0';\n\t\t}\n\t\telse {\n\t\t\tsettype($this->value, 'string');\n\t\t}\n\t}", "public function setType($value) {\n return $this->setParameter('type', $value);\n }", "private function value(): Column\n {\n // unnecessary problems with numeric values\n return Column::create(Column::TYPE_TEXT)\n ->convertsEmptyStringToNull();\n }", "public function value($value, $column = null) {\n switch($column):\n case \"boolean\":\n if($value === true):\n return \"1\";\n elseif($value === false):\n return \"0\";\n else:\n return !empty($value) ? \"1\" : \"0\";\n endif;\n case \"integer\":\n case \"float\":\n if($value === \"\" or empty($value)):\n return \"NULL\";\n elseif(is_numeric($value)):\n return $value;\n endif;\n default:\n if(empty($value)):\n return \"NULL\";\n endif;\n return \"'\" . mysql_real_escape_string($value, $this->connection) . \"'\";\n endswitch;\n }", "public function getValueType()\n {\n return $this->_valueType;\n }", "private static function guessTypeOf($value): string\n {\n if (null === $value) {\n return 'string';\n }\n if (\\is_object($value)) {\n return \\get_class($value);\n }\n $type = \\gettype($value);\n if ('boolean' === $type) {\n return 'bool';\n }\n if ('integer' === $type) {\n return 'int';\n }\n if ('double' === $type) {\n return 'float';\n }\n return $type;\n }", "public function getColumnType($table, $column);", "protected function fieldType(){\n $this->type = 'number';\n }", "protected function columnDataType() : AST\\DataType\\AbstractDataType {}", "public function getType() : IColumnComponentType;", "public function getValueElementType()\n {\n return $this->_inputType;\n }", "public function castSingleValueFromDb($value);", "private static function defineType($value) {\n switch($value) {\n case (is_int($value)):\n $type = parent::PARAM_INT;\n break;\n case (is_string($value)):\n $type = parent::PARAM_STR;\n break;\n case (is_bool($value)):\n $type = parent::PARAM_BOOL;\n break;\n case (is_null($value)):\n $type = parent::PARAM_NULL;\n break;\n default:\n $type = false;\n }\n\n return $type;\n }", "private function parseValueType ($value)\r\n {\r\n // ints\r\n if (is_int($value))\r\n return 'i';\r\n\r\n // doubles\r\n if (is_double($value))\r\n return 'd';\r\n\r\n return 's';\r\n }", "protected function convertValue($value) {\n return $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 convert($value)\n {\n return $value;\n }", "function setType( $value )\n {\n $this->Type = $value;\n }", "public function fromSql( $col, $value ){\n\t\tif( !isset($value) ) return NULL;\n\t\tswitch( $col->getType() ){\n\t\t\tcase DBColumn::VARCHAR :\n\t\t\t\treturn $value;\n\t\n\t\t\tcase DBColumn::INTEGER :\n\t\t\t\treturn intval($value);\n\t\t\t\t\t\n\t\t\tcase DBColumn::DATE :\n\t\t\tcase DBColumn::DATETIME :\n\t\t\t\treturn new \\DateTime( $value );\n\t\n\t\t\tcase DBColumn::NUMERIC :\n\t\t\t\treturn $value;\n\t\t\t\t\t\n\t\t\tcase DBColumn::BOOLEAN :\n\t\t\t\treturn ($value == 'Y' ? TRUE : ($value == 'N' ? FALSE : NULL));\n\t\n\t\t\tcase DBColumn::GROUP :\n\t\t\t\treturn explode(',', $value);\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tthrow new SQLException(\"Unknown SQL TYPE: \" . $col->getType());\n\t\t}\n\t}" ]
[ "0.71577686", "0.68322945", "0.6741546", "0.67279834", "0.6570711", "0.6546737", "0.6524945", "0.6509425", "0.64545697", "0.645355", "0.6416441", "0.6394833", "0.63881016", "0.636853", "0.6338699", "0.63351715", "0.6331433", "0.6323582", "0.6288686", "0.627317", "0.6265586", "0.62540203", "0.6245874", "0.6237614", "0.6218343", "0.62164605", "0.62113786", "0.62007874", "0.61956626", "0.61848366", "0.61811453", "0.61624", "0.6162055", "0.6135409", "0.61258763", "0.61168736", "0.61074734", "0.60926497", "0.6084801", "0.60780203", "0.6066892", "0.6061958", "0.6059294", "0.6058262", "0.60539174", "0.6040104", "0.59827757", "0.596912", "0.59662735", "0.59617275", "0.59611464", "0.59508646", "0.59436685", "0.5940526", "0.59379256", "0.59379256", "0.5931864", "0.5920027", "0.59157354", "0.5913501", "0.5912964", "0.5911271", "0.59005934", "0.58962756", "0.58888364", "0.5888833", "0.5888524", "0.5885624", "0.58823466", "0.5870311", "0.58629006", "0.58501625", "0.5839823", "0.5833038", "0.5823843", "0.5821847", "0.5818691", "0.58165145", "0.5813914", "0.5811304", "0.5803951", "0.57985896", "0.5793719", "0.5789633", "0.5783085", "0.57795405", "0.5760115", "0.57472414", "0.5746266", "0.5745878", "0.57417375", "0.573731", "0.57263035", "0.572388", "0.5717999", "0.57162166", "0.57162166", "0.5705183", "0.5696307", "0.56954193" ]
0.72152674
0
Destroy the session and optionally specify $regenerate = true to regenerate a new session id.
Уничтожьте сессию и необязательно укажите $regenerate = true, чтобы сгенерировать новый идентификатор сессии.
public function destroy(bool $regenerate = false): bool { $this->instance->unlock(); $result = $this->instance->destroy(); if ($regenerate == true) { session_regenerate_id(true); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function destroy()\n {\n session_regenerate_id(true);\n session_destroy();\n }", "public function destroy()\n {\n session_start();\n \n if(ini_get(\"session.use_cookies\")) \n {\n $params = session_get_cookie_params();\n setcookie( session_name(), \n '', \n time() - 42000,\n $params[\"path\"], \n $params[\"domain\"],\n $params[\"secure\"], \n $params[\"httponly\"]\n );\n }\n \n session_unset();\n session_destroy();\n session_regenerate_id(true);\n session_write_close();\n }", "public function destroy_session()\n {\n }", "public function destroysession($destroy){\n session_start();\n session_unset();\n session_destroy();\n}", "public function destroySession()\n {\n // Regenerate the session id and delete the old session file.\n // Note that regenerating session id does not in any way alter the\n // session data stored in $_SESSION, so we need to be careful to clear\n // that as well. Otherwise only the session id will be changed with\n // the session data copied to the new session.\n $result = session_regenerate_id(true);\n\n // Ensure we don't copy any data to the new session\n $_SESSION = array();\n\n return $result;\n }", "public function sessionDestroy(){\n\t\tif($this->useSessions){\n\t\t\tsession_destroy();\n\t\t}\n\t}", "public static function destroy(){\r\n\t\t@session_destroy();\r\n\t}", "public static function destroy() {\n\t\t$_SESSION = [];\n\t\tsession_unset(session_id());\n\t}", "public function destroy() {\n\t\t$_SESSION = array();\n\n\t\t// If it's desired to kill the session, also delete the session cookie.\n\t\t// Note: This will destroy the session, and not just the session data!\n\t\tif (ini_get(\"session.use_cookies\")) {\n\t\t\t$params = session_get_cookie_params();\n\t\t\tsetcookie(session_name(), '', time() - 42000,\n\t\t\t\t$params[\"path\"], $params[\"domain\"],\n\t\t\t\t$params[\"secure\"], $params[\"httponly\"]\n\t\t\t);\n\t\t}\n\n\t\t// Finally, destroy the session.\n\t\tsession_destroy();\n\n\t\tViews::renderTemplate('sessions/logged_out.html.twig');\n\n\t}", "public function logout(){\n session_regenerate_id();\n session_unset();\n session_destroy();\n }", "public function destroy()\n {\n $this->session->remove($this->instance);\n }", "public static function destroy() {\n session_destroy();\n }", "public static function destroy() {\n session_destroy();\n }", "public function destroy()\r\n {\r\n // Unset all of the session variables.\r\n $_SESSION = array();\r\n \r\n // If it's desired to kill the session, also delete the session cookie.\r\n // Note: This will destroy the session, and not just the session data!\r\n if (ini_get('session.use_cookies'))\r\n {\r\n $params = session_get_cookie_params();\r\n setcookie(session_name(), '', time() - 42000, $params['path'], $params['domain'], $params['secure'], $params['httponly']);\r\n setcookie('extended', null, -1);\r\n }\r\n \r\n // Finally, destroy the session.\r\n session_destroy();\r\n }", "public static function destroy()\n {\n return session_destroy();\n }", "public function destroy() {\n session_destroy();\n }", "public static function destroy()\n {\n session_destroy();\n }", "public function removeSession() {\n\t\tsession_regenerate_id(true);\n\t\tsession_unset();\n\t\tsession_destroy();\n\t}", "public function destroySession()\n {\n }", "public function destroy()\n {\n if ( '' !== session_id() )\n {\n $_SESSION = array();\n \n // If it's desired to kill the session, also delete the session cookie.\n // Note: This will destroy the session, and not just the session data!\n if (ini_get(\"session.use_cookies\")) {\n $params = session_get_cookie_params();\n setcookie(session_name(), '', time() - 42000,\n $params[\"path\"], $params[\"domain\"],\n $params[\"secure\"], $params[\"httponly\"]\n );\n }\n \n session_destroy();\n }\n }", "public function destroy()\n {\n unset( $_SESSION[$this->options->idKey] );\n unset( $_SESSION[$this->options->timestampKey] );\n }", "public static function destroy(){\n self::initSession();\n $length = count($_SESSION);\n foreach( $_SESSION as $name => $value){\n unset( $_SESSION[$name] );\n }\n session_destroy();\n }", "public static function destroySession()\n {\n self::prepareSession();\n unset($_SESSION['LOGIN_ID']);\n \n if (isset($_COOKIE['USR_ID']) && isset($_COOKIE['TOKEN']))\n {\n setcookie('USR_ID', NULL, -1); \n setcookie('TOKEN', NULL, -1); \n }\n }", "public function stop(){\n\n $this->regenerate_id();\n\n session_unset();\n session_destroy();\n }", "public function destroy(){\n session_destroy();\n }", "public static function destroySession() { session_destroy(); }", "public static function destroy(){\n session_destroy();\n }", "public static function destorySession() {\n\t\t// Destroy PHPSession\n\t\tsession_destroy();\n\t}", "public static function destroy()\n {\n $_SESSION = [];\n if (ini_get(\"session.use_cookies\")) {\n $params = session_get_cookie_params();\n setcookie(\n session_name(),\n '',\n time() - 42000,\n $params[\"path\"],\n $params[\"domain\"],\n $params[\"secure\"],\n $params[\"httponly\"]\n );\n }\n if (session_status() == PHP_SESSION_ACTIVE) {\n session_destroy();\n }\n }", "public function destroy()\n {\n // delete the current client\n $this->delClient($this->_sess_seed);\n $this->close();\n\n // check and delete the session cookie\n if (isset($_COOKIE[$this->_sess_name])) {\n setcookie(\n $this->_sess_name, \n '', \n time() - 43200, \n '/', \n $this->_cookie_domain, \n false, true\n );\n }\n }", "public function sessdestroy()\n {\n if (session_id() !== '')\n {\n // Get the session name\n $name = session_name();\n\n // Destroy the session\n session_destroy();\n\n // Re-initialize the array\n $_SESSION = array();\n\n // Delete the session cookie\n //cookie::delete($name);\n }\n }", "public function destroy()\n\t{\n\t\t$this->verifySession();\n\t\tsetcookie( $this->getSessionName() );\n\t\t\n\t\treturn session_destroy();\n\t}", "public function destroy() {\n\t\tif(!$this->sid) return;\n\t\tsetcookie('session','',time()-86400,'/',Config::get('session','cookiedomain'));\n\t\tself::$db->query(self::$db->prepare(\"DELETE FROM sessions WHERE sid=@VAL LIMIT 1\", $this->sid));\n\t\t$this->sid = null;\n\t\t$this->store = array();\n\t\t$this->changed = array();\n\t}", "static public function destroy() {\n if(static::$started){\n session_destroy();\n unset($_SESSION);\n static::$started = false;\n }\n }", "public function destroy(): void\n\t{\n $parameters\t= session_get_cookie_params();\n $path = $parameters['path'];\n $domain = $parameters['domain'];\n $secure = $parameters['secure'];\n $httponly = $parameters['httponly'];\n\n setcookie(ini_get('session.name'), '0', 1, $path, $domain, $secure, $httponly);\n\t $this->storageAdapter->remove($this->sessionId);\n\t}", "public function destroy() {\n\t\tsession_destroy();\n\t}", "function delete() {\n $_SESSION = [];\n session_destroy();\n }", "public static function destroy() {\n global $baseuri, $_COOKIE, $_SESSION;\n\n if (isset($_COOKIE[session_name()]) && session_name()) Arcanum_Security::setCookie(session_name(), '', 0, $baseuri);\n if (isset($_COOKIE['username']) && $_COOKIE['username']) Arcanum_Security::setCookie('username','',0,$baseuri);\n if (isset($_COOKIE['key']) && $_COOKIE['key']) Arcanum_Security::setCookie('key','',0,$baseuri);\n\n $sessid = session_id();\n if (!empty( $sessid )) {\n $_SESSION = array();\n session_destroy();\n session_write_close();\n }\n }", "public function destroy()\n {\n \tif ($this->getIsActive()) {\n \t\t$sessionId = session_id();\n \t\t$this->close();\n \t\t$this->setId($sessionId);\n \t\t$this->open();\n \t\tsession_unset();\n \t\t$this->removeAll();\n \t\tsession_destroy();\n \t\t$this->setId($sessionId);\n \t}\n }", "protected function _destroy_session() {\n\t\t$this->CI->session->unset_userdata('user_id');\n\t\t$this->CI->session->unset_userdata('user_data');\n\t}", "public function destroy() {\n\t\tsession_unset ( $_SESSION );\n\t\tsession_destroy ();\n\t\t\n\t\theader ( \"Location: /user\" );\n\t}", "protected function killSession() {\n\n $this->initEndpoint(false, __FUNCTION__);\n return Session::destroy();\n }", "public static function destroy(){\n\t\tsession_unset();\n\t\t//Copier le code de koezion pour supprimer le cookie//\t\t\n\t\tsession_destroy();\n\t}", "public function SessionDestroy()\n\t{\n\t\tif($this->SessionSatus() == false)\n\t\t{\n\t\t\tsession_destroy();\n\t\t}\n\t\t\n\t\t/* Destroy all cookie */\n\t\t\n\t}", "function DestroySession()\n {\n jf::SQL(\"DELETE FROM {$this->TablePrefix()}session WHERE SessionID=?\",$this->SessionID());\n if (isset ( $_COOKIE [session_name ()] ))\n {\n setcookie ( session_name (), '', jf::time () - 42000, '/' );\n }\n $this->SetCurrentUser(null);\n $_SESSION=array();\n session_regenerate_id ( true );\n }", "public function destroySession()\n {\n session_destroy();\n }", "public function delete()\n {\n $_SESSION = array();\n\n // If it's desired to kill the session, also delete the session cookie.\n // Note: This will destroy the session, and not just the session data!\n if (ini_get(\"session.use_cookies\")) {\n $params = session_get_cookie_params();\n setcookie(session_name(), '', time() - 42000,\n $params[\"path\"], $params[\"domain\"],\n $params[\"secure\"], $params[\"httponly\"]\n );\n }\n\n // Finally, destroy the session.\n session_destroy();\n\n header('Location: index.php');\n exit();\n }", "public static function destroy() {\n\t\t// Like in the logout case and after checking if it's alive to get the user credits notifications and statics files revisions.\n\t\tself::$is_alive = false;\n\t\tself::$is_expired = false;\n\t\t\n\t\t//The session can't really be destroyed because it's not stored.\n\t\t//It's just not usable after the expiricy time.\n\t\t//All we can do is remove the cookie.\n\t\t\n\t\tself::delete_cookie(self::$session_id_name, null, false, true);\n\t\t//It's necessary to solve cookie conflicts between aps and environments aswell.\n\t\t$host_tokens = explode('.', $_SERVER['HTTP_HOST']);\n\t\t$host_tokens_length = count($host_tokens);\n\t\t$new_host_tokens = array_slice($host_tokens, $host_tokens_length - 2, 2);\n\t\tself::delete_cookie(self::$session_id_name, implode('.', $new_host_tokens), false, true);\n\t}", "public function destroy()\n\t{\n\t\tif($this->_started)\n\t\t{\n\t\t\tsession_destroy();\n\t\t\t$this->_started=false;\n\t\t}\n\t}", "public function destruirSession()\n {\n session_destroy();\n }", "public function destroySession() {\n unset($_SESSION['uid'],\n $_SESSION['sid'],\n $_SESSION['user'],\n $_SESSION['pass'],\n $_SESSION['email'],\n $_SESSION['tz'],\n $_SESSION['admin'],\n $_SESSION['active']);\n session_destroy();\n $this->live = false;\n if(isset($_COOKIE['auth'])) {\n unset($_COOKIE['auth']);\n setcookie('auth', false, time()-60, '/');\n }\n }", "public static function destroy()\n {\n setcookie(\"PHPSESSID\", null, time() - 7000000, \"/\");\n $_SESSION = array();\n unset($_SESSION);\n @session_destroy();\n }", "public static function destroy() {\n if(!self::started() && !self::start()) {\n throw new RuntimeException('could not start session');\n }\n\n session_destroy();\n }", "public function destroy()\n {\n session()->forget($this->key);\n\n $redirection = $this->redirection('reset') ?? null;\n\n if($redirection)\n {\n if(Route::has($redirection))\n {\n return redirect()->route($redirection)->send();\n } else {\n return redirect($redirection)->send();\n }\n }\n }", "public function destroy(){\n unset($_SESSION);\n session_unset();\n $selection = $this->session_db->delete($this->session_table, array(\"WHERE id = ?\", array('id' => $this->session_id), array('varchar')));\n if ($this->use_key_values) $this->_tidy_key_values();\n return ($selection > 0);\n }", "public function regenerateSession($destroy = false){\n\n\t if(!isset($_SESSION['userAgent'])){\n\t $_SESSION['userAgent'] = $_SERVER['HTTP_USER_AGENT'];\n\t\t}\n\n\t #Create new session & destroy the old one.\n\t\tif($destroy == true){\n\t \tsession_regenerate_id(true);\n\t }else{\n\t \tsession_regenerate_id();\n\t }\n\t}", "private function _destroy() {\n if (isset($_SESSION))\n $_SESSION = array();\n if (isset($_COOKIE[session_name()]))\n setcookie(session_name(), '', time() - 40000);\n @session_destroy();\n return;\n }", "public function logout()\n {\n $this->sessionStorage->regenerate();\n }", "public function destroySession()\n\t{\n\t\t// if no session, don't do anything\n\t\t$id = session_id();\n\t\tif(empty($id))\n\t\t\treturn;\n\n\t\t@session_start();\n\t\t$name = session_name();\n\t\tsession_regenerate_id(); // makes the previous session id entirely useless\n\t\tsession_destroy();\n\t\t// expire named session cookie\n\t\tif(isset($_COOKIE[$name]))\n\t\t\tsetcookie($name, null, time() - 3600, '/');\n\t\t// clear the global session array, but execution should really end by now\n\t\t$_SESSION = array();\n\t}", "public function destroy(){\n unset($_SESSION['user']);\n \n }", "private function destroy_session()\n\t{\n\t\t$array_session = array(\t'account_name', 'nama_user', 'group_active',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'group_name', 'group_switch', 'id_level_akses',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'level_akses', 'nick_level', 'error_session',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'userid', 'regional', 'hospital', 'laboratorium',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'TanggapCovid19@911solop_session'\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t$this->session->unset_userdata($array_session);\n\t}", "static public function logout () {\n Session::destroy();\n // Please note that if sessions are set to autostart, upon the next request a new session will still be created\n }", "public function logout() {\n deleteSession();\n }", "function stop_session() {\n\n\t// Regenerates the session id, makes the old session ID void\n\tregenerate_session();\n\n\t// unset the session variables\n\tsession_unset();\n\n\t// and destroy the session\n\tsession_destroy();\n}", "function destroy()\n{\n session_start();\n session_unset();\n session_destroy();\n}", "public static function destroy() {\n\t\t$sessionStorage = new sessionStorage();\n\t\t$sessionStorage->clear ();\n\t\tself::getBaseInfoStorageInstance ()->clear ();\n\t}", "public function session_destroy()\r\n {\r\n $this->render(false);\r\n $this->layout = 'ajax';\r\n $this->Session->destroy();\r\n $this->redirect($this->referer());\r\n }", "function sess_destroy()\n {\n session_destroy();\n }", "public function sess_destroy(){\n\t\t$this->session->unset_userdata('admin_id');\n\t\t$this->session->unset_userdata('admin_name');\n\t\t$this->session->unset_userdata('admin_email');\n\t\t$this->session->unset_userdata('admin_login');\n\t}", "public static function destroy()\r\n {\r\n\r\n setcookie('login','', 1);\r\n unset($_SESSION);\r\n session_destroy();\r\n }", "public function forget_session() {\n\t\t\tyith_destroycookie( $this->get_session_cookie_name() );\n\n\t\t\t$this->_session_id = $this->generate_session_id();\n\t\t}", "public function regenerateSessionId($destroy = false, $lifetime = null);", "public function _session_logout() {\n $this->_session_start();\n @unlink(session_save_path().\"/sess_\".session_id());\n session_unset();\n session_destroy();\n session_write_close();\n }", "public static function destroy()\r\n\t{\r\n\t\t$_SESSION[self::THIS_ID] = null;\r\n\t}", "public function stopSession() {\n $this->session->sess_destroy();\n }", "public function regenerate_id(){\n\n // saves the old session's id\n $old_session_id = session_id();\n\n // regenerates the id\n // this function will create a new session, with a new id and containing the data from the old session\n // but will not delete the old session\n session_regenerate_id();\n\n // because the session_regenerate_id() function does not delete the old session,\n // we have to delete it manually\n $this->destroy($old_session_id);\n }", "public function destroy(){\n\t\t$this->params = session_get_cookie_params();\n\t\treturn setcookie(session_name(), '', time() - 3600, $this->params[\"path\"], $this->params[\"domain\"], $this->params[\"secure\"], $this->params[\"httponly\"]);\n\t}", "function destroySession()\r\n\t {\r\n\t\t //Remove token and token validity for user, if exists\r\n\t\t if(strlen($_SESSION['username']) > 0)\r\n\t\t {\r\n\t\t\t $gateway = new UsersGateway;\r\n\t\t\t $result = $gateway->loginUpdate(NULL,$_SESSION['username']);\r\n\t\t }\r\n\t\t \r\n\t\t $_SESSION = array();\r\n\t\t setcookie(session_name(), '', time()-2592000);\r\n\t\t session_unset();\r\n\t\t session_destroy();\r\n\t }", "public static function destroy(): void\n {\n foreach (self::$storage as $key => &$val) {\n unset(self::$storage[$key], $val);\n }\n session_destroy();\n }", "function sessionDestroy()\n{\n // Unset all of the session variables.\n $_SESSION = [];\n\n // If it's desired to kill the session, also delete the session cookie.\n // Note: This will destroy the session, and not just the session data!\n if (ini_get(\"session.use_cookies\")) {\n $params = session_get_cookie_params();\n setcookie(\n session_name(),\n '',\n time() - 42000,\n $params[\"path\"],\n $params[\"domain\"],\n $params[\"secure\"],\n $params[\"httponly\"]\n );\n }\n\n // Finally, destroy the session.\n session_destroy();\n}", "function sessionDestroy()\n{\n // Unset all of the session variables.\n $_SESSION = [];\n\n // If it's desired to kill the session, also delete the session cookie.\n // Note: This will destroy the session, and not just the session data!\n if (ini_get(\"session.use_cookies\")) {\n $params = session_get_cookie_params();\n setcookie(\n session_name(),\n '',\n time() - 42000,\n $params[\"path\"],\n $params[\"domain\"],\n $params[\"secure\"],\n $params[\"httponly\"]\n );\n }\n\n // Finally, destroy the session.\n session_destroy();\n}", "public function destroy_session_and_data() {\n session_start();\n $_SESSION = array();\n setcookie(session_name(), '', time() - 2592000, '/');\n session_destroy();\n }", "public function logout(): void\n\t{\n\t\t$this->session->regenerateId();\n\n\t\t$this->session->regenerateToken();\n\n\t\t$this->session->remove($this->options['auth_key']);\n\n\t\t$this->response->getCookies()->delete($this->options['auth_key'], $this->options['cookie_options']);\n\n\t\t$this->user = null;\n\n\t\t$this->hasLoggedOut = true;\n\t}", "public function destroy($destructionCallback = null)\n {\n session_destroy();\n }", "public function logout()\n {\n $this->deleteSession();\n }", "public function killSession() {\n\t\tsession_destroy();\n\t}", "public function destroyCart()\n {\n $this->session->destroy();\n }", "protected function _destroy()\n\t{\n\t\tif (is_null($this->_update_id))\n\t\t{\n\t\t\t// Session has not been created yet\n\t\t\treturn TRUE;\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\t// Delete the current session\n\t\t\t$this->_collection->safeRemove(\n\t\t\t\tarray($this->_columns['session_id'] => $this->_update_id),\n\t\t\t\tarray('justOne' => TRUE)\n\t\t\t);\n\n\t\t\t// Delete the cookie\n\t\t\tCookie::delete($this->_name);\n\t\t}\n\t\tcatch (MongoException $e)\n\t\t{\n\t\t\tthrow new Session_Exception('Cannot destroy session :err', array(':err' => $e->getMessage()));\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tthrow new Session_Exception('Cannot destroy session :err', array(':err' => $this->_db->lastError()));\n\t\t}\n\n\t\treturn TRUE;\n\t}", "public function destroySession()\n {\n if ( session_status() === PHP_SESSION_ACTIVE )\n {\n // Delete the session cookie as well if it exists (default behavior)\n if ( ini_get( \"session.use_cookies\" ) )\n {\n $params = session_get_cookie_params();\n setcookie( session_name(), '', time() - 42000,\n $params[ \"path\" ], $params[ \"domain\" ],\n $params[ \"secure\" ], $params[ \"httponly\" ]\n );\n }\n\n // Destroy the PHP Session\n session_destroy();\n }\n }", "public function destroy()\n {\n if (session_id()) {\n session_destroy();\n }\n\n return $this->clear();\n }", "protected abstract function destroy_other_sessions($verifier);", "public function destroySession(){\n return $this->_getFacebook()->destroySession();\n }", "public function remove(){\n\n if($this->cookies->has('RMU')){\n $this->cookies->get('RMU')->delete();\n\n }\n\n if($this->cookies->has('RMT')){\n $this->cookies->get('RMT')->delete();\n }\n\n $this->session->destroy('auth-identity');\n }", "public function destroy($session_id = null)\n {\n self::$started = false;\n self::$options = array();\n self::$id = null;\n self::$sessionStorage = array();\n }", "function destroy()\n{\n $_SESSION = [];\n if (ini_get(\"session.use_cookies\")) {\n $params = session_get_cookie_params();\n setcookie(session_name(), '', time() - 42000,\n $params[\"path\"], $params[\"domain\"],\n $params[\"secure\"], $params[\"httponly\"]\n );\n }\n session_destroy();\n}", "public static function stop(){\n session_unset();\n\n // destroy the session\n session_destroy();\n }", "function destroySessionToken() {\n\tunset( $_SESSION[ 'session_token' ] );\n}", "public function destroy_session($params = array())\n {\n if (!empty($params)) {\n $this->CI->session->unset_userdata($params);\n //redirect($params['redirect'], 'refresh');\n }\n\n }", "function sess_destroy($id) {\n $cache = getCache();\n $cache->delete('session_' . $id);\n}", "public function logout() {\n\t\t$this->_destroy_session();\n\t}" ]
[ "0.8005926", "0.7238975", "0.71242946", "0.7101555", "0.70944405", "0.7085196", "0.70771646", "0.707128", "0.7066527", "0.7063104", "0.70427364", "0.7030003", "0.7030003", "0.7021853", "0.7006671", "0.7005661", "0.7000571", "0.6965411", "0.6954521", "0.6948179", "0.6926786", "0.69168675", "0.69147116", "0.69013745", "0.6868401", "0.68575615", "0.68531466", "0.68197274", "0.68081087", "0.68045396", "0.68039954", "0.6790146", "0.6770306", "0.6763464", "0.67603654", "0.6758801", "0.6735207", "0.67163086", "0.6682898", "0.6677558", "0.66721606", "0.66573924", "0.6632998", "0.6631829", "0.6620673", "0.6600686", "0.65979713", "0.65965074", "0.65935385", "0.65731937", "0.65559477", "0.65511", "0.6543043", "0.65399045", "0.65262556", "0.6515296", "0.6499875", "0.6499821", "0.6499777", "0.6499437", "0.6481511", "0.6474107", "0.6457978", "0.6456523", "0.64397496", "0.64139384", "0.6411794", "0.6406015", "0.640291", "0.6401482", "0.639541", "0.6390453", "0.6363555", "0.63533086", "0.63433725", "0.63340265", "0.63293296", "0.63110274", "0.63100654", "0.63047266", "0.63047266", "0.62932736", "0.62924385", "0.62889737", "0.62861884", "0.6277046", "0.6264046", "0.6261801", "0.6261792", "0.6253025", "0.62518495", "0.624522", "0.62389046", "0.6235963", "0.62063766", "0.6204646", "0.61984766", "0.61911684", "0.61835337", "0.6179004" ]
0.7831571
1
Affiche la liste des procedures
Показывает список процедур
public function list_procedure() { Fsb::$tpl->set_file('modo/modo_procedure.html'); Fsb::$tpl->set_vars(array( 'U_ADD' => sid(ROOT . 'index.' . PHPEXT . '?p=modo&amp;module=procedure&amp;mode=new'), )); $sql = 'SELECT procedure_id, procedure_name FROM ' . SQL_PREFIX . 'sub_procedure ORDER BY procedure_name'; $result = Fsb::$db->query($sql); while ($row = Fsb::$db->row($result)) { Fsb::$tpl->set_blocks('procedure', array( 'TITLE' => htmlspecialchars($row['procedure_name']), 'U_EDIT' => sid(ROOT . 'index.' . PHPEXT . '?p=modo&amp;module=procedure&amp;mode=edit&amp;id=' . $row['procedure_id']), 'U_DELETE' => sid(ROOT . 'index.' . PHPEXT . '?p=modo&amp;module=procedure&amp;mode=delete&amp;id=' . $row['procedure_id']), )); } Fsb::$db->free($result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function procedure_list()\n\t{\n\t\treturn 'SHOW PROCEDURE STATUS';\n\t}", "public function procedureList(): string\n\t{\n\t\treturn 'SHOW PROCEDURE STATUS';\n\t}", "function list()\n {\n if (!empty($this->fun))\n foreach ($this->fun as $key => $value)\n echo \"$key(\". join(\",\", $value[\"param\"]) . \") = {$value[\"op\"]}\\n\";\n else\n echo \"No function saved\\n\";\n }", "function spip_register_procedures($spip) {}", "protected function getDatabaseStructureProcedures()\n {\n // Listing all procedures from database\n if ($this->dumpSettings['routines']) {\n foreach ($this->dbHandler->query($this->typeAdapter->showProcedures($this->dbName)) as $row) {\n $this->procedures[] = $row['procedure_name'];\n }\n }\n\n return;\n }", "public function generateProcedures()\n {\n return $this->generator->generateProcedures();\n }", "function list_pembicara(){\r\n }", "public function printlist(){\r\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\r\n\t\tif(!$this->canAccess($parishID)){\r\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\r\n\t\t}\r\n\t\t\r\n\t\t$this->title = 'Vehicle list';\t\t\r\n\t\treturn $this->renderWith(array('Vehicle_printresults','Print'));\r\n\t}", "public function listCommand() {\n\t\t$tableData = array();\n\n\t\tforeach ($this->eventHandlersConfiguration as $syncType => $configuration) {\n\t\t\tforeach ($configuration as $implementationClassName => $enabledStatus) {\n\t\t\t\t$tableData[] = array(\n\t\t\t\t\t$implementationClassName . PHP_EOL . ' Key: <b>' . str_replace('\\\\', '_', $implementationClassName) . '</b>',\n\t\t\t\t\t$syncType,\n\t\t\t\t\t$enabledStatus ? 'TRUE' : 'FALSE'\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$this->output->outputTable($tableData, array('Implementation class / key', 'Type', 'Enabled?'));\n\t}", "public static function list() {\n }", "function list_commands(){\n\techo \"----------------------------\\n\";\n\techo \"stPHPschedule - Command List\\n\";\n\techo \"----------------------------\\n\\n\";\n\t\n\techo \"list - list commands\\n\";\n\techo \"check - checks job list and adds to Queue\\n\";\n\techo \"builddb - for first time set up, builds SQLite database\\n\";\n\techo \"status - see whats in the Queue\\n\";\n\techo \"execute - execute, command to put/exec jobs in Queue.\\n\\n\";\n\techo \"----------------------------\\n\";\n}", "public function getProcedure();", "public function getProcedure();", "Public static function routines(){\n // je recupere le nombre de parametre envoyer ainsi que le tableaux de ceux ci\n $nbr_parametre = func_num_args();\n $tableau_param = func_get_args();\n\n foreach( $tableau_param as $clee => $value)\n {\n\n self::charger(\"routines\", $value);\n\n }\n\n\n\n\n }", "public function Mostrar_Presupuesto(){\r\n\r\n\t\t\t$sql=$this->db->query(\"CALL SP_M_TABLA_PRESUPUESTO\");\r\n\t\t\twhile($filas=$sql->fetch(PDO::FETCH_ASSOC)){\r\n\t\t\t\t$this->presupuestos[]=$filas;\r\n\t\t\t}\r\n\t\t\treturn $this->presupuestos;\r\n\t\t}", "public function actionList()\n {\n if(!$this->tasks) // If there are no tasks.\n {\n echo \" No tasks found\\n\";\n return; \n }\n \n foreach($this->tasks as $task) //Iterate through all tasks.\n {\n echo ' '; //Indent.\n //Echo the name of the task followed by its status.\n echo $task->taskId.' : '.TaskReport::getStatusName($task->getStatus()).\"\\n\";\n } \n }", "public function list_procedure_admin()\n\t{\n\t\t$config = array();\n \t$config[\"base_url\"] = base_url(). \"intervenant_list/list_procedure_admin\";\n \t$config[\"total_rows\"] = $this->procedure_m->nombre_procedure_administrative();\n \t$config[\"per_page\"] = 20;\n \t$config[\"uri_segment\"] = 3;\n \n \t$this->pagination->initialize($config);\n \n \t$start = ($this->uri->segment(3)) ? $this->uri->segment(3) : 1;\n \t$procedure_administrativeIntervenant = $this->procedure_m->getByPage_procedure_administrative_intervenant($config[\"per_page\"],$start);\n \t$procedure_administrativeResult = $this->procedure_m->getByPage_procedure_administrative($config[\"per_page\"],$start);\n \t$link = $this->pagination->create_links();\n\n\t\t// on charge des données dans un tableau pour la vue \n\t\t$data['procedure_administrative'] = $procedure_administrativeResult;\n\t\t$data['procedure_administrative_intervenant'] = $procedure_administrativeIntervenant;\n\t\t$data['link'] = $link;\n\n\t\t// on appel la vue avec le tableau des contacts et des entreprises\n\t\t$this->load->view('intervenant/liste/vue_liste_procedure_administrative',$data);\t\n\t}", "function listCmds() {\n\tglobal $currentDate;\n\tglobal $commands;\n\n\t$rubbish = array('|', '-', '/', '.', ' ');\t/* fixes the <a> tag to be W3C compliant */\n\n\tprint('<div class=\"panel panel-default\">');\n\tprint('<div class=\"panel-heading\"><h2 class=\"panel-title\">' . sprintf(gettext(\"Firewall Status on %s\"), $currentDate) . '</h2></div>');\n\tprint('<div class=\"panel-body\">');\n\tprint(' <div class=\"content\">');\n\tprint(\"\\n<p>\" . gettext(\"This status page includes the following information\") . \":\\n\");\n\tprint(\"<ul>\\n\");\n\tfor ($i = 0; isset($commands[$i]); $i++) {\n\t\tprint(\"\\t<li><strong><a href=\\\"#\" . str_replace($rubbish, '', $commands[$i][0]) . \"\\\">\" . $commands[$i][0] . \"</a></strong></li>\\n\");\n\t}\n\n\tprint(\"</ul>\\n\");\n\tprint('\t </div>');\n\tprint('\t </div>');\n\tprint('</div>');\n}", "public function listcommandenrAction()\n\t{\n\n\t\t$sessionmembre = new Zend_Session_Namespace('membre');\n\t\t//$this->_helper->layout->disableLayout();\n\t\t$this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n\tif (!isset($sessionmembre->code_membre)) {\n\t\t\t$this->_redirect('/');\n\t\t}\n\tif (!isset($sessionmembre->code_membre)) {$this->_redirect('/');}\nif($sessionmembre->confirmation_envoi != \"\"){$this->_redirect('/espacepersonnel/confirmation');}\n\n\t\t$commandenr = new Application_Model_EuCommandeNrMapper();\n\t\t$this->view->entries = $commandenr->fetchAllByCodeMembre($sessionmembre->code_membre);\n\t\t\n\t\t$this->view->tabletri = 1;\n\n\t}", "static public function listall()\n {\n \n }", "public function list()\n {\n }", "public function createProcedures(){}", "protected function exportProcedures()\n {\n // Exporting triggers one by one\n foreach ($this->procedures as $procedure) {\n $this->getProcedureStructure($procedure);\n }\n }", "function langonet_lister_operations() {\n\tstatic $operations = array();\n\n\tif (!$operations) {\n\t\t// Les index désignent les groupes de fonctions, le tableau associé contient noms des opérations\n\t\t// telles qu'utilisés dans l'URL de la page de Langonet.\n\t\t$operations = array(\n\t\t\t'verifications' => array('verifier_item', 'verifier_l', 'verifier_doublon'),\n\t\t\t'recherches' => array('rechercher_item', 'rechercher_texte', 'lister'),\n\t\t\t'traductions' => array('generer', 'editer', 'traduire')\n\t\t);\n\n\t\t// On complète par des collections fournies par d'autres plugins\n\t\t$operations = pipeline('declarer_operations_langonet', $operations);\n\t}\n\n\treturn $operations;\n}", "private function ls() {\n\t\t$products = $this->Product->find('all');\n\t\tforeach($products as $product) {\n\t\t\t$this->out(\"ID: {$product['Product']['id']}\\t\\\"{$product['Product']['title']}\\\"\\t{$product['Product']['price']}\");\n\t\t}\n\t}", "public function listAction();", "public function listar();", "public function listar();", "public function listar();", "public function printlist(){\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\n\t\tif(!$this->canAccess($parishID)){\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\n\t\t}\n\t\t\n\t\t$this->title = 'Catholic-Magazine list';\t\t\n\t\treturn $this->renderWith(array('CatholicMagazine_printresults','Print'));\n\t}", "public function show_list()\r\n {\r\n try\r\n {}\r\n catch(Exception $err_obj)\r\n {\r\n \tshow_error($err_obj->getMessage());\r\n } \r\n }", "function spip_unregister_procedures($spip) {}", "public function ListarProvincias(){\n\t\tself::SetNames();\n\t\t$sql = \"SELECT * FROM provincias\";\n\t\tforeach( $this->dbh->query($sql) as $row ){ $this->p[] = $row; }\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n\t}", "function actionList()\n\t{\n\t\t$pageLimit = getPageLimit();\n\t\t$object = new ModelReportForms();\n\t\t$result = $object->getList($pageLimit['from'],$pageLimit['to']);\n\t\trequire(CFG_PATH_LIB.'util/JSON.php');\n\t\t$json = new Services_JSON();\n\t\techo $json->encode($result);\n\t}", "public function listAction() {\n $this->view->specificProjects = SpecificProjectCatalog::getInstance()->getActives();\n $this->setTitle('Lista de Proyectos Específicos');\n }", "public function list(){\n \n }", "public function listar() {\n $sql = \"SELECT nombres,apellidos,cedula,correo,telefono_celular,estado,descripcion from Pasajero where estado='disponible'\";\n $this->objCon->Execute($sql);\n }", "public function showAll()\n {\n //OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\n }", "public function afficherListeCompetitions() {\r\n \t$competitions = $this->gestion->getCompetitions();\r\n $vue = new Vue(\"Gestion\",\"ListeCompetitions\");\r\n $vue->generer(array('competitions' => $competitions), null);\r\n }", "function getPermisstionList();", "public function lists()\n {\n }", "function afficherproduits(){\n\t\t$sql=\"SElECT * From produits\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "public function show(Proses $proses)\n {\n //\n }", "public function Listar()\n {\n }", "public function Listar()\n {\n }", "public function actionPrintList()\n\t{\n\t\tAudit::add('diary','print list');\n\n\t\tYii::app()->getClientScript()->registerCssFile(Yii::app()->createUrl(\n\t\t\tYii::app()->getAssetManager()->publish(\n\t\t\t\tYii::getPathOfAlias('application.modules.'.$this->getModule()->name.'.assets')\n\t\t\t).'/css/module.css'\n\t\t));\n\n\t\t$this->renderPartial('_print_list', array('bookings'=>$this->getBookingList($_POST)), false, true);\n\t}", "public function showAll()\n {\n }", "public function showAll()\n {\n }", "public function showAll()\n {\n }", "public function executeList()\n {\n return $this->renderComponent('places', 'list');\n }", "function afficherListeParas() {\r\n \t //requete sql\r\n\t if ($this->numpage) {// Liste des paragraphes li&eacute;s &agrave; la page \r\n\t \tif (isset($this->colonne)) $fin_req=\"AND colonne='$this->colonne'\"\t;\r\n\t \t$result=mysql_query(\"SELECT numpara FROM if_page_para WHERE numpage='$this->numpage' $fin_req ORDER BY ordre\");\r\n\t\t//echo \"SELECT numpara FROM if_page_para WHERE numpage='$this->numpage' $fin_req ORDER BY ordre<br/>\";\r\n\t\twhile ($row=mysql_fetch_row($result)) {\r\n\t\t \t$unPara=new Paragraphe();\r\n\t\t\t$unPara->numpara=$row[0];\r\n\t\t\t$unPara->numpage=$this->numpage;\r\n\t\t\t$unPara->infosPara(); \r\n\t\t\t$this->paras[]=$unPara;\r\n\t\t }\t//fin du while\r\n\t } else if ($this->formation) {\t// Liste des formations IFIP\r\n\t \t $result=mysql_query(\"SELECT numpara FROM if_v_form $this->tri_date\");\r\n\t\t while ($row=mysql_fetch_row($result)) {\r\n\t\t \t$unPara=new Formation();\r\n\t\t\t$unPara->numpara=$row[0]; \r\n\t\t\t$unPara->infosFormation(); \r\n\t\t\t$this->paras[]=$unPara;\r\n\t\t }\t//fin du while\r\n\t } else if ($this->doc) {\t// Liste des docs IFIP\r\n\t \t $result=mysql_query(\"SELECT numpara FROM if_v_doc $this->req_doc\");\r\n\t\t while ($row=mysql_fetch_row($result)) {\r\n\t\t \t$unPara=new Documentation();\r\n\t\t\t$unPara->numpara=$row[0]; \r\n\t\t\tif ($this->docvcourte)$unPara->infosDocVersionCourte(); //uniquement numpara + ann&eacute;e de stock&eacute;s (pour all&eacute;ger)\r\n\t\t\telse $unPara->infosDoc(); \r\n\t\t\t$this->paras[]=$unPara;\r\n\t\t\t//mise en commentaire HC sept. 2009 - on refait un tri sur le champ date\r\n\t\t\t//usort($this->paras, 'trierDocs');//tri sur le tableau d'ojets Documentation (sur anneeDoc cr&eacute;&eacute;e dans InfosDoc)\r\n\t\t\t\r\n\t\t }\t//fin du while \r\n\t\t if ($this->docvcourte) {\r\n\t\t \t$this->nbdocs=count($this->paras); \r\n\t\t\t$this->paras=array_slice($this->paras, $this->borneinf, $this->bornesup); // troncage du tableau\r\n\t\t\t//print_r($this->paras);\r\n\t\t}\r\n\t } else if ($this->breve) {\t// Liste des br&egrave;ves internationales IFIP\r\n\t \t $result=mysql_query(\"SELECT numpara FROM if_v_breve $this->req_breve\");\r\n\t\t while ($row=mysql_fetch_row($result)) {\r\n\t\t \t$unPara=new Breve();\r\n\t\t\t$unPara->numpara=$row[0]; \r\n\t\t\t$unPara->infosBreve(); \r\n\t\t\t$this->paras[]=$unPara;\r\n\t\t }\t//fin du while\r\n\t } else if ($this->actu) {\t// Liste des br&egrave;ves d'actualit&eacute;s IFIP\r\n\t \t $result=mysql_query(\"SELECT numpara FROM if_v_actu $this->req_actu\");\r\n\t\t while ($row=mysql_fetch_row($result)) {\r\n\t\t \t$unPara=new Actualite();\r\n\t\t\t$unPara->numpara=$row[0]; \r\n\t\t\t$unPara->infosActu(); \r\n\t\t\t$this->paras[]=$unPara;\r\n\t\t }\t//fin du while\r\n\t } else {// Liste de tous les paragraphes (pour choisir un paragraphe &agrave; associer lors de la cr&eacute;ation ou modification de la page sauf les paragraphes de type Formation et de type Doc\r\n\t\t $result=mysql_query(\"SELECT numpara FROM if_paragraphe WHERE numpara NOT IN (SELECT numpara FROM if_v_form) AND NOT IN (SELECT numpara FROM if_v_doc)\");\r\n\t\t while ($row=mysql_fetch_row($result)) {\r\n\t\t \t$unPara=new Paragraphe();\r\n\t\t\t$unPara->numpara=$row[0]; \r\n\t\t\t$unPara->numpage=$this->numpage;\r\n\t\t\t$unPara->infosPara(); \r\n\t\t\t$this->paras[]=$unPara;\r\n\t\t }\t//fin du while\r\n\t }\r\n\t if ($this->docvcourte) return $this->nbdocs;\r\n\t else return count($this->paras); \r\n }", "public function listarpropuestas()\n {\n $proposals_data = $this->proyectModel->getInProcessProyects();\n\n if($_SERVER['REQUEST_METHOD'] == 'POST')\n {\n $proyect_id_selected = -1;\n if(isset($_POST['getproyectIdBtn']) != null)\n {\n $proyect_id_selected = $_POST['getproyectIdBtn'];\n header('location:' . URLROOT . '/proyects/ver_proyecto/' . $proyect_id_selected);\n }\n }\n\n $data = ['title' => 'Listado de propuestas',\n 'propuestas' => $proposals_data];\n\n $this->view('proyects/listado_propuestas', $data);\n }", "public function showAll()\n {\n echo 'Show all action';\n }", "public function listAll()\n\t{\n\n\t\t// Lista todos os projetos //\n\t\t$data['tipos'] = $this->tipo_model->listar();\n\n\t\t// Carrega a view correspondende //\n\t\t$data['main_content'] = 'tipo/listTipo_view';\n\t\t\n\t\t// Envia todas as informações para tela //\n\t\t$this->parser->parse('template', $data);\n\n\t}", "function ret_lista_profissionais($sql='') {\n $sql = \"SELECT * FROM acsViewPoms $sql\";\n $stmt = DBpdo::conectar()->query($sql);\n return $stmt->fetchAll(PDO::FETCH_OBJ);\n }", "public function listar()\n {\n $processo = Processo::where('acordo', 'REQUERENTE')->get()->first();\n\n echo \"<hr><strong>SITUAÇÃO DO PROCESSO:</strong> $processo->situacao<br>\";\n\n $advogados = $processo->advogados;\n\n //loop\n foreach ($advogados as $advogado) {\n echo \"Advogado: $advogado->nome <br>\n OAB: $advogado->oab <br>\";\n }\n }", "public function listPecaProcessoAction()\n {\n\n // desabilitando layout\n $this->getHelper('layout')->disableLayout();\n // valores da grid\n $configGrid = array('a.nuArtefato', 'ta.noTipoArtefato','a.nuDigital','tva.noTipoVinculoArtefato');\n // setando parametros\n $params = $this->_getAllParams();\n // retornando valor pra grid\n $this->view->grid = new Core_Grid($configGrid);\n $params = $this->view->grid->mapper($params);\n // tratando parametros\n $this->view->dto = Core_Dto::factoryFromData($params, 'search');\n // retornando valores pra view\n $this->view->result = $this->getService('ArtefatoVinculo')->listGridVinculacaoPeca($this->view->dto);\n\n }", "public function see_alldatad_proc(){\n\t\treturn $this->db->get('admin');\n\t}", "function getListProfesiones(){\n return getProsiones();\n}", "public function show_all()\n {\n\n }", "function listarGui(){\r\n\t\t \t\r\n\t\t$this->procedimiento='segu.ft_gui_sel';\r\n\t\t$this->transaccion='SEG_GUI_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';\r\n\t\t\r\n\t\t$this->setCount(false);\t\t\t\t\t\t\r\n\t\t$this->setParametro('id_padre','id_padre','varchar');\t\t\r\n\t\t$this->setParametro('id_subsistema','id_subsistema','integer');\t\t\t\r\n\t\t//defino varialbes que se captran como retornod e la funcion\r\n\t\t$this->captura('id_gui','integer');\r\n\t\t$this->captura('id_subsistema','integer');\r\n\t\t$this->captura('id_gui_padre','integer');\r\n\t\t$this->captura('codigo_gui','varchar');\t\r\n\t\t$this->captura('nombre','varchar');\t\t\r\n\t\t$this->captura('descripcion','text'); \r\n\t\t$this->captura('nivel','integer');\r\n\t\t$this->captura('visible','segu.si_no');\t\t\r\n\t\t$this->captura('orden_logico','integer');\r\n\t\t$this->captura('ruta_archivo','text');\r\n\t\t$this->captura('icono','varchar');\r\n\t\t$this->captura('clase_vista','varchar');\r\n\t\t$this->captura('tipo_dato','varchar');\r\n\t\t$this->captura('id_nodo','varchar');\r\n\t\t$this->captura('json_parametros','text');\r\n\t\t\r\n\t\t$this->captura('codigo_mobile','varchar');\r\n\t\t$this->captura('sw_mobile','varchar');\r\n\t\t$this->captura('orden_mobile','numeric');\r\n\t\t\r\n\t\t\r\n\t\r\n\t\t$this->armarConsulta();\r\n\t\t\r\n\r\n\t\t$this->ejecutarConsulta();\r\n\t\treturn $this->respuesta;\t\r\n\t}", "public function listAll();", "public function listAll();", "public function executeList()\n {\n if($this->hasRequestParameter(\"cal\")){\n return $this->renderComponent('events', 'calendar');\n }else{\n return $this->renderComponent('events', 'array');\n }\n }", "private function _listAction()\n {\n $params = $this->_request->getParams();\n\n\t\t$table = new Application_Model_Report();\n\t\t$this->_helper->layout->disableLayout();\n $this->view->data = $table->initList($params);\n //echo '<pre>'; print_r ($this->view->data); echo '</pre>';\n $this->view->last_data = $table->getLastGenerate($params);\n //echo '<pre>'; print_r ($this->view->last_data);\n //die;\n }", "public function listar(){\n \n $pagamentoDao = new PagamentoDAO();\n \n $todosPagamentos = $pagamentoDao->getPagamento();\n \n $this->view->renderizar(\"header\");\n \n $this->view->interpolar(\"listar_pagamento\",$todosPagamentos);\n \n $this->view->renderizar(\"footer\");\n }", "public function liste()\n {\n $this->load->database();\n\n // Exécute la requête \n $requete = $this->db->query(\"SELECT * FROM produits\");\n\n // Récupération des résultats\n $aProduits = $requete->result();\n\n return $aProduits; \n }", "public function listAll(){\r\n\t\t\t$this->bindingsData();\r\n\t\t\t$key = strtolower(get_class($this));\r\n\t\t\t$datos = array();\r\n\t\t\t$datos = $this->computeSQL($this->filtroSQL, (($this->externQuery)?false:true) );\r\n\t\t\tif ( $this->oSystem->getOrderActionClass()->getChannel()=='html' ){\t\r\n\t\t\t\t$template = $this->pathApp . '/listado.html';\r\n\t\t\t} else {\r\n\t\t\t\t$datosJson = array(\"error\"=>\"NO\",\"callBack\"=>\"\");\r\n\t\t\t\t$rows = array();\r\n\t\t\t\twhile ( $row = $this->oSystem->getConnection()->getColumnas($datos) )\r\n\t\t\t\t\tarray_push( $rows, array(\"id\"=>$row['id'],\"nombre\"=>utf8_encode($row['nombre']),\"estado\"=>$row['estado'],\"desc_perfil\"=>$row['desc_perfil'] ) );\r\n\t\t\t\t$key = 'json';\r\n\t\t\t\t$template = '';\r\n\t\t\t\t$pagination = $this->oSystem->getConnection()->getPaginacionJSON();\r\n\t\t\t\t$datosJson['callBack']=\"refreshList(\".json_encode($pagination).\",\".json_encode($rows).\")\";\r\n\t\t\t\t$datos = json_encode( $datosJson );\r\n\t\t\t}\r\n\t\t\t$this->oLogger->debug($template);\r\n\t\t\t$this->computeTemplate($key, $datos, $template);\r\n\t\t}", "function pruebaListarProcesosSecuencia() { // ---> prueba unitaria de la funcion secuenciar procesos (el metoso mas importante \"listar los procesos\")\n //llamamos al metodo que lista los procesos secuencias\n $test = $this->listaProcesosSecuencia();\n //si el valor resultante es una cadena de texto\n $expected_result = 'is_string';\n $test_name = 'comprobar si trae los procesos desde la base de datos';\n $this->unit->run($test, $expected_result, $test_name);\n //retorna el resultado de la prueba\n echo $this->unit->report();\n }", "function afficherproduits(){\r\n\t\t$sql=\"SElECT * From produit\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n }\t\r\n\t}", "public function lists();", "public function getlistaropciones() {\n $procedure = \"call sp_appweb_sistemas_getlistaopciones();\";\n\t\t$query = $this->db-> query($procedure);\n\n\t\tif ($query->num_rows() > 0) { \n\t\t\treturn $query->result();\n\t\t}{\n\t\t\treturn False;\n\t\t}\t\t\n }", "public function ListAll()\n {\n //estab. conexion\n $conn= AccesoDB::getConnectionPDO();\n //indicamos el SP\n $sql=\"call SP_TB_MARCASelectAll\";\n //Ejecutar la sentencia\n $stmt=$conn->query($sql);\n //almacenar los Resultados\n $results=$stmt->fetchAll();\n //retorno\n return $results;\n }", "public function listAll() {\r\n\t }", "public function printlist() {\r\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\r\n\t\tif(!$this->canAccess($parishID)){\r\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\r\n\t\t}\r\n\t\t\n\t\t$this->title = \"House list\";\n return $this->renderWith(array('House_printresults', 'Print'));\n }", "public function listAction() {}", "public function getCommands();", "public function getCommands();", "public static function genScaffCommAll()\n {\n $tables = self::getTables();\n\n foreach ($tables as $table) {\n self::genScaffComm($table);\n echo '<br /><br />';\n }\n }", "function exec_compte_resultat() {\n\tsinon_interdire_acces(autoriser('voir_compta', 'association'));\n\tinclude_spip('association_modules');\n/// INITIALISATIONS\n\tinclude_spip('inc/association_comptabilite');\n\t$ids = association_passeparam_compta();\n/// AFFICHAGES_LATERAUX (connexes)\n\techo association_navigation_onglets('titre_onglet_comptes', 'comptes');\n/// AFFICHAGES_LATERAUX : INTRO : rappel de l'exercicee affichee\n\t$infos['exercice_entete_debut'] = association_formater_date($ids['debut_periode'], 'dtstart');\n\t$infos['exercice_entete_fin'] = association_formater_date($ids['fin_periode'], 'dtend');\n\techo association_tablinfos_intro($ids['titre_periode'], 'exercice', $ids['id_periode'], $infos);\n\t// pas de sommes de synthes puisque tous les totaux sont dans la zone centrale ;-\n/// AFFICHAGES_LATERAUX : RACCOURCIS\n\techo association_navigation_raccourcis(array(\n\t\tarray('informations_comptables', 'grille-24.png', array('comptes', \"$ids[type_periode]=$ids[id_periode]\"), array('voir_compta', 'association') ),\n\t\tarray('encaisse_titre_general', 'finances-24.png', array('encaisse', \"$ids[type_periode]=$ids[id_periode]\"), array('voir_compta', 'association') ),\n\t\tarray('cpte_bilan_titre_general', 'finances-24.png', array('compte_bilan', \"$ids[type_periode]=$ids[id_periode]\".($ids['destination']?\"&destination=$ids[destination]\":'')), array('voir_compta', 'association') ),\n#\t\tarray('annexe_titre_general', 'finances-24.png', array('compte_annexe', \"$ids[type_periode]=$ids[id_periode]\".($ids['destination']?\"&destination=$ids[destination]\":'')), array('voir_compta', 'association') ),\n\t), 16);\n\tif(autoriser('exporter_compta', 'association')) { // on peut exporter : pdf, csv, xml, ...\n\t\techo debut_cadre_enfonce('', TRUE);\n\t\techo '<h3>'. _T('asso:cpte_resultat_mode_exportation') .'</h3>';\n\t\tif (test_plugin_actif('FPDF')) { // impression en PDF : _T('asso:bouton_imprimer')\n\t\t\techo association_navigation_raccourci1('PDF', 'print-24.png', generer_action_auteur('pdf_comptesresultat', 0) );\n\t\t}\n\t\texport_compte($ids, 'resultats');\n\t\techo fin_cadre_enfonce(TRUE);\n\t}\n/// AFFICHAGES_CENTRAUX (corps)\n\tdebut_cadre_association('finances-24.png', 'cpte_resultat_titre_general');\n/// AFFICHAGES_CENTRAUX : FILTRES\n\techo association_form_filtres(array(\n\t\t'periode' => array($ids['id_periode'], 'asso_comptes', 'operation'),\n\t\t'destination' => $ids['destination'],\n\t), 'compte_resultat');\n/// AFFICHAGES_CENTRAUX : TABLEAU\n\t$regles = comptabilite_liste_planregles();\n\techo comptabilite_tableau_balances($GLOBALS['association_metas']['classe_charges'], 'cpte_resultat', '-1', $ids['debut_periode'], $ids['fin_periode'], $ids['destination']); // liste des charges (depenses d'exploitation) cumulees par comptes\n\techo comptabilite_tableau_balances($GLOBALS['association_metas']['classe_produits'], 'cpte_resultat', '+1', $ids['debut_periode'], $ids['fin_periode'], $ids['destination']); // liste des produits (recettes d'exploitation) cumules par comptes\n\techo comptabilite_tableau_resultat($regles['A'], $ids['debut_periode'], $ids['fin_periode'], $ids['destination']); // resultat comptable courant : c'est la difference entre les recettes et les depenses d'exploitation\n\t// liste des contributions volontaires (emplois et ressources) par comptes\n\techo comptabilite_tableau_balances($GLOBALS['association_metas']['classe_contributions_volontaires'], 'cpte_benevolat', 0, $ids['id_periode'], $ids['destination']);\n/// AFFICHAGES_CENTRAUX : FIN\n\tfin_page_association();\n}", "public function listAction()\n {\n $this->_buildShell->writeShellBuildUrls();\n }", "public function actionList()\n {\n $tableList = $this->schema->getTableList($this->db, $this->sparactor) . \"\\n\";\n return $this->output->stdout($tableList, 0, Console::FG_YELLOW);\n }", "public function listWSMethods()\n {\n if ($_ENV['debug_action']) {\n $this->config->load('cit_webservices', TRUE);\n $all_methods = $this->config->item('cit_webservices');\n }\n $all_methods = empty($all_methods) ? array() : $all_methods;\n $render_arr = array(\n 'all_methods' => $all_methods,\n 'ws_url' => $this->config->item('site_url') . \"WS/\"\n );\n $this->smarty->assign($render_arr);\n }", "public function showCommandList(): void\n {\n $flags = $this->flags;\n // has option: --auto-completion\n $autoComp = $flags->getOpt('auto-completion');\n // has option: --shell-env\n $shellEnv = $flags->getOpt('shell-env');\n // input is an path: /bin/bash\n if ($shellEnv && str_contains($shellEnv, '/')) {\n $shellEnv = basename($shellEnv);\n }\n\n // php bin/app list --only-name\n if ($autoComp && $shellEnv === 'bash') {\n $this->dumpAutoCompletion('bash', []);\n return;\n }\n\n $this->logf(Console::VERB_DEBUG, 'Display the application commands list');\n\n $hasGroup = $hasCommand = false;\n $groupArr = $commandArr = [];\n\n // all console groups/controllers\n $router = $this->getRouter();\n if ($groups = $router->getControllers()) {\n $hasGroup = true;\n ksort($groups);\n }\n\n // all independent commands, Independent, Single, Alone\n if ($commands = $router->getCommands()) {\n $hasCommand = true;\n ksort($commands);\n }\n\n // add split title on both exists.\n // if (!$autoComp && $hasCommand && $hasGroup) {\n // $groupArr[] = PHP_EOL . '- <bold>Group Commands</bold>';\n // $commandArr[] = PHP_EOL . '- <bold>Alone Commands</bold>';\n // }\n\n $placeholder = 'No description of the command';\n foreach ($groups as $name => $info) {\n $controller = $info['handler'];\n /** @var AbstractHandler $controller */\n $desc = $controller::getDesc() ?: $placeholder;\n $config = $info['config'];\n $aliases = $config['aliases'];\n $extra = $aliases ? ColorTag::wrap(' (alias: ' . implode(',', $aliases) . ')', 'info') : '';\n\n // collect\n $groupArr[$name] = $desc . $extra;\n }\n\n if (!$hasGroup && $this->isDebug()) {\n $groupArr[] = '... Not register any group command(controller)';\n }\n\n foreach ($commands as $name => $info) {\n $desc = $placeholder;\n $config = $info['config'];\n $command = $info['handler'];\n\n /** @var AbstractHandler $command */\n if (is_subclass_of($command, CommandInterface::class)) {\n $desc = $command::getDesc() ?: $placeholder;\n } elseif ($msg = $config['desc'] ?? '') {\n $desc = $msg;\n } elseif (is_string($command)) {\n $desc = 'A handler : ' . $command;\n } elseif (is_object($command)) {\n $desc = 'A handler by ' . get_class($command);\n }\n\n $aliases = $config['aliases'];\n $extra = $aliases ? ColorTag::wrap(' (alias: ' . implode(',', $aliases) . ')', 'info') : '';\n\n $commandArr[$name] = $desc . $extra;\n }\n\n if (!$hasCommand && $this->isDebug()) {\n $commandArr[] = '... Not register any alone command';\n }\n\n // built in commands\n $internalCommands = static::$internalCommands;\n\n if ($autoComp && $shellEnv === 'zsh') {\n $map = array_merge($internalCommands, $groupArr, $commandArr);\n $this->dumpAutoCompletion('zsh', $map);\n return;\n }\n\n ksort($internalCommands);\n Console::startBuffer();\n\n if ($appDesc = $this->getParam('desc', '')) {\n $appVer = $this->getParam('version', '');\n Console::writeln(sprintf('%s%s' . PHP_EOL, $appDesc, $appVer ? \" (Version: <info>$appVer</info>)\" : ''));\n }\n\n $scriptName = $this->getScriptName();\n\n // built in options\n // $globOpts = self::$globalOptions;\n $globOpts = $this->flags->getOptsHelpLines();\n\n Show::mList([\n 'Usage:' => \"$scriptName <info>{COMMAND}</info> [--opt -v -h ...] [arg0 arg1 arg2=value2 ...]\",\n 'Options:' => FlagUtil::alignOptions($globOpts),\n 'Internal Commands:' => $internalCommands,\n 'Available Commands:' => array_merge($groupArr, $commandArr),\n ], [\n 'sepChar' => ' ',\n ]);\n\n unset($groupArr, $commandArr, $internalCommands);\n Console::write(\"More command information, please use: <cyan>$scriptName COMMAND -h</cyan>\");\n Console::flushBuffer();\n }", "public function listar()\n {\n $sql=\"SELECT p.idpermiso,p.PEnombre FROM permiso AS p order BY p.idpermiso ASC\";\n return ejecutarConsulta($sql);\n }", "public function index()\n {\n $profs = Professeur::all();\n\n return view('Backoffice.profs.liste', compact('profs'));\n }", "public function show_list()\n {\n try\n {\n ////Put the select statement here\n }\n catch(Exception $err_obj)\n {\n\t\t\tshow_error($err_obj->getMessage());\n } \n }", "function code_P()\n {\n $result = \"\";\n for ($i = 0; $i < count($this->procedures); $i++) {\n $result .= $this->procedures[$i]->code_PR();\n }\n return $result;\n }", "public function voirlisteAction() {\n // On récupère l'EntityManager\n $em = $this->getDoctrine()\n ->getEntityManager();\n \n // On récupère la liste des salles\n $liste_salle = $em->getRepository('JulienParcInformatiqueBundle:Salle')\n ->findAll();\n \n // afficher la liste en completant les variables necessaire au template\n return $this->render('JulienParcInformatiqueBundle:parcInfo:voir_liste.html.twig',array(\n 'liste' => $liste_salle,\n 'title' => 'salle',\n 'lien_voir' => 'parcInfo_voir_salle',\n 'lien_delete' => 'parcInfo_supprimer_salle',\n 'lien_update'=> 'parcInfo_modifier_salle',\n 'lien_post' => 'parcInfo_ajouter_salle'\n ));\n \n \n }", "public function display() {\n $listeProfils = $this->model->getListeProfils();\n $this->view->displayListeProfils($listeProfils);\n }", "function listarPrueba(CTParametro $parametro){\n\t\t$obj=new MODPrueba($parametro);\n\t\t$res=$obj->listarPrueba();\n\t\treturn $res;\n\t}", "public function __toString() {\n\n $procNames = \"\";\n foreach( $this->getName() as $name ) {\n $procNames = $procNames . \" name=\". $name. \" (provider=\".$name->getProvider().\", status=\".$name->getStatus().\") \";\n }\n\n return 'Procedure: id=' . $this->id .\n \", procedureNameCount=\" . count($this->getName()) . \" => Names=\".$procNames.\n \", numberCount=\" . count($this->number) .\n \": number->first=\" . $this->number->first() .\n \", parentId=\".$this->getParent()->getId().\n \"; linked accessionCount=\".count($this->accession).\":\".$this->accession->first();\n }", "private function menu_list(){\n $results = $this->dt->menu_list();\n echo $results;\n }", "public function listerAction() {\n\t// contruction de la première ligne (ligne d'intitulé)\n\t$listColnames = array('ID', 'Libellé', 'Prix HT', 'Prix TTC');\n\t// construction des autres lignes\n\t$listEntities = array( \n\t\tarray('id'=>'3', 'Vis',100,120),\t// un article : son id, son label, ses prix HT et TTC\n\t\tarray('id'=>4, 'Ecrou', 50, 60),\t// un autre article : idem\n\t\tarray('id'=>7, 'Rondelle', 10, 12));\t// un autre article : idem\n $path=array(\n\t\t'mod'=>'sym16_simple_stock_puissance',\t// le chemin qui traitera l'action modifier (ici c'est n'importe quoi)\n\t\t'supr'=>'sym16_simple_stock_puissance');// le chemin qui traitera l'action supprimer (ici c'est n'importe quoi)\n\n\treturn $this->render(\n\t\t'SYM16SimpleStockBundle:MonPremier:list.html.twig',\n\t\tarray('listColnames' => $listColnames, 'listEntities'=> $listEntities, 'path'=>$path)\n );\n }", "public function viewAll()\n\t{\n\t\t$result = lister::listall($_GET['action']);\n\t\t$output = $_GET['action'];\n\t\tinclude_once SYSTEM_PATH.'/view/overview.tpl';\n\t}", "public function doListPrint(){\r\n\t\t\tparent::pdfGenericList(array('pais','zona','peso','importe'),\"../_commons/css\",\"Listado Portes.pdf\");\r\n\t\t}", "public function doListPrint(){\r\n\t\t\tparent::pdfGenericList(array('pais','zona','peso','importe'),\"../_commons/css\",\"Listado Portes.pdf\");\r\n\t\t}", "public static function listFunction() {\n return array (\n 'bnToName' => array (\n 'method' => 'help',\n 'args' => array (\n 'genus' => array (\n 'type' => 'varNotNull',\n 'params' => array (\n 'alphaonly' => array()\n )\n ),\n 'species' => array (\n 'type' => 'varNotNull',\n 'params' => array (\n 'alphaonly' => array() \n )\n ),\n 'language' => array (\n 'type' => 'varNull',\n 'params' => array (\n 'alphaonly' => array() \n )\n )\n )\n ),\n 'nameToBn' => array (\n 'method' => 'add',\n 'args' => array (\n 'name' => array (\n 'type' => 'varNotNull',\n 'params' => array (\n )\n )\n )\n ) \n );\n }", "function scList($scf){\n\tglobal $LETHE_SYSTEM_SHORTCODES;\n\tglobal $myconn;\n\t$list = '';\n\tforeach($LETHE_SYSTEM_SHORTCODES as $k=>$v){\n\t\t$list.='<a href=\"javascript:;\" class=\"tooltips lethe-sc\" data-lethe-scf=\"'. $scf .'\" title=\"'. $v .'\"><span class=\"label label-danger\">{'. $k .'}</span></a>';\n\t}\n\t\n\t$opSc = $myconn->query(\"SELECT ID,OID,code_key,isSystem FROM \". db_table_pref .\"short_codes ORDER BY isSystem DESC, code_key ASC\") or die(mysqli_error($myconn));\n\twhile($opScRs = $opSc->fetch_assoc()){\n\t\t$list.='<a href=\"javascript:;\" class=\"lethe-sc\" data-lethe-scf=\"'. $scf .'\"><span class=\"label label-'. (($opScRs['isSystem']==0) ? 'primary':'warning') .'\">{'. showIn($opScRs['code_key'],'page') .'}</span></a>';\n\t}$opSc->free();\n\t\n\treturn $list;\n}", "public function actionIndex()\n {\n echo \"запустите task/find чтобы найти задачи с истекающим сроком\";\n }" ]
[ "0.70439345", "0.69907725", "0.6554162", "0.61181825", "0.6091439", "0.60754484", "0.5962899", "0.59609365", "0.5879916", "0.583414", "0.5826961", "0.58224154", "0.58224154", "0.57826954", "0.57698286", "0.57687426", "0.572464", "0.56757736", "0.56730354", "0.56647354", "0.5648227", "0.56387496", "0.56337184", "0.56203324", "0.55941105", "0.5593042", "0.55744344", "0.55744344", "0.55744344", "0.5557673", "0.5551447", "0.55482095", "0.55414325", "0.554023", "0.5529065", "0.55192405", "0.55145144", "0.5491413", "0.5489022", "0.5486689", "0.5477447", "0.5473649", "0.54557395", "0.54542387", "0.54542387", "0.5427995", "0.5426468", "0.5426468", "0.5426468", "0.54238343", "0.5423035", "0.54135877", "0.5412343", "0.53962845", "0.539459", "0.5393007", "0.5387062", "0.53843343", "0.53786194", "0.5375541", "0.5360087", "0.53586406", "0.53586406", "0.53570455", "0.5356319", "0.5352532", "0.53500414", "0.53495616", "0.53475523", "0.5343657", "0.53414977", "0.5326805", "0.53252476", "0.53132826", "0.5306687", "0.5305032", "0.5304371", "0.5304371", "0.53019667", "0.5298718", "0.52960664", "0.5294685", "0.52871144", "0.5286345", "0.52854186", "0.5284556", "0.5283345", "0.52801657", "0.52741545", "0.52728534", "0.52713525", "0.52641755", "0.5261756", "0.52598095", "0.525298", "0.52522564", "0.52522564", "0.5250786", "0.5247919", "0.52436215" ]
0.7857507
0
Get the Billings records associated with the User record.
Получите записи Billings, связанные с записью User.
public function billings() { return $this->hasMany('App\Models\Billing', 'user_id', 'id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getBill()\n {\n if(Auth::user())\n {\n return \\App\\userBills::get();\n }\n }", "public function billings()\n {\n return $this->hasMany('App\\Billing');\n }", "public function getBills()\n {\n $id = $_SESSION['id'];\n \n if ( null !== $this->getDB() )\n {\n $dbPrep = $this->getDB()->prepare('select bill_id, bill_name, amount, frequency, bill_type from bills where user_id = :id order by bill_type desc');\n \n $dbPrep->bindParam(':id', $id, PDO::PARAM_INT);\n \n if ( $dbPrep->execute() && $dbPrep->rowCount() > 0 )\n {\n $bills = $dbPrep->fetchAll(PDO::FETCH_ASSOC);\n return $bills;\n }\n else\n {\n $error = $dbPrep->errorInfo();\n error_log(\"\\n\".$error[2], 3, \"logs/errors.log\");\n return $bills;\n }\n }\n }", "public function getBookingsForUser($a_user_id) {\r\n\t\treturn $this->ilRoomSharingDatabaseBooking->getBookingsForUser($a_user_id);\r\n\t}", "public function forAdmin(User $user) {\n\t\treturn Bill::where ( 'user_id', $user->id )->orderBy ( 'created_at', 'asc' )->get ();\n\t}", "public function getBookingsForUser($a_user_id) {\r\n\t\t$set = $this->ilDB->query('SELECT * FROM ' . dbc::BOOKINGS_TABLE . ' WHERE pool_id = ' . $this->ilDB->quote($this->pool_id, 'integer')\r\n\t\t\t. ' AND user_id = ' . $this->ilDB->quote($a_user_id, 'integer') . ' AND (date_from >= \"' . date('Y-m-d H:i:s') . '\"' . ' OR date_to >= \"'\r\n\t\t\t. date('Y-m-d H:i:s') . '\")' . ' ORDER BY date_from ASC');\r\n\t\t$bookings = array();\r\n\t\twhile ($row = $this->ilDB->fetchAssoc($set)) {\r\n\t\t\t$bookings[] = $row;\r\n\t\t}\r\n\r\n\t\treturn $bookings;\r\n\t}", "public function bills()\n {\n return $this->hasManyThrough('Rahasi\\Models\\BillPayment', 'Rahasi\\Models\\ApiKey', 'user_id', 'api_key_id');\n }", "public function bills()\n {\n return $this->hasMany(Bill::class)->get();\n }", "public function getAttachedBanks($user){\n $cards = BankAccount::select('id','holder_name as name','bank_name','account_number','account_number as last_four_digit','ifc_code','account_type as account_holder_type','country','currency','created_at','institution_number','transit_number','customer_type','address','city','province','postal_code')\n ->where(['user_id'=>$user->id])->orderBy('id', 'desc')\n ->get();\n return $cards;\n }", "function getUserBillsIDs(){\n\t\treturn $this->userBillIDs;\n\t}", "public function userBookings()\n\t{\n\t\t$flightBooking = DB::select(\n 'SELECT * From flights \n WHERE booked_by = ? \n ORDER BY id DESC', ['user']\n );\n\n \treturn response()->json([\n \t\t'flightBooking'=>$flightBooking, \n \t\t'message'=>'Flight Bookings for users fetched Successfully'\n \t], 200);\n\t}", "private function getBookings($identifiable)\n {\n return QueryBuilder::for($identifiable->bookings()->getQuery())\n ->select('bookings.*')\n ->with(['checkin', 'checkout', 'resource', 'user'])\n ->whereDoesntHave('checkin')\n ->whereHas('resource', function ($query) {\n $query->where('is_facility', '=', 0);\n })\n ->where(function ($query) {\n $filter = request()->query->get('filter');\n\n // Set default time span to +/- 4 days if not in request.\n if (! isset($filter['between'])) {\n $query->between(now()->subDays(4), now()->addDays(4));\n }\n })\n ->join('resources', 'resources.id', '=', 'bookings.resource_id')\n ->join('users', 'users.id', '=', 'bookings.user_id')\n ->allowedFilters(AllowedFilter::scope('between'))\n ->defaultSort('start_time')\n ->allowedSorts(['resources.name', 'users.name', 'start_time', 'end_time'])\n ->paginate(15);\n }", "public function getPendingBids()\n {\n $user = Auth::user();\n $sql = 'SELECT `bids`.`id`, `campaigns`.`campaign_name`, `sites`.`site_name`, `users`.`name`\n FROM `bids`\n JOIN `campaigns` \n ON `bids`.`campaign_id` = `campaigns`.`id`\n JOIN `zones`\n ON `bids`.`zone_handle` = `zones`.`handle`\n JOIN `sites`\n ON `zones`.`site_id` = `sites`.`id`\n JOIN `users`\n ON `sites`.`user_id` = `users`.`id`\n WHERE `bids`.`status` = ?\n AND `sites`.`user_id` = ?;';\n $result = DB::select($sql, array(5, $user->id));\n return $result;\n }", "private function getBill() {\r\n\t\r\n\t\t\t$refreshed_token = new Token($this->id, $this->secret, null);\r\n\t\t\t\t\r\n\t\t\t$bills = $this->user->getBills();\r\n\t\t\t\r\n\t\t\tif($bills) {\r\n\t\t\t\t\r\n\t\t\t\techo json_encode([\r\n\t\t\t\t\t'code' => 200, \r\n\t\t\t\t\t'message' => 'OK',\r\n\t\t\t\t\t'bills' => $bills,\r\n\t\t\t\t\t'token' => $refreshed_token->getTokenString()\r\n\t\t\t\t]);\r\n\t\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t\r\n\t\t\t\techo json_encode([\r\n\t\t\t\t\t'code' => 404, \r\n\t\t\t\t\t'message' => 'Not found',\r\n\t\t\t\t\t'bills' => '',\r\n\t\t\t\t\t'token' => $refreshed_token->getTokenString()\r\n\t\t\t\t]);\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t}", "public function get_my_bookings() {\n global $USER;\n $mybookings = array();\n if (!empty($this->allbookedusers) && !empty($this->options)) {\n foreach ($this->options as $optionid => $option) {\n if (!empty($this->allbookedusers[$option->id])) {\n foreach ($this->allbookedusers[$option->id] as $userobject) {\n if ($userobject->id == $USER->id) {\n $userobject->status[$option->id]->coursename = $this->course->fullname;\n $userobject->status[$option->id]->courseid = $this->course->id;\n $userobject->status[$option->id]->bookingtitle = $this->booking->name;\n $userobject->status[$option->id]->bookingoptiontitle = $this->options[$option->id]->text;\n $mybookings[$optionid] = $userobject;\n }\n }\n }\n }\n }\n return $mybookings;\n }", "public function bill()\n {\n return $this->hasOne(BillingModel::class, '_id', 'bills__id');\n }", "function getAccountingsByUser($userID) {\n\n $stmt = mysqli_prepare($this->con, \"SELECT * FROM Accounting WHERE UserID = ?;\");\n $stmt->bind_param(\"i\", $userID);\n $stmt->execute();\n return $stmt->get_result()->fetch_all(MYSQLI_ASSOC);\n }", "public function bill() : Relations\\HasOne\n {\n return $this->hasOne(Bill::class, 'user_id', 'id');\n }", "public function all($user)\n {\n return DB::table('budgets')\n ->join('activities', 'budgets.id', '=', 'activities.budget_id')\n ->where('activities.user_id', '=', $user)\n ->orderBy('activities.date', 'desc')\n ->get();\n }", "function displayUserBills(){\n\t\t//if empty returns the following string\n\t\tif (empty($this->userBills)) {\n\t\t\t$table = '<h4 class=\"text-warning\">There is nothing to show...</h4>';\n\t\t} else {\n\t\t\t$table = '<table class=\"table table-striped table-hover\">\n\t\t\t\t<tHead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>Description</th><th>Amount</th><th>Category</th><th>Date</th>\n\t\t\t\t\t</tr>\n\t\t\t\t</tHead>\n\t\t\t\t<tBody>\n\t\t\t\t';\n\t\t\t//it calls the getbill as row method of the bill class\n\t\t\tforeach ($this->userBills as $key => $obj) {\n\t\t\t\t$table .= $obj->getBillAsRow();\n\t\t\t}\n\t\t\t$table .= '</tBody></table>';\n\t\t}\n\t\treturn $table;\n\t}", "public function getDuePayments() {\n // Output: Array of Bill objects\n // Authenticate first\n if ($this->authenticated) {\n if ($this->getPermissions() === self::ACTIVE_ADMIN_PERMISSION()) {\n\n $bills = [];\n\n $billsStore = $this->readFile(self::BILLS_FILE());\n \n if (!($billsStore === null)) {\n foreach($billsStore as $billID => $accountNumber) {\n $accountFileName = self::ACCOUNTS_FILE_DIR() . $accountNumber . '.json';\n $account = $this->readFile($accountFileName);\n if (!($account === null)) {\n\n // Load associative array into bill object\n foreach($account['bills'] as $billObject) {\n $bill = Bill::load($billObject);\n\n // Only add if unpaid\n if (!($bill->getIsPaid()))\n array_push($bills, $bill);\n }\n }\n }\n }\n } else\n header('Location: ' . View::UNAUTHORIZED_PAGE); // insufficient permissions\n } else\n header('Location: ' . View::LOGIN_PAGE); // not logged in\n return $bills;\n }", "public function bills() {\n return $this->hasMany('App\\Bill');\n }", "public function bills() {\n return $this->hasMany('App\\Bill');\n }", "function getRemaingBidDetails($user_id)\n\t\t{\n\t\t\t$bids = $this->manage_content->getLastValue_where('user_bid_details', '*', 'user_id', $user_id, 'id');\n\t\t\treturn $bids;\t\t\t\n\t\t}", "public function billUser(){\n\n App::bind('Interfaces/BillerInterface',function (){\n return new StripeBiller(App::make('BillingNotifierInterface'));\n });\n App::bind('Interfaces/BillingNotifierInterface', function (){\n return new SmsNotifier;\n //return binding to sms\n // https://www.youtube.com/watch?v=duqBHik7nRo\n });\n $this->biller->bill(array('ravi'),10);\n return 'billed';\n }", "public function billPayment()\n {\n $users = Introducer::select('introducer.introduced_number as login_id', 'community_user.user_name', 'email', 'phone_number', 'career')\n ->selectRaw('COUNT(introducer.introduced_number) as count_number')\n ->join('community_user', 'introducer.introduced_number', 'community_user.login_id')\n ->where('introducer.status', '<', 2)\n ->orderBy('community_user.user_number', 'desc')\n ->groupBy('introducer.introduced_number')\n ->paginate(config('constants.PAGINATION'));\n return $users;\n }", "public function forUser(User $user)\n {\n if($user->isAdmin()) {\n return Book::orderBy('title')\n ->get();\n }\n\n return $user->books()\n ->where('status', 1)\n ->orderBy('title')\n ->get();\n }", "public static function getBillers()\n {\n $method = 'GET';\n $nonce = ISW::nonce();\n $url = ISW::url() . '/billers';\n $encodedUrl = urlencode($url);\n $timestamp = time();\n $signature = ISW::signature($method, $encodedUrl, $nonce);\n\n\n $authorization = ISW::authorization();\n\n $headers = [\n 'Content-Type' => 'application/json',\n 'Authorization' => $authorization,\n 'Signature' => $signature,\n 'Timestamp' => $timestamp,\n 'Nonce' => $nonce,\n 'SignatureMethod' => ISW::$signatureMethod,\n 'TerminalID' => ISW::terminalID()\n ];\n\n $res = self::client()->request($method, $url, [\n 'headers' => $headers\n ]);\n\n if ( $res->getStatusCode() == 200 ) {\n $data = json_decode($res->getBody()->getContents(), true);\n\n\n return ['success' => true, 'data' => $data];\n }\n\n return ['success' => false, 'message' => 'Error getting billers'];\n }", "public function index()\n {\n // maybe return all the users bills?\n }", "public function listings()\n {\n return $this->hasManyThrough(Trade::class, User::class, '', 'owner_id');\n }", "public function getRequests($user)\n {\n $requests = $this->dbh->query(\"SELECT * FROM \" . $this->table . \" WHERE userID = '\". $user->userID .\"'\")->fetchAll(\\PDO::FETCH_ASSOC);\n return $requests;\n }", "private function getBudgetsData() {\n $result = [];\n\n if ( Auth::user()->cant('list', Limit::class) )\n return $result;\n\n $limits = Limit::where('user_id', '=', Auth::user()->id)\n ->orderBy('name', 'asc');\n\n foreach ( $limits->get() as $limit ) {\n $percentage = ($limit->receipts()->sum('debit') * 100) / $limit->limit;\n $progress = ceil(min(max(0, $percentage), 100));\n\n $result[$limit->id] = (object)[\n 'name' => $limit->name,\n 'id' => $limit->id,\n 'progress' => $progress\n ];\n }\n\n return $result;\n }", "public function getBeneficiaryOwnersData($user_id){\n return ShareHolding::getBeneficiaryOwnersData($user_id);\n }", "function getBikesWithUser( $user ) {\n\t\t\t$query = new ParseQuery( \"Bikes\" );\n\t\t\t$query->equalTo( \"currentUser\" , $user );\n\t\t\t$results = $query->find();\n\n\t\t\t$listOfBikes = array();\n\t\t\tfor( $i = 0; $i < count( $results ); $i++ ) {\n\t\t\t\tarray_push( $listOfBikes , $results[$i]->getObjectId() );\n\t\t\t}\n\n\t\t\treturn $listOfBikes;\n\t\t}", "public function index()\n {\n $permission = $this->checkPermission();\n if (is_array($permission)) {\n $this->_handleResponse($permission);\n return;\n }\n\n $date = $this->request->query('date');\n if (empty($date)) {\n $this->paginate = [\n 'order' => ['Customers.first_name' => 'asc']\n ];\n $customers = $this->paginate($this->Customers->find()\n ->order(['first_name' => 'ASC', 'last_name' => 'ASC'])\n ->where(['shops_id' => $permission->shops_id])\n );\n } else {\n $this->paginate = [\n 'order' => ['Customers.first_name' => 'asc'],\n 'contain' => ['Billings']\n ];\n\n $customers = $this->Customers\n ->find()\n ->contain(['Billings' => ['sort' => ['done' => 'DESC']]])\n ->distinct('Customers.id')\n ->order(['first_name' => 'ASC', 'last_name' => 'ASC'])\n ->where([\n 'Customers.shops_id' => $permission->shops_id \n ])\n ->matching('Billings', function ($q) use($date) {\n $lDate = new Time($date);\n $rDate = new Time($date);\n return $q->where(function ($exp, $q) {\n return $exp->isNull('billing_date');\n })\n ->orWhere(\n ['billing_date >' => $lDate, 'billing_date <' => $rDate->addDays(1)]\n );\n });\n \n $this->set('Billings', $this->paginate($customers));\n\n if (!empty($customers)) {\n $tmpCustomers = array();\n foreach ($customers as $row) {\n $lastBill = end($row['billings']);\n $tmp = array(\n \"id\" => $row['id'],\n \"shops_id\" => $row['shops_id'],\n \"email\" => $row['email'],\n \"first_name\" => $row['first_name'],\n \"last_name\" => $row['last_name'],\n \"birthday\" => $row['birthday'],\n \"address\" => $row['address'],\n \"telephone\" => $row['telephone'],\n \"avatar\" => $row['avatar'],\n \"favorite\" => $row['favorite'],\n \"last_visit\" => $row['last_visit'],\n \"last_service\" => $row['last_service'],\n \"billings\" => [\n 'id' => $lastBill['id'],\n 'done' => $lastBill['done']\n ]\n );\n\n $tmpCustomers[] = $tmp;\n }\n\n $customers = $tmpCustomers;\n }\n }\n \n\n $this->set(compact('customers'));\n $this->set('_serialize', 'customers');\n }", "public function showBills()\n {\n $warning = \"\";\n $bills = [];\n $COLUMNNAMES = ['bill id', 'company', 'bill is paid', 'company IBAN', 'date received'];\n $user = Auth::user();\n $bills = $this->billService->getBills($user->user_number);\n return view('bills', ['bills' => $bills, 'columns' => $COLUMNNAMES, 'warning' => $warning]);\n }", "public function get_userAvailableBidsViews($user_id){\n\n\t\t$userTypeQuery=\"select jm_profile_type from jm_user_tab where jm_user_id='$user_id'\";\n\n\t\t$userTypeResult=$this->db->query($userTypeQuery);\n\n\t\t$coloumnName = \"avail_bids\";\n\n\t\tforeach ($result->result_array() as $row) {\n\t\t\tif( $row['jm_profil_type']=='1')\n\t\t\t{\n //user is a Freelancer\n\t\t\t\t$coloumnName = \"avail_bids\";\n\n\t\t\t}else if($row['jm_profil_type']=='3')\n\t\t\t{\n //user is a Job Seeker\n\t\t\t\t$coloumnName = \"avail_views\";\n\n\t\t\t}\n\t\t}\n\t\t$query = \"SELECT * FROM jm_user_tab WHERE jm_user_id='$user_id' AND \".$coloumnName.\"> 0\";\n\n\t\t$result = $this->db->query($query);\n\n\t\tif ($result->num_rows() <= 0) {\n\t\t\t\n\t\t\t$response = array(\n\t\t\t\t'status' => 500,\n\t\t\t\t'status_message' => 'You have exceded the available limit');\n\t\t} else {\n\t\t\t$response = array(\n\t\t\t\t'status' => 200,\n\t\t\t\t'status_message' => $result->result_array());\n\t\t}\n\t\treturn $response;\n\t}", "public function render_bookings_per_user($userbookings) {\n $output = html_writer::div(' ');\n $items = array();\n\n foreach ($userbookings as $userid => $options) {\n $items = array();\n\n foreach ($options as $optionid => $user) {\n // if the user is visible in only one booking instance, than show the user otherwise do not show\n if ($user->status[$optionid]->bookingvisible) {\n $bookinginstanceurl = new moodle_url('/mod/booking/view.php', array('id' => $user->status[$optionid]->bookingcmid));\n $bookingcourseurl = new moodle_url('/course/view.php', array('id' => $user->status[$optionid]->courseid));\n $bookinglink = html_writer::link($bookinginstanceurl, $user->status[$optionid]->bookingtitle);\n $courselink = html_writer::link($bookingcourseurl, $user->status[$optionid]->coursename);\n $html = html_writer::span($user->status[$optionid]->bookingoptiontitle . \" $bookinglink. $courselink \" . get_string($user->status[$optionid]->booked, 'booking'));\n $items[] = $html;\n }\n }\n if (!empty($items)) {\n $user = reset($options);\n $output .= html_writer::tag('span', $this->output->user_picture($user) . \" \" . fullname($user)) . \" \";\n $output .= html_writer::link('mailto:' . $user->email, $user->email);\n $output .= html_writer::alist($items);\n }\n }\n\n return $output;\n }", "public function data(User $user)\n {\n return app('datatables')\n ->of(UserBlacklist::where('user_id', $user->id))\n ->editColumn('name', function($userBlacklist) use ($user) {\n if(app('policy')->check('App\\Http\\Controllers\\UserBlacklistsController', 'show', [$userBlacklist->slug])) {\n return link_to_action('UserBlacklistsController@show', $userBlacklist->name, [$user->slug, $userBlacklist->slug]);\n }\n return $userBlacklist->name;\n })\n ->make(true);\n }", "private function fetch_all_bills() {\n\t\t\tglobal $db;\n\t\t\t$db->connectDB(); \n\t\t\t$sql = \"SELECT * \n\t\t\t\t\t\t\tFROM bill_order_make\"; \n\t\t\t$result = $db->executeSQL($sql);\n\t\t\twhile( $row = oci_fetch_array($result, OCI_BOTH)) {\n\t\t\t\t$bid = $row[\"BID\"];\n\t\t\t\t$total = $row[\"TOTAL\"];\n\t\t\t\t$staffid = $row[\"STAFFID\"];\n\t\t\t\t$tableid = $row[\"TABLEID\"];\n\t\t\t\t$billpaid = $row[\"BILLPAID\"];\n\t\t\t\t$bill = new Bill($bid, $total, $staffid, $tableid, $billpaid);\n\t\t\t\t$this->bills[$bid] = $bill;\n\t\t\t}\n\t\t\t$sql = \"SELECT bid, f.fname, nofood, price\n\t\t\t\t\t\t\tFROM fooditem f, processorder p1\n\t\t\t\t\t\t\tWHERE f.fname = p1.fname AND f.fname\n\t\t\t\t\t\t\tIN \n\t\t\t\t\t\t\t(SELECT p2.fname \n\t\t\t\t\t\t\tFROM processorder p2)\";\n\t\t\t$result = $db->executeSQL($sql);\n\t\t\twhile( $row = oci_fetch_array($result, OCI_BOTH)) {\n\t\t\t\t$bid = $row[\"BID\"]; \n\t\t\t\t$food_name= $row[\"FNAME\"];\n\t\t\t\t$food_quantity = $row[\"NOFOOD\"];\n\t\t\t\t$food_price = $row[\"PRICE\"];\n\t\t\t\t$food = new Food($food_name, $food_quantity, $food_price);\n\t\t\t\t$this->bills[$bid]->food_list[] = $food;\t\n\t\t\t}\n\t\t\t\n\t\t\t$db->disconnectDB();\n\n\t\t}", "public function getBillOfLading($request);", "public static function find_current_rentings_by_userid($user)\n {\n $sql = \"SELECT r.* , u.userID, u.user_name, g.name, g.id as gameid, g.image\";\n $sql .=\" FROM Game as g Join Renting as r On g.id = r.gameid Join User as u On u.userID = r.userid\";\n $sql .=\" WHERE g.id=r.gameid AND u.userID = r.userid AND r.returnDate IS NULL AND u.userID=\".$user;\n return self::find_by_sql($sql);\n }", "function get_user_listings( $u_id ){\n\t\t$db = dblogin::dbconnect();\n\t\t\n\t\t$sql = \"SELECT * \n\t\t\t\tFROM Listings\n\t\t\t\tWHERE u_id = '$u_id'\n\t\t\t\tAND deleted = 0\";\n\t\t\t\t\n\t\t$rows = $db->Execute( $sql );\n\t\t$return = $rows->GetRows();\n\t\treturn $return;\n\t}", "public function getBookings(Request $request) {\n\n\n $bookings = Booking::all();\n\n return $this->prepareResult(true, $bookings, [],\"All Bookings\");\n\n }", "public function bill(){\n\t\treturn $this->belongsTo('Bills','bill_id');\n\t}", "public function listBorrow(BookingRepository $bookingRepo)\n {\n $user = $this->getUser();\n $id = $user->getId();\n\n $userbookings = $bookingRepo->findBy(\n ['userBorrower' => $id,]\n );\n\n $userBooks = [];\n\n foreach ($userbookings as $userbooking){\n $userbook = $userbooking->getBook();\n array_push($userBooks, $userbook);\n }\n return $this->json($userBooks, 200, [], ['groups' => '1']);\n }", "public function all_bills(){\n\t\tauthenticate(array('ut10'));\n\t\t$userId = $this->session->userdata(\"userId\");\n\t\t$userTypeId = $this->session->userdata(\"userTypeId\");\n\t\t$data['userData'] = $this->login->getUserProfile($userId);\n\t\t$data['table_header_date'] = 'Date';\n\t\t$data['table_header_amount'] = 'Amount';\n\t\t$data['table_header_description'] = 'Description';\n\t\t$data['table_header_action'] = 'Action';\n\t\t$flag \t= $this->uri->segment(2);\n\t\t$com_id = $this->uri->segment(3);\n\t\tif($data['userData']['can_view_bill'] == 1){\n\t\t\t$data['table_heading'] = 'Invoices';\n\t\t\t$this->db->select('user.*,company.company_name');\n\t\t\t$this->db->from('user');\n\t\t\t$this->db->join('company','company.id=user.company_id');\n\t\t\t$this->db->where(\"user.userTypeId = 'ut4'\");\n\t $this->db->where('user.status', 1);\n\t $this->db->where('user.Isprimary', 1);\n\t $query=$this->db->get();\n\t $temp_ut4 = $query->result_array();\t\n\t $this->db->select('user.*');\n\t\t\t$this->db->from('user');\n\t\t\t$this->db->where(\"user.userTypeId = 'ut11'\");\n\t $this->db->where('user.status', 1);\n\t $this->db->where('user.Isprimary', 1);\n\t $query=$this->db->get();\n\t $temp_ut11_temp = $query->result_array();\n\t $temp_ut11 = array();\n\t foreach ($temp_ut11_temp as $key => $value) {\n\t \t$temp_ut11[] = $value;\n\t \t$temp_ut11[$key]['company_name'] = 'Individual'; \n\t }\n\t $data['userlist'] = array_merge($temp_ut4,$temp_ut11);\n\t\t\tif($com_id != ''){\n\t\t\t\t$company_id = base64_decode(base64_decode($com_id));\n\t\t\t\t$data['invoice'] = $this->invoice_model->getInvoice($company_id,$flag);\n\t\t\t\t$this->load->view(\"all_bills\",$data);\n\t\t\t}else{\n\t\t\t\t$this->load->view(\"user_list\",$data);\n\t\t\t}\n\t\t}else{\n\t\t\texit(\"You are not authorize to access this page\");\n\t\t}\n\t}", "public function getAwardedBountyUsers();", "public function get_bank_by_user($user_id){\n\n\t\t$this->db->where('user_id', $user_id);\n\n\t\t$result = $this->db->get('users_bank_details')->result();\n\t\treturn $result;\n\t}", "public static function sumBill()\n {\n if(Auth::user())\n {\n return \\App\\userBills::sumBillAmount();\n }\n }", "public function getBillingAccountsList(){\n return $this->_get(1);\n }", "public function get_userAvailableBsookmarks($user_id){\n\n\t\t$userTypeQuery=\"select jm_profile_type from jm_user_tab where jm_user_id='$user_id'\";\n\n\t\t$userTypeResult=$this->db->query($userTypeQuery);\n\n\t\t$coloumnName = \"jm_userBookmark\";\n\n\t\tforeach ($result->result_array() as $row) {\n\t\t\tif( $row['jm_profil_type']=='1')\n\t\t\t{\n //user is a Freelancer\n\t\t\t\t$coloumnName = \"jm_userBookmark\";\n\n\t\t\t}else if($row['jm_profil_type']=='3')\n\t\t\t{\n //user is a Job Seeker\n\t\t\t\t$coloumnName = \"jm_jobBookmark\";\n\n\t\t\t}\n\t\t}\n\t\t$query = \"SELECT \".$coloumnName.\" FROM jm_userprofile_tab WHERE jm_user_id='$user_id'\";\n\n\t\t$result = $this->db->query($query);\n\n\t\tforeach ($result->result_array() as $row) {\n\t\t\t$bookmarkCount = count(json_decode($row[$coloumnName],true));\n\t\t}\n\n\t\tif ($bookmarkCount <= 0) {\n\t\t\t\n\t\t\t$response = array(\n\t\t\t\t'status' => 500,\n\t\t\t\t'status_message' => 'You have exceded the available bookmark limit');\n\t\t} else {\n\t\t\t$response = array(\n\t\t\t\t'status' => 200,\n\t\t\t\t'status_message' => $result->result_array());\n\t\t}\n\t\treturn $response;\n\t}", "public function getBookShelfList(UserAccount $user);", "function getUserBills($month,$pdo){\n\t\t\n\t\t$month .= '%';\n\t\t\t\n\t\t$getUserBills =\n\t\t$pdo->prepare('SELECT BillID, BillAmount, BillDesc, BillCategory, BillDate \n\t\t\t\tFROM sm16_bills WHERE UserID = :userid AND BillDate LIKE :month');\n\t\t$getUserBills->execute(array(':userid' => $this->userID,':month' => \"$month\"));\n\t\t$info = $getUserBills->fetchAll(PDO::FETCH_ASSOC);\n\t\n\t\t//this simultaneously saves an array with ids and and array of bills objects\n\t\t// as properties\n\t\t$bills = [];\n\t\t$billIDs = [];\n\t\tforeach ($info as $key => $value) {\n\t\t\t$obj = new Bill($value['BillID'], $value['BillDesc'],\n\t\t\t\t\t$value['BillCategory'], $value['BillAmount'], $value['BillDate']);\n\t\t\tarray_push($bills, $obj);\n\t\t\tarray_push($billIDs,$value['BillID']);\n\t\t}\n\t\n\t\t$this->userBills = $bills;\n\t\t$this->userBillIDs = $billIDs;\n\t}", "public function get_user_proposal_bids($user_id)\r\n\t{\r\n\t\t$this->db->select('P.id as prd_id, P.product_code, P.name, PB.user_bid_amt, PB.bid_date');\r\n\t\t$this->db->from('product_bids PB');\r\n\t\t$this->db->join('products P', 'P.id = PB.product_id');\r\n\t\t$this->db->where('PB.user_id', $user_id);\r\n\t\t$this->db->where('P.status', '2'); // status live\r\n\t\t$query = $this->db->get();\r\n\t\tif($query->num_rows() > 0)\r\n\t\t{\r\n\t\t\t$result = $query->result();\r\n\t\t\t$query->free_result();\r\n\t\t\treturn $result;\r\n\t\t}\r\n\t\treturn FALSE;\r\n\t}", "public function invoice()\n{\n $userId=Session::get('loggeduser');\n\n $bookings= DB::table('bookingmodels')\n \n ->where('bookingmodels.user_id', $userId)\n ->get();\n return view('report', ['bookings'=>$bookings]);\n\n\n}", "static function filledBy(User $user)\n {\n return Drugsheet::whereHas('signers', function ($q) use ($user) {\n $q->where('users.id', $user->id);\n })->orWhereHas('pharmacheckers', function ($q) use ($user) {\n $q->where('users.id', $user->id);\n })->orWhereHas('novacheckers', function ($q) use ($user) {\n $q->where('users.id', $user->id);\n })->get();\n }", "public function get_billing_list( $year, $month, $user_id = 0, $status = 0 ) {\n\t\t$wheres = $this->get_billing_where( $year, $month, $user_id, $status );\n\t\t$query = <<<SQL\n\t\t\tSELECT SUM(total) AS total, object_id, SUM(deducting) AS deducting\n\t\t\tFROM {$this->table}\n\t\t\t{$wheres}\n\t\t\tGROUP BY object_id\n\t\t\tORDER BY total DESC\nSQL;\n\t\treturn $this->get_results( $query );\n\t}", "public function receiptsByBill_get(){\n\n $id = $this->get('id');\n\n if(empty($id)) return $this->response(['error' => 'No se ha informado el ID de la factura cuyos recibos se quiere consultar'], RC::HTTP_BAD_REQUEST);\n\n $receipts = $this->PayReceipt->getReceipts($id);\n return $this->response($receipts, RC::HTTP_OK);\n\n }", "public function bids()\n {\n return $this->hasMany(Bidding::class);\n }", "public static function getPendingUsers() {\n return self::getAll(self::T(DB::ACCOUNT), new DBCond('status', Account::STAT_PENDING));\n }", "public function getVisitBill()\n {\n return $this->hasOne(VisitBilling::className(), ['id' => 'visit_bill_id']);\n }", "public function get($billId)\n\t{\n\t\treturn $this->billPayment->find($billId);\n\t}", "protected function getBorrows($user_id){\n $sql = \"SELECT * FROM books INNER JOIN borrow ON borrow.book_id = books.id WHERE borrow.user_id ='\". $_SESSION[\"userID\"].\"'\";\n $result = $this->connect()->query($sql);\n\n if($result){\n if ($result->num_rows > 0) {\n return $result;\n } else {\n return $result;\n }\n }else{\n return false;\n }\n }", "public function getBookings()\n {\n return $this->hasMany(Booking::className(), ['id_uslugis' => 'id_uslugi']);\n }", "public function billable()\n {\n return $this->belongsTo(Cashier::$customerModel, 'user_id');\n }", "public function bookings()\n {\n return $this->hasMany('App\\Model\\Api\\Bookings', 'participant_id');\n }", "public function getMyRecords($userId)\n\t{\n\t\t$sql = \n\t\t'\n\t\t\tSELECT\n\t\t\t\talert.*,\n\t\t\t\tclass.name\n\t\t\tFROM\n\t\t\t\tclass_user\n\t\t\tLEFT JOIN\n\t\t\t\tclass ON class.id = class_user.class_id\n\t\t\tLEFT JOIN\n\t\t\t\temail_alert_class_set AS alert ON alert.class_id = class_user.class_id AND alert.user_id = class_user.user_id\n\t\t\tWHERE\n\t\t\t\talert.user_id = ' . $userId . '\n\t\t\t\t\tAND\n\t\t\t\tclass_user.status = \\'active\\'\n\t\t';\n\n\t\t$response = self::findBySql($sql)->all();\n\t\tif(isset($response) && $response != null) {\n\t\t\treturn $response;\n\t\t}\n\n\t\treturn NULL;\n\t}", "public function getWithBookings(): array\n {\n return $this->model->with('bookings')->get()->toArray();\n }", "public function get_brands(){\n \n $selected_columns=[\n 'b_id',\n 'username',\n 'b_name',\n 'b_img',\n 'b_description',\n 'b_equipments',\n 'b_aplication'\n ];\n \n // Consulta de marcas\n $response=$this->db->select($selected_columns)\n ->from('brands')\n ->join('users','brands.user_id=users.user_id')\n ->get();\n \n return $response;\n }", "public function getUserBooking($userId)\n {\n $sql = \"SELECT * FROM booking WHERE user_id=:user_id\";\n $statement = $this->pdo->prepare($sql);\n $statement->bindValue('user_id', $userId, \\PDO::PARAM_INT);\n $statement->execute();\n try {\n return $statement->fetchAll();\n } catch (\\PDOException $e) {\n return $e;\n }\n }", "static function getBankAccountNumbers($user)\r\n\t{\r\n\t\tif ( NULL == $user || !$user->isLoaded() )\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\t$bankAccounts = User_X_Bank_Account::fetchAll(array('id_user'=>$user->id));\r\n\t\t\t\r\n\t\tif ( empty($bankAccounts) )\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\treturn $bankAccounts;\t\t\t\r\n\t}", "public function getBookings()\n {\n return $this->hasMany(Bookings::className(), ['rideId' => 'rideId']);\n }", "public static function getBoats() {\n return self::getAll(self::T(DB::BOAT));\n }", "function getAccountingsByUserBetweenDates($userID, $startDate, $endDate) {\n\n $stmt = mysqli_prepare($this->con,\"SELECT * FROM Accounting WHERE UserID = ? AND Date BETWEEN ? AND ? ;\");\n $stmt->bind_param(\"iss\", $userID, $startDate, $endDate);\n $stmt->execute();\n return $stmt->get_result()->fetch_all(MYSQLI_ASSOC);\n }", "public function getUserBidsByID($userID){\n\t\t\n\t\t$userID = mysql_real_escape_string($userID);\n\t\t$sqlQuery =\"SELECT * \";\n\t\t$sqlQuery .=\" FROM bids\";\n\t\t$sqlQuery .=\" WHERE user_id=$userID\";\n\t\t$result =$this->getDbManager()->executeSelectQuery($sqlQuery);\n\t\treturn ($result);\n\t}", "public function bills(): HasMany\n {\n return $this->hasMany(Bill::class);\n }", "public function listBatches()\n {\n $sql = \"select batches.batchID, createTime, createdBy, comment, count(UserName) as numTickets from batch, batches WHERE batches.batchID = batch.batchID GROUP BY batches.batchID\";\n \n $result = $this->db->queryAll($sql);\n \n // Always check that result is not an error\n if (PEAR::isError($result)) {\n ErrorHandling::fatal_db_error('Getting list of batches failed: ', $result);\n }\n \n /*$results = array();\n foreach ($result as $row)\n {\n $results[] = $row[0];\n }*/\n \n return $result;\n }", "public function getAll($user){\n\t\treturn $this->pushCriteria($user)\n\t\t\t\t\t->get();\n\n\t}", "public function getAll($user){\n\t\treturn $this->pushCriteria($user)\n\t\t\t\t\t->get();\n\n\t}", "public function getBanEntry(User $user)\n {\n $q = $this->sql(\n 'SELECT ' . static::$TABLE_BAN_CHAMPS . ' \n FROM ' . static::$TABLE_BAN_NAME . ' \n WHERE idUser = :idUser AND isActive = 1', \n [':idUser' => $user->getId()]\n );\n return $q->fetch();\n }", "public function getAllBooking(){\n return $this->bookingRequest->getAllBooking();\n }", "public function getBillDetails()\n {\n $bill = new BillModel('http://safe-plains-5453.herokuapp.com/bill.json');\n print $this->returnJson($bill->getBill('bill.json'));\n }", "public static function getAllPendingUsers () {\n $users = DB::table('pending_users')->get();\n return $users;\n }", "public function getBillItems() {\n\t\t// = 0.46 + 0.46\n\t\treturn [new InvoiceCestTestModelPayableItemWithDiscount, new InvoiceCestTestModelPayableItemWithDiscount];\n\t}", "public function billable()\n {\n return $this->belongsTo(Config::get('billing.billable_model'));\n }", "public function getUserLineItems(User $user) {\n\t\t/* Yes we could join and do it all at once etc, but right now \n\t\t * it's not really that important and I'm not going to bother \n\t\t * caring that much right now, n+1 here I come. (mmmm prototype)\n\t\t */\n\t\t$accounts = $this->db->where(new Account(), 'user_id', $user->id);\n\t\t$lineItems = array();\n\t\tforeach ($accounts as $account) {\n\t\t\t$lineItems = array_merge($lineItems, $this->getAccountLineItems($account));\n\t\t}\n\n\t\treturn $lineItems;\n\t}", "public function testBills()\n {\n $this->visit('/auth/login')\n ->type('test@test.nl', 'email')\n ->type('test', 'password')\n ->press(\"Login\");\n $user = Auth::user();\n $bill = DB::table('bills')->select()->where('user_id', $user->id)->get()[0];\n\n $this->assertNotNull(Auth::user());\n $this->visit('/bills')\n ->see('Bills')\n ->see($bill->id)\n ->see($bill->user_id)\n ->see($bill->company)\n ->see($bill->paid)\n ->see($bill->date_received);\n }", "public static function getBiller( $biller_id )\n {\n $method = 'GET';\n $nonce = ISW::nonce();\n $url = ISW::url() . \"/billers/$biller_id/paymentitems\";\n $encodedUrl = urlencode($url);\n $timestamp = time();\n $signature = ISW::signature($method, $encodedUrl, $nonce);\n\n\n $authorization = ISW::authorization();\n\n $headers = [\n 'Content-Type' => 'application/json',\n 'Authorization' => $authorization,\n 'Signature' => $signature,\n 'Timestamp' => $timestamp,\n 'Nonce' => $nonce,\n 'SignatureMethod' => ISW::$signatureMethod,\n 'TerminalID' => ISW::terminalID()\n ];\n\n $res = self::client()->request($method, $url, [\n 'headers' => $headers\n ]);\n\n if ( $res->getStatusCode() == 200 ) {\n $data = json_decode($res->getBody()->getContents(), true);\n\n\n return ['success' => true, 'data' => $data];\n }\n\n return ['success' => false, 'message' => 'Error getting billers'];\n }", "public function listData($userId)\n {\n $isAdmin = Auth::user()->hasRole('admin');\n\n $bonuses = $this->userService->userRepository->getBonusesScope($isAdmin, Auth::id(), $userId);\n\n return Datatables::of($bonuses)\n ->addColumn('action', function ($bonus) use ($userId, $isAdmin) {\n if ($isAdmin) {\n return $this->bonusService->dataTableControllers($userId, $bonus);\n }\n //Otherwise no actions\n return '-';\n })->editColumn('created_at', function ($bonuses) {\n //Change the Format of report date\n return date('d M Y', strtotime($bonuses->created_at));\n })->make();\n }", "public function show(User $user)\n\t{\n\t \n\t\t$user_billings = $this->userbilling_gestion->all($user->id);\n\t\t\n\t\t$user_subscriptions = UserSubscription::with('plan')->where('user_id', $user->id)->get();\n\t\t\n\t\t$user_transactions = UserTransaction::with('plan')->where('user_id', $user->id)->get();\n\t\n\t\treturn view('back.users.show', compact('user','user_billings','user_subscriptions','user_transactions'));\n\t}", "private function getAllByUser(){\n $query = Db::makeQuery(\"select\", array($this->t), array(), \"{$this->tUser} = {$this->user->getId()}\");\n $rows = Db::query($query);\n foreach ($rows as $row){\n $newEl = new TelecommUserSpendingLog($row);\n if(self::$sumSpentPoins == null){\n self::$sumSpentPoins = 0;\n }\n self::$sumSpentPoins += $newEl->getPointsSpent();\n array_push(self::$list, $newEl );\n }\n }", "public function index(User $user)\n {\n return response()->json($user->waterReadings, 200);\n }", "public function get()\n {\n $service_availability = $this->compareServiceAndResources();\n $booking_obj = new Booking();\n $bookings = $booking_obj->parseBookingsDates($this->service_bookings);\n return $this->compareServiceAvailabilityAndBookings($service_availability, $bookings);\n }", "public function bookings()\n {\n return $this->hasMany(Booking::class);\n }", "public function getBillings(){\r\n\t\t$clinic_id = $this->session->userdata('clinic_id');\r\n\t\t$start = $_POST['startDate'];\r\n\t\t$end = $_POST['endDate'];\r\n\t\tif($start==$end){\r\n\t\t\t$cond = \"where b.clinic_id=\".$clinic_id.\" and b.created_date_time LIKE '\".$start.\"%'\";\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$cond = \"where b.clinic_id=\".$clinic_id.\" and (b.created_date_time BETWEEN '\".$start.\"%' and '\".$end.\"%')\";\t\t\t\r\n\t\t}\r\n\t\t$billing = $this->db->query(\"SELECT b.*,p.first_name as pname,p.umr_no,b.billing_type,c.clinic_name,sum(bi.amount) as bamount\r\n\t\t\tFROM `billing` b\r\n\t\t\tleft join billing_line_items bi on b.billing_id=bi.billing_id\r\n\t\t\tleft join patients p on p.patient_id=b.patient_id\r\n\t\t\tleft join clinics c on c.clinic_id = b.clinic_id \".$cond.\" and b.status!=0\r\n\t\t\tgroup by bi.billing_id order by b.billing_id desc\")->result();\r\n\t\t$i=1; \r\n foreach ($billing as $value) { \r\n $discount = $value->discount;\r\n $discount_unit = $value->discount_unit;\r\n $total_amount = $value->total_amount;\r\n $disc = $discount.\"%\";\r\n ?> \r\n <tr>\r\n <td><?php echo $i++;?></td>\r\n <td><?php echo date(\"d-m-Y\",strtotime($value->created_date_time));?></td>\r\n <td><?php echo ucwords($value->pname.\" \".$value->lname).\" [\".$value->umr_no.\"]\".'<br>'.$value->mobile; ?></td> \r\n <td><?php echo $value->billing_type; ?></td>\r\n <td><i class=\"fas fa-rupee-sign\"></i> \r\n <?php \r\n if($discount_unit==\"INR\")\r\n {\r\n echo $total_amount-$discount;\r\n }\r\n else\r\n {\r\n echo $total_amount-(($disc/100)*$total_amount);\r\n }\r\n ?></td> \r\n <td>\r\n <a href=\"<?php echo base_url('billing/view_order/'.$value->billing_id);?>\"><i class=\"fa fa-eye\"></i></a>&nbsp;\r\n <a href=\"<?php echo base_url('patients/print_invoice/'.$value->appointment_id.'/'.$value->billing_id);?>\"><i class=\"fas fa-print\"></i></a>\r\n </td> \r\n </tr>\r\n <?php }\r\n\t}", "public static function getUserPayments(user $user, int $page, int $limit = 32)\n\t{\n\t\tglobal $ff_sql;\n\t\t// TODO: Update this to be more efficient, using LIMIT for pages is idiotic & slow.\n\t\t$offset = $page * $limit;\n\t\treturn $ff_sql->query_fetch_all(\"\n\t\t\tSELECT\n\t\t\t\t`id`,\n\t\t\t\t`status`,\n\t\t\t\t`user_id`,\n\t\t\t\t`date`,\n\t\t\t\t`affiliate_id`,\n\t\t\t\t`coupon_id`,\n\t\t\t\t`payments_state_id`,\n\t\t\t\t`currency`,\n\t\t\t\t`gross`,\n\t\t\t\t`fee`,\n\t\t\t\t`gateway_name`,\n\t\t\t\t`gateway_info`\n\t\t\tFROM `payments`\n\t\t\tWHERE\n\t\t\t\t`user_id` = \". $ff_sql->quote($user->getId()) .\"\n\t\t\tORDER BY `id` DESC\n\t\t\tLIMIT {$offset}, {$limit}\n\t\t\", [\n\t\t\t'id' => 'int',\n\t\t\t'status' => 'int',\n\t\t\t'user_id' => 'int',\n\t\t\t'date' => 'int',\n\t\t\t'affiliate_id' => 'int',\n\t\t\t'coupon_id' => 'int',\n\t\t\t'payments_state_id' => 'int',\n\t\t\t'gross' => 'float',\n\t\t\t'fee' => 'float',\n\t\t]);\n\t}", "public function index() {\n return Home::find(Auth::user())->bills;\n }", "public function getUnencodedBills($username, $userpass)\r\n {\r\n\r\n\r\n $user_id = SignUserIn($username, $userpass);\r\n\r\n if ($user_id != 0) {\r\n // Create connection\r\n $conn = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);\r\n // Check connection\r\n if ($conn->connect_error) {\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n }\r\n\r\n $sql = \"SELECT * FROM UserBills WHERE user_id = '{$user_id}'\";\r\n $result = $conn->query($sql);\r\n\r\n if ($result->num_rows > 0) {\r\n $rows = [];\r\n $counter = 0;\r\n // output data of each row\r\n while ($row = $result->fetch_assoc()) {\r\n $rows[] = $row;\r\n }\r\n } else {\r\n echo \"0 results\";\r\n }\r\n\r\n $conn->close();\r\n\r\n return $rows; // returns array of objects\r\n\r\n\r\n } else { // logged in failed\r\n return array(\r\n 'Error' => 'Logging in failed user id:' . $user_id . 'username: ' . $username . 'userpass: ' . $userpass,\r\n );\r\n }\r\n\r\n\r\n }", "public function blockedBy() {\n return $this->hasMany('App\\Block', 'blocked_user');\n }" ]
[ "0.7237961", "0.6654736", "0.65813595", "0.6553327", "0.6429992", "0.6379045", "0.63158554", "0.6217433", "0.6195118", "0.6189279", "0.61776423", "0.60486245", "0.60151774", "0.6009651", "0.60032", "0.5964814", "0.5928166", "0.5774118", "0.57664037", "0.5697124", "0.5633089", "0.56271815", "0.56271815", "0.5622107", "0.56170607", "0.56127644", "0.56056", "0.55934757", "0.5575885", "0.5572347", "0.5567443", "0.5566373", "0.5561875", "0.5524721", "0.55246586", "0.5518734", "0.55090356", "0.54920566", "0.54918057", "0.54839814", "0.54726475", "0.54720163", "0.54610336", "0.54574704", "0.5452797", "0.54496765", "0.5446013", "0.5429101", "0.54285467", "0.54275465", "0.54237056", "0.5418724", "0.54179657", "0.54110223", "0.5409534", "0.5404731", "0.5396786", "0.53950024", "0.53731453", "0.53678083", "0.53653884", "0.5364875", "0.5347075", "0.5340012", "0.53254277", "0.5320625", "0.5304494", "0.5287681", "0.52794635", "0.5265826", "0.5265333", "0.52568626", "0.52521247", "0.5245281", "0.52345085", "0.5234442", "0.52316916", "0.52273583", "0.52186716", "0.52186716", "0.5213464", "0.5204688", "0.5196714", "0.5193195", "0.5190258", "0.5185552", "0.5169931", "0.51648337", "0.51591164", "0.51556844", "0.51545787", "0.51533926", "0.51435804", "0.5138091", "0.5136678", "0.5134731", "0.51297456", "0.5129576", "0.51252675", "0.5118678" ]
0.7850565
0
Creates a shopware Connect customer group this can be used by the shop owner to manage the Connect product prices Logic is very simple here if a group with the key 'SC' already exists, no new group is created
Создает группу клиентов Connect Shopware, которую можно использовать владельцем магазина для управления ценами на товары Connect. Логика здесь очень простая: если группа с ключом 'SC' уже существует, новая группа не создается.
public function createConnectCustomerGroup() { $connectGroupAttributeId = $this->getConnectCustomerGroupId(); if (!$this->connectCustomerGroupExists($connectGroupAttributeId)) { // Create Customer Group $this->db->insert( 's_core_customergroups', [ 'groupkey' => $this->getAvailableCustomerGroupName(), 'description' => 'SC export', 'tax' => 0, 'taxinput' => 0, 'mode' => 0 ] ); $customerGroupID = $this->db->fetchOne('SELECT MAX(id) FROM s_core_customergroups'); // Create Customer Group Attributes $this->db->insert( 's_core_customergroups_attributes', [ 'customerGroupID' => $customerGroupID, 'connect_group' => 1 ] ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createGroup();", "public function create_group($name);", "public function createGroup(array $group_data);", "public function createGroup() {\n\t\treturn $this->objectManager->get('Tx_Sfsvgapi_Domain_Model_Group');\n\t}", "public function testCreateGroupSoap()\n {\n $this->_markTestAsSoapOnly();\n\n $serviceInfo = [\n 'soap' => [\n 'service' => self::SERVICE_NAME,\n 'serviceVersion' => self::SERVICE_VERSION,\n 'operation' => 'customerGroupRepositoryV1Save',\n ],\n ];\n\n $groupData = [\n CustomerGroup::ID => null,\n CustomerGroup::CODE => 'Create Group SOAP',\n 'taxClassId' => 3,\n ];\n $requestData = ['group' => $groupData];\n\n $groupId = $this->_webApiCall($serviceInfo, $requestData)[CustomerGroup::ID];\n $this->assertNotNull($groupId);\n\n $newGroup = $this->groupRepository->getById($groupId);\n $this->assertEquals($groupId, $newGroup->getId(), \"The group id does not match.\");\n $this->assertEquals($groupData[CustomerGroup::CODE], $newGroup->getCode(), \"The group code does not match.\");\n $this->assertEquals(\n $groupData['taxClassId'],\n $newGroup->getTaxClassId(),\n \"The group tax class id does not match.\"\n );\n }", "public function post()\n {\n return \"/V1/customerGroups\";\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n \"name\" => \"required|unique:customer_groups|max:255\",\n ],[\n 'name.required' => 'Group name is required',\n ]);\n\n $customer_group = new CustomerGroup;\n\n $customer_group->name = $request-> name;\n $customer_group->description = ($request-> description) ? $request-> description : '' ;\n $customer_group->status = $this -> status;\n $customer_group->save();\n\n \n $request->session()->flash('success', \"New group inserted successfully\");\n return back();\n // return Redirect::back();\n \n }", "protected function installGroup()\n {\n $result = DB::getInstance()->getRow('SELECT id_group FROM ' . _DB_PREFIX_ . 'group_lang WHERE name LIKE \"Pro\"');\n if (!$result) {\n $Group = new Group(null, $this->context->language->id);\n $Group->name = 'Pro';\n $Group->price_display_method = 0;\n $Group->show_prices = 1;\n $Group->add();\n $this->LkIdGroup = $Group->id;\n } else {\n $this->LkIdGroup = $result['id_group'];\n }\n return true;\n }", "public function create()\n\t{\n\t\treturn view('admin.product-group.create');\n\t}", "public function createGroup($name,$catagory){\n return Group::create([\n 'user_id' => Auth::id(),\n 'name' => $name,\n 'catagory' => $catagory\n ]);\n }", "public function testCreateGroup()\n {\n $attributes['objectCategory'] = 'CN=Group,CN=Schema,CN=Configuration,DC=example,DC=com';\n $attributes['sAMAccountType'] = 268435456;\n $attributes['objectClass'][0] = 'mstop';\n $attributes['objectClass'][1] = 'customActiveDirectoryGroup';\n $attributes['objectSID'] = sprintf('%04X%04X-%04X-%04X-%04X-%04X%04X%04X', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(16384, 20479), mt_rand(32768, 49151), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535));\n\n $group = adtools\\Group::create($this->adtools->ldap, 'created-group', 'OU=adtools-test,OU=Test,DC=example,DC=com', $attributes);\n $this->assertInstanceOf(adtools\\Group::class, $group);\n $group->member_add('CN=user3,OU=Users,OU=adtools-test,OU=Test,DC=example,DC=com');\n $this->assertTrue($group->has_member('CN=user3,OU=Users,OU=adtools-test,OU=Test,DC=example,DC=com'));\n }", "public function store(CustomerGroupRequest $request)\n {\n try {\n $data = $request->all();\n CustomerGroup::create($data);\n\n return $this->success(null,'Tax Created.',201);\n } catch (\\Exception $e) {\n return $this->error(\"{$e->getMessage()} at {$e->getFile()} in {$e->getLine()}\",500);\n }\n\n }", "public function create()\n {\n\n // retrieve data\n $get_data = $this->http->data('GET');\n $post_data = $this->http->data('POST');\n\n // allow only method POST\n if ($this->http->method() != 'POST') {\n\n $this->tokenInvalid();\n return;\n }\n\n // validate token\n if ($this->user->isTokenValid($get_data['token'])) {\n\n $this->model->load('account/group');\n if ($this->model->group->countGroup($post_data['name'])) {\n\n $this->json->sendBack([\n 'success' => false,\n 'message' => 'group name already exists'\n ]);\n\n return;\n }\n\n $num_rows = $this->model->group->newGroup($post_data);\n $this->json->sendBack([\n 'success' => true,\n 'affected_rows' => $num_rows\n ]);\n\n return;\n }\n\n $this->tokenInvalid();\n }", "public function creaGruppo($newGroup)\n {\n\t\tif ( ! is_object($this->soapClient)) { \n return false;\n }\n\t\ttry {\n\t\t\t$this->soapClient->CreateGroup($newGroup);\n\t\t\t$this->printLastRequest();\n\t\t\t$this->printLastResponse();\n\t\t\t$returnCode = $this->readReturnCode('CreateGroup', 'ReturnCode');\n if ($this->_config()->isLogEnabled($this->storeId)) { \n $this->_config()->dbLog(sprintf(\n \"Mailup: Create a new Group [%s] [List:%s] [%s]\",\n $newGroup['newGroupName'],\n $newGroup['listGUID'],\n $returnCode\n ));\n }\n return $returnCode;\n\t\t} \n catch (SoapFault $soapFault) {\n\t\t\tMage::log('SOAP error', 0);\n\t\t\tMage::log($soapFault, 0);\n\t\t}\n\t}", "public function customerGroup(CustomerGroup $customerGroup);", "public function testCreateGroupDuplicateGroupSoap()\n {\n $this->_markTestAsSoapOnly();\n $group = $this->customerGroupFactory->create();\n $duplicateGroupCode = 'Duplicate Group Code SOAP';\n\n $group->setId(null);\n $group->setCode($duplicateGroupCode);\n $group->setTaxClassId(3);\n $this->createGroup($group);\n\n $serviceInfo = [\n 'soap' => [\n 'service' => self::SERVICE_NAME,\n 'serviceVersion' => self::SERVICE_VERSION,\n 'operation' => 'customerGroupRepositoryV1Save',\n ],\n ];\n\n $groupData = [\n CustomerGroup::ID => null,\n CustomerGroup::CODE => $duplicateGroupCode,\n 'taxClassId' => 3,\n ];\n $requestData = ['group' => $groupData];\n\n $expectedMessage = 'Customer Group already exists.';\n\n try {\n $this->_webApiCall($serviceInfo, $requestData);\n $this->fail(\"Expected exception\");\n } catch (\\SoapFault $e) {\n $this->assertStringContainsString(\n $expectedMessage,\n $e->getMessage(),\n \"Exception does not contain expected message.\"\n );\n }\n }", "public static function createGroup(string $storeCode, string $groupName, string $type=null, array $groups=[]);", "function flagpole_create_group() {\n\t$validation = array();\n\t$validation['group-nonce'] = check_admin_referer( 'register-group' );\n\t$validation['group-key'] = ( ! empty( $_GET['group-key'] ) ? sanitize_text_field( wp_unslash( $_GET['group-key'] ) ) : false );\n\t$validation['group-name'] = ( ! empty( $_GET['group-name'] ) ? sanitize_text_field( wp_unslash( $_GET['group-name'] ) ) : false );\n\t$validation['group-desc'] = ( ! empty( $_GET['group-description'] ) ? sanitize_textarea_field( wp_unslash( $_GET['group-description'] ) ) : '' );\n\t$validation['group-private'] = ( ! empty( $_GET['group-private'] ) ? sanitize_textarea_field( wp_unslash( $_GET['group-private'] ) ) : false );\n\n\t$validation = array_filter( $validation );\n\n\tif ( $validation ) {\n\t\t$result = Flagpole::init()->create_group( $validation['group-key'], $validation['group-name'],\n\t\t\t$validation['group-desc'], $validation['group-private'] );\n\n\t\tflagpole_operation_redirect( $result );\n\t}\n}", "function create_group($name)\n {\n /* empty for address books don't supporting groups */\n return false;\n }", "public function actionCreate()\n\t{\n\t\t$model=new Productgroups;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t$model->tx2=\"00\";\n\n\t\tif(isset($_POST['Productgroups']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Productgroups'];\n\t\t\t\n\t\t\tif(!empty($model->tx1) && !empty($model->tx2)){\n\t\t\t\t$model->tax=$model->tx1.\".\".$model->tx2;\n\t\t\t}\n\t\t\t\n\t\t\tif(!empty($model->reduce1) && !empty($model->reduce2)){\n\t\t\t\t$model->dealersreduction=$model->reduce1.\".\".$model->reduce2;\n\t\t\t}\n\t\t\t$model->companyID=Yii::app()->user->getState(\"companyID\");\n\t\t\t$model->worldID=Yii::app()->user->getState(\"worldID\");\n\t\t\t$model->deleted=1;\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('index'));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function created(Group $group)\n {\n // Create Stringee Group\n $stringeePcc = new StringeePccUserApi(tenancy()->tenant);\n $stringeeGroup = $stringeePcc->createGroup($group->name);\n\n // If create success\n if($stringeeGroup['r'] == 0) {\n //Update user\n $group->provider_group_id = $stringeeGroup['groupID'];\n $group->save();\n }\n }", "public function create_new_organisation(){\n\n\t $organisationManager = new OrganisationManager();\n\n\n\t $title = (isset($_POST['cie_group_name']))? $_POST['cie_group_name'] : false;\n\n\t if( $title ){\n\t\t $organisation = $organisationManager->create( $title );\n\n\t\t if( is_wp_error($organisation) ){\n\t\t\t $message = __( 'Failed to create the new Organisation.', '' );\n\t\t\t $this->display_admin_error( $message );\n }\n }\n\t}", "public function store(CreateCompetency_GroupRequest $request)\n {\n $input = $request->all();\n\n $competencyGroup = $this->competencyGroupRepository->create($input);\n\n Flash::success('Competency Group saved successfully.');\n\n return redirect(route('competencyGroups.index'));\n }", "public function testGroupCreation()\n {\n $groupName=uniqid(null, true);\n $groupType=uniqid(null, true);\n $groupCompanyId=1;\n\n $group = new Groups();\n $group->name=$groupName;\n $group->type=$groupType;\n $group->company_id=$groupCompanyId;\n $group->save();\n\n $groupSaved = Groups::findFirst(\"id=$group->id\");\n\n $this->assertEquals(\n $groupSaved->name,\n $groupName\n );\n\n $this->assertEquals(\n $groupSaved->type,\n $groupType\n );\n\n $this->assertEquals(\n $groupSaved->company_id,\n $groupCompanyId\n );\n }", "public function action_create() \n\t{\n\t\t// Check login status else redirect to login page\n\t\tAlpaca::logged_in();\n\t\t\n\t\t$title = __('Create Category/Group');\n\n\t\t$auth_user = $this->auth->get_user();\n\t\tif ($auth_user->has_role('admin'))\n\t\t{\n\t\t\tif ($_POST)\n\t\t\t{\n\t\t\t\tif ($_POST['level'] != '0')\n\t\t\t\t{\n\t\t\t\t\t$_POST['parent_id'] = $_POST['level'];\n\t\t\t\t\t$_POST['level'] = 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$group = ORM::factory('group')->values($_POST);\n\t\t\t\t\n\t\t\t\tif ($group->check())\n\t\t\t\t{\n\t\t\t\t\t$group->save();\n\t\t\t\t\t\n\t\t\t\t\techo 'Save successful!';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$errors =$group->validate()->errors('validate');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->head->title->prepend($title);\n\t\t\t$this->template->content = View::factory('group/create')\n\t\t\t\t->bind('title', $title)\n\t\t\t\t->set('groups', ORM::factory('group')->where('level', '=', 0)->find_all())\n\t\t\t\t->bind('errors', $errors);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->template->content = Alpaca::error_page($title, $content);\n\t\t\t\n\t\t\t$content = __('Not enough permission to perform this operation.');\n\t\t}\n\t}", "public function store(StoreProductGroupRequest $request)\n {\n return ProductGroup::create($request->all());\n }", "public function create(Request $request)\n {\n if (!$request->cate_id) exit();\n if (!$request->name) return $this->message(1, '名称不能为空');\n $group = new Group();\n $group->name = $request->name;\n if ($request->difficulty) $group->difficulty = $request->difficulty;\n if ($request->pre_group_id) $group->pre_group_id = $request->pre_group_id;\n if ($request->pass) $group->pass = $request->pass;\n if ($request->mark) $group->mark = $request->mark;\n $group->save();\n $cate_group = new CategoryGroup();\n $cate_group->category_id = $request->cate_id;\n $cate_group->group_id = $group->id;\n if ($request->sort) $cate_group->sort = $request->sort;\n if ($request->career_id) $cate_group->career_id = $request->career_id;\n if ($request->start_time) $cate_group->start_time = $request->start_time;\n if ($request->expire_time) $cate_group->expire_time = $request->expire_time;\n $cate_group->save();\n Log::info('添加关卡', ['group' => json_decode(json_encode($group), true), 'cate_group' => json_decode(json_encode($cate_group), true)]);\n return $this->message(0);\n }", "public function store()\n\t{\n\t\t// $input = Input::except('_token');\n\t\t// $rules = array(\n\t\t// \t'name' => 'required',\n\t\t// );\n\t\t// $validator = Validator::make($input,$rules);\n\t\t// if($validator->fails()) {\n\t\t// \treturn Redirect::action('CustomerController@create')\n\t\t// \t\t->withErrors($validator);\n\t\t// }else{\n\t\t// \t$inputGroup = [\n\t\t// \t\t'pro'=> $input['pro'],\n\t\t// \t\t'code' => $input['code'],\n\t\t// \t\t'price_policy' => $input['price_policy'],\n\t\t// \t];\n\t\t// \tGroupCustomer::create($inputGroup);\n\t\t// \treturn Redirect::action('CustomerController@index');\n\t\t}", "public function actionCreate()\n {\n $model = new KidGroup();\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->save()) {\n Yii::$app->session->setFlash('success', Yii::t('kid', 'Create successful'));\n return $this->redirect(['index']);\n } else {\n Yii::$app->session->setFlash('danger', Yii::t('kid', 'Create failed'));\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public static function CreateDefault()\n {\n $group = new MTConGroup();\n //---\n $group->PermissionsFlags = MTEnPermissionsFlags::PERMISSION_ENABLE_CONNECTION;\n $group->AuthMode = MTEnAuthMode::AUTH_STANDARD;\n $group->AuthPasswordMin = 7;\n $group->ReportsMode = MTEnReportsMode::REPORTS_DISABLED;\n $group->ReportsFlags = MTEnReportsFlags::REPORTSFLAGS_NONE;\n $group->Currency = \"USD\";\n $group->CurrencyDigits = 2;\n $group->NewsMode = MTEnNewsMode::NEWS_MODE_FULL;\n $group->MailMode = MTEnMailMode::MAIL_MODE_FULL;\n $group->MarginFreeMode = MTEnFreeMarginMode::FREE_MARGIN_USE_PL;\n $group->MarginCall = 50;\n $group->MarginStopOut = 30;\n $group->MarginSOMode = MTEnStopOutMode::STOPOUT_PERCENT;\n $group->TradeVirtualCredit = 0;\n $group->MarginFreeProfitMode = MTEnMarginFreeProfitMode::FREE_MARGIN_PROFIT_PL;\n $group->DemoLeverage = 0;\n $group->DemoDeposit = 0;\n $group->LimitSymbols = 0;\n $group->LimitOrders = 0;\n $group->LimitHistory = MTEnHistoryLimit::TRADE_HISTORY_ALL;\n $group->TradeInterestrate = 0;\n $group->TradeFlags = MTEnGroupTradeFlags::TRADEFLAGS_ALL;\n //---\n return $group;\n }", "function create_group($name, $description, $owner) {\n\t$name = str_ireplace('wepay', 'WP', $name);\n\t$params = array('name' => $name,\n\t\t\t\t\t'description' => $description);\n\t$response = send_api_request('group/create', $params, $owner);\n\treturn (!empty($response->result) ? $response->result : false);\n}", "public function createGroup($data){\n\n // check group is already exists or not \n \n $groupDetails = $this->mongoGroupsObject->find([ 'name' => $data['name']]);\n \n // create new group if not exists\n if( count($groupDetails) < 1 ){\n $createGroupResult = $this->mongoGroupsObject->insertOne([\n 'name' => $data['name'],\n 'type' => $data['type'],\n // 'members' => array of objects\n 'PSBId' => $data['PSBId'],\n 'description' => $data['description'],\n 'passwordResetRequest' => $data['passwordResetRequest'],\n 'createdAt' => $data['createdAt'],\n 'createdBy' => $data['createdBy'],\n 'updatedAt' => $data['updatedAt'],\n 'updatedBy' => $data['updatedBy'],\n 'status' => $data['status'],\n 'settings' => $data['settings'],\n 'version' => $data['version'],\n ]);\n return true;\n }else{\n // group already exists\n $this->resultArray['isSuccess'] = false;\n $this->resultArray['message'] = \"Group \".$data['name'].\" is already exists\";\n }\n\n return $this->resultArray;\n\n\t // $header = array(\"Auth:EISecret\");\n\t\t// curl_setopt_array($curl, array(\n\t\t// \t\t\t\t\t\t\tCURLOPT_URL => $this->upgradeConfig['CreateGroup'],\n\t\t// \t\t\t\t\t\t\tCURLOPT_RETURNTRANSFER => true,\n\t\t// \t\t\t\t\t\t\tCURLOPT_ENCODING => \"\",\n\t\t// \t\t\t\t\t\t\tCURLOPT_MAXREDIRS => 10,\n\t\t// \t\t\t\t\t\t\tCURLOPT_TIMEOUT => 30,\n\t\t// \t\t\t\t\t\t\tCURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\t\t// \t\t\t\t\t\t\tCURLOPT_CUSTOMREQUEST => \"POST\",\n\t\t// \t\t\t\t\t\t\tCURLOPT_POSTFIELDS => $data,\n\t\t// \t\t\t\t\t\t\tCURLOPT_HTTPHEADER => $header,\n\t\t// \t\t\t\t\t\t)\n\t\t// \t\t\t\t);\n\t\t// $response = curl_exec($curl);\n\t\t// $err = curl_error($curl);\n\t\t// curl_close($curl);\n\t\t// if(!$err){\n\t\t// \t$jsonData = json_decode($response, true);\n\t\t// \t$return = array(\"result\" => \"success\", \"data\" => $jsonData['data']);\n\t\t// \terror_log(json_encode($jsonData));\n\t\t// \treturn $return;\n\t\t// }\n\t}", "public static function init(CustomerGroup $group): self\n {\n return new self(new CreateCustomerGroupRequest($group));\n }", "public function testCreateGroupDuplicateGroupRest()\n {\n $this->_markTestAsRestOnly();\n\n $duplicateGroupCode = 'Duplicate Group Code REST';\n\n $group = $this->customerGroupFactory->create();\n $group->setId(null);\n $group->setCode($duplicateGroupCode);\n $group->setTaxClassId(3);\n $this->createGroup($group);\n\n $serviceInfo = [\n 'rest' => [\n 'resourcePath' => self::RESOURCE_PATH,\n 'httpMethod' => \\Magento\\Framework\\Webapi\\Rest\\Request::HTTP_METHOD_POST,\n ],\n ];\n\n $groupData = [\n CustomerGroup::ID => null,\n CustomerGroup::CODE => $duplicateGroupCode,\n CustomerGroup::TAX_CLASS_ID => 3,\n ];\n $requestData = ['group' => $groupData];\n\n try {\n $this->_webApiCall($serviceInfo, $requestData);\n $this->fail(\"Expected exception\");\n } catch (\\Exception $e) {\n $errorData = json_decode($e->getMessage(), true);\n\n $this->assertEquals(\n 'Customer Group already exists.',\n $errorData['message']\n );\n $this->assertEquals(400, $e->getCode(), 'Invalid HTTP code');\n }\n }", "function create_shared_group($group_short_name, $group_full_name);", "function make_course_group(){\n \tglobal $COURSE;\n\n\t\tif (!$this->has_course_group()){\n\t\t\t$groupobj->courseid = $COURSE->id;\n\t\t\t$groupobj->name = $COURSE->shortname;\n\t\t\t$groupobj->description = get_string('fullcourse', 'block_course_ascendants');\n\t\t\t$groupobj->timecreated = time();\n\t\t\t$groupobj->timemodified = time();\n\t\t\t$fullgroupid = $DB->insert_record('groups', $groupobj);\n\t\t}\n }", "function addGroup(){\n\t\t$this->groups[] = new we_newsletter_group();\n\t}", "public function create_group()\n\t{\n\t\t$this->data['title'] = $this->lang->line('create_group_title');\n\n\t\tif (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())\n\t\t{\n\t\t\tredirect('settings/change/', 'refresh');\n\t\t}\n\n\t\t// validate form input\n\t\t$this->form_validation->set_rules('group_name', $this->lang->line('create_group_validation_name_label'), 'trim|required|alpha_dash');\n\n\t\tif ($this->form_validation->run() === TRUE)\n\t\t{\n\t\t\t$new_group_id = $this->ion_auth->create_group($this->input->post('group_name'), $this->input->post('description'));\n\t\t\tif ($new_group_id)\n\t\t\t{\n\t\t\t\t// check to see if we are creating the group\n\t\t\t\t// redirect them back to the admin page\n\t\t\t\t$this->session->set_flashdata('messagePr', $this->ion_auth->messages());\n\t\t\t\tredirect(\"settings/change/\", 'refresh');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// display the create group form\n\t\t\t// set the flash data error message if there is one\n\t\t\t$data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n\t\t\t$this->load->view('admin/include/header');\n\t\t\t$this->load->view('admin/settings', $data);\n\t\t\t$this->load->view('admin/include/footer');\n\t\t}\n\t}", "public function createAction()\n {\n $group = new GroupSport($_POST);\n $usersGroups = new UsersGroups();\n\n if ($group->save($this->user->userName)) {\n $usersGroups->save($this->user->userName, $group->groupName);\n $usersGroups->acceptRequest($group->groupName, $this->user->userName);\n Flash::addMessage('Group was successfuly created', Flash::SUCCESS);\n\n $_SESSION['groupNameToDisplay'] = $group->groupName;\n $this->redirect('/Group/groupPage');\n\n } else {\n\n View::renderTemplate('Group/new.html', [\n 'user' => $user\n ]);\n }\n }", "function newGroup () {\n\t\treturn $this->createObject ('groups');\n\t}", "function atriumCreateGroup($preset = 'atrium_groups_private') {\n $group = new stdClass();\n $group->type = 'group';\n $group->title = $this->randomName(8);\n $group->description = $this->randomName(32);\n $group->path = strtolower($this->randomName(8, ''));\n $group->preset = $preset;\n $this->drupalGet('node/add/group');\n $edit = array(\n 'title' => $group->title,\n 'og_description' => $group->description,\n 'purl[value]' => $group->path,\n 'spaces_preset_og' => $group->preset,\n );\n $this->drupalPost('node/add/group', $edit, t('Save'));\n $group->nid = db_result(db_query(\"SELECT id FROM {purl} WHERE value = '%s'\", $group->path));\n return $group;\n }", "public function create()\n\t{\n\t\treturn view('admin.channel-group.create');\n\t}", "public function testCreateGroupRest()\n {\n $this->_markTestAsRestOnly();\n\n $serviceInfo = [\n 'rest' => [\n 'resourcePath' => self::RESOURCE_PATH,\n 'httpMethod' => \\Magento\\Framework\\Webapi\\Rest\\Request::HTTP_METHOD_POST,\n ],\n ];\n\n $groupData = [\n CustomerGroup::ID => null,\n CustomerGroup::CODE => 'Create Group REST',\n CustomerGroup::TAX_CLASS_ID => 3,\n ];\n $requestData = ['group' => $groupData];\n\n $groupId = $this->_webApiCall($serviceInfo, $requestData)[CustomerGroup::ID];\n $this->assertNotNull($groupId);\n\n $newGroup = $this->groupRepository->getById($groupId);\n $this->assertEquals($groupId, $newGroup->getId(), 'The group id does not match.');\n $this->assertEquals($groupData[CustomerGroup::CODE], $newGroup->getCode(), 'The group code does not match.');\n $this->assertEquals(\n $groupData[CustomerGroup::TAX_CLASS_ID],\n $newGroup->getTaxClassId(),\n 'The group tax class id does not match.'\n );\n }", "public function newgroup()\n {\n // return view(\"platform.community.groupnew\");\n }", "private function _add_group() {\n\t\t$this->load->library(['ion_auth', 'form_validation']);\n\t\t// Set validation rules for registering user\n\t\t$this->config->load('form_validate');\n\t\t$validation_rules = $this->config->item('user_group');\n $this->form_validation->set_rules($validation_rules);\n \n $response = [ 'error' => true ];\n\n\t\tif ($this->form_validation->run('user_group') == true) {\n\t\t\t$name = strtolower($this->input->post('name'));\n\t\t\t$description = $this->input->post('description');\n \n\t\t\tif($this->ion_auth->create_group($name, $description)) {\n $response['error'] = false;\n $response['message'] = lang('group_creation_successful');\n\t\t\t} else {\n $response['message'] = $this->ion_auth->errors();\n\t\t\t}\n\t\t} else {\n $response['message'] = validation_errors();\n }\n \n echo $this->json->response('success', $response);\n }", "public function create()\n {\n return view('admin.category._createGrp');\n }", "public function create()\n {\n $groupData = Binput::get('group');\n $groupData['type'] = 'group';\n $groupData['owner_id'] = Auth::user()->id;\n try {\n $group = $this->dispatchFromArray(AddProjectNamespaceCommand::class, $groupData);\n } catch (ValidationException $e) {\n return Redirect::route('groups.new')\n ->withInput(Binput::all())\n ->withTitle(sprintf('%s %s', trans('dashboard.notifications.whoops'), trans('dashboard.teams.add.failure')))\n ->withErrors($e->getMessageBag());\n }\n\n return Redirect::route('groups.index')\n ->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('dashboard.teams.add.success')));\n }", "public function createCustomGroup($params = []) {\n $params = array_merge([\n 'title' => 'Custom Group',\n 'extends' => [$this->entity ?? 'Contact'],\n 'weight' => 5,\n 'style' => 'Inline',\n 'max_multiple' => 0,\n ], $params);\n $identifier = $params['name'] ?? $params['title'];\n $this->ids['CustomGroup'][$identifier] = $this->callAPISuccess('CustomGroup', 'create', $params)['id'];\n return $this->ids['CustomGroup'][$identifier];\n }", "public function onCreateGroup()\n {\n // refresh current step\n $this->currentStep = self::STEP_GROUPS;\n \n if( $user = $this->getUser() ){\n if( !empty( $name = post('name'))){\n try{\n $group = UserGroup::createGroup($user, $name);\n }catch(\\Exception $e){\n Flash::error($e->getMessage());\n }\n }\n }\n \n // Updated list of grous and other vars\n $this->prepareVars();\n }", "public function create()\n {\n $url = \"https://api.weixin.qq.com/shakearound/device/group/add?access_token=\".$this->access_token;\n $result = \\http_post($url,array(\"group_name\" => \"梵净山地质博物馆\"));\n\n dd($result);\n\n\n\n\n return view(\"admin.device.create\");\n }", "public function store(CreateGroupRequest $request)\n\t{\n\t\t$input = $request->all();\n\t\t$date = new Carbon($request->input('date_create'));\n\t\t$count = Group::count();\n\t\t$number = Group::max('id') + 1;\n\t\t$input['date_create'] = $date;\n\t\t$input['folio'] = $date->year.$request->input('branch').'000'.$number;\n\n\t\t$group = Group::create($input);\n\n\t\tAlert::success('Grupo creado Exitosamente')->persistent('Cerrar');\n\n\t\treturn redirect(route('groups.index'));\n\t}", "public function create()\n {\n $list_clusters = [];\n $clusters = $this->cluster_model->getBlockClusterNotSoldYet();\n foreach ($clusters as $key => $cluster) {\n $list_clusters[$cluster->id] = $cluster->block . $cluster->number;\n }\n\n $sales = Sale::get();\n $list_sales = [];\n foreach ($sales as $key => $sale) {\n $list_sales[$sale->id] = $sale->name;\n }\n\n $this->data['clusters'] = $list_clusters;\n $this->data['sales'] = $list_sales;\n $this->data[ 'message_alert' ] = Session::get('message');\n $this->data[ 'url' ] = route('customer.store');\n $this->data[ 'method' ] = \"POST\";\n $this->data[ 'edit' ] = false;\n $this->data[ 'page_title' ] = 'Pelanggan';\n $this->data[ 'header' ] = 'Tambah Pelanggan';\n $this->data[ 'sub_header' ] = '';\n return $this->render( 'uadmin.customer.form' );\n }", "function &createGroup() {\n return $this->_gHandler->create();\n }", "function createGroup(array $data)\r\n {\r\n if (GroupFacade::findByField('group_name', $data['group_name'])->first()) {\r\n throw new GisException(trans('common.usergroup_create_group_name_exits'));\r\n }\r\n\r\n foreach ($this->groupPermission() as $permission) {\r\n $data[$permission] = false;\r\n }\r\n $data['is_guest_group'] = ! empty($data['is_guest_group']) && $data['is_guest_group'] == 'on' ? true : false;\r\n if($data['is_guest_group']){\r\n $checkExistGuestGroup = GroupFacade::checkExistGuestUser();\r\n if ($checkExistGuestGroup) {\r\n throw new GisException(trans('common.user_can_not_create_guest_group'));\r\n }\r\n $array = array('can_delete' => false);\r\n $data = array_merge($data, $array);\r\n }\r\n $data[\"auth_user_fertilizer_definition\"] = false;\r\n\r\n $data = $this->modifyData($data, true);\r\n ApplicationLogFacade::logActionMode2 ( LoggingAction::MODE2_ADD_USER_GROUP, $data);\r\n\r\n return GroupFacade::create($data);\r\n }", "public function getCustomerGroup();", "public function getCustomerGroup();", "public function CreateHostGroupByCode($customer)\n {\n return $this->CreateHostGroupByName($this->FormatGroupName(NameType::HostGroup, $customer));\n }", "public function subscribetogroupAction() {\n //get the channel id from url\n $channel_id=$this->_getParam('channel_id');\n //get group id\n //$id=$this->_getParam('group_id');\n $arr=array('group_id'=>$this->_getParam('group_id'));\n\n try {\n //create a subscription to the group\n $channel_mapper=new Application_Model_Mapper_Channel_Subscription();\n $result=$channel_mapper->create($channel_id);\n if($result==\"subscription successful\") {\n $message=\"Successful subscription\";\n $session=new Zend_Session_Namespace('message');\n $session->feedback=$message;\n }\n $this->_helper->redirector('viewgroup', 'group', 'default',$arr);\n }\n catch(Exception $e) {\n\n }\n\n\n\n\n }", "private function setCustomerGroupValue()\n {\n $value = $this->getData(self::$customerGroupAttributeCode);\n try {\n $group = $this->groupRepository->getById($value);\n $this->setCustomAttribute(self::$customerGroupAttributeCode, $group->getCode());\n } catch (NoSuchEntityException $e) {\n $this->setCustomAttribute(self::$customerGroupAttributeCode, 'N/A');\n }\n }", "function _civicrm_api3_sepa_contribution_group_create_spec(&$params) {\n $params['contribution_id']['api.required'] = 1;\n $params['txgroup_id']['api.required'] = 1;\n}", "public function testCanCreateGroup()\n {\n $admin = $this->createSuperAdmin();\n $groups = $this->createGroups();\n $cmId = $groups[0]->competition_id;\n $disciplineId = $groups[0]->discipline_id;\n $disciplineTitle = $groups[0]->discipline_title;\n\n $url = \"/api/competitions/{$cmId}/disciplines/{$disciplineId}/groups\";\n $response = $this->actingAs($admin, 'api')->postJson($url, [\n 'competition_id' => $cmId,\n 'discipline_id' => $disciplineId,\n 'title' => 'title',\n 'short' => 'short',\n 'rounds' => '1',\n 'time' => '2',\n 'min' => '3',\n 'max' => '4',\n ]);\n\n $response\n ->assertStatus(200)\n ->assertJson([\n 'competition_id' => $cmId,\n 'discipline_id' => $disciplineId,\n 'title' => 'title',\n 'short' => 'short',\n 'rounds' => 1,\n 'time' => 2,\n 'min' => 3,\n 'max' => 4,\n 'order' => 2,\n 'discipline_title' => $disciplineTitle,\n 'type' => Discipline::CAT_TYPE_AGE,\n ]);\n\n $this->assertDatabaseHas('category_groups', [\n 'competition_id' => $cmId,\n 'title' => 'title',\n ]);\n }", "public function testAddGroup()\n {\n $group = Admin_Controller_Group::getInstance()->create($this->objects['initialGroup']);\n \n $this->assertEquals($this->objects['initialGroup']->id, $group->id);\n }", "public static function callback_createGroup()\n\t{\n\t\treturn self::createGroup($_POST['HTML']['name_insert'], $_POST['HTML']['description_insert'], $_POST['HTML']['ldapDN_insert']);\n\t}", "public function addGroupToSet()\n {\n $aChosenCat = $this->_getActionIds('oxgroups.oxid');\n $soxId = $this->getConfig()->getRequestParameter('synchoxid');\n\n // adding\n if ($this->getConfig()->getRequestParameter('all')) {\n $sGroupTable = $this->_getViewName('oxgroups');\n $aChosenCat = $this->_getAll($this->_addFilter(\"select $sGroupTable.oxid \" . $this->_getQuery()));\n }\n if ($soxId && $soxId != \"-1\" && is_array($aChosenCat)) {\n foreach ($aChosenCat as $sChosenCat) {\n $oObject2Delivery = oxNew('oxbase');\n $oObject2Delivery->init('oxobject2delivery');\n $oObject2Delivery->oxobject2delivery__oxdeliveryid = new oxField($soxId);\n $oObject2Delivery->oxobject2delivery__oxobjectid = new oxField($sChosenCat);\n $oObject2Delivery->oxobject2delivery__oxtype = new oxField(\"oxdelsetg\");\n $oObject2Delivery->save();\n }\n }\n }", "public function create_group()\n\t{\n\t\t$this->data['title'] = $this->lang->line('create_group_title');\n\n\t\tif (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())\n\t\t{\n\t\t\tredirect('admin/auth', 'refresh');\n\t\t}\n\n\t\t// validate form input\n\t\t$this->form_validation->set_rules('group_name', $this->lang->line('create_group_validation_name_label'), 'trim|required|alpha_dash');\n\n\t\tif ($this->form_validation->run() === TRUE)\n\t\t{\n\t\t\t$new_group_id = $this->ion_auth->create_group($this->input->post('group_name'), $this->input->post('description'));\n\t\t\tif ($new_group_id)\n\t\t\t{\n\t\t\t\t// check to see if we are creating the group\n\t\t\t\t// redirect them back to the admin page\n\t\t\t\t$this->session->set_flashdata('message', $this->ion_auth->messages());\n\t\t\t\tredirect(\"auth\", 'refresh');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// display the create group form\n\t\t\t// set the flash data error message if there is one\n\t\t\t$this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n\t\t\t$this->data['group_name'] = array(\n\t\t\t\t'name' => 'group_name',\n\t\t\t\t'id' => 'group_name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('group_name'),\n\t\t\t);\n\t\t\t$this->data['description'] = array(\n\t\t\t\t'name' => 'description',\n\t\t\t\t'id' => 'description',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => $this->form_validation->set_value('description'),\n\t\t\t);\n\n\t\t\t$this->_render_page('back/auth/create_group', $this->data);\n\t\t}\n\t}", "public function create()\n {\n //\n $actionRoute = route('admin.group.store');\n return view('admin.group.create', compact('actionRoute'));\n }", "function admin_add_to_group() {\n\t\t//\n\t}", "public function createGroup( $group )\n {\n \n $sql = '\"SELECT 1 FROM pg_roles WHERE rolname=\\''.$group.'\\'\"';\n \n // wenn eine connection vorhanden ist verwenden wir die\n $this->setLoginEnv( $this->user, $this->passwd );\n \n $val = Process::execute\n ( \n 'psql postgres -h '.$this->host.' -tAc '.$sql \n );\n \n if( '1' == trim($val) )\n return true;\n \n $val = Process::execute( 'psql postgres -h '.$this->host.' -tAc \"CREATE ROLE '.$group.'\"' );\n\n if( 'CREATE ROLE' == trim($val) )\n return true;\n else\n return false;\n \n }", "function new_group($data_array)\n {\n if($this->test_connection())\n {\n \n $sql = \"INSERT INTO groups (name,description) VALUES (:name, :description)\";\n $exe_sql = $this->obj_server->prepare($sql);\n $exe_sql->execute($data_array);\n\n if($exe_sql)\n {\n return true;\n }\n else\n {\n return false;\n }\n\n }\n else\n {\n return false;\n }\n }", "public function testCrceGroupAdministrationCreateCustomer()\n {\n\n }", "public function create()\n {\n if(Gate::denies('create-cardgroups')){\n return view('403');\n }\n\n $data = Card::where('owner', 1)->get();\n return view('admin.card_groups.create')->with([\n \"data\" => $data\n ]);\n }", "public function add_group( $group ) {\n\n\t}", "public static function CreateDefault()\n {\n $groupSymbol = new MTConGroupSymbol();\n //---\n $groupSymbol->TradeMode = MTConGroupSymbol::DEFAULT_VALUE_UINT;\n $groupSymbol->ExecMode = MTConGroupSymbol::DEFAULT_VALUE_UINT;\n $groupSymbol->FillFlags = MTConGroupSymbol::DEFAULT_VALUE_UINT;\n $groupSymbol->ExpirFlags = MTConGroupSymbol::DEFAULT_VALUE_UINT;\n $groupSymbol->OrderFlags = MTEnOrderFlags::ORDER_FLAGS_NONE;\n $groupSymbol->SpreadDiff = MTConGroupSymbol::DEFAULT_VALUE_INT;\n $groupSymbol->SpreadDiffBalance = MTConGroupSymbol::DEFAULT_VALUE_INT;\n $groupSymbol->StopsLevel = MTConGroupSymbol::DEFAULT_VALUE_INT;\n $groupSymbol->FreezeLevel = MTConGroupSymbol::DEFAULT_VALUE_INT;\n $groupSymbol->VolumeMin = MTConGroupSymbol::DEFAULT_VALUE_UINT64;\n $groupSymbol->VolumeMinExt = MTConGroupSymbol::DEFAULT_VALUE_UINT64;\n $groupSymbol->VolumeMax = MTConGroupSymbol::DEFAULT_VALUE_UINT64;\n $groupSymbol->VolumeMaxExt = MTConGroupSymbol::DEFAULT_VALUE_UINT64;\n $groupSymbol->VolumeStep = MTConGroupSymbol::DEFAULT_VALUE_UINT64;\n $groupSymbol->VolumeStepExt = MTConGroupSymbol::DEFAULT_VALUE_UINT64;\n $groupSymbol->VolumeLimit = MTConGroupSymbol::DEFAULT_VALUE_UINT64;\n $groupSymbol->VolumeLimitExt = MTConGroupSymbol::DEFAULT_VALUE_UINT64;\n $groupSymbol->MarginFlags = MTConGroupSymbol::DEFAULT_VALUE_UINT;\n $groupSymbol->MarginInitial = MTConGroupSymbol::DEFAULT_VALUE_DOUBLE;\n $groupSymbol->MarginMaintenance = MTConGroupSymbol::DEFAULT_VALUE_DOUBLE;\n //---\n $groupSymbol->MarginRateInitial = array(\n MTEnMarginRateTypes::MARGIN_RATE_BUY => MTConGroupSymbol::DEFAULT_VALUE_DOUBLE,\n MTEnMarginRateTypes::MARGIN_RATE_SELL => MTConGroupSymbol::DEFAULT_VALUE_DOUBLE,\n MTEnMarginRateTypes::MARGIN_RATE_BUY_LIMIT => MTConGroupSymbol::DEFAULT_VALUE_DOUBLE,\n MTEnMarginRateTypes::MARGIN_RATE_SELL_LIMIT => MTConGroupSymbol::DEFAULT_VALUE_DOUBLE,\n MTEnMarginRateTypes::MARGIN_RATE_BUY_STOP => MTConGroupSymbol::DEFAULT_VALUE_DOUBLE,\n MTEnMarginRateTypes::MARGIN_RATE_SELL_STOP => MTConGroupSymbol::DEFAULT_VALUE_DOUBLE,\n MTEnMarginRateTypes::MARGIN_RATE_BUY_STOP_LIMIT => MTConGroupSymbol::DEFAULT_VALUE_DOUBLE,\n MTEnMarginRateTypes::MARGIN_RATE_SELL_STOP_LIMIT => MTConGroupSymbol::DEFAULT_VALUE_DOUBLE\n );\n //---\n $groupSymbol->MarginRateMaintenance = array(\n MTEnMarginRateTypes::MARGIN_RATE_BUY => MTConGroupSymbol::DEFAULT_VALUE_DOUBLE,\n MTEnMarginRateTypes::MARGIN_RATE_SELL => MTConGroupSymbol::DEFAULT_VALUE_DOUBLE,\n MTEnMarginRateTypes::MARGIN_RATE_BUY_LIMIT => MTConGroupSymbol::DEFAULT_VALUE_DOUBLE,\n MTEnMarginRateTypes::MARGIN_RATE_SELL_LIMIT => MTConGroupSymbol::DEFAULT_VALUE_DOUBLE,\n MTEnMarginRateTypes::MARGIN_RATE_BUY_STOP => MTConGroupSymbol::DEFAULT_VALUE_DOUBLE,\n MTEnMarginRateTypes::MARGIN_RATE_SELL_STOP => MTConGroupSymbol::DEFAULT_VALUE_DOUBLE,\n MTEnMarginRateTypes::MARGIN_RATE_BUY_STOP_LIMIT => MTConGroupSymbol::DEFAULT_VALUE_DOUBLE,\n MTEnMarginRateTypes::MARGIN_RATE_SELL_STOP_LIMIT => MTConGroupSymbol::DEFAULT_VALUE_DOUBLE\n );\n //---\n $groupSymbol->MarginRateLiquidity = MTConGroupSymbol::DEFAULT_VALUE_DOUBLE;\n $groupSymbol->MarginHedged = MTConGroupSymbol::DEFAULT_VALUE_DOUBLE;\n $groupSymbol->MarginRateCurrency = MTConGroupSymbol::DEFAULT_VALUE_DOUBLE;\n //--- DEPRECATED\n $groupSymbol->MarginLong = MTConGroupSymbol::DEFAULT_VALUE_DOUBLE;\n $groupSymbol->MarginShort = MTConGroupSymbol::DEFAULT_VALUE_DOUBLE;\n $groupSymbol->MarginLimit = MTConGroupSymbol::DEFAULT_VALUE_DOUBLE;\n $groupSymbol->MarginStop = MTConGroupSymbol::DEFAULT_VALUE_DOUBLE;\n $groupSymbol->MarginStopLimit = MTConGroupSymbol::DEFAULT_VALUE_DOUBLE;\n //---\n $groupSymbol->SwapMode = MTConGroupSymbol::DEFAULT_VALUE_UINT;\n $groupSymbol->SwapLong = MTConGroupSymbol::DEFAULT_VALUE_DOUBLE;\n $groupSymbol->SwapShort = MTConGroupSymbol::DEFAULT_VALUE_DOUBLE;\n $groupSymbol->Swap3Day = MTConGroupSymbol::DEFAULT_VALUE_INT;\n $groupSymbol->REFlags = MTConGroupSymbol::DEFAULT_VALUE_UINT;\n $groupSymbol->RETimeout = MTConGroupSymbol::DEFAULT_VALUE_UINT;\n $groupSymbol->IEFlags = MTConGroupSymbol::DEFAULT_VALUE_UINT;\n $groupSymbol->IECheckMode = MTConGroupSymbol::DEFAULT_VALUE_UINT;\n $groupSymbol->IETimeout = MTConGroupSymbol::DEFAULT_VALUE_UINT;\n $groupSymbol->IESlipProfit = MTConGroupSymbol::DEFAULT_VALUE_UINT;\n $groupSymbol->IESlipLosing = MTConGroupSymbol::DEFAULT_VALUE_UINT;\n $groupSymbol->IEVolumeMax = MTConGroupSymbol::DEFAULT_VALUE_UINT64;\n $groupSymbol->IEVolumeMaxExt = MTConGroupSymbol::DEFAULT_VALUE_UINT64;\n //---\n $groupSymbol->PermissionsFlags = MTEnGroupSymbolPermissions::PERMISSION_DEFAULT;\n $groupSymbol->BookDepthLimit = 0;\n //---\n return $groupSymbol;\n }", "public function CreateUserGroupByCode($customer, $hostGroupID, $perm, $userIDs = null)\n {\n return $this->CreateUserGroupByName($this->FormatGroupName(NameType::UserGroup, $customer), $hostGroupID, $perm, $userIDs);\n }", "public function create()\n {\n $kelompok=collect(['Harta','Hutang','Modal','Pendapatan','Biaya dan Beban']);\n return view('content.accountGroup.create',['kelompok'=>$kelompok]);\n }", "public function create_group()\n\t{\n\t\t$this->data['title'] = lang('Auth.create_group_title');\n\n\t\tif (! $this->ionAuth->loggedIn() || ! $this->ionAuth->isAdmin())\n\t\t{\n\t\t\treturn redirect()->to('/auth');\n\t\t}\n\n\t\t// validate form input\n\t\t$this->validation->setRule('group_name', lang('Auth.create_group_validation_name_label'), 'trim|required|alpha_dash');\n\n\t\tif ($this->request->getPost() && $this->validation->withRequest($this->request)->run())\n\t\t{\n\t\t\t$newGroupId = $this->ionAuth->createGroup($this->request->getPost('group_name'), $this->request->getPost('description'));\n\t\t\tif ($newGroupId)\n\t\t\t{\n\t\t\t\t// check to see if we are creating the group\n\t\t\t\t// redirect them back to the admin page\n\t\t\t\t$this->session->setFlashdata('message', $this->ionAuth->messages());\n\t\t\t\treturn redirect()->to('/auth');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// display the create group form\n\t\t\t// set the flash data error message if there is one\n\t\t\t$this->data['message'] = $this->validation->getErrors() ? $this->validation->listErrors($this->validationListTemplate) : ($this->ionAuth->errors($this->validationListTemplate) ? $this->ionAuth->errors($this->validationListTemplate) : $this->session->getFlashdata('message'));\n\n\t\t\t$this->data['group_name'] = [\n\t\t\t\t'name' => 'group_name',\n\t\t\t\t'id' => 'group_name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => set_value('group_name'),\n\t\t\t];\n\t\t\t$this->data['description'] = [\n\t\t\t\t'name' => 'description',\n\t\t\t\t'id' => 'description',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'value' => set_value('description'),\n\t\t\t];\n\n\t\t\treturn $this->renderPage($this->viewsFolder . DIRECTORY_SEPARATOR . 'create_group', $this->data);\n\t\t}\n\t}", "public function store(Request $request)\n {\n $this->checkPermission('shg_group_management_add');\n $valid = $this->service->validateCreate($request->all());\n\n if ($valid->fails()) {\n return $this->respondWithValidationError($valid);\n }\n\n $data = $valid->validated();\n\n try {\n $res = $this->service->createShgGroup($data);\n $res = ApiResource::make($res);\n return $this->respondWithSuccess($res);\n } catch (\\Throwable $th) {\n return $this->respondWithError('Error Creating Resource');\n }\n }", "public function create()\n {\n if (!check_permission('user/groups/create')) {\n return _404('无权操作!');\n }\n return view('user.group.create');\n }", "public function test_can_create_resource() {\n\n $data = [\n 'name' => $this->faker->name(1,16),\n 'description' => $this->faker->sentence(1,255),\n 'group_id' => \\App\\Group::all()->random()->id,\n ];\n\n $response = $this->call('POST', route('group.store'), $data); \n\t\t$this->assertEquals(201, $response->status());\n\t\t\n\t}", "public function testCreateGroupWithIdSoap()\n {\n $this->_markTestAsSoapOnly();\n\n $serviceInfo = [\n 'soap' => [\n 'service' => self::SERVICE_NAME,\n 'serviceVersion' => self::SERVICE_VERSION,\n 'operation' => 'customerGroupRepositoryV1Save',\n ],\n ];\n\n $groupData = [\n CustomerGroup::ID => 88,\n CustomerGroup::CODE => 'Create Group with Id SOAP',\n CustomerGroup::TAX_CLASS_ID => 3,\n ];\n $requestData = ['group' => $groupData];\n\n try {\n $this->_webApiCall($serviceInfo, $requestData);\n $this->fail(\"Expected exception\");\n } catch (\\SoapFault $e) {\n $this->assertStringContainsString(\n 'No such entity with %fieldName = %fieldValue',\n $e->getMessage(),\n \"SoapFault does not contain expected message.\"\n );\n }\n }", "private function _saveCustomerGroups() {\r\n $customergroupModel = Mage::getModel('deliveryzone/rates_customergroup');\r\n $collection = $customergroupModel->getCollection()->loadByRate($this->getRateId());\r\n foreach ($collection as $item) {\r\n $item->delete();\r\n }\r\n \r\n foreach ($this->getCustomerGroupIds() as $customergroup) {\r\n $customergroupModel->setEntityId(NULL)->setCustomergroupId($customergroup)->setRateId($this->getId())->save();\r\n }\r\n return $this;\r\n }", "public function add_group($data)\n {\n return $this->client_groups_model->add($data);\n }", "public function add_group($data)\n {\n return $this->client_groups_model->add($data);\n }", "public function createGroup(AcceptanceTester $I)\n {\n $groupName = substr(md5(rand()), 0, 7); //generate random name\n $I->createGroup($groupName);\n $I->see($groupName);\n }", "public function creategroupAction() {\n $restaurant = $this->initRestaurant();\n if (is_null($restaurant->getId())) {\n return $this->_redirect('/index');\n }\n\n $request = $this->getRequest();\n $formOptionRow = new Yourdelivery_Form_Restaurant_MealOptionsRowEdit();\n $formOptionRow->setService($restaurant);\n\n if ($request->isPost()) {\n $post = $request->getPost();\n if ($formOptionRow->isValid($post)) {\n $values = $formOptionRow->getValues();\n $optionsRow = new Yourdelivery_Model_Meal_OptionRow();\n $optionsRow->setData($values);\n $optionsRow->setRestaurantId($restaurant->getId());\n $optionsRow->save();\n $this->success('Optionsgruppe wurde erfolgreich erstellt!');\n } else {\n $this->error($formOptionRow->getMessages());\n }\n }\n \n $path = $this->session->optionrowsspath;\n if (!is_null($path)) {\n return $this->_redirect($path);\n } else {\n return $this->_redirect('/restaurant/mealoptionrows');\n }\n }", "public function add_group()\n\t{\n\t\tif($this->isloggedIn())\n\t\t{\n\t\t\t$group = $this->session->userdata['role'];\n\t\t\t$data['menu'] = $this->Menu_model->getMenuItems($group);\n\t\t\t$data['company_info'] = $this->Settings_model->get_company_info();\n\t\t\t$data['groups'] = $this->Users_model->get_all_user_groups();\n\t\t\t//echo '<pre>'; print_r($data['groups']); exit;\n\t\t\t$data['active_groups'] = $this->Login_model->get_active_groups();\n\t\t\t$data['title'] = $data['company_info']['name'].\" | Add Group\";\n\t\t\t$this->load->view(\"backend/users/add_group\", $data);\n\t\t}\n\t\telse {\n\t\t\tredirect(base_url());\n\t\t}\n\t}", "public function createNeededDocumentTypeGroupEntity(): void\n {\n /* Build API test case wrapper */\n $testCase = $this->getApiTestCaseWorker('create_document_type_group', $this->documentTypeContext)\n ->setRequestType(ApiTestCaseWorker::REQUEST_TYPE_CREATE)\n ->setBody($this->documentTypeDataProvider->getEntityArray())\n ->setExpected($this->documentTypeDataProvider->getEntityArray() + ['id' => new ArrayHolder('create_document_type_group', 'id')])\n ->setUnset(['createdAt', 'updatedAt',]);\n\n /* Run the test */\n $testCase->runTest($this);\n }", "public function save_allowed_subgroups_creators_create_step() {\n\t\t$group_id = buddypress()->groups->new_group_id;\n\t\t$this->save_allowed_subgroups_creators( $group_id );\n\t}", "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'name' => 'required|max:255',\n 'category' => 'required',\n ]);\n \n if ($validator->fails()) {\n return redirect()->route('account_group.create')\n ->withErrors($validator)\n ->withInput();\n }\n \n AccountGroup::create([\n 'name' => $request['name'],\n 'acct_category_id' => $request['category']\n ]);\n Session::flash('info', ['Account Group has been created.']);\n return redirect()->route('account_group.index');\n }", "function createGroupInCometChat() {\n\tglobal $cc_clientid;\n\tglobal $current_user;\n\t$user_id = $current_user->ID;\n\n\tif(bp_is_active( 'groups' )) {\n\t\t$group_ids = groups_get_user_groups( bp_loggedin_user_id() );\n\n\t\tif(!empty($_REQUEST['group_id'])){\n\t\t\t$groupid = $_REQUEST['group_id'];\n\t\t}\n\t\tforeach( $group_ids[\"groups\"] as $id ) {\n\t\t\t$group = groups_get_group( array( 'group_id' => $id) );\n\t\t\tif($_REQUEST['group_id'] == $group->id){\n\t\t\t\t$groupname = $group->name;\n\t\t\t}\n\t\t}\n\t\t$groupDetails = array(\n\t\t\t\"userid\"\t\t=> $user_id,\n\t\t\t\"groupid\"\t\t=> $groupid,\n\t\t\t\"groupname\"\t\t=> $groupname,\n\t\t\t\"action\"\t\t=> 'creategroup'\n\t\t);\n\t\t$groupInfo = json_encode($groupDetails);\n\t\t$site_url = get_site_url();\n\t\t$protocol = parse_url($site_url);\n\t\t$request_url = $protocol['scheme'].'://'.$cc_clientid.'.cometondemand.net/cometchat_update.php';\n\n\t\tif(function_exists('curl_init')){\n $result = wp_remote_post($request_url, array(\n 'method' => 'POST',\n 'body' => 'groupinfo='.$groupInfo\n )\n );\n\t\t}\n\t}\n}", "public function run()\n{\n Group::create(['name' => 'Alpha Solutions Group']);\n }", "public function createAction() {\n \t//Recuperation de l'id de l'utilisateur connecte\n \t$user_id = $this->zfcUserAuthentication()->getIdentity()->getId();\n \t\n \t//Instantiation du formulaire de vote\n \t$form = new GroupForm ();\n \t\n \t//Insertion du group et de l'admin de du groupe\n \t$request = $this->getRequest ();\n \tif ($request->isPost ()) {\n \t\t$group = new Group();\n \t\t$form->setInputFilter ( $group->getInputFilter () );\n \t\t$form->setData ($request->getPost ());\n \t\tif ($form->isValid ()) {\n \t\t\t$group->exchangeArray($form->getData());\n \t\t\t$this->getGroupTable()->saveGroup($group);\n \t\t\t$id = $this->getGroupTable()->getLastGroup();\n \t\t\t$this->getGroupMemberTable()->saveGroupAdmin($id, $user_id);\n \t\t\t\n \t\t\treturn $this->redirect ()->toRoute ( 'group' );\n \t\t}\n \t}\n \t\n \t//Construction de la vue\n \treturn array (\n \t\t\t'form' => $form\n \t);\n }", "function new_field_group($name) {\n\n return new Acf\\Groups\\Group($name);\n\n}", "private function getAvailableCustomerGroupName()\n {\n $names = ['SC', 'SWC', 'SWCONN', 'SC-1'];\n\n $repo = $this->modelManager->getRepository('Shopware\\Models\\Customer\\Group');\n foreach ($names as $name) {\n $model = $repo->findOneBy(['key' => $name]);\n if (is_null($model)) {\n return $name;\n }\n }\n\n throw new \\RuntimeException(\n 'Could not find a free group name for the Shopware Connect customer group.Probably you need to delete an existing customer group created by Shopware Connect (SC, SWC, SWCONN, SC-1). Make sure, you really don\\'t need it any more!'\n );\n }", "public function createSingleGroup($parameterArray) {\n $query = 'group/create';\n $this->restRequest('POST', $query, $parameterArray);\n }", "public function create()\n {\n $this->authorize('create', Group::class);\n return view('group.create');\n }", "function create_security_group( $name, $description, $rules ) {\n\tglobal $aws_ec2_client;\n\n\t$aws_ec2_client->createSecurityGroup( array(\n\t\t'GroupName' => $name,\n\t\t'Description' => $description,\n\t) );\n\n\tforeach ( $rules as $rule ) {\n\t\t$rule['GroupName'] = $name;\n\n\t\t$aws_ec2_client->authorizeSecurityGroupIngress( $rule );\n\t}\n}", "public function create()\n {\n $this->authorize('create', Group::class);\n return view('users.groups.add');\n }", "function createGroup(){\r\n $query = \" INSERT\r\n INTO\r\n groups\r\n SET\r\n groupID=:groupID,\r\n groupName=:groupName\";\r\n\r\n // prepare query\r\n $stmt = $this->conn->prepare($query);\r\n\r\n // sanitize values\r\n $this->groupID=htmlspecialchars(strip_tags($this->groupID));\r\n $this->groupName=htmlspecialchars(strip_tags($this->groupName));\r\n\r\n // bind values\r\n $stmt->bindParam(\":groupID\", $this->groupID);\r\n $stmt->bindParam(\":groupName\", $this->groupName);\r\n\r\n // execute query\r\n if($stmt->execute()){\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "public function run()\n {\n ProductGroup::create([\n 'name' => 'Desayunos',\n 'description' => 'Seccion Desayunos',\n 'enabled' => true\n ]);\n\n ProductGroup::create([\n 'name' => 'Almuerzos',\n 'description' => 'Seccion Almuerzos',\n 'enabled' => true\n ]);\n\n ProductGroup::create([\n 'name' => 'Buffets',\n 'description' => 'Seccion Buffets',\n 'enabled' => true\n ]);\n }" ]
[ "0.6819811", "0.65970635", "0.64473546", "0.6437228", "0.6365106", "0.6233577", "0.6226688", "0.62001705", "0.6196347", "0.61599433", "0.61577094", "0.6145794", "0.61205816", "0.611937", "0.6095573", "0.6083912", "0.60801965", "0.60763997", "0.60072815", "0.5971893", "0.59468687", "0.59346384", "0.59304", "0.5921402", "0.5918068", "0.5916173", "0.5913501", "0.59062713", "0.588854", "0.58791524", "0.5868381", "0.5856123", "0.583072", "0.58242655", "0.5822797", "0.58169204", "0.5805797", "0.580302", "0.5800943", "0.579638", "0.5784028", "0.57757956", "0.57742584", "0.57734257", "0.5762179", "0.57455707", "0.5743195", "0.5742496", "0.57325816", "0.57321674", "0.5730067", "0.5726313", "0.5724862", "0.572194", "0.5719959", "0.5719959", "0.5709631", "0.5709279", "0.570479", "0.56917053", "0.568513", "0.5676653", "0.56760424", "0.56669176", "0.5658139", "0.56490326", "0.5648504", "0.56380206", "0.56373006", "0.56355363", "0.56240034", "0.5621906", "0.56142664", "0.5613003", "0.56102705", "0.5579244", "0.55785525", "0.5561643", "0.55539787", "0.55530244", "0.5551791", "0.5544195", "0.5544195", "0.554352", "0.5540889", "0.55377394", "0.55363613", "0.55357", "0.55346507", "0.5530206", "0.5528909", "0.55264735", "0.5512883", "0.5501805", "0.54783916", "0.54665935", "0.5461953", "0.54612875", "0.54594547", "0.5446029" ]
0.7911178
0
Return a free customer group name. It will only check 5 groups if all are used, probably the detection of existing connectCustomerGroups is broken. Throw an exception then
Вернуть имя свободной группы клиентов. Проверится только 5 групп, если все они заняты, вероятно, обнаружение существующих connectCustomerGroups повреждено. Выбросить исключение в таком случае
private function getAvailableCustomerGroupName() { $names = ['SC', 'SWC', 'SWCONN', 'SC-1']; $repo = $this->modelManager->getRepository('Shopware\Models\Customer\Group'); foreach ($names as $name) { $model = $repo->findOneBy(['key' => $name]); if (is_null($model)) { return $name; } } throw new \RuntimeException( 'Could not find a free group name for the Shopware Connect customer group.Probably you need to delete an existing customer group created by Shopware Connect (SC, SWC, SWCONN, SC-1). Make sure, you really don\'t need it any more!' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCustomerGroup();", "public function getCustomerGroup();", "public function get_group_name(): string {\n\t\treturn '';\n\t}", "public function groupName(){\n if(isset($_SESSION['user']['group_id'])){\n $groupTable = new Table\\Table();\n $groupTable->setTable(\"employee_group\");\n $groupTable->setPrimary(\"group_id\");\n \n $where = [\"group_id\" =>\n [\n \"=\" => $_SESSION['user']['group_id']\n ]];\n \n $stmt = $groupTable->get(['group_name'], $where);\n $rows = $this->table->getDB()->fetchAll($stmt);\n $stmt->closeCursor();\n \n if(isset($rows[0][\"group_name\"])){\n $groupName = $rows[0][\"group_name\"];\n } else {\n $groupName = \"No Group\";\n }\n \n } else {\n $groupName = false;\n }\n \n return $groupName;\n }", "function sp_get_bp_group_name(){\n global $bp;\n if(!is_numeric($bp->groups->current_group->id))\n return false;\n $bp_group = new BP_Groups_Group( $bp->groups->current_group->id );\n return $bp_group->name;\n}", "protected function getCurrentCustomersGroup()\n {\n // Check Customer is loggedin or not\n if (Mage::getSingleton('customer/session')->isLoggedIn()) {\n // Get group Id\n $groupId = Mage::getSingleton('customer/session')->getCustomerGroupId();\n return $groupId;\n //Get customer Group name\n } // end\n return false;\n }", "public function createConnectCustomerGroup()\n {\n $connectGroupAttributeId = $this->getConnectCustomerGroupId();\n if (!$this->connectCustomerGroupExists($connectGroupAttributeId)) {\n\n // Create Customer Group\n $this->db->insert(\n 's_core_customergroups',\n [\n 'groupkey' => $this->getAvailableCustomerGroupName(),\n 'description' => 'SC export',\n 'tax' => 0,\n 'taxinput' => 0,\n 'mode' => 0\n ]\n );\n\n $customerGroupID = $this->db->fetchOne('SELECT MAX(id) FROM s_core_customergroups');\n\n // Create Customer Group Attributes\n $this->db->insert(\n 's_core_customergroups_attributes',\n [\n 'customerGroupID' => $customerGroupID,\n 'connect_group' => 1\n ]\n );\n }\n }", "public function getCustomerGroupName()\n {\n if ($this->getTransaction()) {\n $customerGroupId = $this->getTransaction()->getCustomerGroupId();\n try {\n if ($customerGroupId !== null) {\n return $this->groupRepository->getById($customerGroupId)->getCode();\n }\n } catch (NoSuchEntityException $e) {\n return '';\n }\n }\n\n return '';\n }", "private function getCustomerGroups() {\n\t\t$this->load->model( 'sale/customer_group' );\n\n\t\t$customer_groups\t= $this->model_sale_customer_group->getCustomerGroups();\n\t\t$count\t\t\t\t= count( $customer_groups );\n\n\t\tif( $count < 10 ) {\n\t\t\t$size = $count + 2;\n\t\t}else{\n\t\t\t$size = 10;\n\t\t}\n\n\t\t$list = '<select name=\"' . $this->_name . '_customer_groups[]\"'\n\t\t. ' id=\"' . $this->_name . '_customer_groups\" multiple=\"multiple\"'\n\t\t. ' size=\"' . $size . '\"'\n\t\t. '>' . \"\\n\"\n\t\t. '<option value=\"-1\"'\n\t\t. ( in_array( '-1', $this->data[$this->_name . '_customer_groups'] )\n\t\t\t\t? ' selected=\"selected\"'\n\t\t\t\t: ''\n\t\t\t)\n\t\t. '>' . $this->language->get( 'text_all' ) . '</option>' . \"\\n\"\n\t\t. '<option value=\"\" disabled=\"disabled\"'\n\t\t\t. ' style=\"color:#999999\">- - - - - - - - -</option>' . \"\\n\"\n\t\t;\n\n\t\tforeach( $customer_groups as $cGroup ) {\n\t\t\t$list .= '<option value=\"' . $cGroup['customer_group_id'] . '\"'\n\t\t\t. ( in_array( $cGroup['customer_group_id'], $this->data[$this->_name . '_customer_groups'] )\n\t\t\t\t? ' selected=\"selected\"'\n\t\t\t\t: ''\n\t\t\t)\n\t\t\t. '>' . $cGroup['name'] . '</option>' . \"\\n\";\n\t\t}\n\n\t\t$list .= '</select>' . \"\\n\";\n\n\t\t$this->data['lists']['customer_groups'] = $list;\n\t}", "public function getCustomerGroup()\n {\n if (is_null($this->customerGroup)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_CUSTOMER_GROUP);\n if (is_null($data)) {\n return null;\n }\n\n $this->customerGroup = CustomerGroupKeyReferenceModel::of($data);\n }\n\n return $this->customerGroup;\n }", "public function getCustomerGroup()\n {\n return $this->customerGroup instanceof CustomerGroupReferenceBuilder ? $this->customerGroup->build() : $this->customerGroup;\n }", "public function getCustomerGroup()\n {\n return $this->customerGroup instanceof CustomerGroupReferenceBuilder ? $this->customerGroup->build() : $this->customerGroup;\n }", "public function get_group()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $lines = array();\n\n $usersfile = new File(self::FILE_USERS, TRUE);\n $lines = $usersfile->get_contents_as_array();\n\n $group = '';\n\n foreach ($lines as $line) {\n $matches = array();\n if (preg_match('/^DEFAULT LDAP-Group .= \"([^\\\"]*)\",/', $line, $matches)) {\n $group = $matches[1];\n break;\n }\n }\n\n return $group;\n }", "public function groupName()\n {\n return $this->group[0] ?? '';\n }", "private function getConnectCustomerGroupId()\n {\n $repo = $this->modelManager->getRepository('Shopware\\Models\\Attribute\\CustomerGroup');\n /** @var \\Shopware\\Models\\Attribute\\CustomerGroup $model */\n $model = $repo->findOneBy(['connectGroup' => true]);\n\n $customerGroup = null;\n if ($model && $model->getCustomerGroup()) {\n return $model->getCustomerGroup()->getId();\n }\n\n return null;\n }", "function get_customer_group_options($selected_group=null) {\n\n\t$group_data = array();\n\t$group_data = get_group_row_data();\n\n\tif (sizeof($group_data) > 0) {\n\t\t$group_options = $selected = '';\n\t\tforeach ($group_data as $group) {\n\t\t\t$selected = $group->id ==$selected_group ? 'selected=\"selected\"' : '';\n\t\t\t$group_options .= \"<option value='\".$group->id.\"' \".$selected.\">\".$group->group_name.\"</option>\";\n\t\t}\n\t}else {\n\t\t$group_options = '<option value=\"\" selected=\"selected\">Select a group…</option>';\n\t}\n\n\treturn $group_options;\n}", "public function groupName(): string\n {\n return $this->_group_name;\n }", "public function getFieldCustomerGroup()\n {\n return $this->getCustomField('customergroup', 'customer_group');\n }", "public function get_groups_name() {\n\t\t// only fetch stuff from db if not previously done\n\t\tif ( !isset( $this->groups_name ) ) {\n\t\t\t// make sure we know all the id's\n\t\t\t$this -> get_groups_id();\n\t\t\t\n\t\t\t// some sql fiddling depending on how long the groups_id array is\n\t\t\t$sql = \"SELECT g.group_name\";\n\t\t\t$sql = $sql . \" FROM \" . PHPBB_PREFIX . \"_groups g\";\n\t\t\tif( count( $this->groups_id) == 1 ) {\n\t\t\t\t$sql = $sql . \" WHERE g.group_id = \". $this->groups_id[1] .\";\";\n\t\t\t} else {\n\t\t\t\tforeach( $this->groups_id as $i => $group_id ) {\n\t\t\t\t\techo $i;\n\t\t\t\t\techo \"<br />\";\n\t\t\t\t\tif( $i == 0 ) {\n\t\t\t\t\t\t$sql = $sql . \" WHERE g.group_id = \". $this->groups_id[$i];\n\t\t\t\t\t} elseif ( $i + 1 == count ( $this->groups_id ) ) {\n\t\t\t\t\t\t$sql = $sql . \" or g.group_id = \" . $group_id . \";\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$sql = $sql . \" or g.group_id = \" . $group_id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// query the database\n\t\t\tif( $result = $this->db->query($sql) ) {\n\t\t\t\twhile( $row = $result->fetch_object() ) {\n\t\t\t\t\t$this->groups_name[] = $row->group_name;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->db->error;\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t\treturn $this->groups_name;\t\n\t}", "public function getCustomerGroup(): ?CustomerGroupInterface;", "protected function _CustomerGroup()\n {\n \t$customer = $this->_getSession()->getCustomer();\n \t$group_id = Mage::helper('redirection')->getConfigValue('group');\n \tif($customer) {\n \t\tif($customer->getGroupId() == $group_id) {\n \t\t\treturn TRUE;\n \t\t}\n \t}\n\n \t/*redirect for all General/Retailer and Wholeseller*/\n\tif($group_id == ''){\n\t\treturn true;\t\n\t}\t\n }", "public static function getUserGroup()\r\n\t{\r\n\t\t$userGroups = Security::getUserGroups();\r\n\t\tforeach( $userGroups as $g => $v )\r\n\t\t{\r\n\t\t\treturn $g;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}", "public function getDefault()\n {\n return \"/V1/customerGroups/default\";\n }", "public function GetNewUserGroupName($customer)\n {\n return $this->FormatGroupName(NameType::UserGroup, $customer);\n }", "public function freeGroupName($group)\n {\n if($this->getData(\"SELECT id\n FROM _users_groups\n WHERE type_name = '$group'\"))\n {\n return false;\n }\n else\n {\n return true;\n }\n }", "function settingGetFreeGroupId()\n {\n return 1;\n }", "public function GetNewHostGroupName($customer)\n {\n return $this->FormatGroupName(NameType::HostGroup, $customer);\n }", "function create_group($name)\n {\n /* empty for address books don't supporting groups */\n return false;\n }", "private function getIsAllowedCustomerGroup()\n {\n $allowedCustomerGroups = explode(',', (string)$this->getConfigData('customergroup'));\n\n //Mage::log('Current Customer Group ID: ' . Mage::getSingleton('customer/session')->getCustomer()->getData('group_id'));\n //Mage::log('Allowed Customer Groups: ' . $this->getConfigData('customergroup'));\n //Mage::log(__CLASS__ . '->' . __FUNCTION__);\n\n if (!count($allowedCustomerGroups)) {\n //Mage::log('customergroup/multiselect field must not be empty.');\n return false;\n }\n\n if ( empty($allowedCustomerGroups[0])\n && count($allowedCustomerGroups) == 1) {\n //Mage::log('customergroup/multiselect field must not be empty.');\n return false;\n }\n\n if (!Mage::getSingleton('customer/session')->isLoggedIn()) {\n //Mage::log('Customer must be logged in.');\n return false;\n }\n\n $customerGroupId = Mage::getSingleton('customer/session')->getCustomer()->getData('group_id');\n\n\n /**\n * This cannot happen. ID is always at least =1.\n * Read the docs for more information.\n */\n if ('0' == (string)$customerGroupId) {\n //Mage::log('Customer is not logged in or has wrong group (should never happen, but ... system error?)');\n return false;\n }\n\n if (!in_array($customerGroupId, $allowedCustomerGroups)) {\n //Mage::log('Customer is logged in, but not within allowed groups.');\n return false;\n }\n\n //Mage::log('Customer is logged in and within allowed groups.');\n return true;\n }", "public function post()\n {\n return \"/V1/customerGroups\";\n }", "protected function getDefaultGroup()\n {\n if (isset($this->connections[self::DEFAULT_GROUP]) || !$this->connections)\n {\n return self::DEFAULT_GROUP;\n }\n else\n {\n return key($this->connections);\n }\n }", "public function toString()\n {\n return 'Customer Group form was filled correctly.';\n }", "public function generateGroupsDropdown() {\n\n\t\t// Load groups\n\t\t$this->loadGroups();\n\n\t\tif ($this->checkForData('getGroups')) {\n\n\t\t\t// We have groups, now\n\t\t\t// create the placeholder\n\t\t\t$aGroups = array(\n\t\t\t\tnew stdClass()\n\t\t\t);\n\n\t\t\t$aGroups[0]->sValue = null;\n\t\t\t$aGroups[0]->sLabel = 'Please choose a group';\n\n\t\t\t// Loop through each of the groups\n\t\t\t// and create an object out of them\n\t\t\t// then append them to the array\n\t\t\tforeach ($this->getGroups() as $oGroup) {\n\n\t\t\t\t// Create the object\n\t\t\t\t$oGroup = new stdClass();\n\n\t\t\t\t// Set the value\n\t\t\t\t$oGroup->sValue = $oGroup->id;\n\n\t\t\t\t// Set the label\n\t\t\t\t$oGroup->sLabel = $oGroup->name;\n\n\t\t\t\t// Push the groups to the array\n\t\t\t\tarray_push($aGroupss, $oGroup);\n\t\t\t}\n\n\t\t\t// Return the generated\n\t\t\t// groups dropdown HTML\n\t\t\treturn $this->generateHtmlDropdown('selGroupId', 'selGroupId', $aGroups, array(\n\t\t\t\t'style' => 'width:250px;'\n\t\t\t));\n\n\t\t} else {\n\n\t\t\t// Set the system error\n\t\t\t$this->setError(Whv_Config::Get('notificationMessages', 'noGroupsFound'));\n\n\t\t\t// Return null, because we are unable\n\t\t\t// to build a dropdown because the\n\t\t\t// current account is not a member\n\t\t\t// of any groups\n\t\t\treturn null;\n\t\t}\n\n\t}", "public function getUsergroup() {}", "function getUserGroups($u)\n{\n return(\"\");\n}", "function get_group($group_id)\n {\n /* empty for address books don't supporting groups */\n return null;\n }", "public static function getGroup(string $group): string\r\n {\r\n if (array_key_exists($group, static::$characters)) {\r\n return static::$characters[$group];\r\n }\r\n }", "public function groupName();", "public function getFreeNodeGroup()\r\n\t{\r\n\t\t$ids = array();\r\n\t\tforeach ($this->getNodeGroups() as $nodeGroup)\r\n\t\t{\r\n\t\t\t$ids[] = $nodeGroup->getField();\r\n\t\t}\r\n\t\tksort($ids);\r\n\r\n\t\t$res = 0;\r\n\t\tforeach ($ids as $id)\r\n\t\t{\r\n\t\t\tif ($id == $res)\r\n\t\t\t{\r\n\t\t\t\t$res++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $res;\r\n\t}", "function mygroupname($bn) {\n // default grouping is by chars before \"-\"\n $cutpos = strpos($bn, '-');\n if ($cutpos === FALSE) $cutpos = strlen($bn);\n $group = substr($bn, 0, $cutpos);\n return $group;\n }", "abstract public function GetGroupID(string $groupname);", "public function getOldCustomerGroup()\n {\n return $this->oldCustomerGroup instanceof CustomerGroupReferenceBuilder ? $this->oldCustomerGroup->build() : $this->oldCustomerGroup;\n }", "public static function CreateDefault()\n {\n $group = new MTConGroup();\n //---\n $group->PermissionsFlags = MTEnPermissionsFlags::PERMISSION_ENABLE_CONNECTION;\n $group->AuthMode = MTEnAuthMode::AUTH_STANDARD;\n $group->AuthPasswordMin = 7;\n $group->ReportsMode = MTEnReportsMode::REPORTS_DISABLED;\n $group->ReportsFlags = MTEnReportsFlags::REPORTSFLAGS_NONE;\n $group->Currency = \"USD\";\n $group->CurrencyDigits = 2;\n $group->NewsMode = MTEnNewsMode::NEWS_MODE_FULL;\n $group->MailMode = MTEnMailMode::MAIL_MODE_FULL;\n $group->MarginFreeMode = MTEnFreeMarginMode::FREE_MARGIN_USE_PL;\n $group->MarginCall = 50;\n $group->MarginStopOut = 30;\n $group->MarginSOMode = MTEnStopOutMode::STOPOUT_PERCENT;\n $group->TradeVirtualCredit = 0;\n $group->MarginFreeProfitMode = MTEnMarginFreeProfitMode::FREE_MARGIN_PROFIT_PL;\n $group->DemoLeverage = 0;\n $group->DemoDeposit = 0;\n $group->LimitSymbols = 0;\n $group->LimitOrders = 0;\n $group->LimitHistory = MTEnHistoryLimit::TRADE_HISTORY_ALL;\n $group->TradeInterestrate = 0;\n $group->TradeFlags = MTEnGroupTradeFlags::TRADEFLAGS_ALL;\n //---\n return $group;\n }", "public function getFailedGroup(): ?string\n {\n return $this->get(self::FAILED_GROUP);\n }", "function validate_group($group)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if ($group == -1)\n return;\n\n $group = Group_Factory::create($group);\n\n if (! $group->exists())\n return lang('base_group') . ' - ' . lang('base_invalid');\n }", "function adGroupGet($name)\n{\n\t$groupbits = explode(\"\\\\\",$name);\n\tif (count($groupbits) > 1)\n\t{\n\t\t$groupname = $groupbits[1];\n\t\t$groupdomain = strtolower($groupbits[0]);\n\t}\n\telse { return false; }\n\t\n\n\t//initialize some objects\n\t$cn = new \\COM(\"ADODB.Connection\");\n\t$rs = new \\COM(\"ADODB.RecordSet\");\n\n\t//setup the ADODB connection\n\t$cn->provider = \"ADsDSOObject\";\n\n\n\t$cn->open(\"ADs Provider\");\n\n\t//get the GC root\n\t$gc = adGCRoot();\n\t\n\t//assemble the query - use only fields from the GC for obvious reasons\n\t$query = \"<$gc>;(&(objectClass=group)(objectCategory=group)(sAMAccountName=$groupname));sAMAccountName,cn,distinguishedName;subtree\";\n\n\n\t//get the results\n\t$out = false;\n\t$rs = $cn->Execute($query);\n\tif (($rs->EOF) && ($rs->BOF))\n\t{\n\t\tthrow new \\Exception(\"No matching group found for $name\");\n\t}\n\telse\n\t{\n\t\tfor (;!$rs->EOF;)\n\t\t{\n\t\t\t\n\t\t\t$dn = strtolower($rs->fields['distinguishedName']->value);\n\t\t\tif (strpos($dn,\"dc=$groupdomain,\"))\n\t\t\t{\n\t\t\t\t$out = $rs->fields['distinguishedName']->value;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$rs->MoveNext();\n\t\t}\n\t}\t\n\treturn $out;\n}", "public function getUserGroupNames()\n {\n }", "function bitly_get_group($bitly_auth_token, $group_name = null){\n\t\t$curl = curl_init();\n\n\t\t// first, we have to get the group guids from bit.ly\n\n\t\tcurl_setopt_array($curl, array(\n\t\t\tCURLOPT_URL => \"https://api-ssl.bitly.com/v4/groups\",\n\t\t\tCURLOPT_RETURNTRANSFER => true,\n\t\t\tCURLOPT_HTTPGET => true,\n\t\t\tCURLOPT_TIMEOUT => 30,\n\t\t\tCURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\t\t\tCURLOPT_HTTPHEADER => array(\n\t\t\t\t\"Host: api-ssl.bitly.com\",\n\t\t\t\t\"Authorization: Bearer \" . $bitly_auth_token,\n\t\t\t\t\"Accept: application/json\"\n\t\t\t),\n\t\t));\n\t\t$response = json_decode(curl_exec($curl));\n\n\t\t$bitly_group = $response->groups[0]->organization_guid; // default to the first guid in the array. free accounts only have one group.\n\t\tforeach ($response->groups as $group){\n\n\t\t\tif ($group->name == $group_name){\n\t\t\t\t$bitly_group = $group->organization_guid;\n\t\t\t}\n\t\t}\n\n\t\tcurl_close($curl);\n\t\treturn $bitly_group;\n\t}", "public function getGroupName()\n {\n if (array_key_exists(\"groupName\", $this->_propDict)) {\n return $this->_propDict[\"groupName\"];\n } else {\n return null;\n }\n }", "public function getAllCustomerGroups()\n {\n $customerGroupsCollection = Mage::getModel('customer/group')->getCollection();\n $customerGroupsCollection->addFieldToFilter('customer_group_code', array('nlike'=>'%auto%'));\n\n $groups = array();\n foreach ($customerGroupsCollection as $group){\n $groups[] = $group->getId();\n }\n\n return $groups;\n }", "public function getCustomerGroupId()\n {\n $groupModel = Mage::getModel('customer/group');\n $group = $groupModel->load(self::CUSTOMER_GROUP_NAME, 'customer_group_code');\n return $group->getId();\n }", "public function getGroupName(){\r\n\t\treturn $this->group_name;\r\n\t}", "static public function getGroupName();", "function _get_mobile_group() {\r\n if ($this->_mobile) {\r\n return $this->_mobile->get_group();\r\n }\r\n\r\n return '';\r\n }", "function GetGRPName($GRP){\n\tif ($GRP < 1) {\n\t\treturn \"Guest\";\n\t}\n\tif ($GRP == 1) {\n\t\treturn \"Registed\";\n\t}\n\tif ($GRP == 2) {\n\t\treturn \"Trusted\";\n\t}\n\tif ($GRP == 3) {\n\t\treturn \"Writer\";\n\t}\n\tif ($GRP == 4) {\n\t\treturn \"VIP\";\n\t}\n\tif ($GRP >= 5) {\n\t\treturn \"Admin\";\n\t}\n}", "function getDefaultUsergroup()\r\n {\r\n return '';\r\n }", "private function CheckGroup() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\t$sth = DB::prep(\"SELECT COUNT(*) as c FROM cms_messaging_groups WHERE id = :id\");\n\t\t\t$sth->bindParam(\":id\", $this->group, PDO::PARAM_INT);\n\t\t\t$result = DB::getFirst($sth, null, PDO::FETCH_OBJ);\n\t\t\t\n\t\t\tif(!$result->c) throw new Exception (\"\", 5);\n\t\t\t\n\t\t} catch(Exception $e)\n\t\t{\n\t\t\t$this->Fill($e->getCode());\n\t\t}\n\t\t\n\t\t\n\t}", "public function customerGroup(CustomerGroup $customerGroup);", "public function getCustomerGroups()\n {\n return $this->customerGroups;\n }", "public function getGroupName()\n {\n return $this->group_name;\n }", "public function getInstanceGroup()\n {\n return isset($this->instance_group) ? $this->instance_group : '';\n }", "public function getCustomerGroups()\n {\n return $this->scopeConfig->getValue('carriers/vip/customer_groups', ScopeInterface::SCOPE_STORE);\n }", "function ocf_group_ocfid_to_ldapcn($id)\n{\n\tif ($id==db_get_first_id()+1) return get_mapped_admin_group();\n\tif ($id==get_first_default_group()) return get_mapped_users_group();\n\n\tocf_ensure_groups_cached(array($id));\n\tglobal $USER_GROUPS_CACHED;\n\treturn $USER_GROUPS_CACHED[$id]['g__name'];\n}", "public static function getGroup()\n {\n return static::$sGroup;\n }", "function LDAP_getNextGroupID()\n{\n\treturn(LDAP_getNextID(\"group\"));\n}", "abstract public function GetGroupName(int $groupid);", "function getGroupName() {\n return 'smw_group';\n }", "function group_name ($gid) {\n exec(\"grep $gid /etc/group | cut -d':' -f1\", $output, $return);\n if ($return != 0) {\n return false;\n }\n return $output[0];\n}", "function testCg2($list)\n{\n return CentreonContactgroup::verifiedExists($list);\n}", "public function isShowDefaultGroup()\n {\n\n return $this->getConfigForStore(self::XML_IS_SHOW_CUSTOMER_GROUP);\n\n }", "function _get_referrer_group() {\r\n if ($this->_referrer) {\r\n return $this->_referrer->get_group();\r\n }\r\n\r\n return '';\r\n }", "public function customerGroups(Collection $customerGroups);", "public function getGroupName();", "public static function getUserGroup($string){\n \tif(!isset($GLOBALS['User']['groups']) || $GLOBALS['User']['groups'] == array()) User::loadUserGroups();\n \t\n \t//$a = array_flip($GLOBALS['User']['groups']);\n \tforeach($GLOBALS['User']['groups'] as $g){\n \t\tif($g->getName() == $string) return $g->getId();\n \t}\n \treturn null;\n }", "function getGroupDisplay($oGroup) {\n global $default;\n\n if (!isset($oGroup)) {\n // only display unassigned groups\n $oPatternListBox = & new PatternListBox($default->groups_table, \"name\", \"id\", \"fGroupID\");\n $oPatternListBox->setFromClause(\"LEFT OUTER JOIN $default->groups_units_table GUL on ST.id=GUL.group_id\");\n $oPatternListBox->setWhereClause(\"ISNULL(GUL.group_id) AND ST.name <> 'Anonymous' AND ST.name <> 'System Administrators'\");\n return $oPatternListBox->render();\n } else {\n return \"<input type=\\\"hidden\\\" name=\\\"fGroupID\\\" value=\\\"\" . $oGroup->iId . \"\\\">\\n\" .\n $oGroup->getName();\n }\n\n}", "public function getGroupName(): string;", "public function group_to_string(){\n if(count($this->group)>0){\n $g = \"GROUP BY \".implode(',', $this->group);\n return $g;\n }else{\n return '';\n }\n}", "function get_category_group_name($group_id)\n\t{\n\t\t$this->db->select('group_id, group_name');\n\n\t\tif (is_array($group_id))\n\t\t{\n\t\t\t$this->db->where_in('group_id', $group_id);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->db->where('group_id', $group_id);\n\t\t}\n\n\t\treturn $this->db->get('category_groups');\n\t}", "function find_group($ident=\"\")\n\t{\n\tGLOBAL $CircleGroups;\n\t\n\t$group = \"\";\n\t\n\tforeach($CircleGroups as $circle)\n\t {\n\t if ( $circle[0] == $ident )\n\t { $group = $circle[2]; break; }\n\t }\n\t \n\t//IPS_LogMessage(\"...\",$ident.\"-\".$group);\n\treturn $group;\n\t}", "public static function getCustomerGroupOptions($showAll = true)\n\t{\n\t\t$options = array();\n\t\t$results = array();\n\t\tif (SRPlugin::isEnabled('user'))\n\t\t{\n\t\t\t$model = JModelLegacy::getInstance('CustomerGroups', 'SolidresModel', array('ignore_request' => true));\n\t\t\t$model->setState('list.start', 0);\n\t\t\t$model->setState('list.limit', 0);\n\t\t\t$model->setState('filter.state', 1);\n\t\t\t$model->setState('list.ordering', 'a.name');\n\t\t\t$results = $model->getItems();\n\t\t}\n\n\t\tif ($showAll)\n\t\t{\n\t\t\t$options[] = JHTML::_('select.option', -1, JText::_('SR_FILTER_ALL'));\n\t\t}\n\n\t\t$options[] = JHTML::_('select.option', 'NULL', JText::_('SR_GENERAL_CUSTOMER_GROUP'));\n\n\t\tif (!empty($results))\n {\n\t\t\tforeach($results as $item)\n {\n\t\t\t\t$options[] = JHTML::_('select.option', $item->id, $item->name);\n\t\t\t}\n\t\t}\n\n\t\treturn $options;\n\t}", "protected function getSystemGroupNames() {\n\n\t // System groups\n\t $system_group_names = array();\n\t if (!empty(Settings::getInstance()->MODULES['REW_PARTNERS_GRASSHOPPER'])) \t$system_group_names[] = Partner_HappyGrasshopper::GROUP_NAME;\n\t if (!empty(Settings::getInstance()->MODULES['REW_PARTNERS_BOMBBOMB'])) \t\t$system_group_names[] = Partner_BombBomb::GROUP_NAME;\n\t if (!empty(Settings::getInstance()->MODULES['REW_PARTNERS_WISEAGENT'])) \t$system_group_names[] = Partner_WiseAgent::GROUP_NAME;\n\t return $system_group_names;\n\n\t}", "function LDAP_getFreeGroupIDs($start,$amount)\n{\n\treturn(LDAP_getFreeIDs(\"group\",$start,$amount));\n}", "public function findAllGroupNames()\n {\n \n // encode our data into the remote call signature.\n $params = array(\n $this->_getToken(),\n );\n $params = call_user_func_array(array('self', '_soapEncode'), $params);\n \n try\n {\n $result = $this->soapClient->findAllGroupNames($params);\n return $result->out->string;\n }\n catch (SoapFault $e)\n {\n $args = func_get_args();\n return $this->_manageException(__FUNCTION__, $args, $e);\n }\n }", "public function validateHasEmptyGroup()\n {\n if (Yii::$app->user->identity->hasEmptyContactGroup()) {\n $this->addError('name', 'You already have an empty group!');\n }\n }", "public function getGroups(): StringGroup;", "public function getGroupname();", "public function getCustomerGroupForPost()\n {\n $json = <<<JSON\n[\n \n {\n \"customer_group_code\": \"Retailer1\",\n \"tax_class\": \"Retail Customer\"\n },\n {\n \"created_at\": \"2014-12-18 12:59:40\",\n \"customer_group_code\": \"TestGroup\",\n \"mf_guid\": \"3wrlkhhptaqc3s8cdn3txm882xe609tz\",\n \"updated_at\": \"2014-12-18 12:59:40\",\n \"tax_class\": \"Retail Customer\"\n }\n]\nJSON;\n\n return $json;\n }", "function getGroupID($name) {\n\t\t$query = \"\n\t\t\tSELECT\n\t\t\t\tugroup_id\n\t\t\tFROM\n\t\t\t\tugroup\n\t\t\tWHERE\n\t\t\t\tugroup_name='\".addslashes($name).\"'\n\t\t\";\n//\t\techo $query;\n\t\t$r = db_query($query);\n\t\tif (db_num_rows($r)) {\n\t\t\t$a = db_fetch_assoc($r);\n\t\t\treturn $a['ugroup_id'];\n\t\t}\n\t\treturn false;\n\t}", "public function create_group($name);", "public function check_groups_for_registration_code_use()\n {\n $sql = \"select * from \" . $this->groups_table . \" where registration_code != \\\"\\\"\";\n $registration_check_result = $this->db->Execute($sql);\n //echo $sql.\"<br />\\n\";\n if (!$registration_check_result) {\n return false;\n } elseif ($registration_check_result->RecordCount() > 0) {\n $this->update_registration_code_use(1);\n return true;\n } else {\n $this->update_registration_code_use(0);\n $this->update_registration_code_checked(1);\n $this->set_default_group();\n return true;\n }\n }", "protected function getGroupPropertyName(): string\n {\n return 'group';\n }", "public function getDefaultGroup()\n {\n return $this->defaultGroup;\n }", "static function get_group_for( $name ){\n\t\tif ( isset( static::$active_tests[ $name ] ) ) {\n\t\t\treturn static::$active_tests[ $name ][ 'group' ];\n\t\t}\n\t\treturn false;\n\t}", "public function groupName($groupid = 0)\n {\n $groupid*=1;\n if (!$groupid) {\n return false;\n }\n\n $sql=\"SELECT name FROM edxapp.auth_group WHERE id=$groupid;\";\n $q=$this->db->query($sql);\n $f=$q->fetch();\n //todo : add controls\n return $f['name'];\n }", "public static function getName() {\n return 'Product Group';\n }", "public function _getContactGroupString() {\n return array(\n 'tickbox' => array('name' => CHECK_BOX, 'width' => 25, 'align' => CENTER_ALIGNMENT, 'funcBox' => 'TickBox'),\n 'editbox' => array('name' => __('Operations'), 'width' => 50, 'align' => CENTER_ALIGNMENT, 'funcBox' => 'EditBox'),\n 'name' => array('name' => __('Name'), 'width' => 100, 'align' => CENTER_ALIGNMENT, 'sorting' => TRUE),\n 'description' => array('name' => __('Description'), 'width' => 100, 'align' => CENTER_ALIGNMENT, 'sorting' => TRUE),\n 'created_date' => array('name' => __('Created Date'), 'width' => 100, 'align' => CENTER_ALIGNMENT, 'sorting' => TRUE)\n );\n }", "function get_group_options($selected_group=null) {\n\n\t$pricing_group_info = get_option( '_a_totals_pricing_rules', array() );\n\n\tif (sizeof($pricing_group_info) > 0) {\n\t\t$group_options = $selected = '';\n\t\tforeach ($pricing_group_info as $key => $group) {\n\t\t\t$selected = $key==$selected_group ? 'selected=\"selected\"' : '';\n\t\t\t$group_options .= \"<option value='\".$key.\"' \".$selected.\">\".$group['admin_title'].\"</option>\";\n\t\t}\n\t}else {\n\t\t$group_options = '<option value=\"\" selected=\"selected\">Select a group…</option>';\n\t}\n\n\treturn $group_options;\n}", "public function testVerifyDefaultGroupings()\r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\t\t$obj = CAntObject::factory($dbh, \"task\", null, $this->user); \r\n\t\t\r\n\t\t$groups = $obj->getGroupingData(\"category\", null, array(\"user_id\"=>$this->user->id));\r\n\t\tforeach ($groups as $group)\r\n\t\t{\r\n\t\t\t$obj->deleteGroupingEntry(\"category\", $group['id']);\r\n\t\t}\r\n\t\t\r\n\t\t// Now verify groupings which should create defaults\r\n\t\t$result = $obj->verifyDefaultGroupings(\"category\");\r\n\t\t\r\n\t\t// Make sure we have more than one default grouping added\r\n\t\t$this->assertTrue(count($result) >= 1);\r\n\t}", "function get_group_name($group_id = null, $group_type = 'ARO') {\n\n\t\t$this->debug_text(\"get_group_name(): ID: $group_id\");\n\n\t\tswitch(strtolower(trim($group_type))) {\n\t\t\tcase 'axo':\n\t\t\t\t$table = $this->_db_table_prefix .'axo_groups';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$table = $this->_db_table_prefix .'aro_groups';\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$group_id = intval($group_id);\n\n\t\tif (!$group_id) {\n\t\t\t$this->debug_text(\"get_group_name(): group_id ($group_id) is empty, this is required\");\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->db->setQuery( \"SELECT name FROM $table WHERE group_id=\" . (int) $group_id );\n\n\t\t$rows = $this->db->loadRowList();\n\t\tif ($this->db->getErrorNum()) {\n\t\t\t$this->debug_db('get_group_name');\n\t\t\treturn false;\n\t\t}\n\n\t\t$row_count = count( $rows );\n\n\t\tif ($row_count > 1) {\n\t\t\t$this->debug_text(\"get_group_name(): Returned $row_count rows, can only return one. Please make your names unique.\");\n\t\t\treturn false;\n\t\t}\n\n\t\tif ($row_count == 0) {\n\t\t\t$this->debug_text(\"get_group_name(): Returned $row_count rows\");\n\t\t\treturn false;\n\t\t}\n\n\t\t$row = $rows[0];\n\n\t\t//Return the ID.\n\t\treturn $row[0];\n\t}", "function fn_leanpay_payment_get_default_group_id()\n{\n $group_row = db_get_row(\"SELECT id FROM ?:leanpay_installments_groups WHERE name = ?i LIMIT 1\", LEANPAY_DEFAULT_GROUP_NAME);\n \n if (!empty($group_row)) {\n return $group_row['id'];\n }\n \n return false;\n}" ]
[ "0.6596754", "0.6596754", "0.6148748", "0.59941053", "0.5942478", "0.5919014", "0.58906806", "0.5865623", "0.584891", "0.5843333", "0.5737748", "0.5737748", "0.5720267", "0.57042617", "0.56566185", "0.5628349", "0.55900216", "0.5493794", "0.5472323", "0.5447089", "0.54413915", "0.54411596", "0.5428883", "0.5428452", "0.5414652", "0.54055005", "0.5388387", "0.538685", "0.5366803", "0.53516716", "0.53421086", "0.53078586", "0.526438", "0.5229848", "0.5200162", "0.51817745", "0.517952", "0.5178799", "0.5168853", "0.5162374", "0.5156005", "0.5155074", "0.5128374", "0.5113863", "0.51123273", "0.5108987", "0.5097418", "0.50969225", "0.50804144", "0.5074698", "0.50729096", "0.5067197", "0.5063808", "0.5053042", "0.5046153", "0.5041255", "0.5035344", "0.50334454", "0.5025662", "0.498474", "0.4969773", "0.4959957", "0.4953089", "0.49454656", "0.49353957", "0.49295095", "0.49168023", "0.4892247", "0.48893738", "0.48864183", "0.4883431", "0.48798534", "0.48725677", "0.48720205", "0.48660696", "0.4865836", "0.48599842", "0.4858996", "0.4850652", "0.48491383", "0.48432818", "0.4839833", "0.48359448", "0.48340157", "0.48336282", "0.48330522", "0.48311937", "0.48268557", "0.4824302", "0.48210913", "0.48122343", "0.48107716", "0.48096055", "0.48033413", "0.47997278", "0.4798321", "0.47889203", "0.47810844", "0.47769424", "0.47720748" ]
0.7738814
0
Generates connect payment attribute
Генерирует атрибут платежа connect
public function generateConnectPaymentAttribute() { /** @var CrudService $crudService */ $crudService = $this->getCrudService(); $crudService->update( 's_core_paymentmeans_attributes', 'connect_is_allowed', 'boolean', [], null, false, 1 ); $this->modelManager->generateAttributeModels([ 's_core_paymentmeans_attributes' ]); $this->modelManager->regenerateProxies(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPayment()\n {\n return 'CC';\n }", "public function generatePaymentURL(): string;", "private function createMyAttributes()\n {\n /** @var CrudService $crudService */\n $crudService = $this->getCrudService();\n\n $crudService->update(\n 's_order_attributes',\n 'connect_shop_id',\n 'integer'\n );\n\n $crudService->update(\n 's_order_attributes',\n 'connect_order_id',\n 'integer'\n );\n\n $crudService->update(\n 's_categories_attributes',\n 'connect_import_mapping',\n 'text'\n );\n\n $crudService->update(\n 's_categories_attributes',\n 'connect_export_mapping',\n 'text'\n );\n\n $crudService->update(\n 's_categories_attributes',\n 'connect_imported',\n 'text'\n );\n\n $crudService->update(\n 's_media_attributes',\n 'connect_hash',\n 'string'\n );\n\n $crudService->update(\n 's_premium_dispatch_attributes',\n 'connect_allowed',\n 'boolean',\n [],\n null,\n false,\n 1\n );\n\n $crudService->update(\n 's_articles_attributes',\n 'connect_product_description',\n 'html',\n [\n 'translatable' => 1,\n 'displayInBackend' => 1,\n 'label' => 'Connect Beschreibung'\n ]\n );\n\n $crudService->update(\n 's_articles_prices_attributes',\n 'connect_price',\n 'float',\n [],\n null,\n false,\n 0\n );\n\n $crudService->update(\n 's_core_customergroups_attributes',\n 'connect_group',\n 'boolean'\n );\n\n $crudService->update(\n 's_articles_attributes',\n 'connect_article_shipping',\n 'text'\n );\n\n $crudService->update(\n 's_articles_attributes',\n 'connect_reference',\n 'string'\n );\n\n $crudService->update(\n 's_articles_attributes',\n 'connect_property_group',\n 'string'\n );\n\n $crudService->update(\n 's_categories_attributes',\n 'connect_imported_category',\n 'boolean'\n );\n\n $crudService->update(\n 's_articles_attributes',\n 'connect_mapped_category',\n 'boolean'\n );\n\n $crudService->update(\n 's_articles_attributes',\n 'connect_remote_unit',\n 'string'\n );\n\n $crudService->update(\n 's_articles_supplier_attributes',\n 'connect_is_remote',\n 'boolean',\n [],\n null,\n false,\n 0\n );\n\n $crudService->update(\n 's_articles_img_attributes',\n 'connect_detail_mapping_id',\n 'integer'\n );\n\n $crudService->update(\n 's_filter_attributes',\n 'connect_is_remote',\n 'boolean',\n [],\n null,\n false,\n 0\n );\n\n $crudService->update(\n 's_filter_options_attributes',\n 'connect_is_remote',\n 'boolean',\n [],\n null,\n false,\n 0\n );\n\n $crudService->update(\n 's_filter_values_attributes',\n 'connect_is_remote',\n 'boolean',\n [],\n null,\n false,\n 0\n );\n\n $crudService->update(\n 's_product_streams_attributes',\n 'connect_is_remote',\n 'boolean',\n [],\n null,\n false,\n 0\n );\n\n $this->modelManager->generateAttributeModels([\n 's_articles_attributes',\n 's_articles_supplier_attributes',\n 's_order_attributes',\n 's_core_customergroups_attributes',\n 's_articles_prices_attributes',\n 's_premium_dispatch_attributes',\n 's_categories_attributes',\n 's_order_details_attributes',\n 's_order_basket_attributes',\n 's_articles_img_attributes',\n 's_media_attributes',\n 's_filter_attributes',\n 's_filter_options_attributes',\n 's_filter_values_attributes',\n 's_product_streams_attributes',\n ]);\n }", "public function saveConnectAttributeAction()\n {\n $data = $this->Request()->getParams();\n\n /** @var \\Shopware\\CustomModels\\Connect\\Attribute $connectAttribute */\n $connectAttribute = $this->getModelManager()->find('Shopware\\CustomModels\\Connect\\Attribute', $data['id']);\n if (!$connectAttribute) {\n throw new \\RuntimeException(\"Could not find connect attribute with id {$data['id']}\");\n }\n\n /** @var \\Shopware\\Models\\Article\\Detail $detail */\n foreach ($connectAttribute->getArticle()->getDetails() as $detail) {\n $connectAttribute = $this->getHelper()->getConnectAttributeByModel($detail);\n // Only allow changes in the fixedPrice field if this is a local product\n if (!$connectAttribute->getShopId()) {\n $connectAttribute->setFixedPrice($data['fixedPrice']);\n }\n // Save the update fields\n foreach ($data as $key => $value) {\n if (strpos($key, 'update') === 0) {\n $setter = 'set' . ucfirst($key);\n $connectAttribute->$setter($value);\n }\n }\n $this->getModelManager()->persist($connectAttribute);\n }\n\n $this->getModelManager()->flush();\n\n $this->View()->assign(['success' => true]);\n }", "public function createConnectCustomerGroup()\n {\n $connectGroupAttributeId = $this->getConnectCustomerGroupId();\n if (!$this->connectCustomerGroupExists($connectGroupAttributeId)) {\n\n // Create Customer Group\n $this->db->insert(\n 's_core_customergroups',\n [\n 'groupkey' => $this->getAvailableCustomerGroupName(),\n 'description' => 'SC export',\n 'tax' => 0,\n 'taxinput' => 0,\n 'mode' => 0\n ]\n );\n\n $customerGroupID = $this->db->fetchOne('SELECT MAX(id) FROM s_core_customergroups');\n\n // Create Customer Group Attributes\n $this->db->insert(\n 's_core_customergroups_attributes',\n [\n 'customerGroupID' => $customerGroupID,\n 'connect_group' => 1\n ]\n );\n }\n }", "public static function generatePayLink()\n {\n return self::generateLink( \"Pay\", array( \"SessionId\" => self::$_sessionId ) );\n }", "function generate_coupon()\n {\n $reciever = $this->get_receiver(1);\n\n }", "public function createAttributesName()\n {\n $apiKey = !empty($this->apiKey) ? $this->apiKey : $this->getDbData('api_key');\n $valueLanguage = $this->getApiConfigValue();\n $this->updateDbData('sendin_config_lang', trim($valueLanguage->language));\n $this->updateDbData('sendin_date_format', trim($valueLanguage->date_format));\n $noramalAttribute = $this->allAttributesType($valueLanguage->language); \n $transactionalAttributes = $this->allTransactionalAttributes();\n $calcAttribute = $this->attrCalculated(); \n $globalAttribute = $this->attrGlobal();\n\n if ($valueLanguage->language == 'fr') {\n $dataAttr = array('PRENOM'=>'text','NOM'=>'text','CLIENT'=>'number','COMPANY'=>'text','SMS'=>'text','CITY'=>'text','COUNTRY'=>'text','POSTCODE'=>'text','PROVINCE_CODE'=>'text','COUNTRY_CODE'=>'text');\n } else {\n $dataAttr = array('NAME'=>'text','SURNAME'=>'text','CLIENT'=>'number','COMPANY'=>'text','SMS'=>'text','CITY'=>'text','COUNTRY'=>'text','POSTCODE'=>'text','PROVINCE_CODE'=>'text','COUNTRY_CODE'=>'text');\n }\n\n $mailin = $this->createObjMailin($apiKey);\n $normal = array( \"type\" => \"normal\",\n \"data\" => $noramalAttribute\n );\n $mailin->createAttribute($normal);\n\n $transactionalAttributes = array('ORDER_ID'=>'id','ORDER_DATE'=>'date','ORDER_PRICE'=>'number');\n $trans = array( \"type\" => \"transactional\",\n \"data\" => $transactionalAttributes\n );\n $mailin->createAttribute($trans);\n\n $calculatedValue = array( \"type\" => \"calculated\",\n \"data\" => $calcAttribute);\n $mailin->createAttribute($calculatedValue);\n\n $dataGlobal = array( \"type\" => \"global\",\n \"data\" => $globalAttribute);\n $mailin->createAttribute($dataGlobal);\n }", "function give_paypal_connect_button() {\n\n\t// Prepare Stripe Connect URL.\n\t$link = admin_url( 'edit.php?post_type=give_forms&page=give-settings&tab=gateways&section=paypal-standard' );\n\n\treturn sprintf(\n\t\t'<a href=\"%1$s\" id=\"give-paypal-connect\"><span>%2$s</span></a>',\n\t\tesc_url( $link ),\n\t\tesc_html__( 'Connect to PayPal', 'give' )\n\t);\n}", "abstract public function createRegularPaymentXML();", "public function getPaymentLink()\n {\n $paymentRequest = new \\PagSeguroPaymentRequest();\n \n $this->setReference(\\Extensions\\Strings::randomString(32));\n $paymentRequest->setSender($this->getCustomer()\n ->getName(), $this->getCustomer()\n ->getEmail(), $this->getCustomer()\n ->getAreaCode(), $this->getCustomer()\n ->getPhone());\n $paymentRequest->setShippingAddress($this->getCustomer()\n ->getCEP(), $this->getCustomer()\n ->getAddress(), $this->getCustomer()\n ->getNumber(), $this->getCustomer()\n ->getAddressComplement(), $this->getCustomer()\n ->getNeighborhood(), $this->getCustomer()\n ->getCity(), $this->getCustomer()\n ->getState(), $this->getCustomer()\n ->getCountry());\n $paymentRequest->setCurrency(\"BRL\");\n $paymentRequest->setShippingType(3);\n $paymentRequest->setReference($this->getReference());\n $paymentRequest->setNotificationURL($_SERVER['REQUEST_SCHEME'] . \"://\" . $_SERVER['HTTP_HOST'] . \"/pagseguronotifications.php\");\n foreach ($this->getItems() as $item) {\n $paymentRequest->addItem($item['id'], $item['title'], $item['quantity'], $item['value']);\n }\n return $paymentRequest->register(self::$credentials);\n }", "public function generate()\n {\n return $this->_itemCode + $this->_itemBinding + $this->_itemGrade * self::ITEM_GRADE_CONSTANT;\n }", "public function getPaymentName()\n {\n return 'conekta';\n }", "public function donationPayment() {\n\n if (empty($this->config)) {\n throw new \\InvalidArgumentException('Config can not be empty!');\n }\n\n //create payment\n\n $pay = new Payment();\n if (!\\Yii::$app->user->isGuest) {\n $pay->userId = \\Yii::$app->user->id;\n }\n $pay->amount = $this->donation->amount;\n $pay->type = Payment::TYPE_DONATION;\n $pay->relatedId = $this->donation->id;\n $pay->createdDate = time();\n $pay->save();\n\n //build success callback url\n\n //key and value for control callback from First Giving\n $key = \"\"; $value = \"\";\n extract($this->config['callbackSuccessPair']);\n\n $callbackUrl = sprintf('%s?%s=%s&%s=%d', Yii::$app->urlManager->createAbsoluteUrl('fgcallback'), $key, $value, self::PAYMENT_ID_PARAM, $pay->id);\n\n //build form url\n\n $styleSheetUrl = $this->config['formStyleSheetURL'];\n if (!parse_url($styleSheetUrl, PHP_URL_HOST)) {\n $styleSheetUrl = Yii::$app->urlManager->hostInfo . $styleSheetUrl;\n }\n\n $user = Application::getCurrentUser();\n $affiliate_id = $this->config['affiliate']['common'];\n if (isset($user) && ($user->getPlan() == Plan::PLAN_PRO))\n {\n $affiliate_id = $this->config['affiliate']['pro'];\n }\n\n $formUrl = sprintf(\n '%s/secure/payment/%s?amount=%s&_pb_success=%s&buttonText=%s&styleSheetURL=%s&affiliate_id=%s&_cb_success=%s',\n $this->config['donateHost'], // donate host\n $this->firstGiving->organization_uuid, // First Giving organization uuid\n $this->donation->amount, //amount\n base64_encode($this->config['pb_success']), // _pb_success\n 'Donate $'.number_format($this->donation->amount, 2), // buttonText\n base64_encode($styleSheetUrl), // styleSheetURL\n $affiliate_id,\n base64_encode($callbackUrl) // _cb_success\n );\n\n if ($this->donation->email) {\n $formUrl .= sprintf('&email=%s', $this->donation->email);\n }\n\n return $formUrl;\n }", "abstract function getPayment();", "protected function _getPaymentId()\n {\n }", "abstract public function setup_payment(): void;", "function generatePaymentLink() {\n\t header('Content-Type: application/json; charset=utf-8');\n try {\n $paymentLinkPage = new GeneratePaymentLinkController();\n $paymentUrl = $paymentLinkPage->generatePaymentLink($_POST['booking_ref'],\n $_POST['amount'] == 'true' ? true : ($_POST['amount'] == 'false' ? false : $_POST['amount']));\n\t echo json_encode( [ 'paymentUrl' => $paymentUrl ] );\n }\n catch( Exception $e ) {\n\t echo json_encode( [ 'error' => $e->getMessage() ] );\n }\n }", "function get_custadv_payment_id($payment_id,$year){ global $app_version;\n $year = ($year == '') ? $app_version : $year; return 'CAP/'.$year.'/P/'.$payment_id; }", "public function getPayPalPayment()\n {\n }", "protected function generateAndSaveCode()\n {\n $code = Mage::helper('core')->getRandomString(32);\n $configModel = Mage::getModel('core/config');\n $configModel->saveConfig(\n Dotdigitalgroup_Email_Helper_Config::XML_PATH_CONNECTOR_DYNAMIC_CONTENT_PASSCODE,\n $code\n );\n }", "public function callPayAction(): Payment\n {\n return new ModelPayment('Credtcard Payment Method');\n }", "private function paymentPagseguroCheckoutNode($payment) {\n\n\t\t$this->xml_writer->startElement('payment');\n\n\t\t\t$this->xml_writer->writeElement('method', $payment['method']);\n\t\t\t$this->xml_writer->writeElement('amount', Utils::formatNumber($payment['amount']));\n\t\t\t$this->xml_writer->writeElement('currency', $payment['currency']);\n\t\t\t$this->xml_writer->writeElement('country', $payment['country']);\n\t\t\t$this->xml_writer->writeElement('numberOfPayments', $payment['numberOfPayments']);\n\t\t\t$this->xml_writer->writeElement('flag', $payment['flag']);\n\t\t\t$this->xml_writer->writeElement('cardHolder', $payment['cardHolder']);\n\t\t\t$this->xml_writer->writeElement('cardNumber', $payment['cardNumber']);\n\t\t\t$this->xml_writer->writeElement('cardSecurityCode', $payment['cardSecurityCode']);\n\t\t\t$this->xml_writer->writeElement('cardExpirationDate', $payment['cardExpirationDate']);\n\n\t\t$this->xml_writer->endElement();\n\t}", "public function getPayment()\n {\n }", "public function getPaymorrowOxPayment()\n {\n }", "function generate_new_company_billing_without_order($payment) {\n\n $customer = $payment->customer()->first();\n\n $company_billing = new \\App\\Models\\CompanyBilling;\n $company_billing->branch = 'masterbox';\n $company_billing->customer_id = retrieve_customer_id($customer);\n $company_billing->contract_id = generate_contract_id('MBX', $customer);\n $company_billing->bill_id = generate_bill_id('MBX', $customer);\n $company_billing->encrypted_access = Crypt::encrypt($company_billing->branch.$company_billing->customer_id.$company_billing->contract_id.$company_billing->bill_id);\n\n $company_billing->title = 'Box principale';\n $company_billing->save();\n\n return $company_billing;\n\n}", "public function generatechave_autenticacao()\n {\n $this->chave_autenticacao = Yii::$app->security->generateRandomString();\n }", "private static function cryptoCryptGenerate()\r\n {\r\n for ($i = 0; $i < self::CRYPTO_LENGTH; $i++) {\r\n self::$code .= substr(self::$charset, rand(0, 61), 1);\r\n }\r\n }", "public function payment_fields(){\r\n if ($this->sandbox) {\r\n?>\r\n <p>In sandbox mode you can generate test CC numbers <a href=\"https://ccardgenerator.com/generate-mastercard-card-numbers.php\" target=\"_blank\">here</a>.</p>\r\n\r\n <?php \r\n }\r\n\r\n parent::payment_fields();\r\n\r\n ?>\r\n <script type='text/javascript'>\r\n jQuery(function ($) {\r\n jQuery('#<?php echo $this->id?>-card-number').on('payment.cardType', function (e, cardType) {\r\n if (jQuery('#<?php echo $this->id?>-card-number').hasClass('identified')) {\r\n jQuery('#<?php echo $this->id?>-card-type').val(cardType);\r\n } else {\r\n jQuery('#<?php echo $this->id?>-card-type').val('');\r\n }\r\n });\r\n });\r\n </script>\r\n\r\n\r\n <?php\r\n }", "public function getPayment()\n {\n }", "public function accountGenerate(){\n return $this->fetch_nis('/account/generate');\n }", "public function __toString() {\n return \"payment of \".CurrencyUtil::satoshisToNumber($this['amount']).\" \".$this['token'].\" to \".$this['address'];\n }", "public function createPaylinkPayment($paycode)\n\t{\n\t\t$orders_id = $paycode->orders_id;\n\t\t$amount = $paycode->amount;\n\t\t$paycode_hash = $paycode->paycode;\n\n\t\t$order = new order((int)$orders_id);\n\t\t$intent = $this->config->get('intent');\n\t\t$mode = 'ecm';\n\t\t$paymentExperienceProfileId = $this->config->get('payment_experience_profile/'.$_SESSION['language_code']);\n\t\t$paymentArray = array(\n\t\t\t\t\"intent\" => $intent,\n\t\t\t\t\"payer\" => array(\n\t\t\t\t\t\"payment_method\" => \"paypal\"\n\t\t\t\t),\n\t\t\t\t\"transactions\" => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"amount\" => array(\n\t\t\t\t\t\t\t\"currency\" => $order->info['currency'],\n\t\t\t\t\t\t\t\"total\" => $this->_formatAmount($amount, $order->info['currency']),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t\"description\" => $this->encHelper->transcodeOutbound(STORE_NAME),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t\"redirect_urls\" => array(\n\t\t\t\t\t\"return_url\" => str_replace('&amp;', '&', xtc_href_link('shop.php', 'do=PayPal/PaylinkReturn&code='.$paycode_hash, 'SSL')),\n\t\t\t\t\t\"cancel_url\" => str_replace('&amp;', '&', xtc_href_link('index.php', '', 'SSL')),\n\t\t\t\t),\n\t\t\t);\n\t\tif(!empty($paymentExperienceProfileId))\n\t\t{\n\t\t\t$paymentArray['experience_profile_id'] = $paymentExperienceProfileId;\n\t\t}\n\n\t\trequire_once DIR_FS_CATALOG.'gm/classes/JSON.php';\n\t\t$json = MainFactory::create('Services_JSON');\n\t\t$paymentJSON = $json->encodeUnsafe($paymentArray);\n\n\t\t$ppRestService = MainFactory::create_object('PayPalRestService');\n\t\t$ppRestRequest = MainFactory::create_object('PayPalRestRequest', array('POST', '/v1/payments/payment', $paymentJSON, 'ecm'));\n\t\t$response = $ppRestService->performRequest($ppRestRequest);\n\t\t$response_object = $response->getResponseObject();\n\t\tif($response_object === false)\n\t\t{\n\t\t\tthrow new Exception('Error decoding response '.print_r($response, true));\n\t\t}\n\t\tif($response->getResponseCode() != '201')\n\t\t{\n\t\t\t$error_message = $response_object->name.' '.$response_object->message;\n\n\t\t\tif(isset($response_object->details))\n\t\t\t{\n\t\t\t\t$error_message .= ', details: ';\n\t\t\t\tforeach($response_object->details as $detail)\n\t\t\t\t{\n\t\t\t\t\t$error_message .= $detail->field .': '.$detail->issue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow new Exception('ERROR creating payment: '.$error_message);\n\t\t}\n\n\t\t$paypalPayment = MainFactory::create_object('PayPalPayment', array($response_object));\n\t\treturn $paypalPayment;\n\t}", "protected function _getPaymentHelper(){\r\n return Mage::helper('affiliateplus/payment');\r\n }", "abstract public function getPaymentConfiguration();", "function directPayment($payment) {\n $xmldas = SDO_DAS_XML::create(dirname(__FILE__) . '/../Schema/Customer.xsd');\n $filename = dirname(__FILE__) . \"/Payments/Payment_\" . $payment->paymentId . \".xml\";\n $doc = $xmldas->createDocument('customerNS', 'payment', $payment);\n $xmldas->saveFile($doc, $filename,2);\n }", "public function getPaymentMethod()\n {\n }", "protected function payments(): Attribute\n {\n return new Attribute(\n get: function (): Collection {\n return $this->transactions->where('type', TransactionType::Payment);\n }\n );\n }", "public function generate()\n\t{\n\t\t$shop_id = $this->getShop_Id();\n\t\t$all_slot = Tbl_mlm_slot::where('tbl_mlm_slot.shop_id', $shop_id)->membership()->customer()->get();\n $card = null;\n foreach($all_slot as $key => $value)\n {\n if($value->membership_name == 'V.I.P Silver')\n {\n $color = 'silver';\n }\n else if($value->membership_name == 'V.I.P Gold')\n {\n $color = 'gold';\n }\n else if($value->membership_name == 'V.I.P Platinum ')\n {\n $color = 'red';\n }\n else\n {\n $color = 'discount';\n }\n $name = name_format_from_customer_info($value);\n $membership_code = $value->slot_no;\n $card .= $this->card_all($color, $name, $membership_code);\n // $pdf = App::make('snappy.pdf.wrapper');\n // $pdf->loadHTML($card);\n // return $pdf->inline();\n // $card = $this->\n }\n // $discount_card = Tbl_mlm_discount_card_log::\n // ->join('tbl_customer', 'tbl_customer.custmer_id', 'Tbl_mlm_slot.')\n // ->get();\n // \n if(Request::input('pdf') == 'true')\n {\n $pdf = App::make('snappy.pdf.wrapper');\n $pdf->loadHTML($card);\n return $pdf->inline();\n return Pdf_global::show_pdf($card);\n }\n else\n {\n return $card;\n }\n\t}", "public function get_wizard_in_cart_payment_gateways()\n {\n }", "public function generate_customer_id()\n {\n }", "function joinPaymentInfo() ;", "protected function generate_attribute_summary($product)\n {\n }", "function getMakePaymentUrl($order) {\n\t\t\treturn Mage::getModel( 'core/url' )->getUrl( 'warehouse/sales_order/makepayment', array( 'order_id' => $order->getId( ) ) );\n\t\t}", "function generate_layer_attribute($schema, $table, $table_attribute) {\n\t\t$this->debug->write(\"<p>generate_layer_attribute: {$table_attribute}\", 4);\n\t\tif ($table_attribute['type_type'] == 'e')\n\t\t\t$enum_options = $this->pgdatabase->get_enum_options($schema, $table_attribute);\n\t\telse\n\t\t\t$enum_options = array('option' => '', 'constraint' => '');\n\n\t\t$sql .= $this->database->generate_layer_attribute($table_attribute, $table, $enum_options);\n\t\treturn $sql;\n\t}", "abstract public function getPaymentInfo();", "private function generatePaymentXml(\\SimpleXMLElement $cdtTrfTxInf, $payment, $ccy)\n {\n $cdtTrfTxInf->addChild('PmtId')->addChild('EndToEndId', $payment['pmtId']);\n $cdtTrfTxInf->addChild('Amt')->addChild('InstdAmt', $payment['instdAmt'])\n ->addAttribute('Ccy', $ccy);\n if( !empty( $payment['bic'] ) )\n $cdtTrfTxInf->addChild('CdtrAgt')->addChild('FinInstnId')\n ->addChild('BIC', $payment['bic']);\n\n $cdtTrfTxInf->addChild('Cdtr')->addChild('Nm', $payment['cdtr']);\n $cdtTrfTxInf->addChild('CdtrAcct')->addChild('Id')->addChild('IBAN', $payment['iban']);\n\n if( isset( $payment['ultmtCdtr'] ) )\n $cdtTrfTxInf->addChild('UltmtCdtr')->addChild('Nm', $payment['ultmtCdtr']);\n if( isset( $payment['purp'] ) )\n $cdtTrfTxInf->addChild('Purp')->addChild('Cd', $payment['purp']);\n if( isset( $payment['rmtInf'] ) )\n $cdtTrfTxInf->addChild('RmtInf')->addChild('Ustrd', $payment['rmtInf']);\n }", "public function generateSerial()\n {\n\n $this->serial = 'OP' . time() .''. rand ( 55 , time() );\n }", "public function getPaymentUrl();", "public function getCustomer_payment()\n {\n return $this->customer_payment;\n }", "public function create_credit_card_charge() {\n\n\t\t$this->create_transaction( self::TRANSACTION_TYPE_SALE );\n\t}", "public function payment_fields(){\n\t\t}", "public function payment_fields()\n {\n }", "public function payment_fields() {\n\n\t}", "public function payment_fields()\n {\n }", "public function payment_fields()\n {\n }", "public static function payeur()\n\t{\n\t\tJHtml::_('bootstrap.tooltip', '.modalTooltip', array('container' => '.modal-body'));\n\n\t\t// Create the batch selector to change an access level on a selection list.\n\t\treturn\n\t\t\t'<div class=\"control-label\">'\n\t\t\t.'<label id=\"batch-payeur-lbl\" for=\"batch-payeur\" class=\"modalTooltip\" '\n\t\t\t. 'title=\"' . JHtml::tooltipText('COM_CSMBCOMPONENT_ATTESTATION_PAYEUR_LABEL', 'COM_CSMBCOMPONENT_ATTESTATION_PAYEUR_DESC') . '\">'\n\t\t\t. JText::_('COM_CSMBCOMPONENT_ATTESTATION_PAYEUR_LABEL'). '</label></div>'\n\t\t\t. '<div class=\"controls\"><input type=\"text\" name=\"attestation[payeur]\" class=\"required\"/></div>';\n\t}", "public function getAlias()\n {\n return 'payment';\n }", "protected function generateGetAttributes() {\n\t\t$chaine = \"\\tpublic function getAttributes() {\\n\";\n\t\t$chaine .= $this->getGeneratedBy(__CLASS__.\"::\".__FUNCTION__.\"()\");\n\t $chaine .= \"\\t\\t\\$result = array();\\n\";\n\t $chaine .= \"\\t\\t\\$result2 = array();\\n\";\n\t $chaine .= \"\\t\\t\\$reflection = new ReflectionClass(\\$this);\\n\";\n\t $chaine .= \"\\t\\t\\$result = \\$reflection->getdefaultProperties();\\n\";\n\t $chaine .= \"\\t\\t\\$result = array_keys(\\$result);\\n\";\n\t $chaine .= \"\\t\\tforeach (\\$result AS \\$data) {\\n\";\n\t $chaine .= \"\\t\\t\\t\\$result2[] = substr(\\$data,1);\\n\";\n\t $chaine .= \"\\t\\t}\\n\";\n\t \n\t $chaine .= \"\\t\\treturn \\$result2;\\n\";\n\t\t$chaine .= \"\\t}\\n\";\n\t\treturn $chaine;\n\t}", "protected function generateAttributes(int $count): string\n {\n $attributes = \"\";\n $attributesTemplate =\n $this->resource->getReference(\"DNDCharacterCardTemplate\")->getString(\"templates.attributes\");\n\n while ($count--) {\n $results = [];\n\n for ($i = 0; $i < 6; $i++) {\n $dice = isset($dice) ? clone $dice : new Dice(self::DND_GENERATE_RULE);\n $results[$i] = $dice->result;\n }\n\n $attributes .= Convertor::toCustomString($attributesTemplate, [\n \"力量\" => $results[0],\n \"体质\" => $results[1],\n \"敏捷\" => $results[2],\n \"智力\" => $results[3],\n \"感知\" => $results[4],\n \"魅力\" => $results[5],\n \"属性总和\" => array_sum($results)\n ]);\n $attributes .= \"\\n\";\n }\n\n return rtrim($attributes);\n }", "public static function payment_gateway_connect($action = '', $transaction_amount = '', $card_info = [], $shipping_info = [], $additional_parameters = []) {\n\n // Get the default payment gateway connecting strings\n $connection_string = self::get_default_payment_connection_string_with_status();\n\n if (isset($connection_string[0]['payment_method'])) {\n //$payment_type = array(1 => 'Paypal', 2 => 'Braintree', 3 => 'Authorize', 4 => 'Stripe');\n \n // Get the payment gateway type id\n $payment_type_id = $connection_string[0]['payment_gateway_id'];\n try {\n // Declare Payment gateway list \n $xml_system = simplexml_load_file(DOCROOT . \"modules/paymentgateway/views/system.xml\") or die(\"Error: Cannot create object\");\n \n //Set the Paypal Paymen tgateway Here\n $paypal_type = ['0' => 'Paypal'];\n\n //Get the Alternate Paymentgateway types from xml \n $payment_type = [];\n $payment_type = (array) $xml_system->children()->system->section->field->option;\n unset($payment_type['@attributes']);\n \n if ($payment_type[0] == 'Select Provider') {\n $payment_type = array_replace($payment_type, $paypal_type);\n $payment_type = array_combine(range(1, count($payment_type)), array_values($payment_type));\n } else {\n throw new exception('In system.xml need to set first option \"Select Provider\"');\n }\n \n // Get the payment gateway class name\n $payment_gateway_name = $payment_type[$payment_type_id];\n\n // Declaring payment gateway class & method name\n $_payment_gateway_class_name = $payment_gateway_name . 'payment';\n $_payment_gateway_method_name = $payment_gateway_name . '_' . $action;\n\n // Find the payment gateway class exists or not\n if (class_exists($_payment_gateway_class_name)) {\n if (!method_exists($_payment_gateway_class_name, $_payment_gateway_method_name)) {\n throw new Exception($_payment_gateway_class_name . '::' . $_payment_gateway_method_name . '() implementation not loaded');\n }\n if (is_array($card_info)) {\n $card_info = array_merge($card_info, [\"currency\" => CURRENCY_FORMAT]);\n }\n $_payment_gateway_response = $_payment_gateway_class_name::$_payment_gateway_method_name($connection_string, $transaction_amount, $card_info, $shipping_info, $additional_parameters);\n\n return $_payment_gateway_response;\n } else {\n $x = 1;\n throw new Exception(\"Unable to load class: $_payment_gateway_class_name\");\n return false;\n }\n } catch (Exception $ex) {\n\n if (isset($x) && $x == 1) {\n throw new Exception(\"Unable to load class: $_payment_gateway_class_name\");\n }\n throw new Exception($ex);\n }\n } else {\n throw new Exception('payment_gateway_not_properly configured or payment gateway not active');\n }\n }", "protected static function generatePaymentRef()\n {\n // Payment ref is a randomly generates string of 'safechars'\n // Stolen from London Hackspace code\n $safeChars = '2346789BCDFGHJKMPQRTVWXY';\n // We prefix the ref with a string that lets people know it's us\n $prefix = config('hms.account_prefix');\n // Payment references can be up to 18 chars according to:\n // http://www.bacs.co.uk/Bacs/Businesses/BacsDirectCredit/Receiving/Pages/PaymentReferenceInformation.aspx\n $maxRefLength = Account::MAX_REFERENCE_LENGHT;\n\n $paymentRef = $prefix;\n\n for ($i = strlen($prefix); $i < $maxRefLength; $i++) {\n $paymentRef .= $safeChars[rand(0, strlen($safeChars) - 1)];\n }\n\n return $paymentRef;\n }", "public static function payment_fields() {\n\t\t$gateway = Pronamic_WP_Pay_Plugin::get_gateway( edd_get_option( self::SLUG . '_config_id' ) );\n\n\t\tif ( $gateway ) {\n\t\t\t$input = $gateway->get_input_html();\n\n\t\t\tif ( $input ) {\n\t\t\t\techo '<fieldset id=\"edd_cc_fields\" class=\"edd-do-validate\">';\n\t\t\t\techo '<span><legend>', __( 'iDEAL', 'pronamic_ideal' ), '</legend></span>';\n\t\t\t\techo $input;\n\t\t\t\techo '</fieldset>';\n\t\t\t}\n\t\t}\n\t}", "public function getPaymorrowPaymentMap()\n {\n }", "public function generateCouponCodes()\n {\n $button = $this->_rootElement->find(self::GENERATE_CODES_BUTTON_CSS_SELECTOR);\n $button->click();\n }", "function gw_generate_purchase_button()\n\t{\n\t\treturn '<input type=\"image\" src=\"https://www.paypal.com/images/x-click-but6.gif\" name=\"submit\" alt=\"'.$this->ipsclass->lang['paywith_paypal'].'\" />';\n\t}", "public function savePaymentAction()\n {\n $paymentMethod = $this->getRequest()->getPost('payment', array());\n if (isset($paymentMethod['method']) && $paymentMethod['method'] == 'bluepayment') {\n $gatewayId = $this->getRequest()->getPost('payment_method_bluepayment_gateway');\n $cardIndex = $this->getRequest()->getPost('payment_method_bluepayment_card_index');\n $autopayGatewayId = Mage::getStoreConfig(\"payment/bluepayment/autopay_gateway\");\n $gPayGatewayId = Mage::getStoreConfig(\"payment/bluepayment/gpay_gateway\");\n\n Mage::helper('bluepayment/gateways')->setQuoteGatewayId($gatewayId);\n\n if ($gatewayId == $gPayGatewayId) {\n $token = $this->getRequest()->getPost('gpay_token');\n Mage::helper('bluepayment/gateways')->setQuoteGPayToken($token);\n } else {\n if ($gatewayId || $cardIndex) {\n if ($cardIndex !== null) {\n Mage::helper('bluepayment/gateways')->setQuoteGatewayId($autopayGatewayId);\n Mage::helper('bluepayment/gateways')->setQuoteCardIndex($cardIndex);\n }\n } else {\n if (Mage::helper('bluepayment/gateways')->isCheckoutGatewaysActive()) {\n $result = array('error'=>'Nie wybrano kanału płatności lub karty !');\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n return;\n }\n }\n }\n }\n \n parent::savePaymentAction();\n }", "public function payment_fields() {\n\t\t\t$output = '';\n\t\t\tif($this->description) $output .= '<p>' . $this->description . '</p>';\n\n\t\t\t$active = 0;\n\t\t\tif($this->settings['method_ideal'] == 'yes') {\n\t\t\t\t$active++;\n\t\t\t\t$method = 1;\n\t\t\t}\n\t\t\tif($this->settings['method_bcmc'] == 'yes') {\n\t\t\t\t$active++;\n\t\t\t\t$method = 5;\n\t\t\t}\n\t\t\t\n\t\t\tif($active > 1) {\n\t\t\t\t$output .= '<p>';\n\t\t\t\tif($this->settings['method_ideal'] == 'yes') {\n\t\t\t\t\t$output .= '<input type=\"radio\" id=\"ideal\" name=\"omnicard_submethod\" value=\"1\"';\n\t\t\t\t\tif($this->method_default == 'ideal') $output .= ' checked=\"checked\"';\n\t\t\t\t\t$output .= ' /> <label for=\"ideal\">' . __('iDeal', 'omnicard-lite') . '</label><br />';\n\t\t\t\t}\n\t\t\t\tif($this->settings['method_bcmc'] == 'yes') {\n\t\t\t\t\t$output .= '<input type=\"radio\" id=\"bcmc\" name=\"omnicard_submethod\" value=\"5\"';\n\t\t\t\t\tif($this->method_default == 'bcmc') $output .= ' checked=\"checked\"';\n\t\t\t\t\t$output .= ' /> <label for=\"bcmc\">' . __('Bancontact/Mister Cash', 'omnicard-lite') . '</label><br />';\n\t\t\t\t}\n\t\t\t\t$output .= '</p>';\n\t\t\t} else {\n\t\t\t\t$output .= '<input type=\"hidden\" name=\"omnicard_submethod\" value=\"'. $method .'\" />';\n\t\t\t}\n\n\t\t\techo $output;\n\t\t\tunset($transactions, $active, $method, $output);\n\t\t}", "public function getPayInitFields()\n\t{\n\t\t$orderId = $this->getOrder()->getRealOrderId();\n\n\t\t$params = array(\n\t\t\t'ACCOUNTID' => Mage::helper('saferpay')->getSetting('saferpay_account_id'),\n\t\t\t'AMOUNT' => intval(Mage::helper('saferpay')->round($this->getOrder()->getGrandTotal(), 2) * 100),\n\t\t\t'CURRENCY' => $this->getOrder()->getOrderCurrencyCode(),\n\t\t\t'DESCRIPTION' => $this->getOrder()->getStore()->getWebsite()->getName(),\n\t\t\t'CCCVC' => 'yes',\n\t\t\t'CCNAME' => 'yes',\n\t\t\t'ORDERID' => $orderId,\n\t\t\t'SUCCESSLINK' => Mage::getUrl('saferpay/process/success', array('id' => $orderId, 'capture' => $this->getConfigData('payment_action'))),\n\t\t\t'BACKLINK' => Mage::getUrl('saferpay/process/back', array('id' => $orderId, 'capture' => $this->getConfigData('payment_action'))),\n\t\t\t'FAILLINK' => Mage::getUrl('saferpay/process/fail', array('id' => $orderId, 'capture' => $this->getConfigData('payment_action'))),\n\t\t\t'NOTIFYURL' => Mage::getUrl('saferpay/process/notify', array('id' => $orderId, 'capture' => $this->getConfigData('payment_action'))),\n\t\t\t'AUTOCLOSE' => 0,\n\t\t\t'PROVIDERSET' => $this->getProviderId(),\n\t\t\t'LANGID' => $this->getLangId(),\n\t\t\t'SHOWLANGUAGES' => $this->getUseDefaultLangId() ? 'yes' : 'no',\n\t\t\t'DELIVERY'\t\t\t\t=> 'no',\n\t\t\t'VTCONFIG'\t\t\t\t=> Mage::helper('saferpay')->getSetting('vtconfig')\n\t\t);\n\n\t\treturn $params;\n\t}", "function create_rp (){\n \n global $realpolitika_config;\n \n $synchkey = $realpolitika_config['portalconfig']['synchkey'];\n $date = date(\"Y@m@d@G\");\n \n $date = $this->encrypt($date);\n $portalcode = $synchkey.\"@\".$date;\n \n $portalcode = $this->encrypt($portalcode);\n \n return $portalcode;\n\n }", "function initPayment() ;", "public function getPaymentUrlAttribute()\n {\n switch ($this->type->name){\n case 'Paypal':\n return route('payment.paypal.view', $this->app_id);\n\n case 'Stripe':\n return route('payment.stripe.view', $this->app_id);\n\n default:\n throw new Exception(\"Payment Gateway {$this->type->name} not support\");\n }\n }", "abstract public function create_payment(array $payment_data);", "private function getPaymentURL()\n\t{\n\t\t$sandbox = $this->params->get('sandbox', 0);\n\n\t\tif ($sandbox)\n\t\t{\n\t\t\treturn 'https://www.sandbox.paypal.com/cgi-bin/webscr';\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 'https://www.paypal.com/cgi-bin/webscr';\n\t\t}\n\t}", "protected function generateReturnUrlXml()\n {\n $xml = '';\n if($this->config->continueShoppingUrl){\n $xml .= '<continue-shopping-url>';\n $xml .= ' '.$this->config->continueShoppingUrl;\n $xml .= '</continue-shopping-url>';\n }\n\n return $xml;\n }", "function MerchantAuthenticationBlock() \n\t\t{\n\n\t\t\t$g_loginname = \"5GGzub2U3m9\"; // Keep this secure.\n\t\t\t$g_transactionkey = \"8dM82j736HyTng5a\"; // Keep this secure.\n\t\t\treturn\n\t\t\t\"<merchantAuthentication>\".\n\t\t\t\"<name>\" . $g_loginname . \"</name>\".\n\t\t\t\"<transactionKey>\" .$g_transactionkey . \"</transactionKey>\".\n\t\t\t\"</merchantAuthentication>\";\n\t}", "public function add_payment_method()\n {\n }", "public function getPayPalPaymentDescription()\n {\n }", "function generatePaymentLink($booking_ref, $deposit_only) {\n\n\t $response = $this->loadBooking( $booking_ref );\n\t $amount = $deposit_only;\n\t if ( $deposit_only === true ) {\n\t\t $amount = $response['amount_first_night'] ?? 0;\n\t }\n\t // this is used for generating a short URL\n\t $lookup_key = $this->generateRandomLookupKey( self::LOOKUPKEY_LENGTH );\n\t LilHotelierDBO::insertLookupKeyForBooking( $response['reservation_id'], $lookup_key,\n\t\t $amount > 0 ? $amount : null );\n\t return get_option( \"hbo_booking_payments_url\" ) . $lookup_key;\n }", "public function createCustIdentElement(){\n\n\t\t$merchantLogin=null;\n\t\t$merchantPassword=null;\n\n\t\t// if merchantLogin and merchantPassword are set\n\t\tif($this->viaLibObj->merchantLogin && $this->viaLibObj->merchantPassword){\n\t\t\t$merchantLogin=$this->viaLibObj->merchantLogin;\n\t\t\t$merchantPassword=$this->viaLibObj->merchantPassword;\n\t\t}\n\t\telse{\n\t\t\texit;\n\t\t}\n\n\t\t// create custIdent array to communicate with Via\n\t\t$custIdent=array(\n\t\t\t'merchantLogin'=>$merchantLogin,\n\t\t\t'merchantPassword'=>$merchantPassword\n\t\t);\n\n\t\treturn $custIdent;\n\n\t}", "public function getPaymentMethodId()\n {\n }", "public function create_credit_card_charge() {\n\n\t\t$this->create_transaction( self::AUTHORIZE_AND_CAPTURE );\n\t}", "function pf_connection_create(&$cfg, $doc, $desc, $xpath) {\n\t\n\t$entityid = $desc->getAttribute('entityID');\n\n\tif (pf_connection_skip($cfg, $entityid)) return NULL;\n\t\n\t$name = $cfg['name-prefix']; // to indicate that this connection was provisioned\n\t$org = $xpath->query('md:Organization/md:OrganizationName', $desc);\n\t$name .= ($org->length > 0) ? $org->item(0)->textContent : $entityid;\n\n\t//pf_connection_contact_mailto_fix($cfg, $doc, $xpath, $desc);\n\t\n\t$desc->setAttributeNS('urn:sourceid.org:saml2:metadata-extension:v2', 'urn:isActive', 'true');\n\n\t$extensions = $xpath->query('md:Extensions', $desc);\n\tif ($extensions->length > 0) {\n\t\t#echo \" # WARN: ignoring unsupported extensions for entity \\\"$entityid\\\":\\n\";\n\t\t#echo $doc->saveXML($extensions->item(0)) . \"\\n\\n\";\n\t\t$desc->removeChild($extensions->item(0));\n\t}\n\t\n\t$extensions = $doc->createElementNS('urn:oasis:names:tc:SAML:2.0:metadata', 'md:Extensions');\n\t$desc->insertBefore($extensions, $desc->firstChild);\n\t$entity_ext = $doc->createElementNS('urn:sourceid.org:saml2:metadata-extension:v2', 'urn:EntityExtension');\n\n\tpf_set_virtual_server_id($doc, $xpath, $entity_ext, 'dummy');\n\t\n/*\n\t$encryption = $doc->createElement('urn:Encryption');\n\t$encryption_policy = $doc->createElement('urn:EncryptionPolicy');\n\t$encryption_policy->setAttribute('EncryptAssertion', 'true');\n\t$encryption_policy->setAttribute('KeyTransportAlgorithm', 'http://www.w3.org/2001/04/xmlenc#rsa-1_5');\n\t$encryption_policy->setAttribute('EncryptionAlgorithm', 'http://www.w3.org/2001/04/xmlenc#aes128-cbc');\n\t$encryption->appendChild($encryption_policy);\n\t$entity_ext->appendChild($encryption);\n*/\n\n\t$dependencies = $doc->createElement('urn:Dependencies');\n\t$signing_key = $doc->createElement('urn:SigningKeyPairReference');\n\t$signing_key->setAttribute('MD5Fingerprint', $cfg['signing-key-fingerprint']);\n\t$dependencies->appendChild($signing_key);\n\n/*\n\t$encryption_cert = $doc->createElement('urn:EncryptionCert');\n\t$base64_cert = $doc->createElement('urn:Base64EncodedCert', 'MIIDGzCCAgOgAwIBAgIJANI+yGM0M1N2MA0GCSqGSIb3DQEBBQUAMCcxJTAjBgNVBAMTHGx0Y2F3aWtpMDEuaXQub2hpby1zdGF0ZS5lZHUwHhcNMTAwNzA3MjI0MzA1WhcNMjAwNzA0MjI0MzA1WjAnMSUwIwYDVQQDExxsdGNhd2lraTAxLml0Lm9oaW8tc3RhdGUuZWR1MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5fsEv25Mr9wfa48qfjn8m40yB/lwimJ8dSnYw2erd/tfB+sPESw42Is5Lv2B3pI3mj9a0PT0Gf1VgUoQW0RCT6L4VOW50WsPFv/RKPfT/AIRl00dTCqb440PgotGbrK9ivZqlvkzlSGUKuFcg2gLj+CJlbMcwEneSwn0FE1xKEGpMDUk91lZH1XxmnIDDOQn1G5qul4qAbXITMpLi2MlsHAEXxnLrthFFas6zDrviTwHcqGXq9zJJkPHDcbu1qg6AUT7bRJrqszxxktSV6mFclkgLPpcVkigMR8RNVMQkWaaWSnfBkFy2iAe3xw3DNp7obtzgItYi9N8U6K5qorSkQIDAQABo0owSDAnBgNVHREEIDAeghxsdGNhd2lraTAxLml0Lm9oaW8tc3RhdGUuZWR1MB0GA1UdDgQWBBR32XnCliG78DdyTtZhyIQSHChtyjANBgkqhkiG9w0BAQUFAAOCAQEAVEweCxPElHGmam4Iv2QeJsGE7m4de7axp3epAJb7uVbNZ2P1S/s4GZQhmGsUoGoxwqca3wyQ+C1ZkpQJdyFl5s1tFc26D+Z0KTDo174GzO9iI9SeQ4YSp3FNhZqxn4xH3DULzzHwoVSwFr5irLPAVtrqK8H/rzBREhqOse2VSJ/1PkI+p7lUiElIzMiObLGjumF2fDOPkXOSMNyC4c5oCCJtcrip/BaLo6bqdqn3DKP8onMw/lHZQolyVsupuhGsSX13WVJ0uyGvuA7hiHnGEkpDmskUd3TsriyQAt47RZzYtTupO/NdWvz8SvXU1qIOk9CTQ0D2b2OOftfUW+FuAQ==');\n\t$encryption_cert->appendChild($base64_cert);\n\t$dependencies->appendChild($encryption_cert);\n*/\n\t\n\t// needed for Artifact SOAP backchannel profile (incoming, ao. for SAML 1.1), and for Attribute Query (outgoing)\n\t$soap_auth = $doc->createElement('urn:SoapAuth');\n\t$soap_auth->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:soap', 'http://www.sourceid.org/2004/04/soapauth');\n\t\n\t$incoming = $doc->createElement('soap:Incoming');\n\t$none_incoming = $doc->createElement('soap:None');\n\t$none_incoming->setAttribute('providerID','this');\t\n\t//$incoming->appendChild($none_incoming);\n\t// if SAML 1.1\n\t$basic_incoming = $doc->createElement('soap:Basic');\n\t$basic_incoming->setAttribute('providerID','this');\t\n\t$basic_incoming->setAttribute('password', $cfg['basic-auth-password-incoming']);\n\t$incoming->appendChild($basic_incoming);\n\t$soap_auth->appendChild($incoming);\n\n\t$outgoing = $doc->createElement('soap:Outgoing');\n\t$none_outgoing = $doc->createElement('soap:None');\n\t$none_outgoing->setAttribute('providerID','this');\n\t$outgoing->appendChild($none_outgoing);\n\n\t$soap_auth->appendChild($outgoing);\n\t$dependencies->appendChild($soap_auth);\n\t\n\t$entity_ext->appendChild($dependencies);\n\t\n\t$mdUrlId = $doc->createElement('urn:MetadataUrlId', $cfg['metadata-url-id']);\n\t$entity_ext->appendChild($mdUrlId);\n\t$mdEnableUpdate = $doc->createElement('urn:enableAutoMetadataUpdate', 'true');\n\t$entity_ext->appendChild($mdEnableUpdate);\n\t\n\t$extensions->appendChild($entity_ext);\n\t\n\t$idp_desc = $xpath->query('md:IDPSSODescriptor', $desc);\n\tif ($idp_desc->length > 0) {\n\t\t\n\t\tpf_set_virtual_server_id($doc, $xpath, $entity_ext, $cfg['virtual-server-id']['idp']);\n\t\t\n\t\t$username = urlencode('idp:' . $entityid);\n\t\t$basic_incoming->setAttribute('username', $username);\n\t\t$desc->setAttribute('urn:name', pf_connection_name_duplicate_fix($cfg, $name, 'idp'));\n\t\t$idp_desc = $idp_desc->item(0);\n\t\t$idp_desc = pf_connection_prefer_saml20($cfg, $idp_desc);\n\t\t$idp_desc = pf_connection_remove_unsupported_bindings($cfg, $idp_desc, $xpath);\n\t\tif ($xpath->query('md:SingleSignOnService', $idp_desc)->length != 0) {\n\t\t\t// NB: this relies on the fact that PF will process only the IDPSSODescriptor if it has both IDPSSODescriptor and SPSSODescriptor!\n\t\t\tpf_connection_create_idp($cfg, $doc, $xpath, $desc, $idp_desc, $entityid);\n\t\t} else {\n\t\t\techo \"\\n ### SKIPPING IDP: \\\"\" . $entityid . \"\\\" because there are no supported bindings left!\\n\";\n\t\t}\n\t\t$desc->removeChild($idp_desc);\n\t}\n\n\t$sp_desc = $xpath->query('md:SPSSODescriptor', $desc);\n\tif ($sp_desc->length > 0) {\n\n\t\tpf_set_virtual_server_id($doc, $xpath, $entity_ext, $cfg['virtual-server-id']['sp']);\n\t\t\n\t\t$username = urlencode('sp:' . $entityid);\n\t\t$basic_incoming->setAttribute('username', $username);\n\t\t$desc->setAttribute('urn:name', pf_connection_name_duplicate_fix($cfg, $name, 'sp'));\n\t\t$sp_desc = $sp_desc->item(0);\n\t\t$sp_desc = pf_connection_prefer_saml20($cfg, $sp_desc);\n\t\t$sp_desc = pf_connection_remove_unsupported_bindings($cfg, $sp_desc, $xpath);\n\t\tpf_connection_create_sp($cfg, $doc, $xpath, $desc, $sp_desc, $entityid);\n\t}\n\t\n\treturn true;\n}", "public function payment_gateways_setting()\n {\n }", "public function makedefaultpaymentAction() {\n $walletId = $this->getRequest()->getParam('id');\n\n if (Mage::getSingleton('customer/session')->isLoggedIn()) {\n $customerData = Mage::getSingleton('customer/session')->getCustomer();\n $ccUserId = $customerData->getId();\n }\n\n $resource = Mage::getSingleton('core/resource');\n $writeConnection = $resource->getConnection('core_write');\n $getTable = $resource->getTableName('cardconnect_wallet');\n\n /* Query to first update the CC_DEFAULT_CARD in cardconnect_wallet table */\n $updQry = \"UPDATE {$getTable} SET CC_DEFAULT_CARD='N' WHERE CC_USER_ID=\" . $ccUserId . \" AND CC_DEFAULT_CARD='Y'\";\n $writeConnection->query($updQry);\n\n /* Query to make selected card as Default payment card */\n $makeDafault = \"UPDATE {$getTable} SET CC_DEFAULT_CARD='Y' WHERE CC_USER_ID=\" . $ccUserId . \" AND CC_ID=\" . $walletId;\n $writeConnection->query($makeDafault);\n $success_msg = \"Wallet Updated Successfully\";\n echo $success_msg;\n exit;\n }", "protected function generateAttributes(): string\n\t{\n\t\t$attributes = '';\n\t\tforeach($this->attributes as $name => $value)\n\t\t{\n\t\t\t$attributes .= $name . '=\"' . htmlspecialchars($value) . '\" ';\n\t\t}\n\t\treturn trim($attributes);\n\t}", "public function add_my_payment_methods() {\n\n\t\t$gateway = new WC_Gateway_Authorize_Net_CIM();\n\n\t\t$gateway->show_my_payment_methods();\n\t}", "public function getPaymentMethod();", "public function getPaymentMethod();", "public function getPaymentMethod();", "public function getPaymentMethod();", "function generateConfimationCode()\n{\n\treturn $confirmation_code = str_random(30);\n}", "protected function generateKeys()\n {\n $this->attributes['api_key'] = str_random(static::API_KEY_LENGTH);\n $this->attributes['api_secret'] = str_random(static::API_SECRET_LENGTH);\n }", "protected function generate()\n {\n $this->description = 'Wereld Pi dag';\n\n $this->setupDateTimeObjects($this->generateDateTime($this->year, 3, 14));\n\n $this->totalLength = 1;\n }", "public function getPaymentLink(): string\n {\n return $this->_data->payment_link;\n }", "private function paymentOnlineDebitNode($payment) {\n\n\t\t$this->xml_writer->startElement('payment');\n\n\t\t\t$this->xml_writer->writeElement('acquirer', $payment['acquirer']);\n\n\t\t$this->xml_writer->endElement();\n\t}", "function getPaymentInstruction();", "protected function serializePaymentContext()\n {\n return sprintf(\n '<PaymentContext>%s%s</PaymentContext>',\n $this->serializeOrderId(),\n $this->serializePaymentAccountUniqueId()\n );\n }", "public static function seoIdAttribute()\n {\n return \"PCAT-\".Carbon::now()->format('dmyhis').str_random(5);\n }", "public function capturePayment();" ]
[ "0.59396654", "0.5531096", "0.55013686", "0.544303", "0.54407746", "0.54105675", "0.5393525", "0.5343704", "0.53416175", "0.5290342", "0.52579", "0.5207543", "0.51753217", "0.51599526", "0.50759125", "0.5056955", "0.5048845", "0.5033526", "0.50240004", "0.500747", "0.50001526", "0.49960795", "0.49555135", "0.4926859", "0.4920868", "0.4917986", "0.4914959", "0.49004602", "0.48913044", "0.4887246", "0.48857027", "0.48850584", "0.48591638", "0.48551118", "0.48476395", "0.48462817", "0.48456088", "0.48391894", "0.4828713", "0.48248774", "0.48139825", "0.4807043", "0.47859243", "0.47792947", "0.47775546", "0.47765246", "0.47709745", "0.47695854", "0.47685203", "0.47647467", "0.47581404", "0.47466907", "0.47426912", "0.47422007", "0.4741468", "0.4741468", "0.4741322", "0.47392604", "0.47365516", "0.47321084", "0.4730978", "0.47288638", "0.4721798", "0.47190788", "0.47187096", "0.47083327", "0.47031215", "0.47011596", "0.46962944", "0.46943304", "0.46883196", "0.46860918", "0.468062", "0.46763742", "0.46734187", "0.46711445", "0.46706557", "0.46677688", "0.46650985", "0.46618098", "0.46605098", "0.46597245", "0.46576992", "0.46574226", "0.46557444", "0.46555373", "0.46488643", "0.46481535", "0.46481535", "0.46481535", "0.46481535", "0.46456352", "0.46443748", "0.46427605", "0.46413144", "0.46352753", "0.4634172", "0.46324122", "0.4630831", "0.4627739" ]
0.8394212
0
Method to insert questions
Метод вставки вопросов
public function insertQuestion($question, $attempt, $section_id = '');
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _insert($questions)\n\t{\n\t\t$db = database();\n\n\t\t$db->insert('',\n\t\t\t'{db_prefix}antispam_questions',\n\t\t\tarray('question' => 'string-65535', 'answer' => 'string-65535', 'language' => 'string-50'),\n\t\t\t$questions,\n\t\t\tarray('id_question')\n\t\t);\n\t}", "public function Insert ()\n\t{\n\t\t\n\t\t$campos = '';\n\t\t$valores = '';\n\t\t$sep = '';\n\t\t\n\t\t\n\t\t\t\t\n\t\tif ( $this->id != chr ( 0 ) ) {\n\t\t\t$campos .= $sep . \" id \";\n\t\t\t$valores .= $sep . \"'\" . ($this->id) . \"'\";\n\t\t\t$sep = \", \";\n\t\t}\n\t\t\t\t\n\t\tif ( $this->title != chr ( 0 ) ) {\n\t\t\t$campos .= $sep . \" title \";\n\t\t\t$valores .= $sep . \"'\" . ($this->title) . \"'\";\n\t\t\t$sep = \", \";\n\t\t}\n\t\t\t\t\n\t\tif ( $this->description != chr ( 0 ) ) {\n\t\t\t$campos .= $sep . \" description \";\n\t\t\t$valores .= $sep . \"'\" . ($this->description) . \"'\";\n\t\t\t$sep = \", \";\n\t\t}\n\t\t\t\t\n\t\tif ( $this->id_admin != chr ( 0 ) ) {\n\t\t\t$campos .= $sep . \" id_admin \";\n\t\t\t$valores .= $sep . \"'\" . ($this->id_admin) . \"'\";\n\t\t\t$sep = \", \";\n\t\t}\n\t\t\t\t\n\t\tif ( $this->datetime != chr ( 0 ) ) {\n\t\t\t$campos .= $sep . \" datetime \";\n\t\t\t$valores .= $sep . \"'\" . ($this->datetime) . \"'\";\n\t\t\t$sep = \", \";\n\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t$sql = \"\n\t\tINSERT INTO\n\t\t questionnaires\t\t ( \" . $campos . \" )\n\t\tVALUES\n\t\t (\" . $valores . \")\";\n\t\t\n\t\t$res = $this->query ( $sql );\n\t\t\n\t\tif ( $res === false ) {\n\t\t\t$this->StatusMsg = \"Error registrando datos del item \" . $this->id . \" . Error \" . $this->dberno ();\n\t\t\t$this->DebugMsg ();\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$this->id = $this->dblast_id ();\n\t\t$this->StatusMsg = 'El registro fue creado exitosamente';\n\t\treturn true;\n\t}", "public function addQuestion()\n {\n try {\n $this->adminAuthority();\n $type = $this->input->post('type', true);\n $tag = $this->input->post('tag', true);\n $chapter = $this->input->post('chapter', true);\n $text = $this->input->post('text', true);\n $src = $this->input->post('src', true);\n $options = $this->input->post('options', true);\n $answer = $this->input->post('answer', true);\n $analysis = $this->input->post('analysis', true);\n $this->OsModel->addQuestion($type, $tag, $chapter, $text, $src, $options, $answer, $analysis);\n eee('200', 'add success');\n\n } catch (Exception $e) {\n eee('400', $e);\n }\n\n\n }", "function zf_insert_question($fa_insert_values) {\n\n\t$fa_insert_parameters = array(\n\t\t\t\t\n\t\t\t'fel_USER_ID' => $_SESSION['USER_ID'],\n\t\t\t'fel_ANSWER_ID' => NULL,\n\t\t\t'fel_FC_QUESTION' => $fa_insert_values['message'],\n\t\t\t'fel_FC_QUESTION_TYPE' => MC\n\t);\n\n\n\tDatabase::insertRow(\"QUESTIONS(FN_USER_ID, FN_ANSWER_ID, FC_QUESTION, FC_QUESTION_TYPE)\n\t\t\t\t\t\t VALUES(:fel_USER_ID, :fel_ANSWER_ID, :fel_FC_QUESTION, :fel_FC_QUESTION_TYPE)\", $fa_insert_parameters);\n}", "public function addQuestion()\n {\n $this->validate();\n\n //insert the date in to the table\n Question::create([\n 'title' => $this->title,\n 'body' => $this->body,\n 'user_id' => Auth::user()->id,\n ]);\n\n //emit the message\n $this->title = '';\n $this->body = '';\n\n $this->emit('saved');\n }", "function insertQuestion($details) {\n\tglobal $questionnaireID, $moduleID, $alerts, $db;\n\ttry {\n\t\t$stmt = new tidy_sql($db, \"INSERT INTO Questions (QuestionaireID, ModuleID, QuestionText, QuestionText_welsh, Type, staff) VALUES (?,?,?,?,?,?)\", \"issssi\");\n\t\t$stmt->query($questionnaireID, $moduleID, $details[\"QuestionText\"], $details[\"QuestionText_welsh\"], $details[\"QuestionType\"], isset($details[\"Staff\"])?$details[\"Staff\"]:false);\n\t\t\n\t\t$alerts[] = array(\"type\"=>\"success\", \"message\"=>\"Sucessfully added question\");\n\t}\n\tcatch (Exception $e) {\n\t\t$alerts[] = array(\"type\"=>\"danger\", \"message\"=>\"Sorry, an error occurred adding question ({$e->getMessage()})\");\n\t}\n}", "public function testValidQuestionInsert(){\n\t\t$numRows = $this->getConnection()->getRowCount(\"question\");\n\n\t\t//create the question object\n\t\t$question = new Question(generateUuidV4(), $this->VALID_Question, $this->VALID_QUESTION_ID, $this->VALID_QUESTION_CONTENT, $this->VALID_QUESTION_VALUE);\n\t\t//insert the question object\n\t\t$question->insert($this->getPDO());\n\n\t\t//grab the data from MySQL and enforce that it meets expectations\n\t\t$pdoQuestion = Question::getQuestionByQuestionId($this->getPDO(), $question->getQuestionId());\n\t\t$this->assertEquals($numRows +1, $this->getConnection()->getRowCount(\"question\"));\n\t\t$this->assertEquals($pdoQuestion->getQuestionId(), $question->getQuestionId());\n\t\t$this->assertEquals($pdoQuestion->getQuestionContent(), $question->getQuestionContent());\n\t\t$this->assertEquals($pdoQuestion->getQuestionValue(), $question->getQuestionValue);\n\t}", "function insert_new_question( $survey_id, $title, $type ) {\n $current_date = date('Y-m-d');\n $conn = connectionObject();\n $query = $conn->prepare( 'INSERT INTO survey_questions (surveyid,englishtitle,arabictitle,frenchtitle,creationdate,type) VALUES(?,?,?,?,?,?)' );\n $query->execute( array( $survey_id, $title['en'], $title['ar'], $title['fr'], $current_date, $type ) );\n return $conn->lastInsertId();\n}", "function insertToDatabase(){\r\n\t\t$id = $this->getSignupId();\r\n\t\t$questionString = $this->getQuestion();\r\n\t\t$type = $this->getType();\r\n\t\t$options = CommonTools::arrayToSql($this->getOptions());\r\n\t\t$public = CommonTools::booleanToSql($this->getPublic());\r\n\t\t$required = CommonTools::booleanToSql($this->getRequired());\r\n\r\n\t\t$sql = \"INSERT INTO ilmo_questions \" . \r\n\t \t\t\"(ilmo_id, question, type, options, public, required) \" . \r\n\t \t\t\"VALUES \" .\r\n\t \t\t\"($id, '$questionString', '$type', '$options', \" .\r\n\t \t\t\"$public, $required)\";\r\n\t \t\t\r\n\t \t// do query\r\n\t\t$this->database->doQuery($sql);\r\n\t}", "function create_question($survey_id, $type, $instructions, $question, $position){\n $query = \"INSERT INTO questions (survey_id, question_type_id, instructions, question, position)\n VALUES (?,?,?,?,?)\";\n $values = array($survey_id, $type, $instructions, $question, $position);\n $this->db->query($query, $values);\n }", "function addQuestion($topicID, $difficulty, $isMultiple, $quest,$correct, $options){\n\t\t\t$dbConnection = connect();\n\n\t\t\t//Insert into question table & recieve the question ID for use in the answers insert stmt\n\t\t\t $sql = \"INSERT INTO question (topic_ID,difficulty,isMultiple, question)\n\t\t\t\t VALUES($topicID,$difficulty,$isMultiple,'$quest');\";\n\t\t\ttry{\n\t\t\t\t$stmt=$dbConnection->query($sql);\n\t\t\t\t\t$qID = $dbConnection->lastInsertId();\n\n\t\t\t\tif(!$stmt)\n\t\t\t\t\tdie(\"error1\".$dbConnection->errorInfo());\n\t\t\t\t$stmt = \"\";\n\n\t\t\t\t//Loop through the correct answers array and append correct insert statement\n\t\t\t\tfor($i = 0; $i < sizeof($correct); $i++):\n\t\t\t\t\t$stmt .= \"INSERT INTO answer (question_ID, data, isCorrect)\n\t\t\t\t \tVALUES($qID,'\".$correct[$i].\"',1);\";\n\t\t\t\tendfor;\n\n\t\t\t\t//Loop through the optional answers array and append correct insert statement\n\t\t\t\tfor($z = 0; $z < sizeof($options); $z++):\n\t\t\t\t\t$stmt .= \"INSERT INTO answer (question_ID, data, isCorrect)\n\t\t\t\t \tVALUES($qID,'\".$options[$z].\"',0);\";\n\t\t\t\tendfor;\n\n\t\t\t\t$dd = $dbConnection->query($stmt);\n\n\t\t\t\tif(!$dbConnection)\n\t\t\t\t\tdie(\"error2\".$dbConnection->errorInfo());\t\t\t\t\n\n\t\t\t}catch (Exception $e){\n\t\t\t\t//Rollback if fails\n\t\t\t\t$dbConnection->rollback();\n\t\t\t\treturn \"Error rolling back: \". $e;\n\t\t\t}\n\t\t}", "public function testValidQuestionInsert(){\n\t\t$numRows = $this->getConnection()->getRowCount(\"question\");\n\n\t\t//create the user object\n\t\t$questionId = generateUuidV4();\n\t\t$question = new Question ($questionId, $this->VALID_QUESTIONCONTENT, $this->VALID_QUESTIONVALUE);\n\t\t//insert the user object\n\t\t$question->insert($this->getPDO());\n\n\n\t\t//grab the data from MySQL and enforce that it meets expectations\n\t\t$pdoQuestion = Question::getQuestionByQuestionId($this->getPDO(), $question->getQuestionId());\n\t\t$this->assertEquals($numRows +1, $this->getConnection()->getRowCount(\"question\"));\n\t\t$this->assertEquals($pdoQuestion->getQuestionId(), $questionId);\n\t\t$this->assertEquals($pdoQuestion->getQuestionContent(),$this->VALID_QUESTIONCONTENT);\n\t\t$this->assertEquals($pdoQuestion->getQuestionValue(), $this->VALID_QUESTIONVALUE);\n\t}", "function createQuestions($question)\n {\n if ($this->link) {\n //Flag value of 0 represents that the question is visible.\n $flagValue = 0;\n $question1 = htmlentities($question);\n $question2 = mysqli_real_escape_string($this->link, $question1);\n\n //Using insert statement to create a record of a new question\n $stmt = $this->link->prepare(\"INSERT INTO question (question, flag) VALUES (?, ?)\");\n $stmt->bind_param(\"si\", $finalQuestion, $flagValue);\n\n // set parameters and execute.\n $finalQuestion = $question2;\n $stmt->execute();\n\n if ($stmt) {\n //After the statment is successfully executed the user will be redirected to the questionbank.php.\n header('Location: questionBank.php');\n }\n }\n }", "function question_tab_insert($data)\n\t {\n\t $this->db->insert('question',$data);\n\t }", "public function run()\n {\n DB::table('xelaQuestions')->insert(\n array(\n array(\n 'question' => 'Have you been getting enough sleep?',\n 'type' => 'emotional',\n 'tags' => 'general,stress.Hi,mentalHealth.Lo',\n 'affectVars' => 'sleepQuality,mentalHealth'),\n array(\n 'question' => 'How do your muscles feel?',\n 'type' => 'emotional',\n 'tags' => 'recentlyActive.Lo,exerciseFreq.Hi,musclePain.Hi',\n 'affectVars' => 'musclePain,physicalHealth'),\n array(\n 'question' => 'Are you feeling fatigued?',\n 'type' => 'emotional',\n 'tags' => 'stress.Hi,mentalHealth.Lo,age.Hi,appetite.Lo',\n 'affectVars' => 'fatigue,mentalHealth'),\n array(\n 'question' => 'Do you feel ill at all?',\n 'type' => 'emotional',\n 'tags' => 'stress.Hi,appetite.Lo',\n 'affectVars' => 'physicalHealth'),\n array(\n 'question' => 'How stressed are you?',\n 'type' => 'emotional',\n 'tags' => 'general,timeSlept.Lo,sleepQuality.Lo,mentalHealth.Lo',\n 'affectVars' => 'stress,mentalHealth'),\n array(\n 'question' => 'How much sleep did you get last night?',\n 'type' => 'numerical',\n 'tags' => 'general,sleepQuality.Lo',\n 'affectVars' => 'timeSlept'),\n array(\n 'question' => 'How well did you sleep last night?',\n 'type' => 'emotional',\n 'tags' => 'general,stress.Hi,timeSlept.Lo',\n 'affectVars' => 'sleepQuality'),\n\n array(\n 'question' => 'How ready do you feel to train?',\n 'type' => 'emotional',\n 'tags' => 'stress.Hi,mentalHealth.Lo,motivation.Lo,recentlyActive.Hi',\n 'affectVars' => 'readinessToTrain,mentalHealth'),\n array(\n 'question' => 'How sore do you feel?',\n 'type' => 'emotional',\n 'tags' => 'recentlyActive.Lo,exerciseFreq.Hi',\n 'affectVars' => 'physicalHealth'),\n array(\n 'question' => 'How fatigued are you feeling?',\n 'type' => 'emotional',\n 'tags' => 'stress.Hi,mentalHealth.Lo,timeSlept.Lo',\n 'affectVars' => 'physicalHealth'),\n array(\n 'question' => 'How would you rate your level of stress?',\n 'type' => 'emotional',\n 'tags' => 'stress.Hi,mentalHealth.Lo,sleepQuality.Lo',\n 'affectVars' => 'stress,mentalHealth'),\n array(\n 'question' => 'How is your mood today?',\n 'type' => 'emotional',\n 'tags' => 'general,mentalHealth.Lo,sleepQuality.Lo,timeSlept.Lo',\n 'affectVars' => 'mood,mentalHealth'),\n array(\n 'question' => 'How motivated do you feel?',\n 'type' => 'emotional',\n 'tags' => 'general,mentalHealth.Lo',\n 'affectVars' => 'motivation,mentalHealth'),\n array(\n 'question' => 'Have you been eating nutritious meals?',\n 'type' => 'emotional',\n 'tags' => 'general,exerciseFreq.Hi,physicalHealth.Lo',\n 'affectVars' => 'nutritionQuality,physicalHealth'),\n array(\n 'question' => 'How do you feel about eating?',\n 'type' => 'emotional',\n 'tags' => 'mentalHealth.Lo,stress.Hi',\n 'affectVars' => 'appetite,physicalHealth,mentalHealth'),\n\n\n ));\n }", "public function questions();", "public function insert_question($question, $id = null) {\n\t\tif ($id != null) {\n\t\t\t$this->db->set($question);\n\t\t\t$this->db->where('id', $id);\n\n\t\t\tif ($this->db->update('question', $question)) {\n\t\t\t\treturn array(\"success\" => true);\n\t\t\t} else {\n\t\t\t\treturn array(\"success\" => false, \"message\" => \"Failed to update in db\");\n\t\t\t}\n\t\t} else {\n\t\t\tif (count($question) <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($this->db->insert('question', $question)) {\n\t\t\t\treturn array(\"success\" => true, 'id' => $this->db->insert_id());\n\t\t\t} else {\n\t\t\t\treturn array(\"success\" => false, \"message\" => \"Failed to insert in db\");\n\t\t\t}\n\t\t\t// return $this->db->insert('question', $question);\n\t\t}\n\n\t}", "function company_question_insert() {\n\tglobal $wpdb;\n\n\tparse_str($_POST['cont'], $newarray);\n\t$uid = get_current_user_id();\n\n foreach ( $newarray as $key => $val ) {\n $namenumber = explode('_', $key);\n\n if ( $namenumber[0] == 'cqans' ) {\n $minmax = explode(',', $val);\n } else {\n\n // Checks whether there already is a database entry, if it does exist it is only updated, if it doesnt it is created\n if ( $wpdb->get_row(\"SELECT * FROM wp_Company_answer WHERE company_id = $uid AND question_id = $namenumber[1]\") == null ) {\n $wpdb->query(\n \"INSERT INTO wp_Company_answer VALUES\n\t\t\t (NULL, $uid, $namenumber[1], $minmax[1], $minmax[0], $val)\n\t\t\t \");\n } else {\n $wpdb->update('wp_Company_answer', array(\n 'answer_max' => $minmax[1],\n 'answer_min' => $minmax[0],\n 'answer_priority' => $val,\n ), array(\n 'company_id' => $uid,\n 'question_id' => $namenumber[1],\n ));\n }\n }\n }\n pkfg_advance();\n\tdie();\n}", "function addquestion($questionArray)\n{\n //and type \n\n GLOBAL $dbObject;\n GLOBAL $toJsonString; \n\n $answerT = \"\";\n $answerQuery = \"\";\n $typeid = $questionArray['typeid'];\n $studyid = $questionArray['studyid'];\n $questionid = null;\n\n $dbObject->queryInsert(\"insert into question(question,order_Anwsers,\n question_order,type_id) values('\".$questionArray['question'].\"',\".\n $questionArray['qaorder'].\",\".$questionArray['qorder'].\",\".\n $questionArray['typeid'].\")\");\n\n if($dbObject->isDberror())\n {\n return $dbObject->getDberror();\n }\n else\n {\n\n switch($typeid)\n {\n case '9':\n $answerT = \"anwsers_checkbox\";\n break;\n case '10':\n $answerT = \"anwsers_fill_in_blank\";\n break;\n case '11':\n $answerT = \"anwsers_multi_choices\";\n break;\n }\n\n $dbObject->querySelect(\"SELECT id FROM question where \n question='\".$questionArray['question'].\"'\");\n $questionid = $dbObject->getSQLResults();\n\n if($questionid && !$dbObject->isDberror())\n {\n $dbObject->queryInsert(\"insert into study_to_question(question_id,\n study_id) values(\".$questionid[0]['id'].\",\".$studyid.\")\");\n\n $lastKey = count($questionArray['values']);\n $countloop = 0;\n\n foreach($questionArray['values'] as $value)\n { \n if($typeid == '11' || $typeid == '10')\n {\n $explodArray = explode(\",\",$value);\n $answerQuery .= \"insert into $answerT (question_id,qorder,\";\n $answerQuery .= \"anwser) values(\".$questionid[0]['id'].\",\";\n $answerQuery .= $explodArray[1].\",'\".$explodArray[0].\"')\";\n }\n else if ($typeid == '9')\n {\n $answerQuery .= \"insert into $answerT (question_id,\";\n $answerQuery .= \"anwser) values(\".$questionid[0]['id'].\",'\";\n $answerQuery .= $value.\"')\";\n }\n\n if(($countloop + 1) != $lastKey)\n {\n $answerQuery .= \";\";\n }\n\n $countloop++;\n }\n\n $dbObject->queryUpdateMult($answerQuery); \n\n if($dbObject->isDberror())\n {\n return $dbObject->getDberror();\n }\n else\n {\n if($dbObject->get_affected_rows() > 0)\n { \n return '{\"status\":\"good\",\"results\":\"The question was added\"}';\n }\n else\n {\n //user does not exisist\n return '{\"status\":\"good\",\"results\":\"The question was not added\"}';\n }\n } \n }\n else\n {\n return \"{'status':'error','results':'No question id'}\";\n }\n }\n}", "public function insert_question($data){\n\t\t\t\n\t\t$query = $this->db->insert($this->table, $data);\n\t\t$insert_id = $this->db->insert_id();\n\t\t\t\n\t\tif ($insert_id){\n\t\t\treturn $insert_id;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}", "function addQuestion($vars) {\r\n\textract($vars);\r\n\r\n\tlist($dbconn) = lnDBGetConn();\r\n\t$lntable = lnDBGetTables();\r\n\t$quiz_testtable = $lntable['quiz_test'];\r\n\t$quiz_testcolumn = &$lntable['quiz_test_column'];\r\n\r\n\tif($dbconn->ErrorNo() != 0) {\r\n\t\treturn;\r\n\t}\t\r\n\t\r\n\t/**\r\n\techo $keyword;\r\n\techo \"<br>j=1 : \".$add_question_to_test[1];\r\n\techo \"<br>j=2 : \".$add_question_to_test[2];\r\n\techo \"<br>j=3 : \".$add_question_to_test[3];\r\n\t*/\r\n\t$weight = getMaxWeight($qid);\r\n\t//echo $weight;\r\n\t\r\n\tfor($i=1;$i<=$j;$i++)\r\n\t{\r\n\t\t\r\n\tif($add_question_to_test[$i]!=null)\r\n\t\t{\r\n\t\t\r\n\t\t$query = \"INSERT INTO $quiz_testtable\r\n\t\t(\t$quiz_testcolumn[qid],\r\n\t\t$quiz_testcolumn[mcid],\r\n\t\t$quiz_testcolumn[weight]\r\n\t\t)\r\n\t\tVALUES ('\" . lnVarPrepForStore($qid) . \"',\r\n\t\t'\" . lnVarPrepForStore($add_question_to_test[$i]) . \"',\r\n\t\t\t'\" . lnVarPrepForStore($weight) . \"')\";\t\r\n\t\t\r\n\t\t$result = $dbconn->Execute($query);\r\n\t \tif (!$result) die (\"result error\");\t\r\n\t\t\r\n\t\t$weight++;\t\t\r\n\t\t\r\n\t\t}//end if($add_question_to_test[$i]!=null)\r\n\t\r\n\t}// end for\r\n\t\r\n\t//return $permission;\r\n}", "public function run()\n {\n DB::table('questions')->insert([\n [\n 'topic_id' => '1',\n 'status' => '1',\n 'author_name' => 'author',\n 'text' => 'Какое небесное тело в астрологии «отвечает» за понедельник',\n 'answer' => 'Луна'\n ],\n [\n 'topic_id' => '1',\n 'status' => '1',\n 'author_name' => 'author',\n 'text' => 'Какой знак зодиака приходится на лето',\n 'answer' => 'Рак'\n ],\n [\n 'topic_id' => '1',\n 'status' => '1',\n 'author_name' => 'author',\n 'text' => 'Как называется яркая звезда - альфа Скорпиона',\n 'answer' => 'Антарес'\n ],\n [\n 'topic_id' => '2',\n 'status' => '1',\n 'author_name' => 'author',\n 'text' => 'В каком южноамериканском городе стоит 38-метровая статуя Иисуса Христа',\n 'answer' => 'Рио де жанейро'\n ],\n [\n 'topic_id' => '2',\n 'status' => '1',\n 'author_name' => 'author',\n 'text' => 'В каком городе находилось одно из семи чудес света Сады Семирамиды',\n 'answer' => 'Вавилон'\n ],\n [\n 'topic_id' => '2',\n 'status' => '1',\n 'author_name' => 'author',\n 'text' => 'Какой город являлся целью всех крестовых походов',\n 'answer' => 'Иерусалим'\n ],\n\n [\n 'topic_id' => '3',\n 'status' => '1',\n 'author_name' => 'author',\n 'text' => 'Мехом какого животного отделана шапка Мономаха',\n 'answer' => 'Соболь'\n ],\n\n [\n 'topic_id' => '3',\n 'status' => '1',\n 'author_name' => 'author',\n 'text' => '',\n 'answer' => ''\n ],\n\n [\n 'topic_id' => '3',\n 'status' => '1',\n 'author_name' => 'author',\n 'text' => 'Как называется русская охотничья порода собак',\n 'answer' => 'Борзая'\n ],\n\n [\n 'topic_id' => '3',\n 'status' => '1',\n 'author_name' => 'author',\n 'text' => 'Как звали любимую лошадь Петра I',\n 'answer' => 'Лизетта'\n ],\n\n\n [\n 'topic_id' => '3',\n 'status' => '0',\n 'author_name' => 'author',\n 'text' => 'Кого в русских сказках называют Топтыгин',\n 'answer' => NULL\n ],\n ]);\n }", "public function create_question()\n\t{\n\t\t$seq = $this->input->post('seq');\t\n\t\tif($seq == \"0\" || $seq == \"\")\n\t\t{\n\t\t\t$query = $this->db->query(\"SELECT MAX(seq) AS qcount FROM questions where test_id=\".$this->input->post('test_id'));\n\t\t\t$seq = (int) $query->row()->qcount + 1;\n\t\t}\n\t\t\n\t\t//Construct the answer string\n\t\t$answers = '';\n\t\tfor($i = 1; $i <= 10; $i++)\n\t\t{\n\t\t\tif($this->input->post('answer'.$i) === \"\")\n\t\t\t\tbreak;\n\t\t\t$to_append = $this->escape_html($this->input->post('answer'.$i));\n\t\t\t$answers .= $to_append.\",\".$this->input->post('link'.$i).\",\".$this->input->post('tag'.$i).\",\".$this->escape_html($this->input->post('var'.$i)).\"|\"; \n\t\t}\n\t\t$answers = substr($answers, 0, strlen($answers) - 1);\n\t\t\n\t\t$data = array(\n\t\t\t'test_id' => $this->input->post('test_id'),\n\t\t\t'type' => $this->input->post('type'),\n\t\t\t'cluster' => $this->input->post('cluster'),\n\t\t\t'question' => $this->escape_html($this->input->post('question')),\n\t\t\t'seq' => $seq,\n\t\t\t'answers' => $answers,\n\t\t\t'condition' => $this->input->post('condition'),\n\t\t\t'explanation' => $this->input->post('explanation')\n\t\t);\n\t\t\n\t\treturn $this->db->insert('questions', $data);\n\t}", "function assignQuestions($questions, $id)\n {\n if ($this->link) {\n $flagValue = 0;\n\n $length = count($questions);\n for ($i = 0; $i < $length; $i++) {\n echo $questions[$i];\n\n $questions1 = htmlentities($questions[$i]);\n $questions2 = mysqli_real_escape_string($this->link, $questions1);\n\n // prepare and bind\n $stmt = $this->link->prepare(\"INSERT INTO question (question, quizID, flag) VALUES (?, ?, ?)\");\n $stmt->bind_param(\"sii\", $finalQuestion, $id, $flagValue);\n\n // set parameters and execute\n $finalQuestion = $questions2;\n\n $stmt->execute();\n if ($stmt) {\n header('Location: index.php');\n }\n }\n }\n }", "public function run()\n {\n \n\n \\DB::table('ori_questions')->delete();\n \n \\DB::table('ori_questions')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'cmpny_id' => 2,\n 'questions' => 'Are you interested ?',\n 'language_type' => 1,\n 'option1' => 'yes',\n 'option2' => 'no',\n 'option3' => NULL,\n 'option4' => NULL,\n 'option5' => NULL,\n 'option6' => NULL,\n 'status' => 1,\n 'created_by' => 2,\n 'updated_by' => 2,\n 'created_at' => '2018-10-11 09:01:04',\n 'updated_at' => '2018-10-11 09:01:04',\n 'deleted_at' => NULL,\n ),\n 1 => \n array (\n 'id' => 2,\n 'cmpny_id' => 2,\n 'questions' => 'Question 1?',\n 'language_type' => 1,\n 'option1' => 'op1',\n 'option2' => 'op2',\n 'option3' => NULL,\n 'option4' => NULL,\n 'option5' => NULL,\n 'option6' => NULL,\n 'status' => 1,\n 'created_by' => 2,\n 'updated_by' => 2,\n 'created_at' => '2018-10-11 09:01:21',\n 'updated_at' => '2018-10-11 09:01:21',\n 'deleted_at' => NULL,\n ),\n 2 => \n array (\n 'id' => 3,\n 'cmpny_id' => 2,\n 'questions' => 'നിങ്ങൾ ഞങ്ങളുടെ സേവനങ്ങളിൽ തൃപ്തരാണോ?',\n 'language_type' => 2,\n 'option1' => 'അതെ',\n 'option2' => 'അല്ല',\n 'option3' => NULL,\n 'option4' => NULL,\n 'option5' => NULL,\n 'option6' => NULL,\n 'status' => 1,\n 'created_by' => 2,\n 'updated_by' => 3,\n 'created_at' => '2018-11-19 12:59:21',\n 'updated_at' => '2018-11-22 06:03:45',\n 'deleted_at' => NULL,\n ),\n 3 => \n array (\n 'id' => 8,\n 'cmpny_id' => 2,\n 'questions' => 'ചോദ്യം ഒന്ന്',\n 'language_type' => 2,\n 'option1' => 'ഉത്തരം1',\n 'option2' => 'ഉത്തരം2',\n 'option3' => NULL,\n 'option4' => NULL,\n 'option5' => NULL,\n 'option6' => NULL,\n 'status' => 1,\n 'created_by' => 3,\n 'updated_by' => 3,\n 'created_at' => '2018-11-22 06:04:25',\n 'updated_at' => '2018-11-22 06:04:25',\n 'deleted_at' => NULL,\n ),\n ));\n \n \n }", "public function insert_in_set_question_table($set_question) {\n\t\tif (count($set_question) <= 0) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->db->insert('set_question', $set_question);\n\t}", "public function insertQuestion($questionDetails){\n\n\t\t$text_EN \t\t\t\t= $questionDetails['text_EN'];\n\t\t$text_FR \t\t\t\t= $questionDetails['text_FR'];\n\t\t$answertype_serNum \t\t= $questionDetails['answertype_serNum'];\n\t\t$questiongroup_serNum \t= $questionDetails['questiongroup_serNum'];\n\t\t$created_by \t\t\t= $questionDetails['created_by'];\n\t\t$last_updated_by \t\t= $questionDetails['last_updated_by'];\n\n\t\ttry {\n\t\t\t$host_db_link = new PDO( OPAL_DB_DSN, OPAL_DB_USERNAME, OPAL_DB_PASSWORD );\n\t\t\t$host_db_link->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n\t\t\t$sql = \"\n\t\t\t\tINSERT INTO\n\t\t\t\t\tQuestionnaireQuestion (\n\t\t\t\t\t\ttext_EN,\n\t\t\t\t\t\ttext_FR,\n\t\t\t\t\t\tquestiongroup_serNum,\n\t\t\t\t\t\tanswertype_serNum,\n\t\t\t\t\t\tlast_updated_by,\n\t\t\t\t\t\tcreated_by\n\t\t\t\t\t)\n\t\t\t\tVALUES (\n\t\t\t\t\t\\\"$text_EN\\\",\n\t\t\t\t\t\\\"$text_FR\\\",\n\t\t\t\t\t'$questiongroup_serNum',\n\t\t\t\t\t'$answertype_serNum',\n\t\t\t\t\t'$last_updated_by',\n\t\t\t\t\t'$created_by'\n\t\t\t\t)\n\t\t\t\";\n\n\t\t\t$query = $host_db_link->prepare( $sql );\n\t\t\t$query->execute();\n\n\t\t} catch(PDOException $e) {\n\t\t\treturn $e->getMessage();\n\t\t}\n\t}", "function add_question()\n {\n $this->view_data['content'] = 'admin/surveys/edit_question';\n\n $this->_prep_form_values('validation_survey_question_edit');\n\n if ($this->input->post('submit') || $this->isAjax())\n {\n $this->load->model('default/m_survey_questions');\n\n $id = $this->_save('validation_survey_question_edit', $this->m_survey_questions);\n\n if ($id)\n {\n if ($this->isAjax())\n {\n echo $id; exit();\n }\n\n $this->session->set_flashdata('message', 'Question added.');\n \n redirect (current_url());\n }\n }\n $this->parser->parse('admin/template', $this->view_data);\n }", "public function run()\n {\n DB::table('questions')->insert([\n [\n 'topic_id' => '1',\n 'status' => '1',\n 'author_name' => 'author',\n 'text' => 'Lorem ipsum dolor sit amet',\n 'answer' => 'consectetur adipisicing elit,\n sed do eiusmod tempor incididunt\n ut labore et dolore magna aliqua'\n ],\n [\n 'topic_id' => '1',\n 'status' => '0',\n 'author_name' => 'author',\n 'text' => 'Ut enim ad minim veniam',\n 'answer' => NULL\n ],\n [\n 'topic_id' => '2',\n 'status' => '1',\n 'author_name' => 'author',\n 'text' => 'Quis nostrud exercitation ullamco',\n 'answer' => 'Laboris nisi ut aliquip ex ea commod'\n ],\n [\n 'topic_id' => '2',\n 'status' => '0',\n 'author_name' => 'author',\n 'text' => 'Duis aute irure dolor in reprehenderit',\n 'answer' => NULL\n ],\n ]);\n }", "public function run() {\n DB::table(\"experts_questions\")->insert([\n [\n 'question_slug' => uniqid(),\n 'question_text' => \"Kebijakan dari Universitas tentang penggunaan E-learning lebih penting dalam mendorong mahasiswa maupun dosen untuk mengakses E-learning dari pada sistem dan teknologi E-learning yang bagus \n\",\n 'question_category_id' => 6\n ],\n [\n 'question_slug' => uniqid(),\n 'question_text' => \"Kebijakan dari Universitas tentang penggunaan E-learning lebih penting dalam mendorong mahasiswa maupun dosen untuk mengakses E-learning dari pada kualitas materi yang bagus pada E-learning\n\",\n 'question_category_id' => 6\n ],\n [\n 'question_slug' => uniqid(),\n 'question_text' => \"Dalam mengembangkan E-learning Kebijakan dari Universitas tentang penggunaan E-learning harus lebih diperhatikan daripada kesan-kesan yang diberikan mahasiswa tehadap E-learning\n\",\n 'question_category_id' => 6\n ],\n [\n 'question_slug' => uniqid(),\n 'question_text' => \"Kebijakan dari Universitas tentang penggunaan E-learning lebih penting dalam mendorong mahasiswa untuk mengakses E-learning daripada motivasi yang dberikan dosen\n\",\n 'question_category_id' => 6\n ],\n [\n 'question_slug' => uniqid(),\n 'question_text' => \"Teknologi dan sistem E-learning yang handal lebih penting daripada materi yang bagus\",\n 'question_category_id' => 6\n ],\n [\n 'question_slug' => uniqid(),\n 'question_text' => \"Dalam mengembangkan E-learning perkembangan teknologi dan sistem E-learning terkini harus lebih diperhatikan daripada kesan-kesan yang diberikan mahasiswa maupun dosen terhadap E-learning \n\",\n 'question_category_id' => 6\n ],\n [\n 'question_slug' => uniqid(),\n 'question_text' => \"Teknologi dan sistem E-learning yang handal merupakan faktor pendorong yang lebih diperhatikan oleh mahasiswa daripada motivasi yang diberikan dari dosen dalam hal pengaksesan E-learning\n\",\n 'question_category_id' => 6\n ],\n [\n 'question_slug' => uniqid(),\n 'question_text' => \"Perbaikan kualitas materi pada E-learning harus lebih diperhatikan daripada membuat forum diskusi pada E-learning agar mendorong mahasiswa maupun dosen mengakses E-learning\n\",\n 'question_category_id' => 6\n ],\n [\n 'question_slug' => uniqid(),\n 'question_text' => \"Kualitas materi yang ada pada E-learning lebih membuat mahasiswa tertarik membuka E-learning daripada motivasi yang diberikan dosen\",\n 'question_category_id' => 6\n ],\n [\n 'question_slug' => uniqid(),\n 'question_text' => \"Adanya diskusi pada E-learning lebih membuat mahasiswa tertarik membuka E-learning daripada motivasi yang diberikan dosen\",\n 'question_category_id' => 6\n ],\n \n ]);\n }", "protected abstract function insert();", "public function insert();", "public function insert();", "public function insert();", "public function insert();", "abstract public function insert();", "function school_question_insert() {\n\tglobal $wpdb;\n\n\tparse_str($_POST['cont'], $newarray);\n\t$uid = get_current_user_id();\n\t$cookieVal = $_COOKIE['company-identification'];\n\n foreach ( $newarray as $key => $val ) {\n $namenumber = explode('_', $key);\n\n if ( $namenumber[0] == 'sqans' ) {\n $schoolans = $val;\n } else {\n\n // Checks whether there already is a database entry, if it does exist it is only updated, if it doesnt it is created\n if ( $wpdb->get_row(\"SELECT * FROM wp_School_answer WHERE school_id = $uid AND question_id = $namenumber[1] AND company_id = $cookieVal\") == null ) {\n $wpdb->query(\n \"INSERT INTO wp_School_answer VALUES\n\t\t\t (NULL, $uid, $namenumber[1], $cookieVal, $schoolans, '$val')\n\t\t\t \");\n } else {\n $wpdb->update('wp_School_answer', array(\n 'answer_val' => $schoolans,\n 'comment' => $val,\n ), array(\n 'school_id' => $uid,\n 'question_id' => $namenumber[1],\n 'company_id' => $cookieVal,\n ));\n }\n }\n }\n pkfg_advance();\n\tdie();\n}", "function insertQuestion($naam,$bedrijf,$email,$vraag){\n\t$con = getDbConnection();\n\t$sql = \"INSERT INTO vraag (naam,bedrijfsnaam,email,vraag) VALUES (?,?,?,?)\";\n\t$stmt = $con->prepare($sql);\n $stmt->execute(array($naam,$bedrijf,$email,$vraag));\n}", "public function testQuestion()\n {\n $judge = $this->insertJudge('1', 'Codeforces', 'http://www.judge.com');\n $user = $this->insertUser('user1', 'a@a.a', 'aaaaaa', '1');\n $contest = $this->insertContest('Contest1', '2017-12-12 12:12:12', '10', '0', $user);\n $problem = $this->insertProblem('Problem1', 20, $judge, '123', '213');\n\n $initialCount = Question::count();\n // insert valid question and check for count\n $validQuestion = $this->insertQuestion('Question1', 'HelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHello', '', $contest, $user, $problem);\n $this->assertTrue(Question::count() == $initialCount + 1);\n $validQuestion->delete();\n $this->assertTrue(Question::count() == $initialCount); // test deleting\n\n // insert invalid models\n try {\n $this->insertQuestion('', 'HelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHello', '', $contest, $user, $problem);\n $this->fail(\"Shouldn't reach here w/out throwing Validation Exception - missing data\");\n } catch (ValidationException $e) {\n }\n try {\n $this->insertQuestion('HelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHello', 'Hello', '', $contest, $user, $problem);\n $this->fail(\"Shouldn't reach here w/out throwing Validation Exception - title too long\");\n } catch (ValidationException $e) {\n }\n try {\n $this->insertQuestion('Title', 'HelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHello', '', $contest, $user, $problem, '3');\n $this->fail(\"Shouldn't reach here w/out throwing Validation Exception - invalid status\");\n } catch (ValidationException $e) {\n }\n // Answer questions\n\n // Valid answer\n $validQuestion = $this->insertQuestion('Question1', 'HelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHelloHello', '', $contest, $user, $problem);\n $validQuestion->saveAnswer(\"Answer to Q1\", $user);\n\n // Remove question\n $validQuestion->delete();\n $this->assertTrue(Question::count() == $initialCount); // not inserted\n }", "public function insertFaq($atts=array()){\n\t\treturn $this->db->insert(self::TABLE, $atts);\n\t}", "public abstract function insert();", "public function run()\n {\n Questionnaire::insert([\n [\n 'title' => 'Mengetes diri sendiri',\n 'desc' => 'aaaaaaaa',\n 'category' => 4,\n 'user_id' => rand(1, 5),\n 'created_at' => now(),\n 'updated_at' => now()\n ],[\n 'title' => 'Kesehatan Mental',\n 'desc' => \"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\\ntempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\\nquis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\\nconsequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\\ncillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\\nproident, sunt in culpa qui officia deserunt mollit anim id est laborum.\",\n 'category' => 4,\n 'user_id' => rand(1, 5),\n 'created_at' => now(),\n 'updated_at' => now()\n ],[\n 'title' => 'Personality Test',\n 'desc' => \"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod\\ntempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,\\nquis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo\\nconsequat. Duis aute irure dolor in reprehenderit in voluptate velit esse\\ncillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non\\nproident, sunt in culpa qui officia deserunt mollit anim id est laborum.\",\n 'category' => 4,\n 'user_id' => rand(1, 5),\n 'created_at' => now(),\n 'updated_at' => now()\n ],\n ]);\n }", "public function insert($quizesHasPregunta){\r\n\t\t$sql = 'INSERT INTO quizes_has_preguntas (puntaje_maximo, id_quiz, id_pregunta) VALUES (?, ?, ?)';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t\n\t\t$sqlQuery->set($quizesHasPregunta->puntajeMaximo);\n\r\n\t\t\n\t\t$sqlQuery->setNumber($quizesHasPregunta->idQuiz);\n\n\t\t$sqlQuery->setNumber($quizesHasPregunta->idPregunta);\n\r\n\t\t$this->executeInsert($sqlQuery);\t\r\n\t\t//$quizesHasPregunta->id = $id;\r\n\t\t//return $id;\r\n\t}", "public function run()\n {\n DB::table('questions')->insert([\n 'survey_question' => 'How can we help?',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ]); //1\n\n DB::table('questions')->insert([\n 'survey_question' => 'Is the individual you’re seeking to assist verbal or non-verbal?',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ]); //2\n\n DB::table('questions')->insert([\n 'survey_question' => 'How old is the individual you’re seeking to assist?',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ]); //3\n\n DB::table('questions')->insert([\n 'survey_question' => 'Is your child currently employed or seeking employment?',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ]); //4\n\n DB::table('questions')->insert([\n 'survey_question' => 'How can we help?',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ]); //5\n\n DB::table('questions')->insert([\n 'survey_question' => ' How old were you when diagnosed?',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ]); //6\n\n DB::table('questions')->insert([\n 'survey_question' => ' Are you currently employed or seeking employment?',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ]); //7\n\n DB::table('questions')->insert([\n 'survey_question' => 'How can we help?',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ]); //8\n \n DB::table('questions')->insert([\n 'survey_question' => 'What industry is your business?',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ]); //9\n\n DB::table('questions')->insert([\n 'survey_question' => 'How can we help?',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ]); //10\n\n DB::table('questions')->insert([\n 'survey_question' => 'Is the individual you’re seeking to assist verbal or non-verbal?',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ]); //11\n\n DB::table('questions')->insert([\n 'survey_question' => 'What industry is your business?',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ]); //12\n\n DB::table('questions')->insert([\n 'survey_question' => 'How can we help?',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ]); //13\n\n DB::table('questions')->insert([\n 'survey_question' => 'How old is the individual you’re seeking to assist?',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ]); //14\n\n DB::table('questions')->insert([\n 'survey_question' => 'Is the individual you’re seeking to assist verbal or non-verbal?',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n ]); //15\n\n\n\n\n\n }", "private function _addQuestion($questions)\r\n {\r\n foreach ($questions as $question)\r\n {\r\n // According to the type of question select the right element type\r\n $elemToAddFunction = '_add' . $question['FQT_TypeName'];\r\n\r\n $this->$elemToAddFunction($question);\r\n }\r\n }", "function saveQuestion($data)\n{\n\tglobal $db;\n\n\t// First lets save the question.\n\t$question = $db->prepare('INSERT INTO questions (title, category_id) VALUES (:title, :category_id)');\n\n\t// Execute the prepared question statement.\n\t$question->execute(array(\n\t\t'title' \t\t=> $data['title'],\n\t\t'category_id' \t=> $data['category']\n\t));\n\n\t// Get the id of the inserted question.\n\t$question_id = $db->lastInsertId('id');\n\n\t// The correct answer.\n\t$correct_answer = $data['correct-answer'];\n\n\t// Insert each of the answers.\n\tforeach ($data['answers'] as $key => $answer)\n\t{\n\t\t// Always assume that the answer is not correct.\n\t\t$correct = 0;\n\t\n\t\t// Check if the current answer is the correct one.\n\t\tif ($data['correct-answer'] == ($key + 1))\n\t\t{\n\t\t\t$correct = 1;\n\t\t}\n\n\t\t// Prepare our database query.\n\t\t$statement = $db->prepare('INSERT INTO answers (title, question_id, correct) VALUES (:title, :question_id, :correct)');\n\n\t\t// Execute the prepared statement with values.\n\t\t$statement->execute(array(\n\t\t\t'title' \t\t=> $answer,\n\t\t\t'question_id' \t=> $question_id,\n\t\t\t'correct'\t\t=> $correct\n\t\t));\n\t}\n}", "public function insertFaq() {\n $query = 'INSERT INTO faq (pregunta, respuesta) VALUES (?,?)';\n $params = array($this->pregunta, $this->respuesta);\n return Database::executeRow($query, $params);\n }", "function addquestion($quId,$ans)\n\t\t{\n\t\t//$numrecords = $this->db->numberOfRecords($select);\n\t\t//if($numrecords > 0){\n\t\t\n\t//\t$qry\t=\t\"update quest_answer set answer = '\".$ans.\"' where question_id = '\".$quId.\"' \";\n\t//\t$res\t\t\t\t= $this->db->setQuery($qry);\n\t\t//}else{\n\t\t\n\t \t$qry\t=\t\"INSERT INTO quest_answer(question_id,answer)VALUES('\".$quId.\"','\".$ans.\"')\";\n\t\t$res\t\t\t\t= $this->db->setQuery($qry);\n\t\t//}\n\t\tif($res==1)\n\t\t\t\treturn '';\n\t\t\t\telse\n\t\t\t\treturn 'Some unknown error,Please try later!';\n\t\t\n\t\t\n\t\t}", "public function run()\n {\n DB::table('smart_form_questions')->insert([\n [\n 'id' => 1,\n 'category_id' => 2,\n 'content' => 'Выберите ваш пол?',\n 'positive' => 'Мужской',\n 'negative' => 'Женский',\n ],\n [\n 'id' => 2,\n 'category_id' => 11,\n 'content' => 'Заказываете ли вы еду?',\n 'positive' => 'Да',\n 'negative' => 'Нет',\n ],\n [\n 'id' => 3,\n 'category_id' => 6,\n 'content' => 'Ведёте ли вы активный образ жизни?',\n 'positive' => 'Да',\n 'negative' => 'Нет',\n ],\n [\n 'id' => 4,\n 'category_id' => 14,\n 'content' => 'Увлекаетесь ли вы чтением книг?',\n 'positive' => 'Да',\n 'negative' => 'Нет',\n ],\n [\n 'id' => 5,\n 'category_id' => 7,\n 'content' => 'Интересуют ли вас товары для дома?',\n 'positive' => 'Да',\n 'negative' => 'Нет',\n ]\n ]);\n }", "public static function insert()\n {\n }", "protected static function insertQuestionIntoQuestionTable (dbLogic $dbLogic, $questionTitle, $questionContent, $questionImageUploadfile, $questionAlt){\n $insertArray = array(\n \"QUESTION\" => $questionTitle,\n \"CONTENT\" => $questionContent,\n \"IMAGE\" => $questionImageUploadfile,\n \"IMAGE_ALT\" => $questionAlt\n );\n return $dbLogic->insert($insertArray, \"question\");\n }", "public function run()\n {\n DB::table('questions')->insert([\n 'question' => '¿Qué es un Organismo Genéticamente Modificado?',\n 'answer' => 'Un organismo genéticamente modificado (OGM) es un ser vivo (planta,\n animal, hongo o bacteria) al que se le ha modificado uno o varios genes, por medio de técnicas de ingeniería genética (ArgenBio, 2007). \n ',\n 'asked_by' => 'admin',\n 'is_faq' => true,\n 'answered_by' => 1\n ]);\n DB::table('questions')->insert([\n 'question' => '¿Qué es un gen?',\n 'answer' => 'El gen es la unidad física básica de la herencia, que contienen la\n información necesaria para precisar los rasgos transmisibles de padres a\n hijos. Los genes le indican al organismo cómo producir proteínas\n específicas, determinando las partes del cuerpo y sus funciones (NIH, s.f.;\n Medline, 2017).\n Los genes están dispuestos, en estructuras llamadas cromosomas, que\n contienen moléculas de ADN (ácido desoxiribonucléico). Los seres\n humanos tienen alrededor de 20.000 genes organizados en 46\n cromosomas (NIH, s.f.). Muchas características personales, como la\n estatura, dependen de la combinación de varios genes, mientras que otros\n rasgos, como ciertas enfermedades, dependen de un solo gen. La\n composición genética de un individuo se llama genotipo (Medline, 2017).',\n 'asked_by' => 'admin',\n 'is_faq' => true,\n 'answered_by' => 1\n ]);\n DB::table('questions')->insert([\n 'question' => '¿Qué es el ADN?',\n 'answer' => 'El ADN es una molécula que contiene las instrucciones biológicas\n codificadoras de la información celular de cada ser vivo, necesarias para\n desarrollarse, sobrevivir y reproducirse, y que se transmiten de los\n organismos adultos a su descendencia durante la reproducción (NIH,\n 2015).\n El ADN se almacena generalmente en los núcleos de las células, y se\n conforma de unas sustancias químicas básicas llamadas nucleótidos\n (adenina, guanina, timina y citosina) que se unen formando cadenas, lo\n que le da al ADN su característica forma de espiral de doble hélice (NIH,\n 2015; ArgenBio, 2007).',\n 'asked_by' => 'admin',\n 'is_faq' => true,\n 'answered_by' => 1\n ]);\n DB::table('questions')->insert([\n 'question' => '¿Qué es el proyecto genoma humano?',\n 'answer' => 'Un genoma es una colección completa de ácido desoxirribonucleico (ADN)\n de un organismo, que contiene la totalidad del material genético que posee\n un individuo o una especie en particular (RAE, 2018).\n El proyecto genoma, fue un esfuerzo internacional conjunto, de\n aproximadamente 13 años de duración, para desarrolla un mapa de la\n totalidad de los genes humanos (NIH, 2016), con la colaboración de USA,\n Inglaterra, Japón, Francia, Alemania, China y otros países.\n Entre sus objetivos estuvo: identificar los cerca de 20.500 genes en el\n ADN humano, determinar las secuencia de los 3 billones de pares de\n bases que lo conforman, registrar dicha información en bases de datos\n con herramientas de análisis mejoradas y manejar las implicaciones\n éticas, legales, económicas y sociales que de dicho proyecto se\n derivaran (HGP, 2017). ',\n 'asked_by' => 'admin',\n 'is_faq' => true,\n 'answered_by' => 1\n ]);\n DB::table('questions')->insert([\n 'question' => '¿Qué es la biotecnología?',\n 'answer' => 'La biotecnología consiste en el uso de tecnologías para manipular\n sistemas biológicos y organismos vivos o sus derivados, para la creación o\n modificación de productos y procesos, según explica el Convenio sobre la\n Diversidad Biológica -CBD (1992).\n A partir del CDB, se desarrolló en 2000 el Protocolo de Cartagena sobre\n Seguridad de la Biotecnología, que es un acuerdo internacional con el fin\n de normar sobre la conservación y uso sustentable de la diversidad\n biológica y la participación en los beneficios que deriven del uso de\n recursos genéticos (CBD, 2012), acuerdo al que se adhieren múltiples\n naciones, entre ellas Venezuela.',\n 'asked_by' => 'admin',\n 'is_faq' => true,\n 'answered_by' => 1\n ]);\n DB::table('questions')->insert([\n 'question' => '¿Qué es la transgénesis?',\n 'answer' => 'La biotecnología incluye diversas disciplinas, que incluyen la ingeniería\n genética: la tecnología que permite tener ADNr (recombinante), es decir, la\n manipulación deliberada del material genético con diferentes fines\n (CBUDEC, s.f.)\n Dentro de la ingeniería genética existen las técnicas de transgénesis, que\n implican la introducción de una o más secuencias de ADN de una especie\n a otra, por medios artificiales (NIH, s.f.).\n Cuando se habla de alimentos transgénicos se hace referencia a\n alimentos provenientes de cultivos vegetales y productos animales,\n modificados genéticamente (incluyendo el empleo de enzimas y aditivos\n obtenidos de microorganismos transgénicos en la elaboración y\n procesamiento de los alimentos), según señala ArgenBio (2007).',\n 'asked_by' => 'admin',\n 'is_faq' => true,\n 'answered_by' => 1\n ]);\n DB::table('questions')->insert([\n 'question' => '¿Cuáles son las ventajas para las personas de los OGM?',\n 'answer' => 'Entre las ventajas que pueden derivar de la manipulación genética de\n organismos, la FAO (2003) señala que ha permitido ampliar la\n investigación de enfermedades. Se espera poder aplicar la biotecnología \n en los procesos de vacunación y producción de medicamentos; mejorar el\n valor nutritivo de los alimentos y finalmente, la caracterización y posible\n eliminación de genes alergénicos, son algunos de los potenciales usos de\n la biotecnología.',\n 'asked_by' => 'admin',\n 'is_faq' => true,\n 'answered_by' => 1\n ]);\n DB::table('questions')->insert([\n 'question' => '¿Cuáles son las ventajas para las empresas de los OGM?',\n 'answer' => 'Entre las ventajas para las empresas, resaltan las relacionadas con la\n producción agrícola, donde los OGM pueden implicar mayor resistencia a\n los agentes externos, alimentos básicos más nutritivos y mayor\n productividad de animales y cultivos, además de mejorar la resistencia y\n conservación de los productos en los procesos de traslado y\n almacenamiento. La biotecnología puede proporcionar una mayor\n productividad por metro cuadrado, disminución de plagas y enfermedades,\n y una reducción en la necesidad de aplicar sustancias agroquímicas (FAO,\n 2003).',\n 'asked_by' => 'admin',\n 'is_faq' => true,\n 'answered_by' => 1\n ]);\n DB::table('questions')->insert([\n 'question' => '¿Cuáles son los riesgos de los OGM para las personas?',\n 'answer' => 'Se proponen potenciales efectos negativos del uso de OGM para las\n personas: la posibilidad de toxicidad para la salud; las posibilidad de\n provocar reacciones alérgicas; la posibilidad de que los genes insertados\n sean inestables, con el riesgo de transferencia genética; consecuencias\n nutricionales asociados con la modificación genética, donde la\n contaminación de organismos no modificados pueda alterar su seguridad\n y potencial nutritivo; otros posibles efectos (OEI, s.f.).\n Existen implicaciones sobre el respeto a la libertad de los consumidores\n son violados con el inadecuado etiquetado de OGM, impidiendo al público\n conocer el contenido de sus alimentos y decidir si desean o no ingerirlos\n (Group, 2016). La modificación genética de virus y otros organismos con\n alta capacidad de mutación y combinación, pueden implicar la aparición de\n nuevas enfermedades (AgroParlamento, 2001).\n También es posible contemplar riesgos económicos para las personas y\n comunidades, pues los derechos de propiedad intelectual sobre alimentos\n GM y patentes, tienen impacto sobre los derechos de los agricultores\n (OEI, s.f.). La acción extrema en la búsqueda del control de los mercados y\n la protección de sus inversiones, ha hecho que algunas empresas,\n desarrollen semillas que no pudieran ser reutilizadas o fértiles, (recibiendo\n el nombre de terminator) que generan dependencia de los campesinos\n con las transnacionales y así con diversos productos (Massieu, Chauvet,\n Castañeda, Barajas y González, 2000).',\n 'asked_by' => 'admin',\n 'is_faq' => true,\n 'answered_by' => 1\n ]);\n DB::table('questions')->insert([\n 'question' => '¿Cuáles son los riesgos de los OGM para las empresas?',\n 'answer' => 'La OEI (s.f.), señala que para las empresas puede haber consecuencias\n negativas económicas y de relaciones públicas asociadas al uso de OGM.\n Por lo general, la comercialización de OGM es objeto de extensiva \n legislación y normas que generan ciertas limitaciones. Igualmente en el\n caso de los alimentos, existe un valor social/cultural e histórico además\n del nutricional, incluso connotaciones religiosas, por lo que la modificación\n tecnológica de los productos puede provocar respuestas negativas entre\n los consumidores.\n Se ha registrado una tendencia al control del mercado por parte de unas\n pocas grandes empresas, una creciente homogenización de cultivos, y\n control de la tecnología por grupos reducidos de capitales, lo que genera\n monopolios y afecta a los PyMEs. En los últimos años han aumentado las\n fusiones entre empresas agrobiotecnológicas y semilleras (Massieu,\n Chauvet, Castañeda, Barajas y González, 2000).',\n 'asked_by' => 'admin',\n 'is_faq' => true,\n 'answered_by' => 1\n ]);\n DB::table('questions')->insert([\n 'question' => '¿Cuál es el impacto de los OGM en el medio ambiente?',\n 'answer' => 'La manipulación de organismos vivos para modificar sus características\n genéticas es una práctica antigua. Los seres humanos han modificado\n organismos vivos desde hace aproximadamente 10.000 años. Sin embargo\n los cambios generados a través de cruces o exposición a mutágenos son\n imprecisas. Entre los beneficios del uso de OGM, se espera que, con el\n uso de la biotecnología moderna, aumente la precisión de las\n modificaciones a animales y cultivos, los cuales son sometidos a mayor\n grado de pruebas y regulaciones que los productos regulares, aumentando\n su nivel de seguridad (AgroBio, 2017).\n La FAO (2003) menciona la posible rehabilitación de tierras degradadas o\n menos fértiles, la disminución en el uso de agroquímicos y la creación de\n Biocombustibles a partir de materia orgánica. AgroBio (2017), incluye\n además la posibilidad de aumentar la agricultura sin labranza, la protección\n de insectos beneficiosos y una reducción de las emisiones de dióxido de\n carbono.\n Al mismo tiempo, entre los riesgos ambientales del uso de OGM, resalta\n de manera principal la disminución de la biodiversidad, la tendencia\n hacia el monocultivo de variedades puede profundizar la homogeneización\n cultivos, generando una suerte de erosión genética (Massieu, Chauvet,\n Castañeda, Barajas y González, 2000).\n Está demostrada la capacidad de los OGM para dispersarse e introducir\n genes de ingeniería genética en poblaciones silvestres; la posible\n persistencia del gen una vez que el OGM ha sido cosechado y la\n susceptibilidad de los organismos no objetivo como los insectos, bacterias\n y otros, pudiendo incluso desarrollar organismos resistentes; un mayor\n uso de sustancias químicas en la agricultura; la tendencia a un menor uso\n de la rotación de cultivos; el desplazamiento de genes de resistencia a los\n herbicidas y otros vegetales (OEI, s.f.).',\n 'asked_by' => 'admin',\n 'is_faq' => true,\n 'answered_by' => 1\n ]);\n DB::table('questions')->insert([\n 'question' => '¿Cuál es el impacto de los OGM en la economía de un país??',\n 'answer' => 'Dependiendo de la organización económica de cada país el uso de OGM\n puede tener impactos positivos o negativos. El uso de OGM es un factor\n potenciador del desarrollo científico y tecnológico en los países. En\n cuanto a la productividad agrícola, se ha registrado en varios casos un\n crecimiento de productividad nacional importante con la incorporación de\n biotecnología (Bragachini y Manfredi, 2011).\n Sin embargo, dependiendo del rol del Estado en éstas prácticas, los\n desarrollos biotecnológicos tienden a beneficiar más al sector privado y\n de exportaciones, que a cubrir las necesidades internas alimentarias de la\n población en los países que los producen. Al mismo tiempo, la\n biotecnología genera asimetría en las relaciones económicas entre los\n países, acentuando las brechas entre países industrializados y países en\n desarrollo, y entre los grandes capitales y las pequeñas empresas dentro\n de un país (Bota, 2003).',\n 'asked_by' => 'admin',\n 'is_faq' => true,\n 'answered_by' => 1\n ]);\n DB::table('questions')->insert([\n 'question' => '¿Qué es la bioética?',\n 'answer' => 'La bioética es la disciplina que estudia los aspectos éticos implicados en\n las ciencias de la vida, que incluyen en primer lugar la medicina y la\n biología, y en segundo lugar las humanidades, abarcando relaciones del\n hombre con los demás seres vivos y con la salud (PAHO, 2018). La\n bioética tiene el papel de clarificar las discusiones y debates complejos\n sobre las consecuencias éticas, sociales, económicas, políticas y\n jurídicas, etc que se derivan de avances tecnológicos (Rodríguez, 2010).',\n 'asked_by' => 'admin',\n 'is_faq' => true,\n 'answered_by' => 1\n ]);\n DB::table('questions')->insert([\n 'question' => '¿Qué es la bioseguridad?',\n 'answer' => 'La bioseguridad es un conjunto de medidas, protocolos y normas, que\n aplican en los procedimientos realizados en investigaciones científicas para\n la prevención de riesgos (biológico, químico, físico) o infecciones,\n controlando el manejo, uso, almacenamiento y barreras protectoras\n necesarias para garantizar la seguridad (UDD, s.f.), es decir, es un\n sistema de normas de acciones de seguridad que orientan y regulan las\n prácticas en salud (Rosas y Arteaga, 2003).',\n 'asked_by' => 'admin',\n 'is_faq' => true,\n 'answered_by' => 1\n ]);\n DB::table('questions')->insert([\n 'question' => '¿Existe una ley de bioseguridad en Venezuela?',\n 'answer' => 'Venezuela, Panamá y la UNAM de México han elaborado códigos de\n Bioseguridad y Bioética, introduciendo la regulación ética en las\n problemáticas de bioseguridad y no circunscribiendo las respuestas sólo a\n instancias técnicas (Bota, 2003).\n Igualmente, múltiples documentos, reglamentos y leyes en el país abordan\n el tema de la protección al ambiente, la salud y la sociedad, en cuanto a los\n riesgos de los OGM. Resalta la Constitución de la República Bolivariana\n de Venezuela, del año 1999, que alude al tema en sus artículos 11, 110,\n 127, 129 y 328. Además, documentos con la Ley Orgánica de Ambiente, la\n Ley Orgánica de Seguridad de la Nación (artículos 11, 13 y 14), la Ley \n Orgánica de Seguridad y Soberanía Alimentaria (art 12, 17 y 85), la Ley de\n Gestión de la Diversidad Biológica, a ley de Salud Agrícola Integral (artículo\n 46), la Ley de Semillas, la Ley sobre Defensas Sanitarias Vegetal y Animal,\n la Ley de Protección de Fauna Silvestre, el Plan de la Patria, publicado en\n Gaceta Oficial 6118 del 2013, Ley Orgánica de Ciencia, Tecnología e\n Innovación y en la Ley de Bosques.',\n 'asked_by' => 'admin',\n 'is_faq' => true,\n 'answered_by' => 1\n ]);\n DB::table('questions')->insert([\n 'question' => '¿Cuáles son las instituciones responsables de regular los OGM en Venezuela?',\n 'answer' => 'Entre los organismos responsables de regular las actividades relacionadas\n con OGMs en Venezuela, se encuentra los Ministerios con competencia en\n la materia, como el MINEC – Ministerio del Poder Popular para el\n Ecosocialismo, MPPS - Ministerio del Poder Popular para la Salud,\n MPPAPT - Ministerio del Poder Popular para la Agricultura Productiva y\n Tierras, MPPEUCT - Ministerio del Poder Popular para Educación\n Universitaria Ciencia, Tecnología, MINPPIBES - Ministerio del Poder\n Popular de Industrias y Producción Nacional, MPPIC - Ministerio del Poder\n Popular para Industria y Comercio, MPPPA - Ministerio del Poder Popular\n de Pesca y Acuicultura, MPPD - Ministro del Poder Popular para la\n Defensa, MPPEF - Ministerio del Poder Popular de Economía y Finanzas\n Igualmente tienen competencia entes adscritos, incluyendo el INSAI -\n Instituto Nacional de Salud Agrícola Integral, SENCAMER - Servicio\n Autónomo Nacional de Normalización, Calidad, Metrología y Reglamentos\n Técnicos, SENIAT – Servicio Nacional Integrado de Administración\n Aduanera y Tributaria, y FANB – Fuerza Armada Nacional Bolivariana.',\n 'asked_by' => 'admin',\n 'is_faq' => true,\n 'answered_by' => 1\n ]);\n DB::table('questions')->insert([\n 'question' => '¿Por qué es importante el desarrollo de leyes y normas de bioseguridad en Venezuela?',\n 'answer' => 'Existen múltiples códigos en Venezuela que abordan el tema de los OGM,\n sin embargo no existe un documento que agrupe y legisle de forma general\n sobre la materia, con sus respectivos reglamentos específicos. Es\n importante una unificación de criterios y mantener la normativa\n actualizada en un campo tecnológico que evoluciona de forma rápida.\n Los desarrollos tecnológicos suelen ser de naturaleza neutra (salvo\n aquellos creados con el exclusivo propósito de dañar, como las armas), y\n su alcance depende de quiénes ostentan la propiedad sobre la tecnología y\n para qué fines la utilizan. Así, la regulación del Estado sobre los OGM,\n permite controlar que su uso sea, de forma exclusiva, para el beneficio de\n la población y no para su detrimento. Sólo el desarrollo de leyes y normas\n permite controlar qué productos entran al territorio, y sus adecuados\n manejos para evitar los riesgos potenciales a la salud, el ambiente y la\n economía que se deriven de su uso, previendo que no acarreen\n consecuencias negativas para la población.',\n 'asked_by' => 'admin',\n 'is_faq' => true,\n 'answered_by' => 1\n ]);\n DB::table('questions')->insert([\n 'question' => '¿Por qué es importante el desarrollo de leyes y normas de bioseguridad en Venezuela?',\n 'answer' => 'Existen múltiples códigos en Venezuela que abordan el tema de los OGM,\n sin embargo no existe un documento que agrupe y legisle de forma general\n sobre la materia, con sus respectivos reglamentos específicos. Es\n importante una unificación de criterios y mantener la normativa\n actualizada en un campo tecnológico que evoluciona de forma rápida.\n Los desarrollos tecnológicos suelen ser de naturaleza neutra (salvo\n aquellos creados con el exclusivo propósito de dañar, como las armas), y\n su alcance depende de quiénes ostentan la propiedad sobre la tecnología y\n para qué fines la utilizan. Así, la regulación del Estado sobre los OGM,\n permite controlar que su uso sea, de forma exclusiva, para el beneficio de\n la población y no para su detrimento. Sólo el desarrollo de leyes y normas\n permite controlar qué productos entran al territorio, y sus adecuados\n manejos para evitar los riesgos potenciales a la salud, el ambiente y la\n economía que se deriven de su uso, previendo que no acarreen\n consecuencias negativas para la población.',\n 'asked_by' => 'admin',\n 'is_faq' => true,\n 'answered_by' => 1\n ]);\n DB::table('questions')->insert([\n 'question' => '¿Cuál es el rol de las personas y las comunidades en el tema de los OGM?',\n 'answer' => 'Las personas y las comunidades son los principales afectados por el uso\n de OGM, ya sea que sus consecuencias sean positivas o negativas. Por lo\n tanto la población tiene derecho a estar informada y tomar decisiones\n sobre cómo se aplicará dicha tecnología en su país. Venezuela, partiendo\n del principio de la democracia participativa, integra a las comunidades en\n los procesos de toma de decisiones a nivel estadal, no sólo en la consulta\n por el voto, sino desde las discusiones iniciales para la redacción de los\n documentos normativos. Las personas y comunidades tienen la potestad\n de proponer leyes y normas, o modificaciones a las existentes, en base a\n sus saberes y experiencias sobre el tema, y el alcance de su participación\n puede ser comunal, municipal y nacional (Araque, 2014).',\n 'asked_by' => 'admin',\n 'is_faq' => true,\n 'answered_by' => 1\n ]);\n DB::table('questions')->insert([\n 'question' => '¿Cómo pueden las personas participar en los procesos y discusión sobre OGM?',\n 'answer' => 'La Constitución de la República Bolivariana de Venezuela de 1999\n expresa sobre la participación ciudadana que (artículo 62):\n “Todos los ciudadanos y ciudadanas tienen el derecho de participar\n libremente en los asuntos públicos, directamente o por medio de sus\n representantes elegidos o elegidas. La participación del pueblo en la\n formación, ejecución y control de la gestión pública es el medio necesario\n para lograr el protagonismo que garantice su completo desarrollo, tanto\n individual como colectivo. Es obligación del Estado y deber de la sociedad\n facilitar la generación de las condiciones más favorables para su práctica”.\n Las comunidades organizadas en Venezuela cuentan con múltiples\n mecanismos de participación en la actividad política del país y son\n convocadas de forma regular en los procesos legislativos para la discusión\n y el planteamiento de propuestas. En materia de OGM, el estado convoca\n a los miembros de las comunidades organizadas a participar libremente en\n las discusiones, y además brinda acceso a través del sitio web\n www.______.com a un sistema de Q&A (Preguntas y Respuestas) para\n permitir una comunicación más directa con las instituciones, además de\n sus canales regulares habituales.\n En el artículo 70 la constitución establece que “Son medios de\n participación y protagonismo del pueblo en ejercicio de su soberanía, en\n lo político: la elección de cargos públicos, el referendo, la consulta popular,\n la revocación del mandato, las iniciativas legislativa, constitucional y\n constituyente, el cabildo abierto y la asamblea de ciudadanos y ciudadanas\n cuyas decisiones serán de carácter vinculante, entre otros; y en lo social y\n económico: las instancias de atención ciudadana, la autogestión, la\n cogestión, las cooperativas en todas sus formas incluyendo las de carácter\n financiero, las cajas de ahorro, la empresa comunitaria y demás formas\n asociativas guiadas por los valores de la mutua cooperación y la \n solidaridad. La ley establecerá las condiciones para el efectivo\n funcionamiento de los medios de participación previstos en este artículo”.\n Entre los múltiples mecanismos mencionados de los que dispone la\n población venezolana resalta la figura del Referendo, donde los pueblos\n tienen, con periodicidad, sus puntos de vista acerca de un determinado\n asunto, a quienes han sido elegidos para tomar decisiones. Esto incluye el\n Referendo consultivo, revocatorio, abrogatorio o aprobatorio (Araque,\n 2014).',\n 'asked_by' => 'admin',\n 'is_faq' => true,\n 'answered_by' => 1\n ]);\n DB::table('questions')->insert([\n 'question' => '¿Cuáles son las instituciones responsables de regular los OGM en el mundo?',\n 'answer' => 'Diversos entes internacionales organizan, colaboran y median en las\n iniciativas de los países para regular el uso de OGM, si bien ellos no\n legislan de manera directa. Instituciones como las Naciones Unidas, la\n Organización Mundial de la Salud (OMS), la FAO (Food and Agriculture\n Organization de las Naciones Unidas), el PNUMA o Programa de las\n Naciones Unidas para el Medio Ambiente, la Organización Mundial del\n Comercio (OMC), el PNUD (Programa de las Naciones Unidas para el\n Desarrollo), el Centro de Intercambio de Información sobre Seguridad de la\n Biotecnología (CIISB), el GEF (Global Environment Facility, mejor\n conocido como el Fondo para el Medio Ambiente Mundial), Organización\n para el Desarrollo y Cooperación Económica (OCDE), el Centro Mundial de\n Vigilancia de la Conservación o UNEP-WCMC, entre otras, han sido\n responsables de la discusión y elaboración de documentos,\n convenciones y protocolos que, al ser suscritos por las naciones\n participantes, adquieren carácter vinculante en sus respectivas normas\n internas.',\n 'asked_by' => 'admin',\n 'is_faq' => true,\n 'answered_by' => 1\n ]);\n DB::table('questions')->insert([\n 'question' => '¿Cuáles son los acuerdos internacionales más importantes en materia de bioseguridad?',\n 'answer' => 'Luego de largas discusiones y negociaciones entre múltiples países se han\n elaborado importantes documentos internacionales en materia de\n bioseguridad donde resalta la Convención para la Diversidad Biológica\n (CBD), nacida a partir de la Cumbre de Río de Janeiro de 1992, de la que\n derivó el Protocolo de Cartagena sobre Seguridad de la Biotecnología\n del Convenio sobre la Diversidad Biológica, que entró en vigor en el año\n 2003.\n Venezuela es uno de los 170 países que suscribe éste acuerdo y en base\n a sus directrices establece la planificación en materia de bioseguridad en el\n país. El Protocolo de Cartagena establece la conservación de la\n diversidad biológica, a través de la adecuada gestión de los riesgos\n asociados con los organismos vivos modificados (OGM) resultante del uso\n de la biotecnología moderna; se enfoca principalmente en los\n movimientos transfronterizos de los OGMs y busca establecer normas y \n procedimientos que permitan la manipulación, uso y transferencia segura\n (Secretaría del Convenio sobre la Diversidad Biológica, 2000).\n Otros documentos importantes que se relacionan con el tema incluyen la\n Convención para la Prohibición de las Armas Biológicas (CABT)\n vigente desde 1975, que prohíbe el desarrollo, producción, adquisición,\n transferencia, retención, intercambio y almacenamiento de armas tóxicas y\n biológicas. La Convención de Aarhus, que vela por el respeto al derecho\n de las personas a la información, acceso a la justicia, participación pública\n y el proceso de toma de decisiones en materia ambiental, firmado en 1998\n (MAPAMA, s.f.); y la Convención Internacional de Protección\n Fitosanitaria (CIPF) para prevenir la diseminación e introducción de plagas\n de plantas y productos vegetales, así como promover medidas apropiadas\n para combatirlas, con el fin de la conservación de la biodiversidad vegetal y\n en la protección de los recursos naturales (FAO, 2004).',\n 'asked_by' => 'admin',\n 'is_faq' => true,\n 'answered_by' => 1\n ]);\n }", "function saveQuestionOld($data)\n{\n\t// Tell the function that we want to use the $db global.\t\n\tglobal $db;\n\n\t//Prepare to insert the question into questions with the categoryId\n\t$statement = $db->prepare(\"INSERT INTO questions(category_id,title) \n\t\t\t\t\t\t\t VALUES(:category_id,:title)\");\n\n\t//Insert it\n\t$statement->execute(array('category_id'=>$data['addToCategory'],\n\t\t\t\t\t\t\t 'title'=> $data['question']));\n\t\n\t//gets the current row Id for the question so can give the answers below something to belong to.\n\t$questionId=$db->lastInsertId();\n\n\t//Prepare the the insertion of answer 1\n\t$statement = $db->prepare(\"INSERT INTO answers(id,title,correct) \n\t\t\t\t\t\t\t VALUES(:id,:title,correct)\");\n\t\n\t//Insert Answer1\n\t$statement->execute(array('id' => $questionId,\n\t\t\t\t\t\t\t 'title'=> $data['answer1'],\n\t\t\t\t\t\t\t 'correct' => $data['correct']));\n\t\n\t//Prepare the the insertion of answer 2\n\t$statement = $db->prepare(\"INSERT INTO answers(id,title,correct) \n\t\t\t\t\t\t\t VALUES(:id,:title,correct)\");\n\t\n\t//Insert Answer2\t\n\t$statement->execute(array('id' => $questionId,\n\t\t\t\t\t\t\t 'title'=> $data['answer2'],\n\t\t\t\t\t\t\t 'correct' => $data['correct']));\n\t\n\t//Prepare the the insertion of answer 3\n\t$statement = $db->prepare(\"INSERT INTO answers(id,title,correct) \n\t\t\t\t\t\t\t VALUES(:id,:title,correct)\");\n\t\n\t//Insert Answer3\n\t$statement->execute(array('id' => $questionId,\n\t\t\t\t\t\t\t 'title'=> $data['answer3'],\n\t\t\t\t\t\t\t 'correct' => $data['correct']));\t\t\n\t//Prepare the the insertion of answer 4\n\t$statement = $db->prepare(\"INSERT INTO answers(id,title,correct) \n\t\t\t\t\t\t\t VALUES(:id,:title,correct)\");\n\t//Insert Answer4\n\t$statement->execute(array('id' => $questionId,\n\t\t\t\t\t\t\t 'title'=> $data['answer4'],\n\t\t\t\t\t\t\t 'correct' => $data['correct']));\n}", "public function run()\n {\n DB::table('questions')->insert([\n // Philanthropist\n [\n 'userType' => \"Philanthropist\",\n 'reference' => \"P1\",\n 'question' => \"Het maakt me blij als ik anderen kan helpen.\",\n 'correlation' => 0.780,\n ],\n [\n 'userType' => \"Philanthropist\",\n 'reference' => \"P2\",\n 'question' => \"Ik vind het leuk om anderen te helpen zich te oriënteren in nieuwe situaties.\",\n 'correlation' => 0.775,\n ],\n [\n 'userType' => \"Philanthropist\",\n 'reference' => \"P3\",\n 'question' => \"Ik deel graag mijn kennis.\",\n 'correlation' => 0.783,\n ],\n [\n 'userType' => \"Philanthropist\",\n 'reference' => \"P4\",\n 'question' => \"Het welzijn van anderen is belangrijk voor mij.\",\n 'correlation' => 0.763,\n ],\n // Socialiser\n [\n 'userType' => \"Socialiser\",\n 'reference' => \"S1\",\n 'question' => \"Het is belangrijk voor mij om met anderen om te gaan.\",\n 'correlation' => 0.734,\n ],\n [\n 'userType' => \"Socialiser\",\n 'reference' => \"S2\",\n 'question' => \"Ik vind het leuk deel uit te maken van een team.\",\n 'correlation' => 0.617,\n ],\n [\n 'userType' => \"Socialiser\",\n 'reference' => \"S3\",\n 'question' => \"Het is belangrijk voor mij om het gevoel te hebben dat ik deel uitmaak van een gemeenschap.\",\n 'correlation' => 0.676,\n ],\n [\n 'userType' => \"Socialiser\",\n 'reference' => \"S4\",\n 'question' => \"Ik geniet van groepsactiviteiten.\",\n 'correlation' => 0.662,\n ],\n // Free Spirit\n [\n 'userType' => \"Free Spirit\",\n 'reference' => \"F1\",\n 'question' => \"Het is belangrijk voor mij om mijn eigen weg te volgen.\",\n 'correlation' => 0.480,\n ],\n [\n 'userType' => \"Free Spirit\",\n 'reference' => \"F2\",\n 'question' => \"Ik laat me vaak leiden door mijn nieuwsgierigheid.\",\n 'correlation' => 0.546,\n ],\n [\n 'userType' => \"Free Spirit\",\n 'reference' => \"F3\",\n 'question' => \"Ik hou van nieuwe dingen te proberen.\",\n 'correlation' => 0.525,\n ],\n [\n 'userType' => \"Free Spirit\",\n 'reference' => \"F4\",\n 'question' => \"Zelfstandig zijn is belangrijk voor mij.\",\n 'correlation' => 0.496,\n ],\n // Achiever\n [\n 'userType' => \"Achiever\",\n 'reference' => \"A1\",\n 'question' => \"Ik hou ervan om obstakels te verslaan.\",\n 'correlation' => 0.574,\n ],\n [\n 'userType' => \"Achiever\",\n 'reference' => \"A2\",\n 'question' => \"Het is belangrijk voor mij om mijn taken altijd volledig uit te voeren.\",\n 'correlation' => 0.485,\n ],\n [\n 'userType' => \"Achiever\",\n 'reference' => \"A3\",\n 'question' => \"Het is moeilijk voor mij om een probleem los te laten voordat ik een oplossing heb gevonden.\",\n 'correlation' => 0.569,\n ],\n [\n 'userType' => \"Achiever\",\n 'reference' => \"A4\",\n 'question' => \"Ik hou van het beheersen van moeilijke taken.\",\n 'correlation' => 0.604,\n ],\n // Disruptor\n [\n 'userType' => \"Disruptor\",\n 'reference' => \"D1\",\n 'question' => \"Ik provoceer graag.\",\n 'correlation' => 0.588,\n ],\n [\n 'userType' => \"Disruptor\",\n 'reference' => \"D2\",\n 'question' => \"Ik stel de status-quo in vraag.\",\n 'correlation' => 0.398,\n ],\n [\n 'userType' => \"Disruptor\",\n 'reference' => \"D3\",\n 'question' => \"Ik zie mezelf als een rebel.\",\n 'correlation' => 0.569,\n ],\n [\n 'userType' => \"Disruptor\",\n 'reference' => \"D4\",\n 'question' => \"Ik hou niet van het volgen van regels.\",\n 'correlation' => 0.577,\n ],\n // Player\n [\n 'userType' => \"Player\",\n 'reference' => \"P1\",\n 'question' => \"Ik hou van wedstrijden waarbij een prijs kan worden gewonnen.\",\n 'correlation' => 0.459,\n ],\n [\n 'userType' => \"Player\",\n 'reference' => \"P2\",\n 'question' => \"Beloningen zijn een geweldige manier om me te motiveren.\",\n 'correlation' => 0.622,\n ],\n [\n 'userType' => \"Player\",\n 'reference' => \"P3\",\n 'question' => \"Rendement van de investering is belangrijk voor mij.\",\n 'correlation' => 0.313,\n ],\n [\n 'userType' => \"Player\",\n 'reference' => \"P4\",\n 'question' => \"Als de beloning voldoende is, zal ik me inspannen.\",\n 'correlation' => 0.568,\n ],\n ]);\n }", "function addquestion($conId=NULL,$baseId=NULL){\n\t$temp=array();\n\t$temp['id']='';\n\t$temp['sponsern_content_id']=$conId;\n\t$this->Sponsernquestion->save($temp);\n\t$ansQid = $this->Sponsernquestion->id;\n\t\n\t$tempAns=array();\n\t$tempAns['id']='';\n\t$tempAns['qid']=$ansQid;\n\t$tempAns['result']='1';\n\t$this->Sponsernanswer->save($tempAns);\n\t\n\t$this->redirect('editsponsernquestion/'.$conId.'/'.$baseId);\n}", "public function run()\n {\n DB::table('answers')->insert([[\n 'ex_id' => DB::table('exercises')->where('title', 'Ülesanne 1')->pluck('id')->first(),\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'content' => '225g',\n 'is_correct' => true,\n 'order' => 0\n\n ], [\n 'ex_id' => DB::table('exercises')->where('title', 'Ülesanne 4')->pluck('id')->first(),\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'content' => 'Aadul on kotis 6 õpikut.',\n 'is_correct' => true,\n 'order' => 0\n\n ], [\n 'ex_id' => DB::table('exercises')->where('title', 'Ülesanne 2')->pluck('id')->first(),\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'content' => 'Aadul on kotis 6 õpikut.',\n 'is_correct' => true,\n 'order' => 0\n\n ], [\n 'ex_id' => DB::table('exercises')->where('title', 'Ülesanne 3')->pluck('id')->first(),\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'content' => 'See kahekohaline arv on 49.',\n 'is_correct' => true,\n 'order' => 0\n ], [\n 'ex_id' => DB::table('exercises')->where('title', 'Üks õige vastus')->pluck('id')->first(),\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'content' => 'Ilves',\n 'is_correct' => false,\n 'order' => 0\n ], [\n 'ex_id' => DB::table('exercises')->where('title', 'Üks õige vastus')->pluck('id')->first(),\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'content' => 'Tiiger',\n 'is_correct' => false,\n 'order' => 1\n ], [\n 'ex_id' => DB::table('exercises')->where('title', 'Üks õige vastus')->pluck('id')->first(),\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'content' => 'Karu',\n 'is_correct' => true,\n 'order' => 2\n ], [\n 'ex_id' => DB::table('exercises')->where('title', 'Üks õige vastus')->pluck('id')->first(),\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'content' => 'Kass',\n 'is_correct' => false,\n 'order' => 3\n ], [\n 'ex_id' => DB::table('exercises')->where('title', 'Mitu õiget varianti')->pluck('id')->first(),\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'content' => 'Koer',\n 'is_correct' => true,\n 'order' => 0\n ], [\n 'ex_id' => DB::table('exercises')->where('title', 'Mitu õiget varianti')->pluck('id')->first(),\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'content' => 'Ahven',\n 'is_correct' => false,\n 'order' => 1\n ], [\n 'ex_id' => DB::table('exercises')->where('title', 'Mitu õiget varianti')->pluck('id')->first(),\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'content' => 'Ilves',\n 'is_correct' => true,\n 'order' => 2\n ], [\n 'ex_id' => DB::table('exercises')->where('title', 'Mitu õiget varianti')->pluck('id')->first(),\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'content' => 'Pääsuke',\n 'is_correct' => false,\n 'order' => 3\n ], [\n 'ex_id' => DB::table('exercises')->where('title', 'Järjestamine')->pluck('id')->first(),\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'content' => 'Mootorratas',\n 'is_correct' => true,\n 'order' => 0\n ], [\n 'ex_id' => DB::table('exercises')->where('title', 'Järjestamine')->pluck('id')->first(),\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'content' => 'Auto',\n 'is_correct' => true,\n 'order' => 1\n ], [\n 'ex_id' => DB::table('exercises')->where('title', 'Järjestamine')->pluck('id')->first(),\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'content' => 'Lennuk',\n 'is_correct' => true,\n 'order' => 2\n ], [\n 'ex_id' => DB::table('exercises')->where('title', 'Järjestamine')->pluck('id')->first(),\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'content' => 'Kruiisilaev',\n 'is_correct' => true,\n 'order' => 3\n ]]);\n\n\n/* $count = DB::table('exercises')->get()->count();\n $faker = Faker\\Factory::create();\n\n for ($i = 0; $i < $count * 3; $i++) {\n \\App\\Answer::create([\n 'ex_id' => floor($i/3)*10 + 2,\n// 'ex_id' => floor($i/3) + 1,\n 'content' => $faker->sentence(3),\n 'is_correct' => $faker->boolean($chanceOfGettingTrue = 50),\n 'order' => $faker->numberBetween(1,3)\n ]);\n }*/\n }", "abstract function insert();", "function addQuiz($vars) {\r\n\textract($vars);\r\n\r\n\tlist($dbconn) = lnDBGetConn();\r\n\t$lntable = lnDBGetTables();\r\n\t$quiztable = $lntable['quiz'];\r\n\t$quizcolumn = &$lntable['quiz_column'];\r\n\t$lessonstable = $lntable['lessons'];\r\n\t$lessonscolumn = &$lntable['lessons_column'];\r\n\r\n\t$quiz_desc=stripslashes($quiz_desc);\r\n\r\n\tif($dbconn->ErrorNo() != 0) {\r\n\t\treturn;\r\n\t}\t\r\n\r\nif (empty($qid)) {\r\n\t\tif (empty($testtime)) $testtime = 0;\r\n\r\n\t\t$max_qid = getMaxQID();\r\n\r\n\t\t$query = \"INSERT INTO $quiztable\r\n\t\t(\t$quizcolumn[qid],\r\n\t\t$quizcolumn[cid],\r\n\t\t$quizcolumn[name],\r\n\t\t$quizcolumn[intro],\r\n\t\t$quizcolumn[attempts],\r\n\t\t$quizcolumn[feedback],\r\n\t\t$quizcolumn[correctanswers],\r\n\t\t$quizcolumn[grademethod],\r\n\t\t$quizcolumn[shufflequestions],\r\n\t\t$quizcolumn[testtime],\r\n\t\t$quizcolumn[grade],\r\n\t\t$quizcolumn[assessment],\r\n\t\t$quizcolumn[correctscore],\r\n\t\t$quizcolumn[wrongscore],\r\n\t\t$quizcolumn[noans],\r\n\t\t$quizcolumn[difficulty],\r\n\t\t$quizcolumn[difficultypriority]\r\n\t\t)\r\n\t\tVALUES ('\" . lnVarPrepForStore($max_qid) . \"',\r\n\t\t\t'\" . lnVarPrepForStore($cid) . \"',\r\n\t\t\t'\" . $quiz_name . \"',\r\n\t\t\t'\" . $quiz_desc . \"',\r\n\t\t\t'\" . lnVarPrepForStore($attempts) . \"',\r\n\t\t\t'\" . lnVarPrepForStore($feedback) . \"',\r\n\t\t\t'\" . lnVarPrepForStore($correctanswers) . \"',\r\n\t\t\t'\" . lnVarPrepForStore($grademethod) . \"',\r\n\t\t\t'\" . lnVarPrepForStore($shufflequestions) . \"',\r\n\t\t\t'\" . lnVarPrepForStore($testtime) . \"',\r\n\t\t\t'\" . lnVarPrepForStore($grade) . \"',\r\n\t\t\t'\" . lnVarPrepForStore($assessment) . \"',\r\n\t\t\t'\" . lnVarPrepForStore($correctscore) . \"',\r\n\t\t\t'\" . lnVarPrepForStore($wrongscore) . \"',\r\n\t\t\t'\" . lnVarPrepForStore($noans) . \"',\r\n\t\t\t'\" . lnVarPrepForStore($difficulty) . \"',\r\n\t\t\t'\" . lnVarPrepForStore($difficultypriority) . \"')\";\t\r\n\t\t\r\n\t\t$result = $dbconn->Execute($query);\r\n\t if (!$result) die (\"result error\");\r\n\t\r\n}\r\nelse {\r\n\t\tif (empty($testtime)) $testtime = 0;\r\n\t\t$query = \"UPDATE $quiztable SET\r\n\t\t$quizcolumn[name] = '\" . $quiz_name . \"' ,\r\n\t\t$quizcolumn[intro] = '\" . $quiz_desc . \"' ,\r\n\t\t$quizcolumn[attempts] = '\" . lnVarPrepForStore($attempts) . \"',\r\n\t\t$quizcolumn[feedback] = '\" . lnVarPrepForStore($feedback) . \"',\r\n\t\t$quizcolumn[correctanswers] = '\" . lnVarPrepForStore($correctanswers) . \"',\r\n\t\t$quizcolumn[grademethod] = '\" . lnVarPrepForStore($grademethod) . \"',\r\n\t\t$quizcolumn[shufflequestions] = '\" . lnVarPrepForStore($shufflequestions) . \"',\r\n\t\t$quizcolumn[testtime] = '\" . lnVarPrepForStore($testtime) . \"',\r\n\t\t$quizcolumn[grade] = '\" . lnVarPrepForStore($grade) . \"' ,\r\n\t\t$quizcolumn[assessment] = '\" . lnVarPrepForStore($assessment) . \"',\r\n\t\t$quizcolumn[correctscore] = '\" . lnVarPrepForStore($correctscore) . \"' ,\r\n\t\t$quizcolumn[wrongscore] = '\" . lnVarPrepForStore($wrongscore) . \"' ,\r\n\t\t$quizcolumn[noans] = '\" . lnVarPrepForStore($noans) . \"',\r\n\t\t$quizcolumn[difficulty] = '\" . lnVarPrepForStore($difficulty) . \"',\r\n\t\t$quizcolumn[difficultypriority] = '\" . lnVarPrepForStore($difficultypriority) . \"'\r\n\t\tWHERE $quizcolumn[qid] = '\" . lnVarPrepForStore($qid) . \"'\";\r\n\t\t\t\r\n\t\t$dbconn->Execute($query);\r\n\t}\r\n\t\t\r\n}", "public function run()\n {\n \n\n \\DB::table('faqs')->delete();\n \n \\DB::table('faqs')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'question' => 'Areyou able to deliever in time?',\n 'answer' => '<p>Yes we are. You can trust us bla bla</p>\n<p>Yes we are. You can trust us bla bla</p>\n<p>Yes we are. You can trust us bla bla</p>\n<p>Yes we are. You can trust us bla bla</p>\n<p>Yes we are. You can trust us bla bla</p>\n<p>Yes we are. You can trust us bla bla</p>\n<p>Yes we are. You can trust us bla bla</p>\n<p>Yes we are. You can trust us bla bla</p>\n<p>Yes we are. You can trust us bla bla</p>\n<p>Yes we are. You can trust us bla bla</p>',\n 'status' => 1,\n 'created_at' => '2018-07-20 14:13:28',\n 'updated_at' => '2018-07-20 14:13:28',\n 'deleted_at' => NULL,\n ),\n 1 => \n array (\n 'id' => 2,\n 'question' => 'How do I pay the driver?',\n 'answer' => '<p><strong>Hello</strong></p>\n<p>You can do this. You can do this. You can do this.&nbsp;You can do this.&nbsp;You can do this.&nbsp;You can do this.&nbsp;You can do this.&nbsp;You can do this.&nbsp;You can do this.&nbsp;You can do this.&nbsp;You can do this.&nbsp;You can do this.&nbsp;You can do this.&nbsp;You can do this.&nbsp;You can do this.&nbsp;You can do this.&nbsp;You can do this.&nbsp;You can do this.&nbsp;You can do this.&nbsp;You can do this.&nbsp;You can do this.&nbsp;You can do this.&nbsp;</p>\n<p><strong>Thank you.</strong></p>',\n 'status' => 1,\n 'created_at' => '2018-07-26 12:38:44',\n 'updated_at' => '2018-07-26 12:38:44',\n 'deleted_at' => NULL,\n ),\n ));\n \n \n }", "public function addQuestion(ChoiceQuestion $question);", "public function run()\n {\n DB::table('answers')->insert([\n //gives id field a value of 1 and the answer field a value of yes\n ['id' => 1, 'answer' => \"yes\"],\n ]);\n }", "function question_tag_insert($data)\n\t {\n\t $this->db->set('nId',$data['nId']);\n\t\t $this->db->set('tags',$data['text']);\n\t\t $this->db->insert('questiontags');\n\t }", "public function addMPItem(){ \r\n $answer_key = $_POST['ans'];\r\n $test_id=$_POST['test_id'];\r\n $param = array($test_id,\r\n 1,\r\n sanitize($_POST['question']),\r\n\t\t $_POST['points']\r\n\t\t );\r\n try{\r\n $this->_quizmodel->beginTransaction();\r\n if($this->_quizmodel->isQuestionExist($test_id, 0)){\r\n\techo \"dup\";\r\n }else if($this->_quizmodel->addItem($param)){\r\n $item_id = $this->_quizmodel->getNewItemID($test_id);\r\n \r\n //saving choices\r\n $this->_quizmodel->addChoice($answer_key, $item_id, 'a', 1);//A\r\n $this->_quizmodel->addChoice($answer_key, $item_id, 'b', 2);//B\r\n $this->_quizmodel->addChoice($answer_key, $item_id, 'c', 3);//C\r\n $this->_quizmodel->addChoice($answer_key, $item_id, 'd', 4);//D\r\n //showing new item\r\n $item = $this->_quizmodel->getMPItem($item_id);\r\n //display new item\r\n echo \"<div class='panel panel-default' id='{$item['item_id']}'>\";\r\n $this->showMPItem($item);\r\n\techo \"</div>\";\r\n }else{\r\n\techo \"err\"; \r\n }\r\n $this->_quizmodel->commitTransaction();\r\n }catch(Exception $e){\r\n $this->_quizmodel->rollBack();\r\n }\r\n }", "public function insert($professor);", "public function run()\n {\n \n\n \\DB::table('faqs')->delete();\n \n \\DB::table('faqs')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'question' => 'Which women’s health care specialties do you offer consultations for?',\n 'answer' => '-\tWe currently offer online consultations for women’s mental health and fertility.',\n 'type' => 1,\n 'created_at' => '2020-04-17 04:49:42',\n 'updated_at' => '2020-04-17 04:49:42',\n ),\n 1 => \n array (\n 'id' => 3,\n 'question' => 'Do health providers speak Chinese?',\n 'answer' => '-\tAll China based health providers speak Mandarin Chinese. In the case of international health providers, some may speak Chinese. It is not a requirement for a health provider to speak Chinese during an online consultation service. Voycare provides consecutive interpretation services.',\n 'type' => 1,\n 'created_at' => '2020-04-17 04:50:39',\n 'updated_at' => '2020-04-17 04:50:39',\n ),\n 2 => \n array (\n 'id' => 4,\n 'question' => 'I do not like video calls, can I do my consultation via audio call only?',\n 'answer' => '-\tYes, you have an option to participate in your consultation via audio or video call.',\n 'type' => 1,\n 'created_at' => '2020-04-17 04:51:12',\n 'updated_at' => '2020-04-17 04:51:12',\n ),\n 3 => \n array (\n 'id' => 5,\n 'question' => 'Is Chinese interpretation included in the price of the consultation?',\n 'answer' => '-\tNo, this is a separate add-on service.',\n 'type' => 1,\n 'created_at' => '2020-04-17 04:51:45',\n 'updated_at' => '2020-04-17 04:51:45',\n ),\n 4 => \n array (\n 'id' => 6,\n 'question' => 'Is there a limit on the number of consultations I can have?',\n 'answer' => '-\tNo, you can book unlimited number of consultations with as many health providers as you need.',\n 'type' => 1,\n 'created_at' => '2020-04-17 04:52:05',\n 'updated_at' => '2020-04-17 04:52:05',\n ),\n 5 => \n array (\n 'id' => 7,\n 'question' => 'What type of consultations are available on your platform?',\n 'answer' => '-\tWe offer online consultations, which allow you to have an audio or video call with a health provide. You can also book a site visit appointment if a physical appointment is preferred. ',\n 'type' => 1,\n 'created_at' => '2020-04-17 04:52:29',\n 'updated_at' => '2020-04-17 04:52:29',\n ),\n 6 => \n array (\n 'id' => 9,\n 'question' => 'How long are online consultations?',\n 'answer' => '-\tOnline consultations start at 30 minutes and increase in 15-minute intervals.',\n 'type' => 1,\n 'created_at' => '2020-04-17 04:53:22',\n 'updated_at' => '2020-04-17 04:53:22',\n ),\n 7 => \n array (\n 'id' => 10,\n 'question' => 'I don’t see a specific region or clinic I am interested in. Can you still help me?',\n 'answer' => '-\tWe may. Please contact our Provider support team to let us know about the region you wish to find a doctor in.',\n 'type' => 1,\n 'created_at' => '2020-04-17 04:53:44',\n 'updated_at' => '2020-04-17 04:53:44',\n ),\n 8 => \n array (\n 'id' => 11,\n 'question' => 'Can I go visit the clinic or doctor in person after my online consultation?',\n 'answer' => '-\tYes, you can. In fact, it may be needed after your first online consultation. Simply book your site visit appointment and we’ll help you prepare any necessary paper work prior to your visit.',\n 'type' => 1,\n 'created_at' => '2020-04-17 04:54:15',\n 'updated_at' => '2020-04-17 04:54:15',\n ),\n 9 => \n array (\n 'id' => 12,\n 'question' => 'Why should I join Voycare?',\n 'answer' => '-\tYou love what you do, which is helping people heal or become healthier. Now you want to bring your passion to the Chinese market.',\n 'type' => 2,\n 'created_at' => '2020-04-17 04:55:25',\n 'updated_at' => '2020-04-17 04:55:25',\n ),\n 10 => \n array (\n 'id' => 13,\n 'question' => 'Is it free to join Voycare?',\n 'answer' => '-\tYes, it’s absolutely free to sign up and start using Voycare. You only pay a fee for services rendered when making an appointment with a health provider.',\n 'type' => 2,\n 'created_at' => '2020-04-17 04:55:57',\n 'updated_at' => '2020-04-17 04:55:57',\n ),\n 11 => \n array (\n 'id' => 14,\n 'question' => 'Is Voycare only limited to telemedicine or can I physically see my patient?',\n 'answer' => '-\tBoth, you can use the Voycare for remote online consultations or to set up an appointment for a physical site visit.',\n 'type' => 2,\n 'created_at' => '2020-04-17 04:56:22',\n 'updated_at' => '2020-04-17 04:56:22',\n ),\n 12 => \n array (\n 'id' => 15,\n 'question' => 'What specialties are you accepting providers for?',\n 'answer' => '-\tCurrently, our specialties include mental health counseling and fertility for women.',\n 'type' => 2,\n 'created_at' => '2020-04-17 04:56:45',\n 'updated_at' => '2020-04-17 04:56:45',\n ),\n 13 => \n array (\n 'id' => 16,\n 'question' => 'How much money can I make using the platform for each of my sessions?',\n 'answer' => '-\tIt’s entirely up to you. You are in control of how much you charge for online consultations and any treatment resulting an initial consultation.',\n 'type' => 2,\n 'created_at' => '2020-04-17 04:57:06',\n 'updated_at' => '2020-04-17 04:57:06',\n ),\n 14 => \n array (\n 'id' => 17,\n 'question' => 'How do you pay health providers?',\n 'answer' => '-\tNet 30 days for all online consultation sales minus wire transfer processing fees and commission fee.',\n 'type' => 2,\n 'created_at' => '2020-04-17 04:57:33',\n 'updated_at' => '2020-04-17 04:57:33',\n ),\n 15 => \n array (\n 'id' => 18,\n 'question' => 'Do I need to speak the language of the patient in order to use Voycare?',\n 'answer' => '-\tNo, but in most cases your patient will be a Chinese speaker. In the event you cannot speak Mandarin Chinese, a Voycare appointed consecutive interpreter will be joining the online consultation to assist.',\n 'type' => 2,\n 'created_at' => '2020-04-17 04:57:56',\n 'updated_at' => '2020-04-17 04:57:56',\n ),\n 16 => \n array (\n 'id' => 19,\n 'question' => 'Do you offer region exclusivity?',\n 'answer' => '-\tNo, there is no exclusivity given to any health provider.',\n 'type' => 2,\n 'created_at' => '2020-04-17 04:58:17',\n 'updated_at' => '2020-04-17 04:58:17',\n ),\n 17 => \n array (\n 'id' => 20,\n 'question' => 'How do I join Voycare?',\n 'answer' => '-\tGo to our Join Provider page ',\n 'type' => 2,\n 'created_at' => '2020-04-17 04:58:59',\n 'updated_at' => '2020-04-17 04:58:59',\n ),\n 18 => \n array (\n 'id' => 21,\n 'question' => 'Do you provide travel bookings and travel visa services?',\n 'answer' => '-\tYes, we have a travel division that can help with your travel needs when you choose to travel for treatments.',\n 'type' => 3,\n 'created_at' => '2020-04-17 04:59:34',\n 'updated_at' => '2020-04-17 04:59:34',\n ),\n 19 => \n array (\n 'id' => 22,\n 'question' => 'Do you provide local ground support in the destination of a health provider?',\n 'answer' => '-\tYes, we can help coordinate local travel support once you have reached your medical destination of choice. ',\n 'type' => 3,\n 'created_at' => '2020-04-17 05:00:28',\n 'updated_at' => '2020-04-17 05:00:28',\n ),\n 20 => \n array (\n 'id' => 23,\n 'question' => 'Do you offer VIP travel services?',\n 'answer' => '-\tYes, we do. Our travel specialists can coordinate all VIP travel arrangements for your medical destination of choice. ',\n 'type' => 3,\n 'created_at' => '2020-04-17 05:00:51',\n 'updated_at' => '2020-04-17 05:00:51',\n ),\n 21 => \n array (\n 'id' => 24,\n 'question' => 'Is travel included in the treatment packages by clinic?',\n 'answer' => '-\tNo. All treatment pricing is exclusive of any travel expensive.',\n 'type' => 3,\n 'created_at' => '2020-04-17 05:01:14',\n 'updated_at' => '2020-04-17 05:01:14',\n ),\n 22 => \n array (\n 'id' => 25,\n 'question' => 'What type of accommodations do you offer in the destination of the clinic?',\n 'answer' => '-\tTypically, we offer clients a minimum of 4-star international hotel accommodations or luxury apartment rentals. Please discuss with our travel specialists for options.',\n 'type' => 3,\n 'created_at' => '2020-04-17 05:03:04',\n 'updated_at' => '2020-04-17 05:03:04',\n ),\n 23 => \n array (\n 'id' => 26,\n 'question' => 'Do you offer local Chinese speaking guides?',\n 'answer' => '-\tYes, our travel specialists will be able to find local Chinese speaking guides at your medical destination.',\n 'type' => 3,\n 'created_at' => '2020-04-17 05:08:00',\n 'updated_at' => '2020-04-17 05:08:00',\n ),\n 24 => \n array (\n 'id' => 27,\n 'question' => 'How much are the consultations?',\n 'answer' => '-\tPrices varies depending on the health provider.',\n 'type' => 4,\n 'created_at' => '2020-04-17 05:08:30',\n 'updated_at' => '2020-04-17 05:08:30',\n ),\n 25 => \n array (\n 'id' => 28,\n 'question' => 'Can I pay in RMB for a consultation or treatment?',\n 'answer' => '-\tYes, you can pay in RMB by paying with Wechat Pay, AliPay or China UnionPay.',\n 'type' => 4,\n 'created_at' => '2020-04-17 05:08:57',\n 'updated_at' => '2020-04-17 05:08:57',\n ),\n 26 => \n array (\n 'id' => 29,\n 'question' => 'I had a poor connection during my consultation and was unable to speak with the clinic or doctor. Will I receive a refund?',\n 'answer' => '-\tYes, in the event you were unable to successfully have your online consultation due to a technical glitch, you will be eligible for a refund, minus any payment processing fees. Please contact our support team for more information.',\n 'type' => 4,\n 'created_at' => '2020-04-17 05:09:20',\n 'updated_at' => '2020-04-17 05:09:20',\n ),\n 27 => \n array (\n 'id' => 30,\n 'question' => 'I forgot to attend my consultation call and did not notify Voycare. Can I still qualify for refund or reschedule?',\n 'answer' => '-\tNo, you will not receive a refund for failure to show up for your online consultation without a 48-hour advance. Make sure you check your notifications for appointment reminders.',\n 'type' => 4,\n 'created_at' => '2020-04-17 05:09:48',\n 'updated_at' => '2020-04-17 05:09:48',\n ),\n 28 => \n array (\n 'id' => 31,\n 'question' => 'I was unable to attend a consultation call due to an emergency. Can I receive a refund or have the ability to reschedule the call?',\n 'answer' => '-\tIn the event of an emergency out of your control, please contact support to help you reschedule or issue a refund. Please keep in mind, additional documentation may be requested to prove your emergency. ',\n 'type' => 4,\n 'created_at' => '2020-04-17 05:10:09',\n 'updated_at' => '2020-04-17 05:10:09',\n ),\n 29 => \n array (\n 'id' => 32,\n 'question' => 'What payment options to you offer?',\n 'answer' => '-\tWe accept all major credit cards as well as Wechat Pay, AliPay and China UnionPay.',\n 'type' => 4,\n 'created_at' => '2020-04-17 05:10:38',\n 'updated_at' => '2020-04-17 05:10:38',\n ),\n 30 => \n array (\n 'id' => 33,\n 'question' => 'Do you offer bulk discounts, subscriptions or student discounts?',\n 'answer' => '-\tCurrently we do not, but may introduce in the future. Follow us on WeChat to keep abreast of new products and services we may introduce in the future.',\n 'type' => 4,\n 'created_at' => '2020-04-17 05:10:59',\n 'updated_at' => '2020-04-17 05:10:59',\n ),\n 31 => \n array (\n 'id' => 34,\n 'question' => 'Do you have an app?',\n 'answer' => '-\tCurrently we do not have a native mobile app. Our web platform is mobile friendly and can be accessed from a smart phone mobile device or tablet.',\n 'type' => 5,\n 'created_at' => '2020-04-17 05:11:30',\n 'updated_at' => '2020-04-17 05:11:30',\n ),\n 32 => \n array (\n 'id' => 35,\n 'question' => 'I was not happy with my consultation, what should I do?',\n 'answer' => '-\tContact our support team with your concerns to better assist you.',\n 'type' => 5,\n 'created_at' => '2020-04-17 05:12:01',\n 'updated_at' => '2020-04-17 05:12:01',\n ),\n 33 => \n array (\n 'id' => 36,\n 'question' => 'Does your platform work on smart phones and tablet?',\n 'answer' => '-\tYes, our web platform is mobile friendly.',\n 'type' => 5,\n 'created_at' => '2020-04-17 05:12:23',\n 'updated_at' => '2020-04-17 05:12:23',\n ),\n 34 => \n array (\n 'id' => 37,\n 'question' => 'Do I need to be on a WiFi device to use the platform?',\n 'answer' => '-\tYes, but more importantly you need an internet connection. You can use our platform through WiFi connection or through your phone carrier data plan.',\n 'type' => 5,\n 'created_at' => '2020-04-17 05:13:17',\n 'updated_at' => '2020-04-17 05:13:17',\n ),\n 35 => \n array (\n 'id' => 38,\n 'question' => 'I was given a refund or credit, but I do not see it on my account. What should I do?',\n 'answer' => '-\tYou will need to contact our support team to help you look into your refund request. Don’t worry, if a refund was approved your funds will be returned minus any processing fees.',\n 'type' => 5,\n 'created_at' => '2020-04-17 05:13:45',\n 'updated_at' => '2020-04-17 05:13:45',\n ),\n 36 => \n array (\n 'id' => 39,\n 'question' => 'I would like to offer your services to my employees as a benefit. Do you have an employer benefits package?',\n 'answer' => '-\tAt the moment we do not, but may introduce one in the near future.',\n 'type' => 5,\n 'created_at' => '2020-04-17 05:14:06',\n 'updated_at' => '2020-04-17 05:14:06',\n ),\n 37 => \n array (\n 'id' => 40,\n 'question' => 'What is the best way to reach customer service?',\n 'answer' => '-\tYou can send us an email at support@voycare.com',\n 'type' => 5,\n 'created_at' => '2020-04-17 05:14:27',\n 'updated_at' => '2020-04-17 05:14:27',\n ),\n ));\n \n \n }", "public static function insert(Request $request)\n {\n Question::create([\n 'title' => $request->title,\n 'content' => $request->content,\n 'tags' => $request->tags,\n 'uploader_id' => Session::get('id')\n ]);\n }", "public function insert()\n\t{\n\t}", "public function insert()\n\t{\n\t}", "static public function update_questions() {\n\t\t\t$tempQuestion \t\t= dl::select(\"temp_question\");\n\t\t\t$tq_id \t\t\t\t\t= $tempQuestion[0][\"q_id\"];\n\t\t\t$question_fields \t= array(\"q_title\",\"q_desc\",\"q_notes\");\n\t\t\t$question_values \t= array($_POST[\"questionTitle\"],$_POST[\"questionDesc\"], $_POST[\"notesRequired\"]);\n\t\t\t$question_write \t= array_combine($question_fields, $question_values);\n\t\t\t$found \t\t\t\t\t= dl::select(\"question\", \"q_title='\".$_POST[\"questionTitle\"].\"'\");\n\t\t\t$contentFields \t\t= array(\"qc_prompt\", \"qc_measure_unit\", \"q_id\", \"ft_id\");\n\t\t\t$optionFields\t\t\t= array(\"tfo_options\", \"qc_id\");\n\t\t\t$proprtiesFields\t\t= array(\"tfp_required\", \"tfp_size\", \"tfp_name_id\", \"tfp_range_from\", \"tfp_range_to\", \"tfp_numeric\", \"tfp_maxlength\", \"tfp_minlength\");\n\t\t\tif(empty($found)) {\n\t\t\t\tdl::insert(\"question\", $question_write);\n\t\t\t\t//get last added id\n\t\t\t\t$id \t\t\t\t\t= dl::getId(); \n\t\t\t\tself::setValues($id, $tq_id);\n\t\t\t}else{\n\t\t\t\tdl::update(\"question\", $question_write, \"q_id=\".$found[0][\"q_id\"] );\n\t\t\t\t$id=$found[0][\"q_id\"];\n\t\t\t\tself::setValues($id, $tq_id);\n\t\t\t}\n\t\t\t//delete all of the existing records for the id.\n\t\t\tdl::delete(\"temp_question_content\");\n\t\t\tdl::delete(\"temp_question\");\n\t\t\tdl::delete(\"temp_field_properties\");\n\t\t\tdl::delete(\"temp_field_options\");\n\t\t\t?>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\t$(document).ready(function() {\n\t\t\t\t\t$(function() {\n\t\t\t\t\t\t$('#questionTitle').val(\"\");\n\t\t\t\t\t\t$('#questionDesc').val(\"\");\n\t\t\t\t\t\t$('#notesRequired option:first').attr('selected', 'selected');\n\t\t\t\t\t\t$('#quest_message').html(\"Question Added\");\n\t\t\t\t\t\t$('#quest_message').delay(200).fadeOut(2000);\n\t\t\t\t\t\t$('#quest_message').show();\n\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t</script>\n\t\t\t<?php\n\t\t}", "public function newQuestion() {\n $this->receiveAJAX();\n $question = htmlspecialchars($this->request->getVar('question'), ENT_COMPAT, \"UTF-8\");\n $answer = htmlspecialchars($this->request->getVar('answer'), ENT_COMPAT, \"UTF-8\");\n $languageName = htmlspecialchars($this->request->getVar('language'), ENT_COMPAT, \"UTF-8\");\n $username = htmlspecialchars($this->request->getVar('professor'), ENT_COMPAT, \"UTF-8\");\n\n $languageModel = new LanguageModel();\n $languageId = $languageModel->GetLanguageId($languageName);\n\n $userModel = new UserModel();\n $authorId = $userModel->GetUserId($username);\n\n $model = new QuestionModel();\n $model->NewQuestion($languageId, $authorId, $question, $answer);\n\n }", "public function insert()\n {\n \n }", "public function insert()\n {\n \n }", "public function insert()\n {\n \n }", "function create($question_id, $answer) {\n global $db;\n $stmt = $db->prepare(\"INSERT INTO survey_answers( question_id, answer) VALUES (?,?)\");\n return $stmt->execute([$question_id, $answer]);\n }", "public function api_call_add_question() {\n\n global $USER;\n\n // Valid sesskey.\n $this->has_valid_sesskey();\n\n // Set information.\n $this->get_module_information();\n\n // Class.\n $question = new question($this->openwebinar);\n\n // Get post data.\n $questiontype = required_param('questiontype', PARAM_ALPHA);\n\n $data = new \\stdClass();\n $data->question = required_param('question', PARAM_TEXT);\n $data->summary = optional_param('summary', '', PARAM_TEXT);\n $data->questiontype = $question->question_type_string_to_int($questiontype);\n\n // TODO: selectable for which users this question is.\n $users = new \\stdClass();\n $users->all_enrolled_users = true;\n $users->user_ids = array();\n\n $returnid = $question->create($data->questiontype, $data, $users);\n\n if (is_numeric($returnid)) {\n $this->response['status'] = true;\n $this->response['question_id'] = $returnid;\n $this->response['text'] = $data->question;\n $this->response['type'] = $questiontype;\n $this->response['user_id'] = $USER->id;\n }\n\n $this->output_json();\n }", "public function run()\n {\n DB::table('questions')->insert([\n \t'title'=>'TeaScript你真的了解吗?',\n \t'body'=>'这门语言到底有多牛逼?',\n \t'author'=>'leon chen',\n \t'authorId'=>'1',\n \t'authorPortrait'=>'http://www.teascript.cn/image/leon.jpg',\n \t'pubDate'=>'2018-4-28 16:16:16',\n \t'commentCount'=>66,\n \t'viewCount'=>23,\n \t'favorite'=>'true',\n \t'href'=>'nono',\n \t'type'=>1,\n \t'pageToken'=>'igferrari430yyf'\n ]);\n\n DB::table('questions')->insert([\n \t'title'=>'TVM是怎样的一款虚拟机呢?',\n \t'body'=>'充满小疑问?',\n \t'author'=>'leon chen',\n \t'authorId'=>'1',\n \t'authorPortrait'=>'http://www.teascript.cn/image/leon.jpg',\n \t'pubDate'=>'2018-4-28 16:16:16',\n \t'commentCount'=>99,\n \t'viewCount'=>32,\n \t'favorite'=>'true',\n \t'href'=>'nono',\n \t'type'=>1,\n \t'pageToken'=>'igferrari430yyf'\n ]);\n\n DB::table('questions')->insert([\n \t'title'=>'分享一下TeaScript这门语言的学习体验',\n \t'body'=>'开始听陈老师上课啦',\n \t'author'=>'leon chen',\n \t'authorId'=>'1',\n \t'authorPortrait'=>'http://www.teascript.cn/image/leon.jpg',\n \t'pubDate'=>'2018-4-28 16:16:16',\n \t'commentCount'=>66,\n \t'viewCount'=>23,\n \t'favorite'=>'true',\n \t'href'=>'nono',\n \t'type'=>2,\n \t'pageToken'=>'igferrari430yyf'\n ]);\n\n DB::table('questions')->insert([\n \t'title'=>'Tea3D学习总结',\n \t'body'=>'一些个人的小体会',\n \t'author'=>'leon chen',\n \t'authorId'=>'1',\n \t'authorPortrait'=>'http://www.teascript.cn/image/leon.jpg',\n \t'pubDate'=>'2018-4-28 16:16:16',\n \t'commentCount'=>88,\n \t'viewCount'=>0,\n \t'favorite'=>'true',\n \t'href'=>'nono',\n \t'type'=>2,\n \t'pageToken'=>'igferrari430yyf'\n ]);\n\n DB::table('questions')->insert([\n \t'title'=>'这门语言好找工作吗?',\n \t'body'=>'请相关公司联系我',\n \t'author'=>'leon chen',\n \t'authorId'=>'1',\n \t'authorPortrait'=>'http://www.teascript.cn/image/leon.jpg',\n \t'pubDate'=>'2018-4-28 16:16:16',\n \t'commentCount'=>88,\n \t'viewCount'=>0,\n \t'favorite'=>'true',\n \t'href'=>'nono',\n \t'type'=>4,\n \t'pageToken'=>'igferrari430yyf'\n ]);\n\n\n DB::table('questions')->insert([\n \t'title'=>'招聘:网站需要你',\n \t'body'=>'诚招有识之士',\n \t'author'=>'leon chen',\n \t'authorId'=>'1',\n \t'authorPortrait'=>'http://www.teascript.cn/image/leon.jpg',\n \t'pubDate'=>'2018-4-28 16:16:16',\n \t'commentCount'=>88,\n \t'viewCount'=>0,\n \t'favorite'=>'true',\n \t'href'=>'nono',\n \t'type'=>5,\n \t'pageToken'=>'igferrari430yyf'\n ]);\n\n DB::table('questions')->insert([\n \t'title'=>'店长推荐:TeaScript你真的了解吗?',\n \t'body'=>'这门语言到底有多牛逼?',\n \t'author'=>'leon chen',\n \t'authorId'=>'1',\n \t'authorPortrait'=>'http://www.teascript.cn/image/leon.jpg',\n \t'pubDate'=>'2018-4-28 16:16:16',\n \t'commentCount'=>66,\n \t'viewCount'=>23,\n \t'favorite'=>'true',\n \t'href'=>'nono',\n \t'type'=>1,\n \t'pageToken'=>'question_page_token_default'\n ]);\n\n\n DB::table('questions')->insert([\n \t'title'=>'店长推荐:分享一下TeaScript这门语言的学习体验',\n \t'body'=>'开始听陈老师上课啦',\n \t'author'=>'leon chen',\n \t'authorId'=>'1',\n \t'authorPortrait'=>'http://www.teascript.cn/image/leon.jpg',\n \t'pubDate'=>'2018-4-28 16:16:16',\n \t'commentCount'=>66,\n \t'viewCount'=>23,\n \t'favorite'=>'true',\n \t'href'=>'nono',\n \t'type'=>2,\n \t'pageToken'=>'question_page_token_default'\n ]);\n\n\n\n\n\n\n }", "public static function create_post($question,$language,$user_id,$dates,$times,$type)\r\n{\r\n $sql = \"INSERT INTO post (question,language,user_id,dates,times,type) VALUES (?,?,?,?,?,?)\";\r\n Database::$db->prepare($sql)->execute([$question,$language,$user_id,$dates,$times,$type]);\r\n}", "function insertQuestionDescriptor($data, $question_ids)\n {\n foreach ($data as $row) {\n if (isset($row['Description'])) {\n $descriptors = $row['Description'];\n foreach ($question_ids as $question_id) {\n if ($question_id['MixevalsQuestion']['question_num'] == $row['question_num']) {\n $q_id = $question_id['MixevalsQuestion']['id'];\n }\n }\n\n foreach ($descriptors as $value) {\n $desc = $value;\n //$desc['mixeval_id'] = $id;\n $desc['question_id'] = $q_id;\n $this->save($desc);\n $this->id = null;\n }\n }\n }\n }", "public function insertQuestion($info)\n {\n $this->_wdb->insert('millionmind_question_unaudited', $info);\n return $this->_wdb->lastInsertId();\n }", "public static function insertQuestion($pro_id, $u_id,$question){\r\n\t\t$query = SharIt::db()->createCommand()->insertInto(SharDB::tableName('qanda'))\r\n\t\t\t\t->values(array(\r\n\t\t\t\t'product_id' => $pro_id, 'user_id' => $u_id, 'question' => $question, \r\n\t\t\t\t'question_time' => new FluentLiteral('NOW()')));\r\n\t\t\t\t\r\n\t\t$question_id=$query->execute();\r\n return $question_id;\r\n\t}", "public function testCreateQuestion()\n {\n }", "public function run()\n {\n \\DB::table('questions')->insert([\n 'pregunta' => 'Edad',\n 'tipo' =>'abierta',\n 'section_id'=>1\n ]);\n \\DB::table('questions')->insert([\n 'pregunta' => '¿Por que no has tomado asesorías?',\n 'tipo' =>'multiple',\n 'section_id'=>1\n ]);\n \\DB::table('questions')->insert([\n 'pregunta' => 'Municipio de residencia actual',\n 'tipo' =>'select',\n 'section_id'=>1\n ]);\n \\DB::table('questions')->insert([\n 'pregunta' => '¿A quien acudió y cual fue el resultado?',\n 'tipo' =>'tabla',\n 'section_id'=>1\n ]);\n\n //más pruebas jiji\n \\DB::table('questions')->insert([\n 'pregunta' => 'Esta pregunta es abierta por favor escribe lo que sea',\n 'tipo' =>'abierta',\n 'section_id'=>1\n ]);\n \\DB::table('questions')->insert([\n 'pregunta' => 'esta pregunta es de radio y es de prueba',\n 'tipo' =>'multiple',\n 'section_id'=>1\n ]);\n \\DB::table('questions')->insert([\n 'pregunta' => 'Pregunta tipo select ojo cuidado',\n 'tipo' =>'select',\n 'section_id'=>1\n ]);\n \\DB::table('questions')->insert([\n 'pregunta' => 'esta es otra tablita vamos a ver',\n 'tipo' =>'tabla',\n 'section_id'=>1\n ]);\n }", "public static function _insert()\n\t{\n\t}", "public function run()\n {\n \\Illuminate\\Support\\Facades\\DB::insert(\"INSERT INTO `questions` VALUES (1,'آیا از این هتل راضی بودید؟',4),(3,'از سایت ما خوشت اومد؟',4)\");\n }", "public function store(Request $request)\n {\n$nuevaPregunta = new Question();\n$nuevaPregunta->text = $request->text_question;\n$nuevaPregunta->points = 15;\n$nuevaPregunta->verified = 0;\n$nuevaPregunta->created_by = $request->creator;\n$nuevaPregunta->save();\n$preguntaCreada = Question::where(\"text\", \"=\", $request->text_question)->get();\n$respuestaCorrecta = new Answer();\n$respuestaCorrecta->text = $request->text_answer_correct;\n$respuestaCorrecta->correct = 0;\n$respuestaCorrecta->question_id = $preguntaCreada[0][\"id\"];\n$respuestaCorrecta->save();\n$respuesta2 = new Answer();\n$respuesta2->text = $request->text_answer2;\n$respuesta2->correct = 0;\n$respuesta2->question_id = $preguntaCreada[0][\"id\"];\n$respuesta2->save();\n$respuesta3 = new Answer();\n$respuesta3->text = $request->text_answer3;\n$respuesta3->correct = 0;\n$respuesta3->question_id = $preguntaCreada[0][\"id\"];\n$respuesta3->save();\n$respuesta4 = new Answer();\n$respuesta4->text = $request->text_answer4;\n$respuesta4->correct = 0;\n$respuesta4->question_id = $preguntaCreada[0][\"id\"];\n$respuesta4->save();\nreturn \"Pregunta guardada\";\nexit;\n}", "function AddQuestion($user,$cat,$cont){\r\n $qst= addslashes($cont);\r\n $aqst= htmlspecialchars($qst);\r\n try{\r\n $this->db->query(\"INSERT INTO questions(adby,cat,content,dated,status)VALUES('$user','$cat','$aqst',NOW(),1)\");\r\n return 'QUESTION INSERTED SUCCESSFULLY';\r\n exit;\r\n }catch(PDOException $e){throw new Exception(\"Error Processing Request<br/>\".$e->getMessage(), 1);}\r\n }", "public function run()\n {\n //\n $question1 = new Question();\n $question1->topic_id = 1;\n $question1->question_text = 'romel wels sheikmna php????:';\n $question1->save();\n\n $q1answer1 = new Options();\n $q1answer1->question_id = 1;\n $q1answer1->option = '1995';\n $q1answer1->correct = 1;\n $q1answer1->save();\n\n $q1answer2 = new Options();\n $q1answer2->question_id = 1;\n $q1answer2->option = '2020';\n $q1answer2->save();\n\n $q1answer3 = new Options();\n $q1answer3->question_id = 1;\n $q1answer3->option = 'ar vici';\n $q1answer3->save();\n\n $question2 = new Question();\n $question2->topic_id = 1;\n $question2->question_text = 'es aris text??';\n $question2->save();\n\n $q2answer1 = new Options();\n $q2answer1->question_id = 2;\n $q2answer1->option = 'kiii';\n $q2answer1->save();\n\n $q2answer2 = new Options();\n $q2answer2->question_id = 2;\n $q2answer2->option = 'araa';\n $q2answer2->correct = 1;\n $q2answer2->save();\n\n $q2answer3 = new Options();\n $q2answer3->question_id = 2;\n $q2answer3->option = 'arvicii';\n $q2answer3->save();\n\n $question3 = new Question();\n $question3->topic_id = 1;\n $question3->question_text = 'ramdeni clis xar?:';\n $question3->save();\n\n $q3answer1 = new Options();\n $q3answer1->question_id = 3;\n $q3answer1->option = 'me var 21 clis';\n $q3answer1->correct = 1;\n $q3answer1->save();\n\n $q3answer2 = new Options();\n $q3answer2->question_id = 3;\n $q3answer2->option = 'mevar 22 clis';\n $q3answer2->save();\n\n $q3answer3 = new Options();\n $q3answer3->question_id = 3;\n $q3answer3->option = 'mevar 23 clis';\n $q3answer3->save();\n }", "function insert_new_survey( $title, $location, $expiry ) {\n // survey create date\n $current_date = date('Y-m-d');\n\n // connection object\n $conn = connectionObject();\n\n // insert\n $query = $conn->prepare( 'INSERT INTO survey (englishtitle,arabictitle,frenchtitle,creationdate,validdate,address) VALUES(?,?,?,?,?,?)' );\n $query->execute( array( $title['en'], $title['ar'], $title['fr'], $current_date, $expiry, $location ) );\n return $conn->lastInsertId();\n}", "public function addshortanswerAction(){\r\n\t\t$this->view->action = \"editshortanswer\";\r\n $this->view->nameTypeQuestion = \"Câu hỏi trả lời ngắn\";\r\n\t\t$ObjQuestion = Array();\r\n\t\t$ObjQuestion['type'] = 6;\r\n\t\t$ObjQuestion['score'] = 1;\r\n\t\t$ObjQuestion['level'] = 0.5;\r\n\t\t$ObjQuestion['classification'] = 0.2;\r\n\t\t$ObjQuestion['isupdate'] = 0; // insert new question\r\n\t\t$ObjQuestion['subject_id'] = \"\";\r\n\t\t$ObjQuestion['chapter_id'] = \"\";\r\n\t\t$ObjQuestion['question_title'] = \"\";\r\n\t\t$ObjQuestion['id'] = '';\r\n\t\t$ObjQuestion['content'] = \"\";\r\n\t\t$ObjQuestion['generalfeedback'] = \"\";\r\n\t\t$ObjQuestion['hidden'] = '';\r\n\t\t$ObjQuestion['classification'] = '';\r\n $ObjQuestion['created_user'] = $this->getUserId();\r\n \r\n\t\t$this->view->ObjQuestion = $ObjQuestion;\r\n\t\t$this->renderquestion(6);\r\n\t}", "public function run()\n {\n \\DB::table('questions')->insert([\n 'name' => 'Какой тег обозначает заголовок на странице?',\n 'topics_id' => 1,\n 'type_id' => 1,\n ]);\n }", "public function insert_user_questions_data($insert_data) {\n try {\n $where_array = array(\n \"user_id\" => $insert_data['user_id'],\n \"exam_id\" => $insert_data['exam_id'],\n \"question_id\" => $insert_data['question_id'],\n \"row_status\" => 1\n );\n $count = $this->db->where($where_array)\n ->select(\"*\")\n ->from(\"user_questions\")\n ->get()\n ->num_rows();\n if ($count > 0) {\n $update_data = array(\n \"user_answer\" => $insert_data['user_answer']\n );\n return $this->db->where($where_array)->update(\"user_questions\", $update_data);\n }\n else \n return $this->db->insert(\"user_questions\", $insert_data);\n } catch(Exception $e) {\n return false;\n }\n }", "public function insert()\n {\n }", "public function insert()\n {\n }", "public function run()\n {\n //\n $question1 = new Question();\n $question1->topic_id = 1;\n $question1->question_text = '1917 m. rugsėjo mėn. buvo išrinkta Lietuvos Taryba, paskelbusi Lietuvos Nepriklausomybę, iš:';\n $question1->save();\n\n $q1answer1 = new Options();\n $q1answer1->question_id = 1;\n $q1answer1->option = '*20 narių';\n $q1answer1->correct = 1;\n $q1answer1->save();\n\n $q1answer2 = new Options();\n $q1answer2->question_id = 1;\n $q1answer2->option = '24 narių';\n $q1answer2->save();\n\n $q1answer3 = new Options();\n $q1answer3->question_id = 1;\n $q1answer3->option = '30 narių';\n $q1answer3->save();\n\n $question2 = new Question();\n $question2->topic_id = 1;\n $question2->question_text = '1918 m. vasario 16 d., skelbiant Lietuvos Nepriklausomybę, Lietuvos Tarybai vadovavo';\n $question2->save();\n\n $q2answer1 = new Options();\n $q2answer1->question_id = 2;\n $q2answer1->option = 'Antanas Smetona';\n $q2answer1->save();\n\n $q2answer2 = new Options();\n $q2answer2->question_id = 2;\n $q2answer2->option = '*Jonas Basanavičius';\n $q2answer2->correct = 1;\n $q2answer2->save();\n\n $q2answer3 = new Options();\n $q2answer3->question_id = 2;\n $q2answer3->option = 'Jonas Basanavičius';\n $q2answer3->save();\n\n $question3 = new Question();\n $question3->topic_id = 1;\n $question3->question_text = 'Pirmoji valstybė, 1918 m. pripažinusi Lietuvos Nepriklausomybę:';\n $question3->save();\n\n $q3answer1 = new Options();\n $q3answer1->question_id = 3;\n $q3answer1->option = '*Vokietija';\n $q3answer1->correct = 1;\n $q3answer1->save();\n\n $q3answer2 = new Options();\n $q3answer2->question_id = 3;\n $q3answer2->option = 'Rusija';\n $q3answer2->save();\n\n $q3answer3 = new Options();\n $q3answer3->question_id = 3;\n $q3answer3->option = 'Latvija';\n $q3answer3->save();\n }", "function postquestion($userID, $title, $content) {\n\tif (IDValidate ( $userID ) == - 1) {\n\t\treturn - 1;\n\t}\n\t$ProcceedContent = nl2br ( htmlentities ( $content ) );\n\t$ProcceedTitle = htmlspecialchars ( $title );\n\t$db = new database ();\n\t$db->connect ();\n\tdate_default_timezone_set ( 'UTC' );\n\t\n\t$query = \"INSERT INTO `Questions`(`UID`, `Title`, `Content`, `Time`) \n\tVALUES ( ? , ? , ? , ? )\";\n\t\n\tif ($stmt = $db->prepare ( $query )) {\n\t\t$stmt->bind_param ( \"isss\", $userID, $ProcceedTitle, $ProcceedContent, date ( \"Y-m-d H:i:s\" ) );\n\t\tif ($stmt->execute ()) {\n\t\t\t\n\t\t\t$affectrows = $stmt->affected_rows;\n\t\t\t\n\t\t\tif ($affectrows != 0) {\n\t\t\t\treturn $stmt->insert_id;\n\t\t\t}\n\t\t}\n\t}\n\treturn - 1;\n}", "public function run()\n {\n\n\n ///Arithemetic questions\n\n $question = new Question();\n $question->number = 1;\n $question->content = \"2 + 2\";\n $examination = Examination::find(1);\n $examination->questions()->save($question);\n\n $question = new Question();\n $question->number = 2;\n $question->content = \"4 + 2\";\n $examination = Examination::find(1);\n $examination->questions()->save($question);\n\n $question = new Question();\n $question->number = 3;\n $question->content = \"2 + 6\";\n $examination = Examination::find(1);\n $examination->questions()->save($question);\n\n\n ///Mathematics Questions\n\n $question = new Question();\n $question->number = 1;\n $question->content = \"10 + 6\";\n $examination = Examination::find(2);\n $examination->questions()->save($question);\n\n $question = new Question();\n $question->number = 2;\n $question->content = \"11 X 2\";\n $examination = Examination::find(2);\n $examination->questions()->save($question);\n\n $question = new Question();\n $question->number = 3;\n $question->content = \"Name the shape below.\";\n $question->image = \"questions/6VOhoTBuWIdiayVA1yIVT3sZuBPYvTQ2VWIQiWyF.png\";\n $examination = Examination::find(2);\n $examination->questions()->save($question);\n\n $question = new Question();\n $question->number = 4;\n $question->content = \"12 - 6\";\n $examination = Examination::find(2);\n $examination->questions()->save($question);\n\n $question = new Question();\n $question->number = 5;\n $question->content = \"Name the shape below.\";\n $question->image = \"questions/wPgCtPmI5fv7IgfIB18eOXBFzmr5p0KB4aq9PLWS.png\";\n $examination = Examination::find(2);\n $examination->questions()->save($question);\n\n\n ///English..\n $question = new Question();\n $question->number = 1;\n $question->content = \"Biscuit cookie dessert gummies chocolate bar?\";\n $examination = Examination::find(3);\n $examination->questions()->save($question);\n\n $question = new Question();\n $question->number = 2;\n $question->content = \"Carrot cake tiramisu candy soufflé?\";\n $examination = Examination::find(3);\n $examination->questions()->save($question);\n\n $question = new Question();\n $question->number = 3;\n $question->content = \"Dessert cheesecake donut soufflé chocolate cake?\";\n $examination = Examination::find(3);\n $examination->questions()->save($question);\n\n $question = new Question();\n $question->number = 4;\n $question->content = \"Tootsie roll chocolate jelly?\";\n $examination = Examination::find(3);\n $examination->questions()->save($question);\n\n $question = new Question();\n $question->number = 5;\n $question->content = \"Tootsie roll chocolate jelly?\";\n $examination = Examination::find(3);\n $examination->questions()->save($question);\n\n $question = new Question();\n $question->number = 6;\n $question->content = \"chocolate cake halvah pudding ice cream?\";\n $examination = Examination::find(3);\n $examination->questions()->save($question);\n\n\n ///Science\n $question = new Question();\n $question->number = 1;\n $question->content = \"Chocolate bar sugar plum sugar plum sweet roll?\";\n $examination = Examination::find(4);\n $examination->questions()->save($question);\n\n $question = new Question();\n $question->number = 2;\n $question->content = \"Croissant pie jelly-o marshmallow sweet?\";\n $question->image = \"questions/JyLc7r5tjIIYwnPoqJWhgfZRjjxB4bRxYkw3PLVN.png\";\n $examination = Examination::find(4);\n $examination->questions()->save($question);\n\n $question = new Question();\n $question->number = 3;\n $question->content = \"Croissant pie jelly-o marshmallow sweet?\";\n $question->image = \"questions/6VOhoTBuWIdiayVA1yIVT3sZuBPYvTQ2VWIQiWyF.png\";\n $examination = Examination::find(4);\n $examination->questions()->save($question);\n\n\n ///Swahili\n $question = new Question();\n $question->number = 1;\n $question->content = \"Chocolate bar sugar plum sugar plum sweet roll?\";\n $examination = Examination::find(5);\n $examination->questions()->save($question);\n\n $question = new Question();\n $question->number = 2;\n $question->content = \"Croissant pie jelly-o marshmallow sweet?\";\n $question->image = \"questions/JyLc7r5tjIIYwnPoqJWhgfZRjjxB4bRxYkw3PLVN.png\";\n $examination = Examination::find(5);\n $examination->questions()->save($question);\n\n $question = new Question();\n $question->number = 3;\n $question->content = \"Croissant pie jelly-o marshmallow sweet?\";\n $question->image = \"questions/6VOhoTBuWIdiayVA1yIVT3sZuBPYvTQ2VWIQiWyF.png\";\n $examination = Examination::find(5);\n $examination->questions()->save($question);\n }", "public function insertar(){\n\n\n\n\t}", "public function addQuestion(\\IMRIM\\Bundle\\LmsBundle\\Entity\\Question $questions)\n {\n $this->questions[] = $questions;\n }", "public function insert(WhoAreYou $answer): bool;", "function storyquestionadd()\n\t{\n\t\t$model = $this->loadModel('AdminModel');\n\n\t\t//Loads a view from corresponding view folder\n\t\t$view = $this->loadView('storyquestionadd');\n\n\t\t$storyQuestionViewModel = $this->loadViewModel('shared/StoryQuestionViewModel');\n\n\t\t//Execute code if a post back\n\t\tif($this->isPost())\n\t\t{\n\t\t\t// $storyQuestionViewModel->NameE = $_POST[\"NameE\"];\n\t\t\t// $storyQuestionViewModel->NameF = $_POST[\"NameF\"];\n\n\t\t\t//Map post values to the loginViewModel\n\t\t\t$storyQuestionViewModel = AutoMapper::mapPost($storyQuestionViewModel );\n\t\t\t\n\t\t\tif($storyQuestionViewModel->validate())\n\t\t\t{\n\t\t\t\t$model->addQuestion($storyQuestionViewModel->NameE, $storyQuestionViewModel->NameF);\n\n\t\t\t\t$this->redirect(\"admin/\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// echo \"Failed to save the change\";\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Execute this code if NOT a post back\n\t\t}\n\n\t\t$view->set('storyQuestionViewModel', $storyQuestionViewModel);\n\n\t\t//Renders the view. true indicates to load the layout\n\t\t$view->render(true);\t\t\n\t}" ]
[ "0.7938423", "0.72090846", "0.7139996", "0.7058476", "0.70474535", "0.70171744", "0.70158666", "0.6960521", "0.69150007", "0.6878102", "0.6802097", "0.67785007", "0.6771875", "0.6735658", "0.6682819", "0.6672898", "0.6635266", "0.66233253", "0.6619629", "0.6617111", "0.6615975", "0.6613784", "0.6566872", "0.6552968", "0.65510106", "0.6542683", "0.6537748", "0.65333766", "0.6526962", "0.65214086", "0.6505968", "0.6503543", "0.6503543", "0.6503543", "0.6503543", "0.65026224", "0.6500916", "0.6500336", "0.64911413", "0.6485675", "0.6484195", "0.6450586", "0.6447453", "0.6441056", "0.64395386", "0.6437727", "0.6437561", "0.6420286", "0.64103067", "0.6409477", "0.6405781", "0.6374597", "0.63741004", "0.63673204", "0.63613504", "0.6351972", "0.63405013", "0.633773", "0.63108695", "0.62960345", "0.62833", "0.6280554", "0.6276145", "0.6264162", "0.62579405", "0.62461823", "0.6244825", "0.6244825", "0.6239168", "0.62319726", "0.62305915", "0.62305915", "0.62305915", "0.62238115", "0.6217098", "0.6214154", "0.6212145", "0.6209233", "0.6204476", "0.6192601", "0.61906034", "0.6190047", "0.61841786", "0.618073", "0.61757296", "0.6167515", "0.61614186", "0.61560535", "0.6153752", "0.6149877", "0.6149442", "0.61449504", "0.61449504", "0.61439204", "0.6138844", "0.6138049", "0.61162126", "0.6098806", "0.6095434", "0.6092869" ]
0.73686504
1
Sets the left padding of the axis canvas from the chart picture
Устанавливает левое отступа полотна оси от изображения графика
public function setAxisPaddingLeft($left) { $this->axis_padding_left = $left; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAxisPaddingLeft()\n\t{\n\t\treturn $this->axis_padding_left;\n\t}", "public function getAxisPaddingRight()\n\t{\n\t\treturn $this->axis_padding_right;\n\t}", "public function setAxisPaddingRight($right)\n\t{\n\t\t$this->axis_padding_right = $right;\n\t}", "protected function canvasSpacingX()\n {\n $this->canvas['spacing']['x'] = 0;\n\n if ($this->intermediate['width'] < $this->canvas['width']) {\n $difference = $this->canvas['width'] - $this->intermediate['width'];\n\n if ($difference % 2 === 0) {\n $this->canvas['spacing']['x'] = $difference / 2;\n } else {\n if ($difference > 1) {\n $this->canvas['spacing']['x'] = ($difference - 1) / 2 + 1;\n } else {\n $this->canvas['spacing']['x'] = 1;\n }\n }\n }\n }", "function setHorizontalMargin($value) {\n $this->fields['margin_right'] = $this->fields['margin_left'] = $value;\n }", "public function getAxisPaddingTop()\n\t{\n\t\treturn $this->axis_padding_top;\n\t}", "public function getAxisPaddingBottom()\n\t{\n\t\treturn $this->axis_padding_bottom;\n\t}", "function _fillLeft()\n {\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_RIGHT) {\n return $this->_left - $this->_font->width($this->_text);\n }\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_CENTER_X) {\n return $this->_left - $this->_font->_centerWidth($this->_text);\n } else {\n return $this->_left;\n }\n }", "protected function all_axes_change_spaces_to_newline(){\n\t\tif (strcmp($this->x_label, \"Frame #\") == 0){\n\t\t\t$this->x_label = \"Frame\\\\n#\";\n\t\t}\n\t\tif (strcmp($this->x_label, \"Column 1\") == 0){\n\t\t\t$this->x_label = \"Column\\\\n1\";\n\t\t}\n\t\tif (strcmp($this->x_label, \"Column 2\") == 0){\n\t\t\t$this->x_label = \"Column\\\\n2\";\n\t\t}\n\t\tif (strcmp($this->x_label, \"Column 3\") == 0){\n\t\t\t$this->x_label = \"Column\\\\n3\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Frame #\") == 0){\n\t\t\t$this->y_label = \"Frame\\\\n#\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Column 1\") == 0){\n\t\t\t$this->y_label = \"Column\\\\n1\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Column 2\") == 0){\n\t\t\t$this->y_label = \"Column\\\\n2\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Column 3\") == 0){\n\t\t\t$this->y_label = \"Column\\\\n3\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Frame #\") == 0){\n\t\t\t$this->z_label = \"Frame\\\\n#\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Column 1\") == 0){\n\t\t\t$this->z_label = \"Column\\\\n1\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Column 2\") == 0){\n\t\t\t$this->z_label = \"Column\\\\n2\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Column 3\") == 0){\n\t\t\t$this->z_label = \"Column\\\\n3\";\n\t\t}\n\t}", "public function setAxisPaddingBottom($bottom)\n\t{\n\t\t$this->axis_padding_bottom = $bottom;\n\t}", "function _fillLeft()\n {\n return (int) (($this->_left + $this->_right - $this->_plotWidth()) / 2);\n }", "public function setAxisPaddingTop($top)\n\t{\n\t\t$this->axis_padding_top = $top;\n\t}", "function setPadding($top, $right, $bottom, $left)\n\t{\n\t\t$this->padTop = $top;\n\t\t$this->padRight = $right;\n\t\t$this->padBottom = $bottom;\n\t\t$this->padLeft = $left;\n\t}", "protected function tbMarkMarginX()\n {\n\n\n if (isset($this->aTableType['TB_ALIGN'])) {\n $tb_align = $this->aTableType['TB_ALIGN'];\n } else {\n $tb_align = '';\n }\n\n //set the table align\n switch ($tb_align) {\n case 'C':\n $this->iTableStartX = $this->lMargin + $this->aTableType['L_MARGIN'] + ($this->PageWidth() - $this->tbGetWidth()) / 2;\n break;\n case 'R':\n $this->iTableStartX = $this->lMargin + $this->aTableType['L_MARGIN'] + ($this->PageWidth() - $this->tbGetWidth());\n break;\n default:\n $this->iTableStartX = $this->lMargin + $this->aTableType['L_MARGIN'];\n break;\n }//\n\n }", "function _axis_options($x_grid=true, $y_grid=true)\r\n{\r\n\t$x_grid_colour = \"color:'transparent',\";\t\t// hide the grid but we still want to specify the count\r\n\t$y_grid_colour = \"color:'transparent',\";\t\t// .. because it determines the number of labels\r\n\r\n\tif (($this->chart_data->show_grid) and ($x_grid))\r\n\t\t$x_grid_colour = \"\";\r\n\t\t\r\n\tif (($this->chart_data->show_grid) and ($y_grid))\r\n\t\t$y_grid_colour = \"\";\r\n\t\t\r\n\tif (($this->chart_data->x_labels == -1) or ($this->chart_data->x_labels == ''))\t\t\t// auto, which means 5\r\n\t\t$x_grid_count = \"count:5\";\r\n\telse\r\n\t\t$x_grid_count = \"count:\".$this->chart_data->x_labels;\r\n\t\r\n\tif (($this->chart_data->y_labels == -1) or ($this->chart_data->y_labels == ''))\t\t\t// auto, which means 5\r\n\t\t$y_grid_count = \"count:5\";\r\n\telse\r\n\t\t$y_grid_count = \"count:\".$this->chart_data->y_labels;\r\n\t\r\n\t$x_gridlines = \",gridlines:{\".$x_grid_colour.$x_grid_count.\"}\";\r\n\t$y_gridlines = \",gridlines:{\".$y_grid_colour.$y_grid_count.\"}\";\r\n\r\n// axis label formats\r\n\r\n\tif ($this->chart_data->x_format == FORMAT_NONE)\r\n\t\t$x_format = '';\r\n\telse\r\n\t\t$x_format = ',format:\"'.$this->_gcFormatString($this->chart_data->x_format).'\"';\r\n\t\t\r\n\tif ($this->chart_data->y_format == FORMAT_NONE)\r\n\t\t$y_format = '';\r\n\telse\r\n\t\t$y_format = ',format:\"'.$this->_gcFormatString($this->chart_data->y_format).'\"';\r\n\t\t\r\n// X axis ranges\r\n\r\n\tif (($this->chart_data->x_start == '') and ($this->chart_data->x_end == ''))\r\n\t\t$x_range = '';\r\n\telse\r\n\t\t{\r\n\t\t$x_min = $this->_gcFormatNumber($this->chart_x_min,$this->chart_data->x_format);\r\n\t\t$x_max = $this->_gcFormatNumber($this->chart_x_max,$this->chart_data->x_format);\r\n\t\t$x_range = \",viewWindowMode:'explicit',viewWindow:{min:$x_min,max:$x_max}\";\r\n\t\t}\r\n\r\n// Y axis ranges\r\n\r\n\tif (($this->chart_data->y_start == '') and ($this->chart_data->y_end == ''))\r\n\t\t$y_range = '';\r\n\telse\r\n\t\t$y_range = \",viewWindowMode:'explicit',viewWindow:{min:\".$this->chart_y_min.\",max:\".$this->chart_y_max.\"}\";\r\n\r\n// finally we are ready to specify the axis objects\r\n\r\n\t$this->gvOptions .= \",hAxis:{title:'\".$this->x_title.\"'\".$x_gridlines.$x_format.$x_range.\"}\";\r\n\t$this->gvOptions .= \",vAxis:{title:'\".$this->y_title.\"'\".$y_gridlines.$y_format.$y_range.\"}\";\r\n}", "public function getAxisXLabelOffsetX()\n\t{\n\t\treturn $this->axis_xlabel_offX;\n\t}", "protected function draw_axis_name(){\n\n\t\t$valid_axis = array('x1', 'y', 'y2');\n\n\t\tforeach($valid_axis as $axis) {\n\n\t\t\t$var_title = 'axis_title_' . $axis;\n\t\t\t$var_unit = 'axis_unit_' . $axis;\n\t\t\t$var_position = 'axis_position_' . $axis;\n\n\t\t\tif($this->$var_title) {\n\n\t\t\t\t$title = $this->$var_title . (($this->$var_unit != '') ? ' [' . $this->$var_unit . ']' : '');\n\t\t\t\tif($axis == 'y') {\n\t\t\t\t\t$angle = 90;\n\t\t\t\t}elseif($axis == 'y2') {\n\t\t\t\t\t$angle = 270;\n\t\t\t\t}else {\n\t\t\t\t\t$angle = 0;\n\t\t\t\t}\n\n\t\t\t\t/* calculate the size of the title */\n\t\t\t\t$title_box = imageftbbox($this->axis_font_size, $angle, $this->axis_font, $title);\n\n\t\t\t\tif($axis == 'x1'){\n\t\t\t\t\t$y = $this->canvas_height - 2*$this->axis_font_size;\n\t\t\t\t\t$x = ($this->$var_position == 'middle') ? ($this->chart_width / 2) - ($title_box[4] / 2) + $this->offset_left\n\t\t\t\t\t : $this->canvas_width - $this->offset_right - $title_box[4];\n\t\t\t\t}elseif($axis == 'y') {\n\t\t\t\t\t$x = 3*$this->axis_font_size;\n\t\t\t\t\t$y = ($this->$var_position == 'middle') ? ($this->chart_height / 2) - ($title_box[3] / 2) + $this->offset_top\n\t\t\t\t\t : -$title_box[3] + $this->offset_top;\n\t\t\t\t}else{\n\t\t\t\t\t$x = $this->canvas_width - 3*$this->axis_font_size;;\n\t\t\t\t\t$y = ($this->$var_position == 'middle') ? ($this->chart_height / 2) - ($title_box[3] / 2) + $this->offset_top\n\t\t\t\t\t : -$title_box[3] + $this->offset_top;\n\t\t\t\t}\n\n\t\t\t\t/* draw the y-title */\n\t\t\t\timagefttext($this->img, $this->axis_font_size, $angle,$x ,$y , $this->axis_font_color, $this->axis_font, $title);\n\t\t\t}\n\t\t}\n\t}", "function Set90AndMargin($lm = 0, $rm = 0, $tm = 0, $bm = 0)\n {\n $lm = $lm == 0 ? floor(0.2 * $this->img->width) : $lm;\n $rm = $rm == 0 ? floor(0.1 * $this->img->width) : $rm;\n $tm = $tm == 0 ? floor(0.2 * $this->img->height) : $tm;\n $bm = $bm == 0 ? floor(0.1 * $this->img->height) : $bm;\n\n $adj = ($this->img->height - $this->img->width) / 2;\n $this->img->SetMargin($tm - $adj, $bm - $adj, $rm + $adj, $lm + $adj);\n $this->img->SetCenter(floor($this->img->width / 2), floor($this->img->height / 2));\n $this->SetAngle(90);\n if (empty($this->yaxis) || empty($this->xaxis)) {\n JpgraphError::RaiseL(25009);//('You must specify what scale to use with a call to Graph::SetScale()');\n }\n $this->xaxis->SetLabelAlign('right', 'center');\n $this->yaxis->SetLabelAlign('center', 'bottom');\n }", "public function setPadding($padding);", "private function _addOmittedCanvasDimension() {\n $sourceWidth = $this->_params['sourceWidth'];\n $sourceHeight = $this->_params['sourceHeight'];\n $sourceRatio = $sourceWidth / $sourceHeight;\n\n if (empty($this->_params['w'])\n && empty($this->_params['h'])\n ) {\n $this->_params['w'] = $sourceWidth;\n $this->_params['h'] = $sourceHeight;\n } elseif (empty($this->_params['h'])) {\n if (!$this->_params['grow']\n && $this->_params['w'] > $sourceWidth\n ) {\n $this->_params['h'] = $sourceHeight;\n } else {\n $this->_params['h'] = $this->_params['w'] / $sourceRatio;\n }\n } elseif (empty($this->_params['w'])) {\n if (!$this->_params['grow']\n && $this->_params['h'] > $sourceHeight\n ) {\n $this->_params['w'] = $sourceWidth;\n } else {\n $this->_params['w'] = $this->_params['h'] * $sourceRatio;\n }\n }\n }", "public function setLeftAlign() { $this->_isLeft = true; }", "function set_x_axis_3d($size) {\n\t\tif ($size > 0)\n\t\t\t$this->x_axis_3d = intval ( $size );\n\t}", "public function PreStrokeAdjust($graph)\n\t{\n\t\tif ($this->center) {\n\t\t\t$a = 0.5;\n\t\t\t$b = 0.5;\n\t\t\t++$this->numpoints;\n\t\t} else {\n\t\t\t$a = 0;\n\t\t\t$b = 0;\n\t\t}\n\t\t$graph->xaxis->scale->ticks->SetXLabelOffset($a);\n\t\t$graph->SetTextScaleOff($b);\n\t}", "function kvell_edge_get_title_content_padding() {\n\t\t$title_content_padding = apply_filters( 'kvell_edge_title_content_padding', 0 );\n\t\t\n\t\treturn intval( $title_content_padding );\n\t}", "function woodmart_override_section_margin_control( $control_stack ) {\n\t\t$control = Plugin::instance()->controls_manager->get_control_from_stack( $control_stack->get_unique_name(), 'margin' );\n\n\t\t$control['allowed_dimensions'] = [ 'top', 'right', 'bottom', 'left' ];\n\t\t$control['placeholder'] = [\n\t\t\t'top' => '',\n\t\t\t'right' => '',\n\t\t\t'bottom' => '',\n\t\t\t'left' => '',\n\t\t];\n\t\t$control['selectors'] = [\n\t\t\t'{{WRAPPER}}' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t];\n\n\t\t$control_stack->update_responsive_control( 'margin', $control );\n\t}", "function SetXLabelOffset($aLabelOff, $aTickOff = -1)\n {\n $this->xlabel_offset = $aLabelOff;\n if ($aTickOff == -1) // Same as label offset\n $this->xtick_offset = $aLabelOff;\n else\n $this->xtick_offset = $aTickOff;\n if ($aLabelOff > 0)\n $this->SupressLast(); // The last tick wont fit\n }", "function SetTickLabelMargin($aMargin)\n {\n if (ERR_DEPRECATED)\n JpGraphError::RaiseL(25056);//('SetTickLabelMargin() is deprecated. Use Axis::SetLabelMargin() instead.');\n $this->tick_label_margin = $aMargin;\n }", "public function getAxisYLabelOffsetX()\n\t{\n\t\treturn $this->axis_ylabel_offX;\n\t}", "function setAxisPosition($axis_id, $position = AXIS_POSITION_LEFT) { \r\n if ( isset($this->data[\"Axis\"][$axis_id] ) ) { \r\n $this->data[\"Axis\"][$axis_id][\"Position\"] = $position; \r\n } \r\n }", "function remove_caption_padding( $width ) {\n\treturn $width - 10;\n}", "public function setMarginLeft(?int $marginLeft) : self\n {\n $this->initialized['marginLeft'] = true;\n $this->marginLeft = $marginLeft;\n return $this;\n }", "function row_seperator($col_length){\n$row = '';\nforeach($col_length as $column_length)\n{\n$row .= PLUS . str_repeat(Xaxis, (Xspace * 2) + $column_length);\n}\n$row .= PLUS;\n \nreturn $row;\n}", "private function axisLabelsSeries($rect) {\r\n $tmpNum = 0;\r\n $tmpSt = \"\";\r\n $tmpValue = 0;\r\n\r\n $this->calcAllSeries();\r\n $tmpRange = $this->calcFirstLastAllSeries($rect);\r\n\r\n if ($tmpRange->first != intval('1000000000000')) { // MAX_VALUE\r\n $oldPosLabel = -1;\r\n $oldSizeLabel = 0;\r\n $tmpLabelW = $this->axis->getHorizontal();\r\n switch ($this->axis->getLabels()->iAngle) {\r\n case 90:\r\n case 270:\r\n $tmpLabelW = !$tmpLabelW;\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n $axisLabels = $this->axis->getLabels();\r\n for ( $t = $tmpRange->first; $t <= $tmpRange->last; $t++) {\r\n $r = $this->getAxisSeriesLabel($t);\r\n if ($r->result) {\r\n $tmpValue = $r->value;\r\n $tmpSt = $r->label;\r\n\r\n if (($tmpValue >= $this->axis->iMinimum) &&\r\n ($this->tmpValue <= $this->axis->iMaximum)) {\r\n $tmp = $this->axis->calcPosValue($tmpValue);\r\n if (!$this->axis->getTickOnLabelsOnly()) {\r\n $this->addTick($tmp);\r\n }\r\n\r\n if ($axisLabels->getVisible() &&\r\n (strlen($tmpSt) != 0)) {\r\n\r\n $tmpMulti = $this->axis->chart->multiLineTextWidth(\r\n $tmpSt);\r\n\r\n $tmpLabelSize = $tmpMulti->width;\r\n $tmpNum = $tmpMulti->count;\r\n\r\n if (!$tmpLabelW) {\r\n $tmpLabelSize = $this->chart->getGraphics3D()->getFontHeight() * $tmpNum;\r\n }\r\n if (($axisLabels->iSeparation != 0) &&\r\n ($this->oldPosLabel != -1)) {\r\n $tmpLabelSize += (int) (0.02 * $tmpLabelSize *\r\n $axisLabels->iSeparation);\r\n $tmpLabelSize *= 0.5;\r\n\r\n if ($tmp >= $oldPosLabel) {\r\n $tmpDraw = (($tmp -\r\n $tmpLabelSize) >=\r\n ($this->oldPosLabel +\r\n $oldSizeLabel));\r\n } else {\r\n $tmpDraw = (($tmp +\r\n $tmpLabelSize) <=\r\n ($this->oldPosLabel -\r\n $oldSizeLabel));\r\n }\r\n\r\n if ($tmpDraw) {\r\n $this->drawThisLabel($tmp, $tmpSt, null);\r\n $oldPosLabel = $tmp;\r\n $oldSizeLabel = $tmpLabelSize;\r\n }\r\n } else {\r\n $this->drawThisLabel($tmp, $tmpSt, null);\r\n $oldPosLabel = $tmp;\r\n $oldSizeLabel = $tmpLabelSize / 2;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n $this->axis->iSeriesList->clear(false);\r\n }\r\n }", "function _fillRight()\n {\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_RIGHT) {\n return $this->_left;\n }\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_CENTER_X) {\n return $this->_left + $this->_font->_centerWidth($this->_text);\n } else {\n return $this->_left + $this->_font->width($this->_text);\n }\n }", "public function setPadding($v) { $this->_padding = (int)$v; }", "public function enableCenter();", "public function enableAutoPadding()\n\t{\n\t\t$this->autoPadding = true;\n\t}", "function _fillRight()\n {\n return (int) (($this->_left + $this->_right + $this->_plotWidth()) / 2);\n }", "public function disableCenter();", "public function setMawWidth($data) { $this->mawWidth = $data; }", "private function drawLabels()\n {\n $min_value = CArray::amin($this->data[0]);\n $max_value = CArray::amax($this->data[0]);\n\n $left = CArray::toArray(\n CArray::linspace($min_value, 0, 5, false)\n );\n\n $right = CArray::toArray(\n CArray::linspace(0, $max_value, 5)\n );\n\n # Remove 0 so it don't repeat\n array_shift($right);\n\n $bottom_values = array_merge(\n $left,\n $right\n );\n\n $padding = CArray::toArray(\n CArray::linspace($this->grid_padding, $this->gridWidth(), count($bottom_values))\n );\n\n foreach($bottom_values as $k => $value) {\n $this->addLine(\n $padding[$k] + ($this->grid_padding/2),\n $this->height - $this->grid_padding,\n $padding[$k] + ($this->grid_padding/2),\n $this->height - ($this->grid_padding/1.5)\n );\n $this->addText(\n $value,\n $padding[$k] + ($this->grid_padding/2.5),\n $this->height - ($this->grid_padding/2)\n );\n }\n\n\n\n $min_value = CArray::amin($this->data[1]);\n $max_value = CArray::amax($this->data[1]);\n\n $side_values = CArray::toArray(\n CArray::linspace($min_value, $max_value, 6, false)\n );\n\n $padding = CArray::toArray(\n CArray::linspace($this->gridHeight(), $this->grid_padding, count($side_values))\n );\n\n\n foreach($side_values as $k => $value) {\n $this->addLine(\n $this->grid_padding,\n $padding[$k] + ($this->grid_padding/2),\n ($this->grid_padding/1.5),\n $padding[$k] + ($this->grid_padding/2)\n );\n $this->addText(\n round($value, 2),\n $this->grid_padding * 0.2,\n $padding[$k] + ($this->grid_padding/2.5)\n );\n }\n }", "public function setAxisXLabelOffsetX($dx)\n\t{\n\t\t$this->axis_xlabel_offX = $dx;\n\t}", "final public function alignLeft()\n {\n $this->side = 'left';\n\n return $this;\n }", "public function setPaddingStandard($padding);", "private function adjust_selection_left($noskip = true){\n\t\tif ($this->selRow < 5) {\n\t\t\t$row = $this->curKbrdLayout + $this->selRow * 3 + 1; //the row of key type from $kLayout\n\t\t\tdo {\n\t\t\t\t--$this->selCol;\n\t\t\t\tif ($this->selCol < 0)\n\t\t\t\t\t$this->selCol = strlen($this->kLayout[$row]) - 1;\n\t\t\t} while ($this->kLayout[$row][$this->selCol] === 's'); //to the last non-space key of the row\n\n\t\t} else if (($this->selRow === 5) && ($noskip)){ //edit field\n\t\t\t//move cursor to the left\n\t\t\tif ($this->cursPos > 0)\n\t\t\t\t--$this->cursPos;\n\t\t} else if ($this->selRow === 11){ //(OK/Cancel)\n\t\t\t--$this->selCol;\n\t\t\tif ($this->selCol < 0)\n\t\t\t\t$this->selCol = 1;\n\t\t} else { //rows 6-10\n\t\t\t$this->selCol = 0;\n\t\t}\n\t}", "protected function draw_chart_title(){\n\n\t\tif($this->chart_title) {\n\n\t\t\t/* calculate the size of the title */\n\t\t\t$title_box = imageftbbox($this->title_font_size, 0, $this->title_font, $this->chart_title);\n\t\t\t$x = $title_box[0] + ($this->canvas_width / 2) - ($title_box[4] / 2);\n\t\t\t$y = 2*$this->title_font_size;\n\n\t\t\t/* draw the title */\n\t\t\timagefttext($this->img, $this->title_font_size,0 ,$x ,$y , $this->title_font_color, $this->title_font, $this->chart_title);\n\n\t\t}\n\t}", "function lalita_side_padding() { \n\t$lalita_settings = wp_parse_args(\n\t\tget_option( 'lalita_spacing_settings', array() ),\n\t\tlalita_spacing_get_defaults()\n\t);\n\t\n\tif ( ( $lalita_settings[ 'side_top' ] != 0 ) || ( $lalita_settings[ 'side_right' ] != 0 ) || ( $lalita_settings[ 'side_bottom' ] != 0 ) || ( $lalita_settings[ 'side_left' ] != 0 ) ) {\n\t?>\n\t<div class=\"lalita-side-padding-inside\">\n\t<?php\n\t}\n}", "function SetMargins($left, $top, $right=null)\n{\n\t$this->lMargin = $left;\n\t$this->tMargin = $top;\n\tif($right===null)\n\t\t$right = $left;\n\t$this->rMargin = $right;\n}", "function setAllMargins($value) {\n $this->fields['margin_top'] = $value;\n $this->fields['margin_right'] = $value;\n $this->fields['margin_bottom'] = $value;\n $this->fields['margin_left'] = $value;\n }", "function set_x_tick_size($size) {\n\t\tif ($size > 0)\n\t\t\t$this->x_tick_size = $size;\n\t}", "public function getHorizontalConfig()\n {\n $model = \\Magento\\Framework\\App\\ObjectManager::getInstance()->create('Magento\\Framework\\App\\Config\\ScopeConfigInterface');\n $hor = $model->getValue('imagegallery/gallerypage/horizontaldimension', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n\n return $hor;\n }", "public function getYDescriptionOffsetLeft()\n\t{\n\t\treturn $this->ydescr_offX;\n\t}", "function setSerieTicks($series, $width = 0) {\r\n if ( !is_array($series) ) { \r\n $series = $this->convertToArray($series); \r\n }\r\n \r\n foreach($series as $key => $serie) { \r\n if ( isset($this->data[\"Series\"][$serie]) ) { \r\n $this->data[\"Series\"][$serie][\"Ticks\"] = $width; \r\n } \r\n }\r\n }", "function PMA_PDF_setXScale($x)\n {\n $x = ($x - $this->_xMin) / $this->scale + $this->leftMargin;\n $this->SetX($x);\n }", "public function setYDescriptionOffsetLeft($dx)\n\t{\n\t\t$this->ydescr_offX = $dy;\n\t}", "public function setIndentationLeft(float $indentation) {\n $this->indentationLeft = $indentation;\n }", "function setXCbox($imgs = array(),$margin = array()){\n\t\t\n\t\tif(isset($imgs['c']) && isset($imgs['o'])){\n\t\t\t$this->boxC = $imgs['c'];\n\t\t\t$this->boxO = $imgs['o'];\n\t\t}\n\t\tif(isset($margin['l']) && isset($margin['r'])){\n\t\t\t$this->boxImgMarginL = $margin['l'];\n\t\t\t$this->boxImgMarginR = $margin['r'];\n\t\t}\n\t\t\n\t}", "function astra_addon_responsive_shop_button_padding() {\n\t$theme_options = get_option( 'astra-settings', array() );\n\t$vertical_button_padding = isset( $theme_options['shop-button-v-padding'] ) ? $theme_options['shop-button-v-padding'] : '';\n\t$horizontal_button_padding = isset( $theme_options['shop-button-h-padding'] ) ? $theme_options['shop-button-h-padding'] : '';\n\tif ( ! isset( $theme_options['shop-button-padding'] ) ) {\n\t\t$theme_options['shop-button-padding'] = array(\n\t\t\t'desktop' => array(\n\t\t\t\t'top' => $vertical_button_padding,\n\t\t\t\t'right' => $horizontal_button_padding,\n\t\t\t\t'bottom' => $vertical_button_padding,\n\t\t\t\t'left' => $horizontal_button_padding,\n\t\t\t),\n\t\t\t'tablet' => array(\n\t\t\t\t'top' => '',\n\t\t\t\t'right' => '',\n\t\t\t\t'bottom' => '',\n\t\t\t\t'left' => '',\n\t\t\t),\n\t\t\t'mobile' => array(\n\t\t\t\t'top' => '',\n\t\t\t\t'right' => '',\n\t\t\t\t'bottom' => '',\n\t\t\t\t'left' => '',\n\t\t\t),\n\t\t\t'desktop-unit' => 'px',\n\t\t\t'tablet-unit' => 'px',\n\t\t\t'mobile-unit' => 'px',\n\t\t);\n\t\tupdate_option( 'astra-settings', $theme_options );\n\t}\n}", "function mediadesk_edge_get_title_content_padding() {\n\t\t$title_content_padding = apply_filters( 'mediadesk_edge_filter_title_content_padding', 0 );\n\t\t\n\t\treturn intval($title_content_padding);\n\t}", "protected function _tbAlign()\n {\n $this->SetX($this->iTableStartX);\n }", "public function cropLeftBottom()\n {\n $crop = new Crop([\n 'image' => $this->image,\n 'width' => 100,\n 'height' => 100,\n 'horizontalAlign' => Crop::LEFT,\n 'verticalAlign' => Crop::BOTTOM\n ]);\n $image = $crop->applyFilter();\n $size = $image->getResourceImage()->getSize();\n $this->assertEquals(100, $size->getHeight());\n $this->assertEquals(100, $size->getWidth());\n $color = new Color('6e1aec', 0);\n $this->assertEquals(\n $color,\n $image->getResourceImage()->getColorAt(new Point(10, 10))\n );\n }", "private function set_axes($x_labels, $y_max) { \n\n if ($y_max > 50) {\n $steps = ceil($y_max / 50);\n $scaled_max = $steps * 50;\n } else {\n $scaled_max = 50;\n }\n \n $chart_x_legend = new OFC_Elements_Legend_X((string)$this->x_legend );\n $chart_x_legend->set_style((string)$this->style);\n $this->chart->set_x_legend($chart_x_legend );\n $chart_y_legend = new OFC_Elements_Legend_Y((string)$this->y_legend );\n $chart_y_legend->set_style((string)$this->style); \n $this->chart->set_y_legend($chart_y_legend );\n $x = new OFC_Elements_Axis_X();\n $x->set_labels_from_array($x_labels);\n $this->chart->set_x_axis($x); \n $y = new OFC_Elements_Axis_Y();\n $y->set_range(0, $scaled_max, 50);\n $this->chart->add_y_axis( $y );\n }", "public function marginProvider()\n {\n return [[new \\Urbania\\AppleNews\\Format\\Margin()], [1]];\n }", "public function set_baseline_offset($offset) {\r\n $this->recompute_size();\r\n $height = $this->labelsize[1] - $this->baselineoffset;\r\n $this->connectiontopoffset = $offset - $this->baselineoffset;\r\n $this->baselineoffset = $offset;\r\n $this->labelsize[1] = $this->baselineoffset + $height;\r\n $this->sizefixed = true;\r\n }", "function setOptions()\r\n\t{\r\n\t\t$cname = \"Column3D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBaseColor\", \"Canvas base color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgDepth\", \"Canvas background depth\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBaseDepth\", \"Canvas base 3D depth\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"showCanvasBg\", \"Show background canvas\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showCanvasBase\", \"Show base canvas\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneShowBorder\", \"Show zero-plane norder\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneBorderColor\", \"Zero-Plane border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\t\t\r\n\t\t$cname = \"Column2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showColumnShadow\", \"Show Column Shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\t\t\r\n\t\t$cname = \"Bar2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showColumnShadow\", \"Show Column Shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"Line\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Line Properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"lineColor\", \"Line color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"lineThickness\", \"Line thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"lineAlpha\", \"Line alpha\", \"number\", null);\r\n\t\t// Line Shadow Properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"showShadow\", \"Show line shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowColor\", \"Line shadow color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowThickness\", \"Line shadow thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowAlpha\", \"Line shadow alpha\", \"number\", null);\r\n\t\t// Anchor properties\t\r\n\t\t$this->chart_types[$cname][4][] = array(\"showAnchors\", \"Show anchors\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorSides\", \"Anchor sides\", \"number\", array(\"three\"=>3, \"four\"=>4));\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorBorderColor\", \"Anchor border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorBgColor\", \"Anchor background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorBgAlpha\", \"Anchor background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorAlpha\", \"Anchor alpha\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"Area2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showColumnShadow\", \"Show Column Shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Area\r\n\t\t$this->chart_types[$cname][4][] = array(\"showAreaBorder\", \"Show area border\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaBorderThickness\", \"Area border thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaBorderColor\", \"Area border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaBgColor\", \"Area background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaAlpha\", \"Area alpha\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"Pie2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showPercentageValues\", \"Show percentage values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showPercentageInLabel\", \"Show percentage in label\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Pie\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieBorderThickness\", \"Pie Border Thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieBorderAlpha\", \"Pie Border Alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieFillAlpha\", \"Pie Fill Alpha\", \"number\", null);\r\n\t\t// Slicing\r\n\t\t$this->chart_types[$cname][4][] = array(\"slicingDistance\", \"Distance of slice\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"nameTBDistance\", \"Distance of label\", \"number\", null);\r\n\t\t// Pie Shadow\r\n\t\t$this->chart_types[$cname][4][] = array(\"showShadow\", \"Show pie shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowColor\", \"Pie shadow color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowAlpha\", \"Pie shadow alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowXShift\", \"Shadow x-shift\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowYShift\", \"Shadow y-shift\", \"number\", null);\r\n\t\t// Fontsk\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\r\n\t\t$cname = \"Pie3D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showPercentageValues\", \"Show percentage values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showPercentageInLabel\", \"Show percentage in label\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Pie\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieRadius\", \"Radius of pie\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieBorderThickness\", \"Pie Border Thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieBorderThickness\", \"Pie Border Thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieBorderAlpha\", \"Pie Border Alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieFillAlpha\", \"Pie Fill Alpha\", \"number\", null);\r\n\t\t// Fontsk\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieRadius\", \"Radius of pie\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\r\n\t\t$cname = \"Doughnut2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showPercentageValues\", \"Show percentage values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showPercentageInLabel\", \"Show percentage in label\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Pie\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieBorderThickness\", \"Pie Border Thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieBorderAlpha\", \"Pie Border Alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieFillAlpha\", \"Pie Fill Alpha\", \"number\", null);\r\n\t\t// Slicing\r\n\t\t$this->chart_types[$cname][4][] = array(\"slicingDistance\", \"Distance of slice\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"nameTBDistance\", \"Distance of label\", \"number\", null);\r\n\t\t// Pie Shadow\r\n\t\t$this->chart_types[$cname][4][] = array(\"showShadow\", \"Show pie shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowColor\", \"Pie shadow color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowAlpha\", \"Pie shadow alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowXShift\", \"Shadow x-shift\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowYShift\", \"Shadow y-shift\", \"number\", null);\r\n\t\t// Fontsk\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"Funnel\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgSWF\", \"Path to an swf file\", \"text\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Funnel Properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"fillAlpha\", \"Alpha level of fill\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"funnelBaseWidth\", \"Base Width\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"funnelBaseHeight\", \"Base Height\", \"number\", null);\r\n\t\t// Slicing\r\n\t\t$this->chart_types[$cname][4][] = array(\"isSliced\", \"Slice the funnel\", \"bool\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"slicingDistance\", \"Distance of the slice in px\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Chart Margins\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Bottom Margin\", \"number\", null);\r\n\t\t// Borders\r\n\t\t$this->chart_types[$cname][4][] = array(\"showBorder\", \"Show Border\", \"bool\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"borderColor\", \"Border Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"borderThickness\", \"Thickness of Border (in px)\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"borderAlpha\", \"Border Alpha\", \"number\", null);\r\n\t\t// Hover Options\r\n\t\t$this->chart_types[$cname][4][] = array(\"showhovercap\", \"Show Hover Captions\", \"bool\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"hoverCapBgColor\", \"Hover Caption Bg Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"hoverCapBorderColor\", \"Hover Caption Border Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"hoverCapSepChar\", \"Char that separates val from name in hover caption)\", \"text\", null);\r\n\r\n\t\t$cname = \"MSColumn3D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBaseColor\", \"Canvas base color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgDepth\", \"Canvas background depth\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBaseDepth\", \"Canvas base 3D depth\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"showCanvasBg\", \"Show background canvas\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showCanvasBase\", \"Show base canvas\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneShowBorder\", \"Show zero-plane norder\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneBorderColor\", \"Zero-Plane border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"MSColumn2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showColumnShadow\", \"Show Column Shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"MSBar2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showColumnShadow\", \"Show Column Shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"MSLine\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Line Properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"lineColor\", \"Line color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"lineThickness\", \"Line thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"lineAlpha\", \"Line alpha\", \"number\", null);\r\n\t\t// Line Shadow Properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"showShadow\", \"Show line shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowColor\", \"Line shadow color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowThickness\", \"Line shadow thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowAlpha\", \"Line shadow alpha\", \"number\", null);\r\n\t\t// Anchor properties\t\r\n\t\t$this->chart_types[$cname][4][] = array(\"showAnchors\", \"Show anchors\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorSides\", \"Anchor sides\", \"number\", array(\"three\"=>3, \"four\"=>4));\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorBorderColor\", \"Anchor border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorBgColor\", \"Anchor background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorBgAlpha\", \"Anchor background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorAlpha\", \"Anchor alpha\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"MSArea2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showColumnShadow\", \"Show Column Shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Area\r\n\t\t$this->chart_types[$cname][4][] = array(\"showAreaBorder\", \"Show area border\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaBorderThickness\", \"Area border thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaBorderColor\", \"Area border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaBgColor\", \"Area background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaAlpha\", \"Area alpha\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\t}", "public function hide_x_axis()\n\t{\n\t\t// x-axis\n\t\t$this->axis_x()->grid_visible(false)->label()->visible(false);\n\t\tif (isset($this->bg_colour)) $this->axis_x()->colour($this->bg_colour);\n\t\treturn $this;\n\t}", "public function setMargins( $left, $right = '', $top = '', $bottom = '' )\n {\n if ( $left < 0 )\n {\n $this->currentMarginLeft = $this->paperWidth + $left;\n }\n else\n {\n $this->currentMarginLeft = $left;\n }\n\n if ( $right !== '' )\n {\n if ( $right < 0 )\n {\n $this->currentMarginRight = $this->paperWidth + $right;\n }\n else\n {\n $this->currentMarginRight = $right;\n }\n }\n\n if ( $top !== '' )\n {\n if ( $top < 0 )\n {\n $this->currentMarginTop = $this->paperHeight + $top;\n }\n else\n {\n $this->currentMarginTop = $top;\n }\n }\n\n if ( $bottom !== '' )\n {\n if ( $bottom < 0 )\n {\n $this->currentMarginBottom = $this->paperHeight + $bottom;\n }\n else\n {\n $this->currentMarginBottom = $bottom;\n }\n }\n }", "private function _pad($padding)\n {\n $desired_size = $this->_lineSize + $padding - 1;\n $lines = array();\n foreach (file($this->getDatPath()) as $line) {\n $lines[] = str_pad(rtrim($line), $desired_size);\n }\n writeFile($this->getDatPath(), $lines);\n }", "public function paddingCommand()\n {\n $data = [\n 'Eggs' => '$1.99',\n 'Oatmeal' => '$4.99',\n 'Bacon' => '$2.99',\n ];\n\n Show::padding($data, 'padding data show');\n }", "public function addCenterMiddle()\n {\n $crop = new ResizeAndTrim([\n 'image' => $this->image,\n 'width' => 267,\n 'height' => 150\n ]);\n $image = $crop->applyFilter();\n $path = dirname(dirname(__DIR__));\n $file = $path .'/_data/play_normal.png';\n\n $addImage = new AddImage([\n 'path' => $file,\n 'image' => $image,\n 'verticalAlign' => AddImage::MIDDLE,\n 'horizontalAlign' => AddImage::CENTER\n ]);\n $destination = $addImage->applyFilter();\n $color = new Color([200, 206, 209], 0);\n $this->assertEquals(\n $color,\n $destination->getResourceImage()\n ->getColorAt(new Point(133, 76))\n );\n }", "function codeless_image_crop_positions() {\n\treturn array(\n\t\t'' => esc_html__( 'Default', 'folie' ),\n\t\t'left-top' => esc_html__( 'Top Left', 'folie' ),\n\t\t'right-top' => esc_html__( 'Top Right', 'folie' ),\n\t\t'center-top' => esc_html__( 'Top Center', 'folie' ),\n\t\t'left-center' => esc_html__( 'Center Left', 'folie' ),\n\t\t'right-center' => esc_html__( 'Center Right', 'folie' ),\n\t\t'center-center' => esc_html__( 'Center Center', 'folie' ),\n\t\t'left-bottom' => esc_html__( 'Bottom Left', 'folie' ),\n\t\t'right-bottom' => esc_html__( 'Bottom Right', 'folie' ),\n\t\t'center-bottom' => esc_html__( 'Bottom Center', 'folie' ),\n\t);\n}", "public function create() {\n \t$this->img = imagecreatetruecolor($this->canvas_width, $this->canvas_height);\n\n /* setup image colors */\n $this->image_background_color = $this->get_image_color($this->image_background_color, $this->alpha_image_background_color);\n $this->image_border_color = $this->get_image_color($this->image_border_color, $this->alpha_image_border_color);\n $this->chart_background_color = $this->get_image_color($this->chart_background_color, $this->alpha_chart_background_color);\n\n $this->x_axis_color_small_tics = $this->get_image_color($this->x_axis_color, $this->alpha_x_axis_color+50);\n\t\t$this->x_axis_color = $this->get_image_color($this->x_axis_color, $this->alpha_x_axis_color);\n\n $this->y_axis_color_small_tics\t= $this->get_image_color($this->y_axis_color, $this->alpha_y_axis_color+50);\n $this->y_axis_color = $this->get_image_color($this->y_axis_color, $this->alpha_y_axis_color);\n\n $this->y2_axis_color_small_tics\t= $this->get_image_color($this->y2_axis_color, $this->alpha_y2_axis_color+20);\n $this->y2_axis_color = $this->get_image_color($this->y2_axis_color, $this->alpha_y2_axis_color);\n $this->grid_color = $this->get_image_color($this->grid_color, $this->alpha_grid_color);\n\t\t$this->chart_value_border\t\t= $this->get_image_color($this->chart_value_border, 50);\n\n /* setup font colors */\n $this->axis_font_color = $this->get_image_color($this->axis_font_color, $this->alpha_axis_font_color);\n $this->title_font_color = $this->get_image_color($this->title_font_color, $this->alpha_title_font_color);\n $this->legend_font_color = $this->get_image_color($this->legend_font_color, $this->alpha_title_font_color);\n\n\t\t/* setup series colors */\n\t\tforeach($this->data_series_color as &$color) { $color = $this->get_series_color($color[\"color\"], $color[\"alpha\"]); }\n\n \t/* setup grid style */\n $this->valid_grid_styles = array('dotted' => array($this->grid_color, IMG_COLOR_TRANSPARENT),\n 'dashed' => array(IMG_COLOR_TRANSPARENT, IMG_COLOR_TRANSPARENT, IMG_COLOR_TRANSPARENT, IMG_COLOR_TRANSPARENT, $this->grid_color, $this->grid_color, $this->grid_color, $this->grid_color),\n 'drawn_through' => array($this->grid_color));\n $this->x_grid_style = $this->valid_grid_styles[$this->x_grid_style];\n $this->y_grid_style = $this->valid_grid_styles[$this->y_grid_style];\n\n /* draw the background */\n imagefilltoborder($this->img, 0, 0, 1, $this->image_background_color);\n\n /* draw image border */\n imagerectangle($this->img, 1, 1, $this->canvas_width-2, $this->canvas_height-2, $this->image_border_color);\n\n\t\t/* execute the \"constructor\" of the sub class */\n\t\tchart::_construct();\n\n\n imagepng($this->img);\n imagedestroy($this->img);\n\n\n }", "public function af4_top_bar_left_attr( $attributes ) {\n\t\t$attributes['class'] .= ' grid-x grid-padding-x';\n\t\treturn $attributes;\n\t}", "public function getMarginLeft() : ?int\n {\n return $this->marginLeft;\n }", "private function drawYaxis()\n {\n\n $min =\n round($this->min, $this->precision);\n $max =\n round($this->max, $this->precision);\n\n if (!isset($this->y_axis_legend_increment)) {\n\n $increment =\n round(($max - $min) / $this->total_values, $this->precision);\n } else {\n $increment = $this->y_axis_legend_increment;\n }\n\n if ($increment == 0) {\n $increment = 1;\n }\n\n //$spacing = \\round($spacing, 10);\n for ($label = $min; $label <= $max + $increment; $label+=$increment) {\n\n $px_position = $this->plotValue($label);\n if ($this->x_axis_hints == 1) {\n \\imageline($this->im, 0, $px_position, $this->width,\n $px_position, $this->ink['axis']);\n }\n imagestring($this->im, 1, 10, $px_position - 4, $label,\n $this->ink['text']);\n }\n }", "public function test_default_border_thickness()\n {\n $this->assertEquals($this->mappr->border_thickness, 1.25);\n }", "function _sr_margin_chart(){\r\r\n\t$date_min = strtotime( wwex_report_charts_start_date() );\r\r\n\t$date_max = time();\r\r\n\t\r\r\n\t$results = _sr_query_margin_results(array($date_min, $date_max));\r\r\n\t\r\r\n\t$formated_results = _sr_margin_format_results( $results );\r\r\n\treturn $formated_results;\r\r\n}", "public function getDimensionX();", "public function cropMiddleLeft()\n {\n $crop = new Crop([\n 'image' => $this->image,\n 'width' => 100,\n 'height' => 100,\n 'horizontalAlign' => Crop::LEFT,\n 'verticalAlign' => Crop::MIDDLE\n ]);\n $image = $crop->applyFilter();\n $size = $image->getResourceImage()->getSize();\n $this->assertEquals(100, $size->getHeight());\n $this->assertEquals(100, $size->getWidth());\n $color = new Color('4ea052', 0);\n $this->assertEquals(\n $color,\n $image->getResourceImage()->getColorAt(new Point(10, 10))\n );\n }", "public function testPadLeftDefaultFiller(): void\n {\n $paddedString = Str::padLeft($this->stringLeft, 4);\n $this->assertSame(' ' . $this->stringLeft, $paddedString);\n }", "public function setPadding(\n int $top,\n int $right,\n int $bottom,\n int $left\n ): void {\n $this->padding = [$top, $right, $bottom, $left];\n }", "private function _getScaleXY() {return \"scale($this->_scalex, $this->_scaley)\";}", "function &Image_Graph_Plotarea_Radar()\n {\n parent::Image_Graph_Element();\n $this->_padding = 10;\n $this->_axisX = & new Image_Graph_Axis_Radar();\n $this->_axisX->_setParent($this);\n $this->_axisY = & new Image_Graph_Axis(IMAGE_GRAPH_AXIS_Y);\n $this->_axisY->_setParent($this);\n $this->_axisY->_setMinimum(0);\n }", "function SetBorderWidth($width)\n\t\t\t\t{ \n\t\t\t\t\t$this->border_width = $width; \n }", "function set_x_axis_steps($steps) {\n\t\tif ($steps > 0)\n\t\t\t$this->x_axis_steps = $steps;\n\t}", "function setScatterSerieTicks($id, $width = 0) { \r\n if ( isset($this->data[\"ScatterSeries\"][$id]) ) { \r\n $this->data[\"ScatterSeries\"][$id][\"Ticks\"] = $width; \r\n } \r\n }", "function StrokePlotArea()\n {\n // Note: To be consistent we really should take a possible shadow\n // into account. However, that causes some problem for the LinearScale class\n // since in the current design it does not have any links to class Graph which\n // means it has no way of compensating for the adjusted plotarea in case of a\n // shadow. So, until I redesign LinearScale we can't compensate for this.\n // So just set the two adjustment parameters to zero for now.\n $boxadj = 0; //$this->doframe ? $this->frame_weight : 0 ;\n $adj = 0; //$this->doshadow ? $this->shadow_width : 0 ;\n\n if ($this->background_image != \"\" || $this->background_cflag != \"\") {\n $this->StrokeFrameBackground();\n } else {\n $aa = $this->img->SetAngle(0);\n $this->StrokeFrame();\n $aa = $this->img->SetAngle($aa);\n $this->StrokeBackgroundGrad();\n if ($this->bkg_gradtype < 0 ||\n ($this->bkg_gradtype > 0 && $this->bkg_gradstyle == BGRAD_MARGIN)) {\n $this->FillPlotArea();\n }\n }\n }", "public function paddingProvider()\n {\n return [[1]];\n }", "function set_x_offset($val) {\n\t\t$this->x_offset = $val ? 'true' : 'false';\n\t}", "public function getPadding() { return $this->_padding; }", "function setAxisXY($axis_id, $identity = AXIS_Y) { \r\n if ( isset($this->data[\"Axis\"][$axis_id] ) ) { \r\n $this->data[\"Axis\"][$axis_id][\"Identity\"] = $identity; \r\n } \r\n }", "function SetAligns($a) \r\n{\r\n $this->aligns=$a; \r\n}", "function _plotWidth()\n {\n return (min($this->height(), $this->width())) * 0.80;\n }", "public static function lpad()\n\t{\n\t}", "function set_cell_width(){\n\t\tglobal $worksheet, $TOTAL_LEVEL;\n\n\t\t$worksheet->set_column(0, 0, 5);\n\t\t$worksheet->set_column(1, 1, 25);\n\t\t$worksheet->set_column(2, (($TOTAL_LEVEL * 3)+3), 5);\n\t}", "function Table_Align(){\r\n\t\t//check if the table is aligned\r\n\t\tif (isset($this->tb_table_type['TB_ALIGN'])) $tb_align = $this->tb_table_type['TB_ALIGN']; else $tb_align='';\r\n\r\n\t\t//set the table align\r\n\t\tswitch($tb_align){\r\n\t\t\tcase 'C':\r\n\t\t\t\t$this->SetX($this->lMargin + $this->tb_table_type['L_MARGIN'] + ($this->PageWidth() - $this->Get_Table_Width())/2);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'R':\r\n\t\t\t\t$this->SetX($this->lMargin + $this->tb_table_type['L_MARGIN'] + ($this->PageWidth() - $this->Get_Table_Width()));\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t$this->SetX($this->lMargin + $this->tb_table_type['L_MARGIN']);\r\n\t\t\t\tbreak;\r\n\t\t}//if (isset($this->tb_table_type['TB_ALIGN'])){\r\n\t}", "function SetAligns($a)\r\n{\r\n $this->aligns=$a;\r\n}", "function SetAligns($a)\r\n{\r\n $this->aligns=$a;\r\n}", "public function setHorizontalLines($do) {\r\n \r\n $this->drawHorizontalLines = $do;\r\n \r\n }", "function SetAligns($a)\n{\n $this->aligns=$a;\n}" ]
[ "0.72724247", "0.5983666", "0.5707837", "0.5637575", "0.5588581", "0.5574118", "0.5410253", "0.54070073", "0.5373311", "0.5350222", "0.5332097", "0.5271982", "0.51940423", "0.5181046", "0.5160998", "0.5106923", "0.5027214", "0.49767715", "0.49574152", "0.49236503", "0.48057073", "0.48056248", "0.47604972", "0.47167638", "0.46860215", "0.4658636", "0.46548778", "0.462447", "0.4609117", "0.46033397", "0.4576682", "0.45530632", "0.45469284", "0.45440006", "0.45364088", "0.45201144", "0.45187664", "0.4518737", "0.45171812", "0.4516002", "0.45146507", "0.45132735", "0.4504881", "0.45032033", "0.4485657", "0.44654727", "0.4464159", "0.44621596", "0.4442762", "0.4425854", "0.4416687", "0.44095534", "0.44081724", "0.44053185", "0.44047612", "0.43902174", "0.43732938", "0.43648487", "0.43556452", "0.43389818", "0.43386233", "0.43274555", "0.4325984", "0.43203917", "0.4317711", "0.43167225", "0.43154553", "0.4301579", "0.42931378", "0.42820734", "0.42788544", "0.42611372", "0.42561102", "0.42546406", "0.42436573", "0.42428896", "0.42408583", "0.4240704", "0.4236406", "0.4236224", "0.42306063", "0.42270437", "0.42267254", "0.42250696", "0.42236865", "0.42208248", "0.4220767", "0.42193592", "0.4218307", "0.42170748", "0.42151016", "0.42018503", "0.420141", "0.42007723", "0.41797554", "0.41765368", "0.41715005", "0.41715005", "0.4169138", "0.4163926" ]
0.74434286
0
Sets the bottom padding of the axis canvas from the chart picture
Устанавливает нижний отступ области оси от изображения диаграммы
public function setAxisPaddingBottom($bottom) { $this->axis_padding_bottom = $bottom; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAxisPaddingBottom()\n\t{\n\t\treturn $this->axis_padding_bottom;\n\t}", "public function getAxisPaddingTop()\n\t{\n\t\treturn $this->axis_padding_top;\n\t}", "public function setAxisPaddingTop($top)\n\t{\n\t\t$this->axis_padding_top = $top;\n\t}", "public function getAxisPaddingRight()\n\t{\n\t\treturn $this->axis_padding_right;\n\t}", "private function drawYaxis()\n {\n\n $min =\n round($this->min, $this->precision);\n $max =\n round($this->max, $this->precision);\n\n if (!isset($this->y_axis_legend_increment)) {\n\n $increment =\n round(($max - $min) / $this->total_values, $this->precision);\n } else {\n $increment = $this->y_axis_legend_increment;\n }\n\n if ($increment == 0) {\n $increment = 1;\n }\n\n //$spacing = \\round($spacing, 10);\n for ($label = $min; $label <= $max + $increment; $label+=$increment) {\n\n $px_position = $this->plotValue($label);\n if ($this->x_axis_hints == 1) {\n \\imageline($this->im, 0, $px_position, $this->width,\n $px_position, $this->ink['axis']);\n }\n imagestring($this->im, 1, 10, $px_position - 4, $label,\n $this->ink['text']);\n }\n }", "function _fillBottom()\n {\n return (int) (($this->_top + $this->_bottom + $this->_plotHeight()) / 2);\n }", "function _fillBottom()\n {\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_BOTTOM) {\n return $this->_top;\n }\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_CENTER_Y) {\n return $this->_top + $this->_font->_centerHeight($this->_text);\n } else {\n return $this->_top + $this->_font->height($this->_text);\n }\n }", "protected function canvasSpacingY()\n {\n $this->canvas['spacing']['y'] = 0;\n\n if ($this->intermediate['height'] < $this->canvas['height']) {\n\n $difference = $this->canvas['height'] - $this->intermediate['height'];\n\n if ($difference % 2 === 0) {\n $this->canvas['spacing']['y'] = $difference / 2;\n } else {\n if ($difference > 1) {\n $this->canvas['spacing']['y'] = ($difference - 1) / 2 + 1;\n } else {\n $this->canvas['spacing']['y'] = 1;\n }\n }\n }\n }", "private function _addOmittedCanvasDimension() {\n $sourceWidth = $this->_params['sourceWidth'];\n $sourceHeight = $this->_params['sourceHeight'];\n $sourceRatio = $sourceWidth / $sourceHeight;\n\n if (empty($this->_params['w'])\n && empty($this->_params['h'])\n ) {\n $this->_params['w'] = $sourceWidth;\n $this->_params['h'] = $sourceHeight;\n } elseif (empty($this->_params['h'])) {\n if (!$this->_params['grow']\n && $this->_params['w'] > $sourceWidth\n ) {\n $this->_params['h'] = $sourceHeight;\n } else {\n $this->_params['h'] = $this->_params['w'] / $sourceRatio;\n }\n } elseif (empty($this->_params['w'])) {\n if (!$this->_params['grow']\n && $this->_params['h'] > $sourceHeight\n ) {\n $this->_params['w'] = $sourceWidth;\n } else {\n $this->_params['w'] = $this->_params['h'] * $sourceRatio;\n }\n }\n }", "public function getAxisPaddingLeft()\n\t{\n\t\treturn $this->axis_padding_left;\n\t}", "public function setAxisPaddingRight($right)\n\t{\n\t\t$this->axis_padding_right = $right;\n\t}", "function StrokePlotArea()\n {\n // Note: To be consistent we really should take a possible shadow\n // into account. However, that causes some problem for the LinearScale class\n // since in the current design it does not have any links to class Graph which\n // means it has no way of compensating for the adjusted plotarea in case of a\n // shadow. So, until I redesign LinearScale we can't compensate for this.\n // So just set the two adjustment parameters to zero for now.\n $boxadj = 0; //$this->doframe ? $this->frame_weight : 0 ;\n $adj = 0; //$this->doshadow ? $this->shadow_width : 0 ;\n\n if ($this->background_image != \"\" || $this->background_cflag != \"\") {\n $this->StrokeFrameBackground();\n } else {\n $aa = $this->img->SetAngle(0);\n $this->StrokeFrame();\n $aa = $this->img->SetAngle($aa);\n $this->StrokeBackgroundGrad();\n if ($this->bkg_gradtype < 0 ||\n ($this->bkg_gradtype > 0 && $this->bkg_gradstyle == BGRAD_MARGIN)) {\n $this->FillPlotArea();\n }\n }\n }", "function setPadding($top, $right, $bottom, $left)\n\t{\n\t\t$this->padTop = $top;\n\t\t$this->padRight = $right;\n\t\t$this->padBottom = $bottom;\n\t\t$this->padLeft = $left;\n\t}", "function _axis_options($x_grid=true, $y_grid=true)\r\n{\r\n\t$x_grid_colour = \"color:'transparent',\";\t\t// hide the grid but we still want to specify the count\r\n\t$y_grid_colour = \"color:'transparent',\";\t\t// .. because it determines the number of labels\r\n\r\n\tif (($this->chart_data->show_grid) and ($x_grid))\r\n\t\t$x_grid_colour = \"\";\r\n\t\t\r\n\tif (($this->chart_data->show_grid) and ($y_grid))\r\n\t\t$y_grid_colour = \"\";\r\n\t\t\r\n\tif (($this->chart_data->x_labels == -1) or ($this->chart_data->x_labels == ''))\t\t\t// auto, which means 5\r\n\t\t$x_grid_count = \"count:5\";\r\n\telse\r\n\t\t$x_grid_count = \"count:\".$this->chart_data->x_labels;\r\n\t\r\n\tif (($this->chart_data->y_labels == -1) or ($this->chart_data->y_labels == ''))\t\t\t// auto, which means 5\r\n\t\t$y_grid_count = \"count:5\";\r\n\telse\r\n\t\t$y_grid_count = \"count:\".$this->chart_data->y_labels;\r\n\t\r\n\t$x_gridlines = \",gridlines:{\".$x_grid_colour.$x_grid_count.\"}\";\r\n\t$y_gridlines = \",gridlines:{\".$y_grid_colour.$y_grid_count.\"}\";\r\n\r\n// axis label formats\r\n\r\n\tif ($this->chart_data->x_format == FORMAT_NONE)\r\n\t\t$x_format = '';\r\n\telse\r\n\t\t$x_format = ',format:\"'.$this->_gcFormatString($this->chart_data->x_format).'\"';\r\n\t\t\r\n\tif ($this->chart_data->y_format == FORMAT_NONE)\r\n\t\t$y_format = '';\r\n\telse\r\n\t\t$y_format = ',format:\"'.$this->_gcFormatString($this->chart_data->y_format).'\"';\r\n\t\t\r\n// X axis ranges\r\n\r\n\tif (($this->chart_data->x_start == '') and ($this->chart_data->x_end == ''))\r\n\t\t$x_range = '';\r\n\telse\r\n\t\t{\r\n\t\t$x_min = $this->_gcFormatNumber($this->chart_x_min,$this->chart_data->x_format);\r\n\t\t$x_max = $this->_gcFormatNumber($this->chart_x_max,$this->chart_data->x_format);\r\n\t\t$x_range = \",viewWindowMode:'explicit',viewWindow:{min:$x_min,max:$x_max}\";\r\n\t\t}\r\n\r\n// Y axis ranges\r\n\r\n\tif (($this->chart_data->y_start == '') and ($this->chart_data->y_end == ''))\r\n\t\t$y_range = '';\r\n\telse\r\n\t\t$y_range = \",viewWindowMode:'explicit',viewWindow:{min:\".$this->chart_y_min.\",max:\".$this->chart_y_max.\"}\";\r\n\r\n// finally we are ready to specify the axis objects\r\n\r\n\t$this->gvOptions .= \",hAxis:{title:'\".$this->x_title.\"'\".$x_gridlines.$x_format.$x_range.\"}\";\r\n\t$this->gvOptions .= \",vAxis:{title:'\".$this->y_title.\"'\".$y_gridlines.$y_format.$y_range.\"}\";\r\n}", "protected function all_axes_change_spaces_to_newline(){\n\t\tif (strcmp($this->x_label, \"Frame #\") == 0){\n\t\t\t$this->x_label = \"Frame\\\\n#\";\n\t\t}\n\t\tif (strcmp($this->x_label, \"Column 1\") == 0){\n\t\t\t$this->x_label = \"Column\\\\n1\";\n\t\t}\n\t\tif (strcmp($this->x_label, \"Column 2\") == 0){\n\t\t\t$this->x_label = \"Column\\\\n2\";\n\t\t}\n\t\tif (strcmp($this->x_label, \"Column 3\") == 0){\n\t\t\t$this->x_label = \"Column\\\\n3\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Frame #\") == 0){\n\t\t\t$this->y_label = \"Frame\\\\n#\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Column 1\") == 0){\n\t\t\t$this->y_label = \"Column\\\\n1\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Column 2\") == 0){\n\t\t\t$this->y_label = \"Column\\\\n2\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Column 3\") == 0){\n\t\t\t$this->y_label = \"Column\\\\n3\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Frame #\") == 0){\n\t\t\t$this->z_label = \"Frame\\\\n#\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Column 1\") == 0){\n\t\t\t$this->z_label = \"Column\\\\n1\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Column 2\") == 0){\n\t\t\t$this->z_label = \"Column\\\\n2\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Column 3\") == 0){\n\t\t\t$this->z_label = \"Column\\\\n3\";\n\t\t}\n\t}", "public function test_default_border_thickness()\n {\n $this->assertEquals($this->mappr->border_thickness, 1.25);\n }", "public function setPadding($padding);", "public function setAxisPaddingLeft($left)\n\t{\n\t\t$this->axis_padding_left = $left;\n\t}", "function _plotHeight()\n {\n return (min($this->height(), $this->width())) * 0.80;\n }", "public function setBottomOfImage($bottomOfImage)\n {\n if (intval($this->bottomOfImage) !== intval($bottomOfImage)) {\n $this->bottomOfImage = intval($bottomOfImage);\n }\n }", "function Set90AndMargin($lm = 0, $rm = 0, $tm = 0, $bm = 0)\n {\n $lm = $lm == 0 ? floor(0.2 * $this->img->width) : $lm;\n $rm = $rm == 0 ? floor(0.1 * $this->img->width) : $rm;\n $tm = $tm == 0 ? floor(0.2 * $this->img->height) : $tm;\n $bm = $bm == 0 ? floor(0.1 * $this->img->height) : $bm;\n\n $adj = ($this->img->height - $this->img->width) / 2;\n $this->img->SetMargin($tm - $adj, $bm - $adj, $rm + $adj, $lm + $adj);\n $this->img->SetCenter(floor($this->img->width / 2), floor($this->img->height / 2));\n $this->SetAngle(90);\n if (empty($this->yaxis) || empty($this->xaxis)) {\n JpgraphError::RaiseL(25009);//('You must specify what scale to use with a call to Graph::SetScale()');\n }\n $this->xaxis->SetLabelAlign('right', 'center');\n $this->yaxis->SetLabelAlign('center', 'bottom');\n }", "function set_containing_block($x = null, $y = null, $w = null, $h = null)\n {\n parent::set_containing_block($x, $y, $w, $h);\n //$w = $this->get_containing_block(\"w\");\n if (isset($h)) {\n $this->_bottom_page_margin = $h;\n } // - $this->_frame->get_style()->length_in_pt($this->_frame->get_style()->margin_bottom, $w);\n }", "function Footer() {\r\n $this->SetY(-19);\r\n }", "function saveYMargin($value) {\r\n $this->data[\"YMargin\"] = $value;\r\n }", "protected function cellSettings()\n {\n $this->SetCellPadding(\n Config::get('laravel-tcpdf::cell_padding')\n );\n\n $this->setCellHeightRatio(\n Config::get('laravel-tcpdf::cell_height_ratio')\n );\n }", "private function drawLabels()\n {\n $min_value = CArray::amin($this->data[0]);\n $max_value = CArray::amax($this->data[0]);\n\n $left = CArray::toArray(\n CArray::linspace($min_value, 0, 5, false)\n );\n\n $right = CArray::toArray(\n CArray::linspace(0, $max_value, 5)\n );\n\n # Remove 0 so it don't repeat\n array_shift($right);\n\n $bottom_values = array_merge(\n $left,\n $right\n );\n\n $padding = CArray::toArray(\n CArray::linspace($this->grid_padding, $this->gridWidth(), count($bottom_values))\n );\n\n foreach($bottom_values as $k => $value) {\n $this->addLine(\n $padding[$k] + ($this->grid_padding/2),\n $this->height - $this->grid_padding,\n $padding[$k] + ($this->grid_padding/2),\n $this->height - ($this->grid_padding/1.5)\n );\n $this->addText(\n $value,\n $padding[$k] + ($this->grid_padding/2.5),\n $this->height - ($this->grid_padding/2)\n );\n }\n\n\n\n $min_value = CArray::amin($this->data[1]);\n $max_value = CArray::amax($this->data[1]);\n\n $side_values = CArray::toArray(\n CArray::linspace($min_value, $max_value, 6, false)\n );\n\n $padding = CArray::toArray(\n CArray::linspace($this->gridHeight(), $this->grid_padding, count($side_values))\n );\n\n\n foreach($side_values as $k => $value) {\n $this->addLine(\n $this->grid_padding,\n $padding[$k] + ($this->grid_padding/2),\n ($this->grid_padding/1.5),\n $padding[$k] + ($this->grid_padding/2)\n );\n $this->addText(\n round($value, 2),\n $this->grid_padding * 0.2,\n $padding[$k] + ($this->grid_padding/2.5)\n );\n }\n }", "function astra_addon_responsive_shop_button_padding() {\n\t$theme_options = get_option( 'astra-settings', array() );\n\t$vertical_button_padding = isset( $theme_options['shop-button-v-padding'] ) ? $theme_options['shop-button-v-padding'] : '';\n\t$horizontal_button_padding = isset( $theme_options['shop-button-h-padding'] ) ? $theme_options['shop-button-h-padding'] : '';\n\tif ( ! isset( $theme_options['shop-button-padding'] ) ) {\n\t\t$theme_options['shop-button-padding'] = array(\n\t\t\t'desktop' => array(\n\t\t\t\t'top' => $vertical_button_padding,\n\t\t\t\t'right' => $horizontal_button_padding,\n\t\t\t\t'bottom' => $vertical_button_padding,\n\t\t\t\t'left' => $horizontal_button_padding,\n\t\t\t),\n\t\t\t'tablet' => array(\n\t\t\t\t'top' => '',\n\t\t\t\t'right' => '',\n\t\t\t\t'bottom' => '',\n\t\t\t\t'left' => '',\n\t\t\t),\n\t\t\t'mobile' => array(\n\t\t\t\t'top' => '',\n\t\t\t\t'right' => '',\n\t\t\t\t'bottom' => '',\n\t\t\t\t'left' => '',\n\t\t\t),\n\t\t\t'desktop-unit' => 'px',\n\t\t\t'tablet-unit' => 'px',\n\t\t\t'mobile-unit' => 'px',\n\t\t);\n\t\tupdate_option( 'astra-settings', $theme_options );\n\t}\n}", "private function set_axes($x_labels, $y_max) { \n\n if ($y_max > 50) {\n $steps = ceil($y_max / 50);\n $scaled_max = $steps * 50;\n } else {\n $scaled_max = 50;\n }\n \n $chart_x_legend = new OFC_Elements_Legend_X((string)$this->x_legend );\n $chart_x_legend->set_style((string)$this->style);\n $this->chart->set_x_legend($chart_x_legend );\n $chart_y_legend = new OFC_Elements_Legend_Y((string)$this->y_legend );\n $chart_y_legend->set_style((string)$this->style); \n $this->chart->set_y_legend($chart_y_legend );\n $x = new OFC_Elements_Axis_X();\n $x->set_labels_from_array($x_labels);\n $this->chart->set_x_axis($x); \n $y = new OFC_Elements_Axis_Y();\n $y->set_range(0, $scaled_max, 50);\n $this->chart->add_y_axis( $y );\n }", "public function Footer() {\n $this->SetY(-50);\n // Arial italic 8\n $this->SetMargins(10,0);\n \n\n }", "function setVerticalMargin($value) {\n $this->fields['margin_top'] = $this->fields['margin_bottom'] = $value;\n }", "function createChart(&$info,&$cfg)\r\n{\r\n $backgndColor=array('R' => 255, 'G' => 255, 'B' => 254);\r\n $chartCfg=new stdClass();\r\n $chartCfg->XSize = $info->canDraw ? $cfg->XSize : 600;\r\n $chartCfg->YSize = $info->canDraw ? $cfg->YSize : 50; \r\n \r\n $chartCfg->border = new stdClass();\r\n $chartCfg->border->width = 1;\r\n $chartCfg->border->color = array('R' => 0, 'G' => 0, 'B' => 0);\r\n\r\n $chartCfg->graphArea = new stdClass();\r\n $chartCfg->graphArea->color=array('R' => 213, 'G' => 217, 'B' => 221);\r\n \r\n $chartCfg->graphArea->beginX = property_exists($cfg,'beginX') ? $cfg->beginX : 40; \r\n $chartCfg->graphArea->beginY = property_exists($cfg,'beginY') ? $cfg->beginY : 100; \r\n \r\n $chartCfg->graphArea->endX = $chartCfg->XSize - $chartCfg->graphArea->beginX;\r\n $chartCfg->graphArea->endY = $chartCfg->YSize - $chartCfg->graphArea->beginY;\r\n\r\n $chartCfg->scale=new stdClass();\r\n\r\n\t// 20100914 - franciscom \r\n\t// After reading documentation\r\n\t// drawScale\r\n\t// Today there is four way of computing scales :\r\n\t//\r\n // - Getting Max & Min values per serie : ScaleMode = SCALE_NORMAL\r\n // - Like the previous one but setting the min value to 0 : ScaleMode = SCALE_START0\r\n // - Getting the series cumulative Max & Min values : ScaleMode = SCALE_ADDALL\r\n // - Like the previous one but setting the min value to 0 : ScaleMode = SCALE_ADDALLSTART0\r\n\t//\r\n\t// This will depends on the kind of graph you are drawing, today only the stacked bar chart \r\n\t// can use the SCALE_ADDALL mode. \r\n\t// Drawing graphs were you want to fix the min value to 0 you must use the SCALE_START0 option. \r\n\t//\r\n $chartCfg->scale->mode = SCALE_ADDALLSTART0;\r\n $chartCfg->scale->color = array('R' => 0, 'G' => 0, 'B' => 0);\r\n $chartCfg->scale->drawTicks = TRUE;\r\n $chartCfg->scale->angle=$cfg->scale->legendXAngle;\r\n $chartCfg->scale->decimals=1;\r\n $chartCfg->scale->withMargin=TRUE;\r\n \r\n $chartCfg->legend=new stdClass();\r\n $chartCfg->legend->X=$chartCfg->XSize-80; \r\n $chartCfg->legend->Y=15;\r\n $chartCfg->legend->color=array('R' => 236, 'G' => 238, 'B' => 240);\r\n\r\n $chartCfg->title=new stdClass();\r\n $chartCfg->title->value=$cfg->chartTitle; \r\n \r\n $chartCfg->title->X=2*$chartCfg->graphArea->beginX; \r\n $chartCfg->title->Y=$chartCfg->legend->Y;\r\n $chartCfg->title->color=array('R' => 0, 'G' => 0, 'B' => 255);\r\n \r\n $Test = new pChart($chartCfg->XSize,$chartCfg->YSize);\r\n $Test->reportWarnings(\"GD\");\r\n $Test->drawBackground($backgndColor['R'],$backgndColor['G'],$backgndColor['B']);\r\n $Test->drawGraphArea($chartCfg->graphArea->color['R'],\r\n $chartCfg->graphArea->color['G'],$chartCfg->graphArea->color['B']);\r\n $Test->setGraphArea($chartCfg->graphArea->beginX,$chartCfg->graphArea->beginY,\r\n $chartCfg->graphArea->endX,$chartCfg->graphArea->endY);\r\n \r\n $Test->setFontProperties(config_get('charts_font_path'),config_get('charts_font_size'));\r\n \r\n if($info->canDraw)\r\n {\r\n $DataSet = new pData;\r\n foreach($info->chart_data as $key => $values)\r\n {\r\n $id=$key+1;\r\n $DataSet->AddPoint($values,\"Serie{$id}\"); \r\n $DataSet->SetSerieName($info->series_label[$key],\"Serie{$id}\");\r\n \r\n }\r\n $DataSet->AddPoint($info->xAxis->values,$info->xAxis->serieName);\r\n $DataSet->AddAllSeries();\r\n $DataSet->RemoveSerie($info->xAxis->serieName);\r\n $DataSet->SetAbsciseLabelSerie($info->xAxis->serieName);\r\n $chartData=$DataSet->GetData();\r\n $chartLegend=$DataSet->GetDataDescription();\r\n \r\n \r\n foreach( $info->series_color as $key => $hexrgb)\r\n {\r\n $rgb=str_split($hexrgb,2);\r\n $Test->setColorPalette($key,hexdec($rgb[0]),hexdec($rgb[1]),hexdec($rgb[2])); \r\n }\r\n // $Test->setFixedScale($info->scale->minY,$info->scale->maxY,$info->scale->divisions);\r\n $Test->drawScale($chartData,$chartLegend,$chartCfg->scale->mode,\r\n $chartCfg->scale->color['R'],$chartCfg->scale->color['G'],$chartCfg->scale->color['B'],\r\n $chartCfg->scale->drawTicks,$chartCfg->scale->angle,$chartCfg->scale->decimals,\r\n $chartCfg->scale->withMargin);\r\n \r\n $Test->drawStackedBarGraph($chartData,$chartLegend,70);\r\n \r\n // Draw the legend\r\n $Test->setFontProperties(config_get('charts_font_path'),config_get('charts_font_size'));\r\n $Test->drawLegend($chartCfg->legend->X,$chartCfg->legend->Y,$chartLegend,\r\n $chartCfg->legend->color['R'],$chartCfg->legend->color['G'],\r\n $chartCfg->legend->color['B']);\r\n \r\n $Test->addBorder($chartCfg->border->width,\r\n $chartCfg->border->color['R'],$chartCfg->border->color['G'],\r\n $chartCfg->border->color['B']);\r\n }\r\n else\r\n {\r\n $chartCfg->title->value .= '/' . lang_get('no_data_available'); \r\n }\r\n\r\n $Test->drawTitle($chartCfg->title->X,$chartCfg->title->Y,$chartCfg->title->value,\r\n $chartCfg->title->color['R'],$chartCfg->title->color['G'],$chartCfg->title->color['B']);\r\n $Test->Stroke();\r\n}", "private function _setHeight()\n {\n $this->height = (count($this->fields) + 1) * $this->heightCell;\n }", "protected function cellSettings()\n {\n $this->SetCellPadding(\n RC_Config::get('tcpdf::config.cell_padding')\n );\n\n $this->setCellHeightRatio(\n RC_Config::get('tcpdf::config.cell_height_ratio')\n );\n }", "public function setXDescriptionOffsetBottom($dy)\n\t{\n\t\t$this->xdescr_offY = $dy;\n\t}", "function get_margin_height()\n {\n $style = $this->_frame->get_style();\n\n if ($style->list_style_type === \"none\") {\n return 0;\n }\n\n return $style->get_font_size() * self::BULLET_SIZE + 2 * self::BULLET_PADDING;\n }", "public function getXDescriptionOffsetBottom()\n\t{\n\t\treturn $this->xdescr_offY;\n\t}", "public function setBottom()\n {\n $defaultBottom = ($this->origin && $this->origin == 'bottom') ? 0 : null;\n\n $this->bottom = $this->attributes->get('bottom', $defaultBottom);\n\n return $this;\n }", "function setOptions()\r\n\t{\r\n\t\t$cname = \"Column3D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBaseColor\", \"Canvas base color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgDepth\", \"Canvas background depth\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBaseDepth\", \"Canvas base 3D depth\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"showCanvasBg\", \"Show background canvas\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showCanvasBase\", \"Show base canvas\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneShowBorder\", \"Show zero-plane norder\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneBorderColor\", \"Zero-Plane border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\t\t\r\n\t\t$cname = \"Column2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showColumnShadow\", \"Show Column Shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\t\t\r\n\t\t$cname = \"Bar2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showColumnShadow\", \"Show Column Shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"Line\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Line Properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"lineColor\", \"Line color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"lineThickness\", \"Line thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"lineAlpha\", \"Line alpha\", \"number\", null);\r\n\t\t// Line Shadow Properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"showShadow\", \"Show line shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowColor\", \"Line shadow color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowThickness\", \"Line shadow thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowAlpha\", \"Line shadow alpha\", \"number\", null);\r\n\t\t// Anchor properties\t\r\n\t\t$this->chart_types[$cname][4][] = array(\"showAnchors\", \"Show anchors\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorSides\", \"Anchor sides\", \"number\", array(\"three\"=>3, \"four\"=>4));\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorBorderColor\", \"Anchor border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorBgColor\", \"Anchor background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorBgAlpha\", \"Anchor background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorAlpha\", \"Anchor alpha\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"Area2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showColumnShadow\", \"Show Column Shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Area\r\n\t\t$this->chart_types[$cname][4][] = array(\"showAreaBorder\", \"Show area border\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaBorderThickness\", \"Area border thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaBorderColor\", \"Area border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaBgColor\", \"Area background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaAlpha\", \"Area alpha\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"Pie2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showPercentageValues\", \"Show percentage values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showPercentageInLabel\", \"Show percentage in label\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Pie\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieBorderThickness\", \"Pie Border Thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieBorderAlpha\", \"Pie Border Alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieFillAlpha\", \"Pie Fill Alpha\", \"number\", null);\r\n\t\t// Slicing\r\n\t\t$this->chart_types[$cname][4][] = array(\"slicingDistance\", \"Distance of slice\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"nameTBDistance\", \"Distance of label\", \"number\", null);\r\n\t\t// Pie Shadow\r\n\t\t$this->chart_types[$cname][4][] = array(\"showShadow\", \"Show pie shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowColor\", \"Pie shadow color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowAlpha\", \"Pie shadow alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowXShift\", \"Shadow x-shift\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowYShift\", \"Shadow y-shift\", \"number\", null);\r\n\t\t// Fontsk\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\r\n\t\t$cname = \"Pie3D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showPercentageValues\", \"Show percentage values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showPercentageInLabel\", \"Show percentage in label\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Pie\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieRadius\", \"Radius of pie\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieBorderThickness\", \"Pie Border Thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieBorderThickness\", \"Pie Border Thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieBorderAlpha\", \"Pie Border Alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieFillAlpha\", \"Pie Fill Alpha\", \"number\", null);\r\n\t\t// Fontsk\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieRadius\", \"Radius of pie\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\r\n\t\t$cname = \"Doughnut2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showPercentageValues\", \"Show percentage values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showPercentageInLabel\", \"Show percentage in label\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Pie\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieBorderThickness\", \"Pie Border Thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieBorderAlpha\", \"Pie Border Alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieFillAlpha\", \"Pie Fill Alpha\", \"number\", null);\r\n\t\t// Slicing\r\n\t\t$this->chart_types[$cname][4][] = array(\"slicingDistance\", \"Distance of slice\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"nameTBDistance\", \"Distance of label\", \"number\", null);\r\n\t\t// Pie Shadow\r\n\t\t$this->chart_types[$cname][4][] = array(\"showShadow\", \"Show pie shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowColor\", \"Pie shadow color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowAlpha\", \"Pie shadow alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowXShift\", \"Shadow x-shift\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowYShift\", \"Shadow y-shift\", \"number\", null);\r\n\t\t// Fontsk\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"Funnel\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgSWF\", \"Path to an swf file\", \"text\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Funnel Properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"fillAlpha\", \"Alpha level of fill\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"funnelBaseWidth\", \"Base Width\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"funnelBaseHeight\", \"Base Height\", \"number\", null);\r\n\t\t// Slicing\r\n\t\t$this->chart_types[$cname][4][] = array(\"isSliced\", \"Slice the funnel\", \"bool\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"slicingDistance\", \"Distance of the slice in px\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Chart Margins\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Bottom Margin\", \"number\", null);\r\n\t\t// Borders\r\n\t\t$this->chart_types[$cname][4][] = array(\"showBorder\", \"Show Border\", \"bool\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"borderColor\", \"Border Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"borderThickness\", \"Thickness of Border (in px)\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"borderAlpha\", \"Border Alpha\", \"number\", null);\r\n\t\t// Hover Options\r\n\t\t$this->chart_types[$cname][4][] = array(\"showhovercap\", \"Show Hover Captions\", \"bool\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"hoverCapBgColor\", \"Hover Caption Bg Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"hoverCapBorderColor\", \"Hover Caption Border Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"hoverCapSepChar\", \"Char that separates val from name in hover caption)\", \"text\", null);\r\n\r\n\t\t$cname = \"MSColumn3D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBaseColor\", \"Canvas base color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgDepth\", \"Canvas background depth\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBaseDepth\", \"Canvas base 3D depth\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"showCanvasBg\", \"Show background canvas\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showCanvasBase\", \"Show base canvas\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneShowBorder\", \"Show zero-plane norder\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneBorderColor\", \"Zero-Plane border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"MSColumn2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showColumnShadow\", \"Show Column Shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"MSBar2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showColumnShadow\", \"Show Column Shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"MSLine\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Line Properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"lineColor\", \"Line color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"lineThickness\", \"Line thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"lineAlpha\", \"Line alpha\", \"number\", null);\r\n\t\t// Line Shadow Properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"showShadow\", \"Show line shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowColor\", \"Line shadow color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowThickness\", \"Line shadow thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowAlpha\", \"Line shadow alpha\", \"number\", null);\r\n\t\t// Anchor properties\t\r\n\t\t$this->chart_types[$cname][4][] = array(\"showAnchors\", \"Show anchors\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorSides\", \"Anchor sides\", \"number\", array(\"three\"=>3, \"four\"=>4));\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorBorderColor\", \"Anchor border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorBgColor\", \"Anchor background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorBgAlpha\", \"Anchor background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorAlpha\", \"Anchor alpha\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"MSArea2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showColumnShadow\", \"Show Column Shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Area\r\n\t\t$this->chart_types[$cname][4][] = array(\"showAreaBorder\", \"Show area border\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaBorderThickness\", \"Area border thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaBorderColor\", \"Area border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaBgColor\", \"Area background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaAlpha\", \"Area alpha\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\t}", "private function\n\t\tset_frame_height_and_width()\n\t{\n\t\t$this->set_no_of_options_and_no_of_characters_with_options();\n\n\t\t$this->frame_width = \n\t\t\t$this->label_width \n\t\t\t+ ($this->column_width * ( $this->get_no_of_characters() + 1)) \n\t\t\t+ ($this->get_frame_padding() * 2);\n\n\t\t$this->frame_height = \n\t\t\t(\n\t\t\t\t($this->label_height * 0.8) \n\t\t\t\t*\n\t\t\t\t($this->no_of_options + $this->no_of_characters_with_options + 1)\n\t\t\t);\n\t}", "function getHeight()\n\t{\n\t\treturn $this->YSize;\n\t}", "public function set_baseline_offset($offset) {\r\n $this->recompute_size();\r\n $height = $this->labelsize[1] - $this->baselineoffset;\r\n $this->connectiontopoffset = $offset - $this->baselineoffset;\r\n $this->baselineoffset = $offset;\r\n $this->labelsize[1] = $this->baselineoffset + $height;\r\n $this->sizefixed = true;\r\n }", "public function getItemMarginBottom() {\n return $this->itemMarginBottom;\n }", "public function getDimensionY();", "public function PreStrokeAdjust($graph)\n\t{\n\t\tif ($this->center) {\n\t\t\t$a = 0.5;\n\t\t\t$b = 0.5;\n\t\t\t++$this->numpoints;\n\t\t} else {\n\t\t\t$a = 0;\n\t\t\t$b = 0;\n\t\t}\n\t\t$graph->xaxis->scale->ticks->SetXLabelOffset($a);\n\t\t$graph->SetTextScaleOff($b);\n\t}", "public function paint($g, $rect) {\r\n \r\n TChart::$controlName .= 'BottomWall_';\r\n \r\n $this->prepareGraphics($g); \r\n\r\n $w = $this->chart->getAspect()->getWidth3D();\r\n if ($this->iSize > 0) {\r\n $r = $rect->copy();\r\n $r->y = $r->getBottom();\r\n $r->height = $this->iSize; \r\n $g->cuber($r, 0, $w, $this->getShouldDark());\r\n } else {\r\n $g->rectangleY($rect->x, $rect->getBottom(), $rect->getRight(), 0, $w);\r\n }\r\n }", "public function setBottom($var)\n {\n GPBUtil::checkInt32($var);\n $this->bottom = $var;\n\n return $this;\n }", "public function getAxisXLabelOffsetY()\n\t{\n\t\treturn $this->axis_xlabel_offY;\n\t}", "public function setButtonPadding(string $value)\n {\n $this->styles['button_padding'] = $value;\n }", "function woodmart_override_section_margin_control( $control_stack ) {\n\t\t$control = Plugin::instance()->controls_manager->get_control_from_stack( $control_stack->get_unique_name(), 'margin' );\n\n\t\t$control['allowed_dimensions'] = [ 'top', 'right', 'bottom', 'left' ];\n\t\t$control['placeholder'] = [\n\t\t\t'top' => '',\n\t\t\t'right' => '',\n\t\t\t'bottom' => '',\n\t\t\t'left' => '',\n\t\t];\n\t\t$control['selectors'] = [\n\t\t\t'{{WRAPPER}}' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t];\n\n\t\t$control_stack->update_responsive_control( 'margin', $control );\n\t}", "protected function canvasSpacingX()\n {\n $this->canvas['spacing']['x'] = 0;\n\n if ($this->intermediate['width'] < $this->canvas['width']) {\n $difference = $this->canvas['width'] - $this->intermediate['width'];\n\n if ($difference % 2 === 0) {\n $this->canvas['spacing']['x'] = $difference / 2;\n } else {\n if ($difference > 1) {\n $this->canvas['spacing']['x'] = ($difference - 1) / 2 + 1;\n } else {\n $this->canvas['spacing']['x'] = 1;\n }\n }\n }\n }", "function wsm_yoasttobottom() {\n\treturn 'low';\n}", "public function getImageBottom()\n {\n return $this->imageBottom;\n }", "function drawGraphic($db,$periodos,$reporte,$modalidad,$fontPath) {\n $MyData = new pData(); \n \n for($j=0; $j<count($periodos); $j++){\n //var_dump($row_periodos[\"codigoperiodo\"]);echo \"<br/><br/>\";\n $codigoperiodo = $periodos[$j][\"codigoperiodo\"];\n $arrayP = str_split($codigoperiodo, strlen($codigoperiodo)-1);\n $labelP = $arrayP[0].\"-\".$arrayP[1];\n $valores = getValores($db,$modalidad,$periodos[$j][\"codigoperiodo\"]);\n $MyData->addPoints($valores[\"valores\"][1],$labelP);\n }\n \n $MyData->setAxisName(0,\"Estudiantes beneficiados\");\n $MyData->addPoints($valores[\"valores\"][0],\"Becas\");\n $MyData->setSerieDescription(\"Becas\",\"Becas\");\n $MyData->setAbscissa(\"Becas\");\n\n /* Create the pChart object */\n $myPicture = new pImage(700,230,$MyData);\n /* Turn of Antialiasing */\n $myPicture->Antialias = FALSE;\n\n /* Add a border to the picture */\n $myPicture->drawRectangle(0,0,699,229,array(\"R\"=>0,\"G\"=>0,\"B\"=>0)); \n\n//$myPicture->drawGradientArea(0,0,700,230,DIRECTION_VERTICAL,array(\"StartR\"=>240,\"StartG\"=>240,\"StartB\"=>240,\"EndR\"=>180,\"EndG\"=>180,\"EndB\"=>180,\"Alpha\"=>100));\n //$myPicture->drawGradientArea(0,0,700,230,DIRECTION_HORIZONTAL,array(\"StartR\"=>240,\"StartG\"=>240,\"StartB\"=>240,\"EndR\"=>180,\"EndG\"=>180,\"EndB\"=>180,\"Alpha\"=>20));\n $myPicture->setFontProperties(array(\"FontName\"=>$fontPath.\"calibri.ttf\",\"FontSize\"=>8));\n\n /* Draw the scale */\n $myPicture->setGraphArea(50,30,680,200);\n $myPicture->drawScale(array(\"CycleBackground\"=>TRUE,\"DrawSubTicks\"=>TRUE,\"Mode\"=>SCALE_MODE_START0,\"GridR\"=>0,\"GridG\"=>0,\"GridB\"=>0,\"GridAlpha\"=>10));\n\n /* Turn on shadow computing */ \n $myPicture->setShadow(TRUE,array(\"X\"=>1,\"Y\"=>1,\"R\"=>0,\"G\"=>0,\"B\"=>0,\"Alpha\"=>10));\n\n /* Draw the chart */\n $settings = array(\"Gradient\"=>TRUE,\"DisplayPos\"=>LABEL_POS_INSIDE,\"DisplayValues\"=>TRUE,\"DisplayR\"=>255,\"DisplayG\"=>255,\"DisplayB\"=>255,\"DisplayShadow\"=>TRUE,\"Surrounding\"=>10);\n $myPicture->drawBarChart($settings);\n\n /* Write the chart legend */\n $myPicture->drawLegend(420,12,array(\"Style\"=>LEGEND_NOBORDER,\"Mode\"=>LEGEND_HORIZONTAL));\n \n //$myPicture->drawLegend($ancho-240,9,array(\"Style\"=>LEGEND_NOBORDER,\"Mode\"=>LEGEND_HORIZONTAL,\"FontR\"=>255,\"FontG\"=>255,\"FontB\"=>255));\n\n /* Render the picture (choose the best way) */\n $myPicture->Render(\"imagenesGraficas/\".$reporte[\"alias\"].\"/becas_\".$modalidad[\"codigomodalidadacademicasic\"].\".png\"); \n ?>\n <img alt=\"Resultados selectividad\" src=\"<?php echo \"imagenesGraficas/\".$reporte[\"alias\"].\"/becas_\".$modalidad[\"codigomodalidadacademicasic\"].\".png\"; ?>\" style=\"border: 1px solid gray;margin-right: 20px;\"/>\n <?php }", "public function test_default_height()\n {\n $this->assertEquals($this->mappr->height, 450);\n }", "function dysign_yoast_bottom() {\n return 'low';\n}", "public function bottom($value) {\n return $this->setProperty('bottom', $value);\n }", "function kloe_qodef_get_footer_bottom() {\n\n\t\t$parameters = array();\n\n\t\t$parameters['footer_bottom_border'] = kloe_qodef_get_footer_bottom_border();\n\t\t$parameters['footer_bottom_border_in_grid'] = (kloe_qodef_options()->getOptionValue('footer_bottom_border_in_grid') == 'yes') ? 'qodef-in-grid' : '';\n\t\t$parameters['footer_in_grid'] = (kloe_qodef_options()->getOptionValue('footer_in_grid') == 'yes') ? true : false;\n\t\t$parameters['footer_bottom_columns'] = kloe_qodef_options()->getOptionValue('footer_bottom_columns');\n\t\t$parameters['footer_bottom_border_bottom'] = kloe_qodef_get_footer_bottom_bottom_border();\n\n\t\tkloe_qodef_get_module_template_part('templates/parts/footer-bottom', 'footer', '', $parameters);\n\n\t}", "function xx_thumb_cols() {\n return 4;\n}", "public function setPadding($v) { $this->_padding = (int)$v; }", "function voyage_mikado_get_footer_bottom() {\n\n\t\t$parameters = array();\n\n\t\t$parameters['footer_bottom_border'] = voyage_mikado_get_footer_bottom_border();\n\t\t$parameters['footer_bottom_border_in_grid'] = (voyage_mikado_options()->getOptionValue('footer_bottom_border_in_grid') == 'yes') ? 'mkdf-in-grid' : '';\n\t\t$parameters['footer_in_grid'] = (voyage_mikado_options()->getOptionValue('footer_in_grid') == 'yes') ? true : false;\n\t\t$parameters['footer_bottom_columns'] = voyage_mikado_options()->getOptionValue('footer_bottom_columns');\n\t\t$parameters['footer_bottom_border_bottom'] = voyage_mikado_get_footer_bottom_bottom_border();\n\n\t\tvoyage_mikado_get_module_template_part('templates/parts/footer-bottom', 'footer', '', $parameters);\n\n\t}", "public function getBottomOfImage()\n {\n return $this->bottomOfImage;\n }", "protected function draw_axis_name(){\n\n\t\t$valid_axis = array('x1', 'y', 'y2');\n\n\t\tforeach($valid_axis as $axis) {\n\n\t\t\t$var_title = 'axis_title_' . $axis;\n\t\t\t$var_unit = 'axis_unit_' . $axis;\n\t\t\t$var_position = 'axis_position_' . $axis;\n\n\t\t\tif($this->$var_title) {\n\n\t\t\t\t$title = $this->$var_title . (($this->$var_unit != '') ? ' [' . $this->$var_unit . ']' : '');\n\t\t\t\tif($axis == 'y') {\n\t\t\t\t\t$angle = 90;\n\t\t\t\t}elseif($axis == 'y2') {\n\t\t\t\t\t$angle = 270;\n\t\t\t\t}else {\n\t\t\t\t\t$angle = 0;\n\t\t\t\t}\n\n\t\t\t\t/* calculate the size of the title */\n\t\t\t\t$title_box = imageftbbox($this->axis_font_size, $angle, $this->axis_font, $title);\n\n\t\t\t\tif($axis == 'x1'){\n\t\t\t\t\t$y = $this->canvas_height - 2*$this->axis_font_size;\n\t\t\t\t\t$x = ($this->$var_position == 'middle') ? ($this->chart_width / 2) - ($title_box[4] / 2) + $this->offset_left\n\t\t\t\t\t : $this->canvas_width - $this->offset_right - $title_box[4];\n\t\t\t\t}elseif($axis == 'y') {\n\t\t\t\t\t$x = 3*$this->axis_font_size;\n\t\t\t\t\t$y = ($this->$var_position == 'middle') ? ($this->chart_height / 2) - ($title_box[3] / 2) + $this->offset_top\n\t\t\t\t\t : -$title_box[3] + $this->offset_top;\n\t\t\t\t}else{\n\t\t\t\t\t$x = $this->canvas_width - 3*$this->axis_font_size;;\n\t\t\t\t\t$y = ($this->$var_position == 'middle') ? ($this->chart_height / 2) - ($title_box[3] / 2) + $this->offset_top\n\t\t\t\t\t : -$title_box[3] + $this->offset_top;\n\t\t\t\t}\n\n\t\t\t\t/* draw the y-title */\n\t\t\t\timagefttext($this->img, $this->axis_font_size, $angle,$x ,$y , $this->axis_font_color, $this->axis_font, $title);\n\t\t\t}\n\t\t}\n\t}", "public function getAxisYLabelOffsetX()\n\t{\n\t\treturn $this->axis_ylabel_offX;\n\t}", "public function create() {\n \t$this->img = imagecreatetruecolor($this->canvas_width, $this->canvas_height);\n\n /* setup image colors */\n $this->image_background_color = $this->get_image_color($this->image_background_color, $this->alpha_image_background_color);\n $this->image_border_color = $this->get_image_color($this->image_border_color, $this->alpha_image_border_color);\n $this->chart_background_color = $this->get_image_color($this->chart_background_color, $this->alpha_chart_background_color);\n\n $this->x_axis_color_small_tics = $this->get_image_color($this->x_axis_color, $this->alpha_x_axis_color+50);\n\t\t$this->x_axis_color = $this->get_image_color($this->x_axis_color, $this->alpha_x_axis_color);\n\n $this->y_axis_color_small_tics\t= $this->get_image_color($this->y_axis_color, $this->alpha_y_axis_color+50);\n $this->y_axis_color = $this->get_image_color($this->y_axis_color, $this->alpha_y_axis_color);\n\n $this->y2_axis_color_small_tics\t= $this->get_image_color($this->y2_axis_color, $this->alpha_y2_axis_color+20);\n $this->y2_axis_color = $this->get_image_color($this->y2_axis_color, $this->alpha_y2_axis_color);\n $this->grid_color = $this->get_image_color($this->grid_color, $this->alpha_grid_color);\n\t\t$this->chart_value_border\t\t= $this->get_image_color($this->chart_value_border, 50);\n\n /* setup font colors */\n $this->axis_font_color = $this->get_image_color($this->axis_font_color, $this->alpha_axis_font_color);\n $this->title_font_color = $this->get_image_color($this->title_font_color, $this->alpha_title_font_color);\n $this->legend_font_color = $this->get_image_color($this->legend_font_color, $this->alpha_title_font_color);\n\n\t\t/* setup series colors */\n\t\tforeach($this->data_series_color as &$color) { $color = $this->get_series_color($color[\"color\"], $color[\"alpha\"]); }\n\n \t/* setup grid style */\n $this->valid_grid_styles = array('dotted' => array($this->grid_color, IMG_COLOR_TRANSPARENT),\n 'dashed' => array(IMG_COLOR_TRANSPARENT, IMG_COLOR_TRANSPARENT, IMG_COLOR_TRANSPARENT, IMG_COLOR_TRANSPARENT, $this->grid_color, $this->grid_color, $this->grid_color, $this->grid_color),\n 'drawn_through' => array($this->grid_color));\n $this->x_grid_style = $this->valid_grid_styles[$this->x_grid_style];\n $this->y_grid_style = $this->valid_grid_styles[$this->y_grid_style];\n\n /* draw the background */\n imagefilltoborder($this->img, 0, 0, 1, $this->image_background_color);\n\n /* draw image border */\n imagerectangle($this->img, 1, 1, $this->canvas_width-2, $this->canvas_height-2, $this->image_border_color);\n\n\t\t/* execute the \"constructor\" of the sub class */\n\t\tchart::_construct();\n\n\n imagepng($this->img);\n imagedestroy($this->img);\n\n\n }", "public function getAxisYLabelOffsetY()\n\t{\n\t\treturn $this->axis_ylabel_offY;\n\t}", "private function _pad($padding)\n {\n $desired_size = $this->_lineSize + $padding - 1;\n $lines = array();\n foreach (file($this->getDatPath()) as $line) {\n $lines[] = str_pad(rtrim($line), $desired_size);\n }\n writeFile($this->getDatPath(), $lines);\n }", "function _fillTop()\n {\n return (int) (($this->_top + $this->_bottom - $this->_plotHeight()) / 2);\n }", "public function setPaddingStandard($padding);", "function moments_qodef_get_footer_bottom_bottom_border() {\n\n\t\t$footer_bottom_border = '';\n\n\t\tif (moments_qodef_options()->getOptionValue('footer_bottom_border_bottom_color')) {\n\t\t\tif (moments_qodef_options()->getOptionValue('footer_bottom_border_bottom_width') !== '') {\n\t\t\t\t$footer_border_height = moments_qodef_options()->getOptionValue('footer_bottom_border_bottom_width');\n\t\t\t} else {\n\t\t\t\t$footer_border_height = '1';\n\t\t\t}\n\n\t\t\t$footer_bottom_border = 'height: '.esc_attr($footer_border_height).'px; background-color: '.esc_attr(moments_qodef_options()->getOptionValue('footer_bottom_border_bottom_color')).';';\n\t\t}\n\n\t\treturn $footer_bottom_border;\n\t}", "function height()\n {\n return $this->_canvas->getHeight();\n }", "public function getBottomDecoration()\n {\n if ($this->hasDijitParam('bottomDecoration')) {\n return $this->getDijitParam('bottomDecoration');\n }\n return [];\n }", "public function setPadding(\n int $top,\n int $right,\n int $bottom,\n int $left\n ): void {\n $this->padding = [$top, $right, $bottom, $left];\n }", "function klippe_mikado_header_top_bar_styles() {\n\t\t$top_header_height = klippe_mikado_options()->getOptionValue( 'top_bar_height' );\n\t\t\n\t\tif ( ! empty( $top_header_height ) ) {\n\t\t\techo klippe_mikado_dynamic_css( '.mkdf-top-bar', array( 'height' => klippe_mikado_filter_px( $top_header_height ) . 'px' ) );\n\t\t\techo klippe_mikado_dynamic_css( '.mkdf-top-bar .mkdf-logo-wrapper a', array( 'max-height' => klippe_mikado_filter_px( $top_header_height ) . 'px' ) );\n\t\t}\n\t\t\n\t\techo klippe_mikado_dynamic_css( '.mkdf-header-box .mkdf-top-bar-background', array( 'height' => klippe_mikado_get_top_bar_background_height() . 'px' ) );\n\t\t\n\t\t$top_bar_container_selector = '.mkdf-top-bar > .mkdf-vertical-align-containers';\n\t\t$top_bar_container_styles = array();\n\t\t$container_side_padding = klippe_mikado_options()->getOptionValue( 'top_bar_side_padding' );\n\t\t\n\t\tif ( $container_side_padding !== '' ) {\n\t\t\tif ( klippe_mikado_string_ends_with( $container_side_padding, 'px' ) || klippe_mikado_string_ends_with( $container_side_padding, '%' ) ) {\n\t\t\t\t$top_bar_container_styles['padding-left'] = $container_side_padding;\n\t\t\t\t$top_bar_container_styles['padding-right'] = $container_side_padding;\n\t\t\t} else {\n\t\t\t\t$top_bar_container_styles['padding-left'] = klippe_mikado_filter_px( $container_side_padding ) . 'px';\n\t\t\t\t$top_bar_container_styles['padding-right'] = klippe_mikado_filter_px( $container_side_padding ) . 'px';\n\t\t\t}\n\t\t\t\n\t\t\techo klippe_mikado_dynamic_css( $top_bar_container_selector, $top_bar_container_styles );\n\t\t}\n\t\t\n\t\tif ( klippe_mikado_options()->getOptionValue( 'top_bar_in_grid' ) == 'yes' ) {\n\t\t\t$top_bar_grid_selector = '.mkdf-top-bar .mkdf-grid .mkdf-vertical-align-containers';\n\t\t\t$top_bar_grid_styles = array();\n\t\t\t$top_bar_grid_background_color = klippe_mikado_options()->getOptionValue( 'top_bar_grid_background_color' );\n\t\t\t$top_bar_grid_background_transparency = klippe_mikado_options()->getOptionValue( 'top_bar_grid_background_transparency' );\n\t\t\t\n\t\t\tif ( !empty($top_bar_grid_background_color) ) {\n\t\t\t\t$grid_background_color = $top_bar_grid_background_color;\n\t\t\t\t$grid_background_transparency = 1;\n\t\t\t\t\n\t\t\t\tif ( $top_bar_grid_background_transparency !== '' ) {\n\t\t\t\t\t$grid_background_transparency = $top_bar_grid_background_transparency;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$grid_background_color = klippe_mikado_rgba_color( $grid_background_color, $grid_background_transparency );\n\t\t\t\t$top_bar_grid_styles['background-color'] = $grid_background_color;\n\t\t\t}\n\t\t\t\n\t\t\techo klippe_mikado_dynamic_css( $top_bar_grid_selector, $top_bar_grid_styles );\n\t\t}\n\t\t\n\t\t$top_bar_styles = array();\n\t\t$background_color = klippe_mikado_options()->getOptionValue( 'top_bar_background_color' );\n\t\t$border_color = klippe_mikado_options()->getOptionValue( 'top_bar_border_color' );\n\t\t\n\t\tif ( $background_color !== '' ) {\n\t\t\t$background_transparency = 1;\n\t\t\tif ( klippe_mikado_options()->getOptionValue( 'top_bar_background_transparency' ) !== '' ) {\n\t\t\t\t$background_transparency = klippe_mikado_options()->getOptionValue( 'top_bar_background_transparency' );\n\t\t\t}\n\t\t\t\n\t\t\t$background_color = klippe_mikado_rgba_color( $background_color, $background_transparency );\n\t\t\t$top_bar_styles['background-color'] = $background_color;\n\t\t\t\n\t\t\techo klippe_mikado_dynamic_css( '.mkdf-header-box .mkdf-top-bar-background', array( 'background-color' => $background_color ) );\n\t\t}\n\t\t\n\t\tif ( klippe_mikado_options()->getOptionValue( 'top_bar_border' ) == 'yes' && $border_color != '' ) {\n\t\t\t$top_bar_styles['border-bottom'] = '1px solid ' . $border_color;\n\t\t}\n\t\t\n\t\techo klippe_mikado_dynamic_css( '.mkdf-top-bar', $top_bar_styles );\n\t}", "function moments_qodef_get_footer_bottom_border() {\n\n\t\t$footer_bottom_border = '';\n\n\t\tif (moments_qodef_options()->getOptionValue('footer_bottom_border_color')) {\n\t\t\tif (moments_qodef_options()->getOptionValue('footer_bottom_border_width') !== '') {\n\t\t\t\t$footer_border_height = moments_qodef_options()->getOptionValue('footer_bottom_border_width');\n\t\t\t} else {\n\t\t\t\t$footer_border_height = '1';\n\t\t\t}\n\n\t\t\t$footer_bottom_border = 'height: '.esc_attr($footer_border_height).'px; background-color: '.esc_attr(moments_qodef_options()->getOptionValue('footer_bottom_border_color')).';';\n\t\t}\n\n\t\treturn $footer_bottom_border;\n\t}", "function _fillTop()\n {\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_BOTTOM) {\n return $this->_top - $this->_font->height($this->_text);\n }\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_CENTER_Y) {\n return $this->_top - $this->_font->_centerHeight($this->_text);\n } else {\n return $this->_top;\n }\n }", "function PMA_PDF_setXyScale($x, $y)\n {\n $x = ($x - $this->_xMin) / $this->scale + $this->leftMargin;\n $y = ($y - $this->_yMin) / $this->scale + $this->topMargin;\n $this->SetXY($x, $y);\n }", "function graph()\n {\n // Set font path for True Type Fonts\n $FONT_PATH = ROOT_PATH.\"files/fonts/graph/tahoma.ttf\";\n\n // Create colors\n $black = imagecolorallocate($this->png_image, 0, 0, 0);\n $white = imagecolorallocate($this->png_image, 255, 255, 255);\n\n // Set background to white\n imagefill($this->png_image, 0, 0, $this->bg_color);\n\n // Get values for placement of axis and labels\n $line_spacer = $this->font_size; \n $font_width = $this->font_size; \n\n // Need values to center labels\n $y_label_size = strlen($this->y_label) * $font_width;\n $x_label_size = strlen($this->x_label) * $font_width;\n $x_axis_x = (imagesx($this->png_image) - $x_label_size) / 2;\n $x_axis_y = imagesy($this->png_image) - .25 * $line_spacer;\n $y_axis_x = 1.25 * $line_spacer;\n $y_axis_y = (imagesy($this->png_image) + $y_label_size) / 2;\n\n // Add labels to image\n imagettftext($this->png_image, $this->font_size, 90, $y_axis_x, $y_axis_y, $this->font_color, $FONT_PATH, $this->y_label);\n imagettftext($this->png_image, $this->font_size, 0, $x_axis_x, $x_axis_y, $this->font_color, $FONT_PATH, $this->x_label);\n\n // Create axis lines\n $origin_x = $line_spacer * 4;\n $origin_y = imagesy($this->png_image) - $line_spacer * 3;\n $x_end = imagesx($this->png_image) - $line_spacer;\n $y_end = $line_spacer;\n\n // Create bars and labels\n $graph_width = $x_end - $origin_x;\n $graph_height = $origin_y - $y_end;\n\n // Check for multiple data sets\n if(is_array($this->data[0]))\n {\n $max_value = 0;\n $num_values = 0;\n $data_sets = sizeof($this->data);\n for($i = 0; $i < sizeof($this->data); ++$i)\n {\n for($j = 0; $j < sizeof($this->data[$i]); ++$j)\n {\n $max_value = $this->data[$i][$j] > $max_value ? $this->data[$i][$j] : $max_value;\n ++$num_values;\n }\n }\n }\n else\n {\n $max_value = max($this->data);\n $num_values = sizeof($this->data);\n $data_sets = 1;\n }\n\n $bar_width = round(($graph_width - $this->bar_space - ($this->bar_space * $data_sets)) / ($num_values + .5));\n $left = $origin_x + $this->bar_space - $bar_width;\n\n for($i = 0; $i < sizeof($this->data[0]); ++$i)\n {\n for($j = 0; $j < sizeof($this->data); ++$j)\n {\n if(!is_array($this->data[$j]))\n {\n settype($this->data[$j], 'array');\n }\n\n // Bar setup \n $height = $this->data[$j][$i] / $max_value * ($graph_height - $line_spacer); // Line spacer for cussion\n $top = $origin_y - $height;\n $left += $bar_width; \n $bottom = $origin_y;\n $right = $left + $bar_width;\n\n // Add bars and labels\n imagefilledrectangle($this->png_image, $left, $top, $right, $bottom, is_array($this->bar_color) ? $this->bar_color[$j] : $this->bar_color);\n if(!isset($this->data[$j+1][$i]))\n {\n $left += $this->bar_space;\n }\n }\n }\n\n // Label setup and adding\n $label_top = $origin_y + 1.25 * $line_spacer;\n $label_left = $origin_x + $this->bar_space + $bar_width * $data_sets * .5;\n for($k = 0; $k < sizeof($this->x_tags); ++$k)\n {\n $k_left = $label_left - strlen($this->x_tags[$k]) * 3;\n imagettftext($this->png_image, $this->font_size, 0, $k_left, $label_top, $this->font_color, $FONT_PATH, $this->x_tags[$k]); \n $label_left += $this->bar_space + $bar_width * $data_sets;\n }\n\n // Draw axis last to be on top of bars\n imageline($this->png_image, $origin_x, $origin_y, $origin_x, $y_end, $this->font_color);\n imageline($this->png_image, $origin_x, $origin_y, $x_end, $origin_y, $this->font_color);\n\n // Add ticks \n $tick_spacer = $this->y_interval / $max_value * ($graph_height - $line_spacer);\n for($i = 1; $i * $tick_spacer <= $graph_height; ++$i)\n {\n $tick_y = $origin_y - $tick_spacer * $i;\n imageline($this->png_image, $origin_x - 5, $tick_y, $origin_x, $tick_y, $this->font_color);\n imagettftext($this->png_image, $this->font_size, 90, $origin_x - 8, $tick_y + 6, $this->font_color, $FONT_PATH, $i * $this->y_interval);\n }\n\n // Add the key if needed\n if($this->key_labels !== NULL)\n {\n // Find longest label\n $longest = 0;\n for($i = 0; $i < sizeof($this->key_labels); ++$i)\n {\n $longest = strlen($this->key_labels[$i]) > strlen($this->key_labels[$longest]) ? $i : $longest;\n }\n \n // Set up key outline and dimensions\n $key_right = imagesx($this->png_image) - $line_spacer;\n $key_top = $line_spacer;\n $key_bottom = $key_top + $line_spacer + 2 * $line_spacer * sizeof($this->key_labels);\n $key_left = $key_right - 2 * $line_spacer - strlen($this->key_labels[$longest]) * $font_width;\n $box_left = $key_left + $line_spacer;\n $box_right = $box_left + $line_spacer;\n $text_left = $box_right + $line_spacer;\n\n // Finish alignment and add elements\n for($i = 0; $i < sizeof($this->key_labels); ++$i)\n {\n $box_top = $key_top + $line_spacer + 2 * $line_spacer * $i;\n $box_bottom = $box_top + $line_spacer;\n imagefilledrectangle($this->png_image, $box_left, $box_top, $box_right, $box_bottom, $this->bar_color[$i]);\n imagettftext($this->png_image, $this->font_size, 0, $text_left, $box_bottom, $this->font_color, $FONT_PATH, $this->key_labels[$i]);\n }\n imagerectangle($this->png_image, $key_left, $key_top, $key_right, $key_bottom, $this->font_color);\n }\n\n // Send headers and display image\n header(\"Content-Type: image/png\");\n imagepng($this->png_image);\n\n return TRUE;\n }", "function defaultProfitMargin_HH()\n {\n return 25;\n }", "private function createDividerBottom() {\r\n\t\tglobal $VERSION;\r\n\t\t$ver = str_pad(\"=[ $VERSION ]=\", \"70\", \"=\", STR_PAD_LEFT);\r\n\t\treturn ($ver);\r\n\t}", "function dokanee_additional_spacing() {\n\t\t// No longer needed\n\t}", "public function setBottom(int $bottom)\n {\n $this->bottom = $bottom;\n return $this;\n }", "function drawGraph(){\n \n $red = rand(0,85);\n $green = rand(86,171);\n $blue = rand(172,255);\n \n// Creating the image where the graph will appear; \n \n $image = imagecreatetruecolor($this->width, $this->height);\n \n// Setting the back ground color, text color, bar color and border color\n \n $bgcolor = imagecolorallocate($image, $green, $blue, $red);\n $textcolor = imagecolorallocate($image, $red, $blue, $green); \n $barcolor = imagecolorallocate($image, $blue, $red, $green);\n $bordercolor = imagecolorallocate($image, $blue, $red, $green);\n \n// Coloring in the back ground with the random color.\n \n imagefilledrectangle($image, 0, 0, $this->width - 1, $this->height - 1, $bgcolor);\n \n// Draw bars\n// $data = 6;\n $bar_width = $this->width / (count($this->data) * 2) - 1;\n \n for ($i = 0; $i < count($this->data); $i++) {\n imagefilledrectangle($image, ($i * $bar_width * 2) + $bar_width, $this->height,\n ($i * $bar_width * 2) + ($bar_width * 2), $this->height - (($this->height / $this->max_value) * $this->data[$i][1]), $barcolor);\n imagestringup($image, 5, ($i * $bar_width * 2) + ($bar_width), $this->height - 5, $this->data[$i][0], $textcolor);\n }\n \n// Drawing Border \n \n imagerectangle($image, 0, 0, $this->width -1, $this->height - 1, $bordercolor);\n \n \n for ($i = 1; $i <= $this->max_value; $i++) {\n imagestring($image, 5, 0, $this->height - ($i * ($this->height / $this->max_value)), $i, $barcolor);\n }\n \n \n imagepng($image, $this->filename, 5);\n imagedestroy($image);\n\n }", "public function testPropertyPadding($value)\n {\n $object = new ConditionalComponentLayout();\n $object->setPadding($value);\n\n $this->assertEquals($value, $object->getPadding());\n }", "public function setMarginBottom(?int $marginBottom) : self\n {\n $this->initialized['marginBottom'] = true;\n $this->marginBottom = $marginBottom;\n return $this;\n }", "function yoasttobottom() {\r\n\treturn 'low';\r\n}", "function setHeight($p) {$this->height = $p; }", "function calYposition($widths, $yTop, $yBottom) {\n\t\t$totalWidth = array_sum($widths);\n\t\t$y = $yTop + ($yBottom-$yTop-$totalWidth)/2;\n\t\treturn $y;\n\t}", "function lalita_side_padding() { \n\t$lalita_settings = wp_parse_args(\n\t\tget_option( 'lalita_spacing_settings', array() ),\n\t\tlalita_spacing_get_defaults()\n\t);\n\t\n\tif ( ( $lalita_settings[ 'side_top' ] != 0 ) || ( $lalita_settings[ 'side_right' ] != 0 ) || ( $lalita_settings[ 'side_bottom' ] != 0 ) || ( $lalita_settings[ 'side_left' ] != 0 ) ) {\n\t?>\n\t<div class=\"lalita-side-padding-inside\">\n\t<?php\n\t}\n}", "function set_x_tick_size($size) {\n\t\tif ($size > 0)\n\t\t\t$this->x_tick_size = $size;\n\t}", "function saveAxisConfig($axis) {\r\n $this->data[\"Axis\"] = $axis;\r\n }", "private function axisLabelsSeries($rect) {\r\n $tmpNum = 0;\r\n $tmpSt = \"\";\r\n $tmpValue = 0;\r\n\r\n $this->calcAllSeries();\r\n $tmpRange = $this->calcFirstLastAllSeries($rect);\r\n\r\n if ($tmpRange->first != intval('1000000000000')) { // MAX_VALUE\r\n $oldPosLabel = -1;\r\n $oldSizeLabel = 0;\r\n $tmpLabelW = $this->axis->getHorizontal();\r\n switch ($this->axis->getLabels()->iAngle) {\r\n case 90:\r\n case 270:\r\n $tmpLabelW = !$tmpLabelW;\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n $axisLabels = $this->axis->getLabels();\r\n for ( $t = $tmpRange->first; $t <= $tmpRange->last; $t++) {\r\n $r = $this->getAxisSeriesLabel($t);\r\n if ($r->result) {\r\n $tmpValue = $r->value;\r\n $tmpSt = $r->label;\r\n\r\n if (($tmpValue >= $this->axis->iMinimum) &&\r\n ($this->tmpValue <= $this->axis->iMaximum)) {\r\n $tmp = $this->axis->calcPosValue($tmpValue);\r\n if (!$this->axis->getTickOnLabelsOnly()) {\r\n $this->addTick($tmp);\r\n }\r\n\r\n if ($axisLabels->getVisible() &&\r\n (strlen($tmpSt) != 0)) {\r\n\r\n $tmpMulti = $this->axis->chart->multiLineTextWidth(\r\n $tmpSt);\r\n\r\n $tmpLabelSize = $tmpMulti->width;\r\n $tmpNum = $tmpMulti->count;\r\n\r\n if (!$tmpLabelW) {\r\n $tmpLabelSize = $this->chart->getGraphics3D()->getFontHeight() * $tmpNum;\r\n }\r\n if (($axisLabels->iSeparation != 0) &&\r\n ($this->oldPosLabel != -1)) {\r\n $tmpLabelSize += (int) (0.02 * $tmpLabelSize *\r\n $axisLabels->iSeparation);\r\n $tmpLabelSize *= 0.5;\r\n\r\n if ($tmp >= $oldPosLabel) {\r\n $tmpDraw = (($tmp -\r\n $tmpLabelSize) >=\r\n ($this->oldPosLabel +\r\n $oldSizeLabel));\r\n } else {\r\n $tmpDraw = (($tmp +\r\n $tmpLabelSize) <=\r\n ($this->oldPosLabel -\r\n $oldSizeLabel));\r\n }\r\n\r\n if ($tmpDraw) {\r\n $this->drawThisLabel($tmp, $tmpSt, null);\r\n $oldPosLabel = $tmp;\r\n $oldSizeLabel = $tmpLabelSize;\r\n }\r\n } else {\r\n $this->drawThisLabel($tmp, $tmpSt, null);\r\n $oldPosLabel = $tmp;\r\n $oldSizeLabel = $tmpLabelSize / 2;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n $this->axis->iSeriesList->clear(false);\r\n }\r\n }", "function win_bottom($width=180){\n\n global $config, $prefix;\n $this->win_body_close(); \t\n \t$cell_width=$width-30;\n\n \t$left = $prefix . $config->theme_config['box']['img']['bottom']['left'];\n \t$center = $prefix . $config->theme_config['box']['img']['bottom']['center'];\n \t$right = $prefix . $config->theme_config['box']['img']['bottom']['right'];\n\n \tprint \"<table width=\\\"$width\\\" border=\\\"0\\\" cellspacing=\\\"0\\\" bgcolor=\\\"\" . $config->theme_config['colors']['box_background'] . \"\\\" cellpadding=\\\"0\\\" align=\\\"center\\\">\\n\";\n \tprint \" <tr>\\n\";\n \tprint \" <td ><img alt=\\\"\\\" src=\\\"\";\n \t$this->img($left);\n \tprint \"\\\" ></td>\\n\";\n \tprint \" <td width=\\\"100%\\\" background=\\\"\";\n \t$this->img($center);\n \tprint \"\\\" align=\\\"center\\\" style=\\\"color: '\" . $config->theme_config['colors']['header_font'] . \"'; font-weight: bold;\\\"></td>\\n\";\n \tprint \" <td ><img alt=\\\"\\\" src=\\\"\";\n \t$this->img($right);\n \tprint \"\\\" ></td>\\n\";\n \tprint \" </tr>\\n\";\n \tprint \"</table>\\n\";\n \t\n \treturn;\n }", "function Canvas($width = 1, $height = 1) {\n\t\tparent::Image();\n\t\t$this->width = $width;\n\t\t$this->height = $height;\n\t\t$this->padding = new Insets();\n\t}", "protected function addBottom()\r\n {\r\n $this->add(array(\r\n 'name' => 'bottom',\r\n 'required' => false,\r\n 'filters' => array(\r\n //array('name' => 'Zend\\Filter\\HtmlEntities'),\r\n array('name' => 'Zend\\Filter\\StringTrim'),\r\n array('name' => 'Zend\\Filter\\StripTags'),\r\n ),\r\n )); \r\n \r\n return $this; \r\n }", "function setAllMargins($value) {\n $this->fields['margin_top'] = $value;\n $this->fields['margin_right'] = $value;\n $this->fields['margin_bottom'] = $value;\n $this->fields['margin_left'] = $value;\n }", "public function cropCenterBottom()\n {\n $crop = new Crop([\n 'image' => $this->image,\n 'width' => 100,\n 'height' => 100,\n 'horizontalAlign' => Crop::CENTER,\n 'verticalAlign' => Crop::BOTTOM\n ]);\n $image = $crop->applyFilter();\n $size = $image->getResourceImage()->getSize();\n $this->assertEquals(100, $size->getHeight());\n $this->assertEquals(100, $size->getWidth());\n $color = new Color('d70caa', 0);\n $this->assertEquals(\n $color,\n $image->getResourceImage()->getColorAt(new Point(10, 10))\n );\n }", "function drawAreaChart($Format=NULL)\n {\n $DisplayValues\t= isset($Format[\"DisplayValues\"]) ? $Format[\"DisplayValues\"] : FALSE;\n $DisplayOffset\t= isset($Format[\"DisplayOffset\"]) ? $Format[\"DisplayOffset\"] : 2;\n $DisplayColor\t= isset($Format[\"DisplayColor\"]) ? $Format[\"DisplayColor\"] : DISPLAY_MANUAL;\n $DisplayR\t\t= isset($Format[\"DisplayR\"]) ? $Format[\"DisplayR\"] : 0;\n $DisplayG\t\t= isset($Format[\"DisplayG\"]) ? $Format[\"DisplayG\"] : 0;\n $DisplayB\t\t= isset($Format[\"DisplayB\"]) ? $Format[\"DisplayB\"] : 0;\n $ForceTransparency\t= isset($Format[\"ForceTransparency\"]) ? $Format[\"ForceTransparency\"] : 25;\n $AroundZero\t= isset($Format[\"AroundZero\"]) ? $Format[\"AroundZero\"] : TRUE;\n $Threshold\t\t= isset($Format[\"Threshold\"]) ? $Format[\"Threshold\"] : NULL;\n\n $this->LastChartLayout = CHART_LAST_LAYOUT_REGULAR;\n\n $Data = $this->DataSet->getData();\n list($XMargin,$XDivs) = $this->scaleGetXSettings();\n\n foreach($Data[\"Series\"] as $SerieName => $Serie)\n {\n if ( $Serie[\"isDrawable\"] == TRUE && $SerieName != $Data[\"Abscissa\"] )\n {\n $R = $Serie[\"Color\"][\"R\"]; $G = $Serie[\"Color\"][\"G\"]; $B = $Serie[\"Color\"][\"B\"]; $Alpha = $Serie[\"Color\"][\"Alpha\"]; $Ticks = $Serie[\"Ticks\"];\n if ( $DisplayColor == DISPLAY_AUTO ) { $DisplayR = $R; $DisplayG = $G; $DisplayB = $B; }\n\n $AxisID\t= $Serie[\"Axis\"];\n $Mode\t\t= $Data[\"Axis\"][$AxisID][\"Display\"];\n $Format\t= $Data[\"Axis\"][$AxisID][\"Format\"];\n $Unit\t\t= $Data[\"Axis\"][$AxisID][\"Unit\"];\n\n $PosArray = $this->scaleComputeY($Serie[\"Data\"],array(\"AxisID\"=>$Serie[\"Axis\"]));\n $YZero = $this->scaleComputeY(0,array(\"AxisID\"=>$Serie[\"Axis\"]));\n\n if ( $Threshold != NULL )\n {\n foreach($Threshold as $Key => $Params)\n {\n $Threshold[$Key][\"MinX\"] = $this->scaleComputeY($Params[\"Min\"],array(\"AxisID\"=>$Serie[\"Axis\"]));\n $Threshold[$Key][\"MaxX\"] = $this->scaleComputeY($Params[\"Max\"],array(\"AxisID\"=>$Serie[\"Axis\"]));\n }\n }\n\n $this->DataSet->Data[\"Series\"][$SerieName][\"XOffset\"] = 0;\n\n if ( $Data[\"Orientation\"] == SCALE_POS_LEFTRIGHT )\n {\n if ( $YZero > $this->GraphAreaY2-1 ) { $YZero = $this->GraphAreaY2-1; }\n\n $Areas = \"\"; $AreaID = 0; \n $Areas[$AreaID][] = $this->GraphAreaX1 + $XMargin;\n if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaY2-1; }\n\n if ( $XDivs == 0 ) { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1)/4; } else { $XStep = ($this->GraphAreaX2-$this->GraphAreaX1-$XMargin*2)/$XDivs; }\n $X = $this->GraphAreaX1 + $XMargin; $LastX = NULL; $LastY = NULL;\n\n if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = \"\"; $PosArray[0] = $Value; }\n foreach($PosArray as $Key => $Y)\n {\n if ( $DisplayValues && $Serie[\"Data\"][$Key] != VOID )\n {\n if ( $Serie[\"Data\"][$Key] > 0 ) { $Align = TEXT_ALIGN_BOTTOMMIDDLE; $Offset = $DisplayOffset; } else { $Align = TEXT_ALIGN_TOPMIDDLE; $Offset = -$DisplayOffset; }\n $this->drawText($X,$Y-$Offset,$this->scaleFormat($Serie[\"Data\"][$Key],$Mode,$Format,$Unit),array(\"R\"=>$DisplayR,\"G\"=>$DisplayG,\"B\"=>$DisplayB,\"Align\"=>$Align));\n }\n\n if ( $Y == VOID && isset($Areas[$AreaID]) )\n {\n if($LastX == NULL)\n { $Areas[$AreaID][] = $X; }\n else\n { $Areas[$AreaID][] = $LastX; }\n\n if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaY2-1; }\n $AreaID++;\n }\n elseif ($Y != VOID)\n {\n if ( !isset($Areas[$AreaID]) )\n {\n $Areas[$AreaID][] = $X;\n if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaY2-1; }\n }\n\n $Areas[$AreaID][] = $X;\n $Areas[$AreaID][] = $Y;\n }\n\n $LastX = $X;\n $X = $X + $XStep;\n }\n $Areas[$AreaID][] = $LastX;\n if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaY2-1; }\n\n /* Handle shadows in the areas */\n if ( $this->Shadow )\n {\n $ShadowArea = \"\";\n foreach($Areas as $Key => $Points)\n {\n $ShadowArea[$Key] = \"\";\n foreach($Points as $Key2 => $Value)\n {\n if ( $Key2 % 2 == 0 )\n { $ShadowArea[$Key][] = $Value + $this->ShadowX; }\n else\n { $ShadowArea[$Key][] = $Value + $this->ShadowY; }\n }\n } \n\n foreach($ShadowArea as $Key => $Points)\n $this->drawPolygonChart($Points,array(\"R\"=>$this->ShadowR,\"G\"=>$this->ShadowG,\"B\"=>$this->ShadowB,\"Alpha\"=>$this->Shadowa));\n }\n\n $Alpha = $ForceTransparency != NULL ? $ForceTransparency : $Alpha;\n $Color = array(\"R\"=>$R,\"G\"=>$G,\"B\"=>$B,\"Alpha\"=>$Alpha,\"Threshold\"=>$Threshold);\n\n foreach($Areas as $Key => $Points)\n $this->drawPolygonChart($Points,$Color);\n }\n else\n {\n if ( $YZero < $this->GraphAreaX1+1 ) { $YZero = $this->GraphAreaX1+1; }\n if ( $YZero > $this->GraphAreaX2-1 ) { $YZero = $this->GraphAreaX2-1; }\n\n $Areas = \"\"; $AreaID = 0; \n if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaX1+1; }\n $Areas[$AreaID][] = $this->GraphAreaY1 + $XMargin;\n\n if ( $XDivs == 0 ) { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1)/4; } else { $YStep = ($this->GraphAreaY2-$this->GraphAreaY1-$XMargin*2)/$XDivs; }\n $Y = $this->GraphAreaY1 + $XMargin; $LastX = NULL; $LastY = NULL;\n\n if ( !is_array($PosArray) ) { $Value = $PosArray; $PosArray = \"\"; $PosArray[0] = $Value; }\n foreach($PosArray as $Key => $X)\n {\n if ( $DisplayValues && $Serie[\"Data\"][$Key] != VOID )\n {\n if ( $Serie[\"Data\"][$Key] > 0 ) { $Align = TEXT_ALIGN_BOTTOMMIDDLE; $Offset = $DisplayOffset; } else { $Align = TEXT_ALIGN_TOPMIDDLE; $Offset = -$DisplayOffset; }\n $this->drawText($X+$Offset,$Y,$this->scaleFormat($Serie[\"Data\"][$Key],$Mode,$Format,$Unit),array(\"Angle\"=>270,\"R\"=>$DisplayR,\"G\"=>$DisplayG,\"B\"=>$DisplayB,\"Align\"=>$Align));\n }\n\n if ( $X == VOID && isset($Areas[$AreaID]) )\n {\n if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaX1+1; }\n\n if($LastY == NULL)\n { $Areas[$AreaID][] = $Y; }\n else\n { $Areas[$AreaID][] = $LastY; }\n\n $AreaID++;\n }\n elseif ($X != VOID)\n {\n if ( !isset($Areas[$AreaID]) )\n {\n if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaX1+1; }\n $Areas[$AreaID][] = $Y;\n }\n\n $Areas[$AreaID][] = $X;\n $Areas[$AreaID][] = $Y;\n }\n\n $LastX = $X; $LastY = $Y;\n $Y = $Y + $YStep;\n }\n if ( $AroundZero ) { $Areas[$AreaID][] = $YZero; } else { $Areas[$AreaID][] = $this->GraphAreaX1+1; }\n $Areas[$AreaID][] = $LastY;\n\n /* Handle shadows in the areas */\n if ( $this->Shadow )\n {\n $ShadowArea = \"\";\n foreach($Areas as $Key => $Points)\n {\n $ShadowArea[$Key] = \"\";\n foreach($Points as $Key2 => $Value)\n {\n if ( $Key2 % 2 == 0 )\n { $ShadowArea[$Key][] = $Value + $this->ShadowX; }\n else\n { $ShadowArea[$Key][] = $Value + $this->ShadowY; }\n }\n } \n\n foreach($ShadowArea as $Key => $Points)\n $this->drawPolygonChart($Points,array(\"R\"=>$this->ShadowR,\"G\"=>$this->ShadowG,\"B\"=>$this->ShadowB,\"Alpha\"=>$this->Shadowa));\n }\n\n $Alpha = $ForceTransparency != NULL ? $ForceTransparency : $Alpha;\n $Color = array(\"R\"=>$R,\"G\"=>$G,\"B\"=>$B,\"Alpha\"=>$Alpha,\"Threshold\"=>$Threshold);\n\n foreach($Areas as $Key => $Points)\n $this->drawPolygonChart($Points,$Color);\n }\n }\n }\n }", "function goodwish_edge_get_footer_bottom() {\n\n\t\t$parameters = array();\n\n\t\t$parameters['footer_bottom_border'] = goodwish_edge_get_footer_bottom_border();\n\t\t$parameters['footer_bottom_border_in_grid'] = (goodwish_edge_options()->getOptionValue('footer_bottom_border_in_grid') == 'yes') ? 'edgtf-in-grid' : '';\n\t\t$parameters['footer_in_grid'] = (goodwish_edge_options()->getOptionValue('footer_in_grid') == 'yes') ? true : false;\n\t\t$parameters['footer_bottom_columns'] = goodwish_edge_options()->getOptionValue('footer_bottom_columns');\n\t\t$parameters['footer_bottom_border_bottom'] = goodwish_edge_get_footer_bottom_bottom_border();\n\n\t\tgoodwish_edge_get_module_template_part('templates/parts/footer-bottom', 'footer', '', $parameters);\n\n\t}", "function drawChart(&$viewer) {\n #\n # For simplicity, in this demo, the data arrays are filled with hard coded data. In a real\n # application, you may use a database or other data source to load up the arrays, and only\n # visible data (data within the view port) need to be loaded.\n #\n $dataX0 = array(10, 15, 6, -12, 14, -8, 13, -3, 16, 12, 10.5, -7, 3, -10, -5, 2, 5);\n $dataY0 = array(130, 150, 80, 110, -110, -105, -130, -15, -170, 125, 125, 60, 25, 150, 150, 15,\n 120);\n $dataX1 = array(6, 7, -4, 3.5, 7, 8, -9, -10, -12, 11, 8, -3, -2, 8, 4, -15, 15);\n $dataY1 = array(65, -40, -40, 45, -70, -80, 80, 10, -100, 105, 60, 50, 20, 170, -25, 50, 75);\n $dataX2 = array(-10, -12, 11, 8, 6, 12, -4, 3.5, 7, 8, -9, 3, -13, 16, -7.5, -10, -15);\n $dataY2 = array(65, -80, -40, 45, -70, -80, 80, 90, -100, 105, 60, -75, -150, -40, 120, -50, -30\n );\n\n # Create an XYChart object 500 x 480 pixels in size, with light blue (c0c0ff) background\n $c = new XYChart(500, 480, 0xc0c0ff);\n\n # Set the plotarea at (50, 40) and of size 400 x 400 pixels. Use light grey (c0c0c0) horizontal\n # and vertical grid lines. Set 4 quadrant coloring, where the colors alternate between lighter\n # and deeper grey (dddddd/eeeeee).\n $plotAreaObj = $c->setPlotArea(50, 40, 400, 400, -1, -1, -1, 0xc0c0c0, 0xc0c0c0);\n $plotAreaObj->set4QBgColor(0xdddddd, 0xeeeeee, 0xdddddd, 0xeeeeee, 0x000000);\n\n # As the data can lie outside the plotarea in a zoomed chart, we need enable clipping\n $c->setClipping();\n\n # Set 4 quadrant mode, with both x and y axes symetrical around the origin\n $c->setAxisAtOrigin(XYAxisAtOrigin, XAxisSymmetric + YAxisSymmetric);\n\n # Add a legend box at (450, 40) (top right corner of the chart) with vertical layout and 8pt\n # Arial Bold font. Set the background color to semi-transparent grey (40dddddd).\n $legendBox = $c->addLegend(450, 40, true, \"arialbd.ttf\", 8);\n $legendBox->setAlignment(TopRight);\n $legendBox->setBackground(0x40dddddd);\n\n # Add titles to axes\n $c->xAxis->setTitle(\"Alpha Index\");\n $c->yAxis->setTitle(\"Beta Index\");\n\n # Set axes line width to 2 pixels\n $c->xAxis->setWidth(2);\n $c->yAxis->setWidth(2);\n\n # The default ChartDirector settings has a denser y-axis grid spacing and less-dense x-axis grid\n # spacing. In this demo, we want the tick spacing to be symmetrical. We use around 40 pixels\n # between major ticks and 20 pixels between minor ticks.\n $c->xAxis->setTickDensity(40, 20);\n $c->yAxis->setTickDensity(40, 20);\n\n #\n # In this example, we represent the data by scatter points. You may modify the code below to use\n # other layer types (lines, areas, etc).\n #\n\n # Add scatter layer, using 11 pixels red (ff33333) X shape symbols\n $c->addScatterLayer($dataX0, $dataY0, \"Group A\", Cross2Shape(), 11, 0xff3333);\n\n # Add scatter layer, using 11 pixels green (33ff33) circle symbols\n $c->addScatterLayer($dataX1, $dataY1, \"Group B\", CircleShape, 11, 0x33ff33);\n\n # Add scatter layer, using 11 pixels blue (3333ff) triangle symbols\n $c->addScatterLayer($dataX2, $dataY2, \"Group C\", TriangleSymbol, 11, 0x3333ff);\n\n #\n # In this example, we have not explicitly configured the full x and y range. In this case, the\n # first time syncLinearAxisWithViewPort is called, ChartDirector will auto-scale the axis and\n # assume the resulting range is the full range. In subsequent calls, ChartDirector will set the\n # axis range based on the view port and the full range.\n #\n $viewer->syncLinearAxisWithViewPort(\"x\", $c->xAxis);\n $viewer->syncLinearAxisWithViewPort(\"y\", $c->yAxis);\n\n # Output the chart\n $chartQuery = $c->makeSession($viewer->getId());\n\n # Include tool tip for the chart\n $imageMap = $c->getHTMLImageMap(\"\", \"\",\n \"title='[{dataSetName}] Alpha = {x|G}, Beta = {value|G}'\");\n\n # Set the chart URL, image map and chart metrics to the viewer\n $viewer->setImageUrl(\"getchart.php?\".$chartQuery);\n $viewer->setImageMap($imageMap);\n $viewer->setChartMetrics($c->getChartMetrics());\n}", "function getBottomRight() { return $this->_bottomright; }" ]
[ "0.70901424", "0.5888331", "0.58246034", "0.5530978", "0.54866815", "0.5476491", "0.53564507", "0.5303302", "0.52725947", "0.5266937", "0.5182376", "0.5138269", "0.49867415", "0.4972047", "0.49188346", "0.48637655", "0.4810769", "0.47851816", "0.4771209", "0.4696418", "0.467306", "0.46682286", "0.46311662", "0.4625607", "0.46161553", "0.45806667", "0.45746413", "0.45565978", "0.4547431", "0.45358822", "0.45351028", "0.45314884", "0.4525183", "0.45073488", "0.45065355", "0.45023736", "0.44998068", "0.44985694", "0.4472828", "0.44643036", "0.44629416", "0.44322696", "0.44255206", "0.44125617", "0.4410561", "0.4395675", "0.43952003", "0.43820342", "0.43788984", "0.4378146", "0.4366934", "0.4353996", "0.43510002", "0.4336122", "0.43352252", "0.43266296", "0.4323696", "0.43182385", "0.43159804", "0.43159756", "0.43128195", "0.43113315", "0.43096265", "0.43077254", "0.42922634", "0.42821267", "0.42768544", "0.4275522", "0.42716715", "0.4270683", "0.4268432", "0.42654443", "0.42599055", "0.42581093", "0.42555586", "0.42537737", "0.42529914", "0.4251108", "0.42485395", "0.4244988", "0.42352057", "0.42330933", "0.42265135", "0.42118278", "0.4201115", "0.4200779", "0.4199893", "0.4196627", "0.4195002", "0.41921657", "0.4187077", "0.41845635", "0.4183888", "0.41778886", "0.41698235", "0.41697797", "0.41631493", "0.41626623", "0.41600135", "0.4152463" ]
0.7469646
0
Sets the top padding of the axis canvas from the chart picture
Устанавливает верхнее отступа оси canvas от изображения диаграммы
public function setAxisPaddingTop($top) { $this->axis_padding_top = $top; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAxisPaddingTop()\n\t{\n\t\treturn $this->axis_padding_top;\n\t}", "public function setAxisPaddingBottom($bottom)\n\t{\n\t\t$this->axis_padding_bottom = $bottom;\n\t}", "public function getAxisPaddingBottom()\n\t{\n\t\treturn $this->axis_padding_bottom;\n\t}", "public function getAxisPaddingLeft()\n\t{\n\t\treturn $this->axis_padding_left;\n\t}", "function klippe_mikado_header_top_bar_styles() {\n\t\t$top_header_height = klippe_mikado_options()->getOptionValue( 'top_bar_height' );\n\t\t\n\t\tif ( ! empty( $top_header_height ) ) {\n\t\t\techo klippe_mikado_dynamic_css( '.mkdf-top-bar', array( 'height' => klippe_mikado_filter_px( $top_header_height ) . 'px' ) );\n\t\t\techo klippe_mikado_dynamic_css( '.mkdf-top-bar .mkdf-logo-wrapper a', array( 'max-height' => klippe_mikado_filter_px( $top_header_height ) . 'px' ) );\n\t\t}\n\t\t\n\t\techo klippe_mikado_dynamic_css( '.mkdf-header-box .mkdf-top-bar-background', array( 'height' => klippe_mikado_get_top_bar_background_height() . 'px' ) );\n\t\t\n\t\t$top_bar_container_selector = '.mkdf-top-bar > .mkdf-vertical-align-containers';\n\t\t$top_bar_container_styles = array();\n\t\t$container_side_padding = klippe_mikado_options()->getOptionValue( 'top_bar_side_padding' );\n\t\t\n\t\tif ( $container_side_padding !== '' ) {\n\t\t\tif ( klippe_mikado_string_ends_with( $container_side_padding, 'px' ) || klippe_mikado_string_ends_with( $container_side_padding, '%' ) ) {\n\t\t\t\t$top_bar_container_styles['padding-left'] = $container_side_padding;\n\t\t\t\t$top_bar_container_styles['padding-right'] = $container_side_padding;\n\t\t\t} else {\n\t\t\t\t$top_bar_container_styles['padding-left'] = klippe_mikado_filter_px( $container_side_padding ) . 'px';\n\t\t\t\t$top_bar_container_styles['padding-right'] = klippe_mikado_filter_px( $container_side_padding ) . 'px';\n\t\t\t}\n\t\t\t\n\t\t\techo klippe_mikado_dynamic_css( $top_bar_container_selector, $top_bar_container_styles );\n\t\t}\n\t\t\n\t\tif ( klippe_mikado_options()->getOptionValue( 'top_bar_in_grid' ) == 'yes' ) {\n\t\t\t$top_bar_grid_selector = '.mkdf-top-bar .mkdf-grid .mkdf-vertical-align-containers';\n\t\t\t$top_bar_grid_styles = array();\n\t\t\t$top_bar_grid_background_color = klippe_mikado_options()->getOptionValue( 'top_bar_grid_background_color' );\n\t\t\t$top_bar_grid_background_transparency = klippe_mikado_options()->getOptionValue( 'top_bar_grid_background_transparency' );\n\t\t\t\n\t\t\tif ( !empty($top_bar_grid_background_color) ) {\n\t\t\t\t$grid_background_color = $top_bar_grid_background_color;\n\t\t\t\t$grid_background_transparency = 1;\n\t\t\t\t\n\t\t\t\tif ( $top_bar_grid_background_transparency !== '' ) {\n\t\t\t\t\t$grid_background_transparency = $top_bar_grid_background_transparency;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$grid_background_color = klippe_mikado_rgba_color( $grid_background_color, $grid_background_transparency );\n\t\t\t\t$top_bar_grid_styles['background-color'] = $grid_background_color;\n\t\t\t}\n\t\t\t\n\t\t\techo klippe_mikado_dynamic_css( $top_bar_grid_selector, $top_bar_grid_styles );\n\t\t}\n\t\t\n\t\t$top_bar_styles = array();\n\t\t$background_color = klippe_mikado_options()->getOptionValue( 'top_bar_background_color' );\n\t\t$border_color = klippe_mikado_options()->getOptionValue( 'top_bar_border_color' );\n\t\t\n\t\tif ( $background_color !== '' ) {\n\t\t\t$background_transparency = 1;\n\t\t\tif ( klippe_mikado_options()->getOptionValue( 'top_bar_background_transparency' ) !== '' ) {\n\t\t\t\t$background_transparency = klippe_mikado_options()->getOptionValue( 'top_bar_background_transparency' );\n\t\t\t}\n\t\t\t\n\t\t\t$background_color = klippe_mikado_rgba_color( $background_color, $background_transparency );\n\t\t\t$top_bar_styles['background-color'] = $background_color;\n\t\t\t\n\t\t\techo klippe_mikado_dynamic_css( '.mkdf-header-box .mkdf-top-bar-background', array( 'background-color' => $background_color ) );\n\t\t}\n\t\t\n\t\tif ( klippe_mikado_options()->getOptionValue( 'top_bar_border' ) == 'yes' && $border_color != '' ) {\n\t\t\t$top_bar_styles['border-bottom'] = '1px solid ' . $border_color;\n\t\t}\n\t\t\n\t\techo klippe_mikado_dynamic_css( '.mkdf-top-bar', $top_bar_styles );\n\t}", "function _fillTop()\n {\n return (int) (($this->_top + $this->_bottom - $this->_plotHeight()) / 2);\n }", "function setPadding($top, $right, $bottom, $left)\n\t{\n\t\t$this->padTop = $top;\n\t\t$this->padRight = $right;\n\t\t$this->padBottom = $bottom;\n\t\t$this->padLeft = $left;\n\t}", "function _fillTop()\n {\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_BOTTOM) {\n return $this->_top - $this->_font->height($this->_text);\n }\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_CENTER_Y) {\n return $this->_top - $this->_font->_centerHeight($this->_text);\n } else {\n return $this->_top;\n }\n }", "private function drawYaxis()\n {\n\n $min =\n round($this->min, $this->precision);\n $max =\n round($this->max, $this->precision);\n\n if (!isset($this->y_axis_legend_increment)) {\n\n $increment =\n round(($max - $min) / $this->total_values, $this->precision);\n } else {\n $increment = $this->y_axis_legend_increment;\n }\n\n if ($increment == 0) {\n $increment = 1;\n }\n\n //$spacing = \\round($spacing, 10);\n for ($label = $min; $label <= $max + $increment; $label+=$increment) {\n\n $px_position = $this->plotValue($label);\n if ($this->x_axis_hints == 1) {\n \\imageline($this->im, 0, $px_position, $this->width,\n $px_position, $this->ink['axis']);\n }\n imagestring($this->im, 1, 10, $px_position - 4, $label,\n $this->ink['text']);\n }\n }", "public function getAxisPaddingRight()\n\t{\n\t\treturn $this->axis_padding_right;\n\t}", "function _axis_options($x_grid=true, $y_grid=true)\r\n{\r\n\t$x_grid_colour = \"color:'transparent',\";\t\t// hide the grid but we still want to specify the count\r\n\t$y_grid_colour = \"color:'transparent',\";\t\t// .. because it determines the number of labels\r\n\r\n\tif (($this->chart_data->show_grid) and ($x_grid))\r\n\t\t$x_grid_colour = \"\";\r\n\t\t\r\n\tif (($this->chart_data->show_grid) and ($y_grid))\r\n\t\t$y_grid_colour = \"\";\r\n\t\t\r\n\tif (($this->chart_data->x_labels == -1) or ($this->chart_data->x_labels == ''))\t\t\t// auto, which means 5\r\n\t\t$x_grid_count = \"count:5\";\r\n\telse\r\n\t\t$x_grid_count = \"count:\".$this->chart_data->x_labels;\r\n\t\r\n\tif (($this->chart_data->y_labels == -1) or ($this->chart_data->y_labels == ''))\t\t\t// auto, which means 5\r\n\t\t$y_grid_count = \"count:5\";\r\n\telse\r\n\t\t$y_grid_count = \"count:\".$this->chart_data->y_labels;\r\n\t\r\n\t$x_gridlines = \",gridlines:{\".$x_grid_colour.$x_grid_count.\"}\";\r\n\t$y_gridlines = \",gridlines:{\".$y_grid_colour.$y_grid_count.\"}\";\r\n\r\n// axis label formats\r\n\r\n\tif ($this->chart_data->x_format == FORMAT_NONE)\r\n\t\t$x_format = '';\r\n\telse\r\n\t\t$x_format = ',format:\"'.$this->_gcFormatString($this->chart_data->x_format).'\"';\r\n\t\t\r\n\tif ($this->chart_data->y_format == FORMAT_NONE)\r\n\t\t$y_format = '';\r\n\telse\r\n\t\t$y_format = ',format:\"'.$this->_gcFormatString($this->chart_data->y_format).'\"';\r\n\t\t\r\n// X axis ranges\r\n\r\n\tif (($this->chart_data->x_start == '') and ($this->chart_data->x_end == ''))\r\n\t\t$x_range = '';\r\n\telse\r\n\t\t{\r\n\t\t$x_min = $this->_gcFormatNumber($this->chart_x_min,$this->chart_data->x_format);\r\n\t\t$x_max = $this->_gcFormatNumber($this->chart_x_max,$this->chart_data->x_format);\r\n\t\t$x_range = \",viewWindowMode:'explicit',viewWindow:{min:$x_min,max:$x_max}\";\r\n\t\t}\r\n\r\n// Y axis ranges\r\n\r\n\tif (($this->chart_data->y_start == '') and ($this->chart_data->y_end == ''))\r\n\t\t$y_range = '';\r\n\telse\r\n\t\t$y_range = \",viewWindowMode:'explicit',viewWindow:{min:\".$this->chart_y_min.\",max:\".$this->chart_y_max.\"}\";\r\n\r\n// finally we are ready to specify the axis objects\r\n\r\n\t$this->gvOptions .= \",hAxis:{title:'\".$this->x_title.\"'\".$x_gridlines.$x_format.$x_range.\"}\";\r\n\t$this->gvOptions .= \",vAxis:{title:'\".$this->y_title.\"'\".$y_gridlines.$y_format.$y_range.\"}\";\r\n}", "function Set90AndMargin($lm = 0, $rm = 0, $tm = 0, $bm = 0)\n {\n $lm = $lm == 0 ? floor(0.2 * $this->img->width) : $lm;\n $rm = $rm == 0 ? floor(0.1 * $this->img->width) : $rm;\n $tm = $tm == 0 ? floor(0.2 * $this->img->height) : $tm;\n $bm = $bm == 0 ? floor(0.1 * $this->img->height) : $bm;\n\n $adj = ($this->img->height - $this->img->width) / 2;\n $this->img->SetMargin($tm - $adj, $bm - $adj, $rm + $adj, $lm + $adj);\n $this->img->SetCenter(floor($this->img->width / 2), floor($this->img->height / 2));\n $this->SetAngle(90);\n if (empty($this->yaxis) || empty($this->xaxis)) {\n JpgraphError::RaiseL(25009);//('You must specify what scale to use with a call to Graph::SetScale()');\n }\n $this->xaxis->SetLabelAlign('right', 'center');\n $this->yaxis->SetLabelAlign('center', 'bottom');\n }", "protected function canvasSpacingY()\n {\n $this->canvas['spacing']['y'] = 0;\n\n if ($this->intermediate['height'] < $this->canvas['height']) {\n\n $difference = $this->canvas['height'] - $this->intermediate['height'];\n\n if ($difference % 2 === 0) {\n $this->canvas['spacing']['y'] = $difference / 2;\n } else {\n if ($difference > 1) {\n $this->canvas['spacing']['y'] = ($difference - 1) / 2 + 1;\n } else {\n $this->canvas['spacing']['y'] = 1;\n }\n }\n }\n }", "public function setAxisPaddingLeft($left)\n\t{\n\t\t$this->axis_padding_left = $left;\n\t}", "private function _addOmittedCanvasDimension() {\n $sourceWidth = $this->_params['sourceWidth'];\n $sourceHeight = $this->_params['sourceHeight'];\n $sourceRatio = $sourceWidth / $sourceHeight;\n\n if (empty($this->_params['w'])\n && empty($this->_params['h'])\n ) {\n $this->_params['w'] = $sourceWidth;\n $this->_params['h'] = $sourceHeight;\n } elseif (empty($this->_params['h'])) {\n if (!$this->_params['grow']\n && $this->_params['w'] > $sourceWidth\n ) {\n $this->_params['h'] = $sourceHeight;\n } else {\n $this->_params['h'] = $this->_params['w'] / $sourceRatio;\n }\n } elseif (empty($this->_params['w'])) {\n if (!$this->_params['grow']\n && $this->_params['h'] > $sourceHeight\n ) {\n $this->_params['w'] = $sourceWidth;\n } else {\n $this->_params['w'] = $this->_params['h'] * $sourceRatio;\n }\n }\n }", "public function set_baseline_offset($offset) {\r\n $this->recompute_size();\r\n $height = $this->labelsize[1] - $this->baselineoffset;\r\n $this->connectiontopoffset = $offset - $this->baselineoffset;\r\n $this->baselineoffset = $offset;\r\n $this->labelsize[1] = $this->baselineoffset + $height;\r\n $this->sizefixed = true;\r\n }", "function setVerticalMargin($value) {\n $this->fields['margin_top'] = $this->fields['margin_bottom'] = $value;\n }", "public function setAxisPaddingRight($right)\n\t{\n\t\t$this->axis_padding_right = $right;\n\t}", "function woodmart_override_section_margin_control( $control_stack ) {\n\t\t$control = Plugin::instance()->controls_manager->get_control_from_stack( $control_stack->get_unique_name(), 'margin' );\n\n\t\t$control['allowed_dimensions'] = [ 'top', 'right', 'bottom', 'left' ];\n\t\t$control['placeholder'] = [\n\t\t\t'top' => '',\n\t\t\t'right' => '',\n\t\t\t'bottom' => '',\n\t\t\t'left' => '',\n\t\t];\n\t\t$control['selectors'] = [\n\t\t\t'{{WRAPPER}}' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t];\n\n\t\t$control_stack->update_responsive_control( 'margin', $control );\n\t}", "public function PreStrokeAdjust($graph)\n\t{\n\t\tif ($this->center) {\n\t\t\t$a = 0.5;\n\t\t\t$b = 0.5;\n\t\t\t++$this->numpoints;\n\t\t} else {\n\t\t\t$a = 0;\n\t\t\t$b = 0;\n\t\t}\n\t\t$graph->xaxis->scale->ticks->SetXLabelOffset($a);\n\t\t$graph->SetTextScaleOff($b);\n\t}", "protected function all_axes_change_spaces_to_newline(){\n\t\tif (strcmp($this->x_label, \"Frame #\") == 0){\n\t\t\t$this->x_label = \"Frame\\\\n#\";\n\t\t}\n\t\tif (strcmp($this->x_label, \"Column 1\") == 0){\n\t\t\t$this->x_label = \"Column\\\\n1\";\n\t\t}\n\t\tif (strcmp($this->x_label, \"Column 2\") == 0){\n\t\t\t$this->x_label = \"Column\\\\n2\";\n\t\t}\n\t\tif (strcmp($this->x_label, \"Column 3\") == 0){\n\t\t\t$this->x_label = \"Column\\\\n3\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Frame #\") == 0){\n\t\t\t$this->y_label = \"Frame\\\\n#\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Column 1\") == 0){\n\t\t\t$this->y_label = \"Column\\\\n1\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Column 2\") == 0){\n\t\t\t$this->y_label = \"Column\\\\n2\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Column 3\") == 0){\n\t\t\t$this->y_label = \"Column\\\\n3\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Frame #\") == 0){\n\t\t\t$this->z_label = \"Frame\\\\n#\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Column 1\") == 0){\n\t\t\t$this->z_label = \"Column\\\\n1\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Column 2\") == 0){\n\t\t\t$this->z_label = \"Column\\\\n2\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Column 3\") == 0){\n\t\t\t$this->z_label = \"Column\\\\n3\";\n\t\t}\n\t}", "function _fillBottom()\n {\n return (int) (($this->_top + $this->_bottom + $this->_plotHeight()) / 2);\n }", "function StrokePlotArea()\n {\n // Note: To be consistent we really should take a possible shadow\n // into account. However, that causes some problem for the LinearScale class\n // since in the current design it does not have any links to class Graph which\n // means it has no way of compensating for the adjusted plotarea in case of a\n // shadow. So, until I redesign LinearScale we can't compensate for this.\n // So just set the two adjustment parameters to zero for now.\n $boxadj = 0; //$this->doframe ? $this->frame_weight : 0 ;\n $adj = 0; //$this->doshadow ? $this->shadow_width : 0 ;\n\n if ($this->background_image != \"\" || $this->background_cflag != \"\") {\n $this->StrokeFrameBackground();\n } else {\n $aa = $this->img->SetAngle(0);\n $this->StrokeFrame();\n $aa = $this->img->SetAngle($aa);\n $this->StrokeBackgroundGrad();\n if ($this->bkg_gradtype < 0 ||\n ($this->bkg_gradtype > 0 && $this->bkg_gradstyle == BGRAD_MARGIN)) {\n $this->FillPlotArea();\n }\n }\n }", "public function setPadding($padding);", "protected function canvasSpacingX()\n {\n $this->canvas['spacing']['x'] = 0;\n\n if ($this->intermediate['width'] < $this->canvas['width']) {\n $difference = $this->canvas['width'] - $this->intermediate['width'];\n\n if ($difference % 2 === 0) {\n $this->canvas['spacing']['x'] = $difference / 2;\n } else {\n if ($difference > 1) {\n $this->canvas['spacing']['x'] = ($difference - 1) / 2 + 1;\n } else {\n $this->canvas['spacing']['x'] = 1;\n }\n }\n }\n }", "function setOptions()\r\n\t{\r\n\t\t$cname = \"Column3D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBaseColor\", \"Canvas base color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgDepth\", \"Canvas background depth\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBaseDepth\", \"Canvas base 3D depth\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"showCanvasBg\", \"Show background canvas\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showCanvasBase\", \"Show base canvas\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneShowBorder\", \"Show zero-plane norder\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneBorderColor\", \"Zero-Plane border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\t\t\r\n\t\t$cname = \"Column2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showColumnShadow\", \"Show Column Shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\t\t\r\n\t\t$cname = \"Bar2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showColumnShadow\", \"Show Column Shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"Line\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Line Properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"lineColor\", \"Line color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"lineThickness\", \"Line thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"lineAlpha\", \"Line alpha\", \"number\", null);\r\n\t\t// Line Shadow Properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"showShadow\", \"Show line shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowColor\", \"Line shadow color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowThickness\", \"Line shadow thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowAlpha\", \"Line shadow alpha\", \"number\", null);\r\n\t\t// Anchor properties\t\r\n\t\t$this->chart_types[$cname][4][] = array(\"showAnchors\", \"Show anchors\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorSides\", \"Anchor sides\", \"number\", array(\"three\"=>3, \"four\"=>4));\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorBorderColor\", \"Anchor border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorBgColor\", \"Anchor background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorBgAlpha\", \"Anchor background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorAlpha\", \"Anchor alpha\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"Area2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showColumnShadow\", \"Show Column Shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Area\r\n\t\t$this->chart_types[$cname][4][] = array(\"showAreaBorder\", \"Show area border\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaBorderThickness\", \"Area border thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaBorderColor\", \"Area border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaBgColor\", \"Area background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaAlpha\", \"Area alpha\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"Pie2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showPercentageValues\", \"Show percentage values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showPercentageInLabel\", \"Show percentage in label\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Pie\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieBorderThickness\", \"Pie Border Thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieBorderAlpha\", \"Pie Border Alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieFillAlpha\", \"Pie Fill Alpha\", \"number\", null);\r\n\t\t// Slicing\r\n\t\t$this->chart_types[$cname][4][] = array(\"slicingDistance\", \"Distance of slice\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"nameTBDistance\", \"Distance of label\", \"number\", null);\r\n\t\t// Pie Shadow\r\n\t\t$this->chart_types[$cname][4][] = array(\"showShadow\", \"Show pie shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowColor\", \"Pie shadow color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowAlpha\", \"Pie shadow alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowXShift\", \"Shadow x-shift\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowYShift\", \"Shadow y-shift\", \"number\", null);\r\n\t\t// Fontsk\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\r\n\t\t$cname = \"Pie3D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showPercentageValues\", \"Show percentage values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showPercentageInLabel\", \"Show percentage in label\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Pie\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieRadius\", \"Radius of pie\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieBorderThickness\", \"Pie Border Thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieBorderThickness\", \"Pie Border Thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieBorderAlpha\", \"Pie Border Alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieFillAlpha\", \"Pie Fill Alpha\", \"number\", null);\r\n\t\t// Fontsk\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieRadius\", \"Radius of pie\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\r\n\t\t$cname = \"Doughnut2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showPercentageValues\", \"Show percentage values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showPercentageInLabel\", \"Show percentage in label\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Pie\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieBorderThickness\", \"Pie Border Thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieBorderAlpha\", \"Pie Border Alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"pieFillAlpha\", \"Pie Fill Alpha\", \"number\", null);\r\n\t\t// Slicing\r\n\t\t$this->chart_types[$cname][4][] = array(\"slicingDistance\", \"Distance of slice\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"nameTBDistance\", \"Distance of label\", \"number\", null);\r\n\t\t// Pie Shadow\r\n\t\t$this->chart_types[$cname][4][] = array(\"showShadow\", \"Show pie shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowColor\", \"Pie shadow color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowAlpha\", \"Pie shadow alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowXShift\", \"Shadow x-shift\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowYShift\", \"Shadow y-shift\", \"number\", null);\r\n\t\t// Fontsk\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"Funnel\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgSWF\", \"Path to an swf file\", \"text\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Funnel Properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"fillAlpha\", \"Alpha level of fill\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"funnelBaseWidth\", \"Base Width\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"funnelBaseHeight\", \"Base Height\", \"number\", null);\r\n\t\t// Slicing\r\n\t\t$this->chart_types[$cname][4][] = array(\"isSliced\", \"Slice the funnel\", \"bool\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"slicingDistance\", \"Distance of the slice in px\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Chart Margins\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Bottom Margin\", \"number\", null);\r\n\t\t// Borders\r\n\t\t$this->chart_types[$cname][4][] = array(\"showBorder\", \"Show Border\", \"bool\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"borderColor\", \"Border Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"borderThickness\", \"Thickness of Border (in px)\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"borderAlpha\", \"Border Alpha\", \"number\", null);\r\n\t\t// Hover Options\r\n\t\t$this->chart_types[$cname][4][] = array(\"showhovercap\", \"Show Hover Captions\", \"bool\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"hoverCapBgColor\", \"Hover Caption Bg Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"hoverCapBorderColor\", \"Hover Caption Border Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"hoverCapSepChar\", \"Char that separates val from name in hover caption)\", \"text\", null);\r\n\r\n\t\t$cname = \"MSColumn3D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBaseColor\", \"Canvas base color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgDepth\", \"Canvas background depth\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBaseDepth\", \"Canvas base 3D depth\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"showCanvasBg\", \"Show background canvas\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showCanvasBase\", \"Show base canvas\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneShowBorder\", \"Show zero-plane norder\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneBorderColor\", \"Zero-Plane border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"MSColumn2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showColumnShadow\", \"Show Column Shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"MSBar2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showColumnShadow\", \"Show Column Shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"MSLine\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Line Properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"lineColor\", \"Line color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"lineThickness\", \"Line thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"lineAlpha\", \"Line alpha\", \"number\", null);\r\n\t\t// Line Shadow Properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"showShadow\", \"Show line shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowColor\", \"Line shadow color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowThickness\", \"Line shadow thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"shadowAlpha\", \"Line shadow alpha\", \"number\", null);\r\n\t\t// Anchor properties\t\r\n\t\t$this->chart_types[$cname][4][] = array(\"showAnchors\", \"Show anchors\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorSides\", \"Anchor sides\", \"number\", array(\"three\"=>3, \"four\"=>4));\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorBorderColor\", \"Anchor border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorBgColor\", \"Anchor background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorBgAlpha\", \"Anchor background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"anchorAlpha\", \"Anchor alpha\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\r\n\t\t$cname = \"MSArea2D\";\r\n\t\t// Background\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgColor\", \"Chart Background Color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"bgAlpha\", \"Chart Alpha Level\", \"number\", null);\r\n\t\t// Canvas properties\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgColor\", \"Canvas background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBgAlpha\", \"Canvas background alpha\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderColor\", \"Canvas border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"canvasBorderThickness\", \"Canvas border thickness\", \"number\", null);\r\n\t\t// Limits\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMinValue\", \"Lower Limit of y-axis\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"yAxisMaxValue\", \"Upper Limit of y-axis\", \"number\", null);\r\n\t\t// Generic\r\n\t\t$this->chart_types[$cname][4][] = array(\"shownames\", \"Show x-axis names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showValues\", \"Show y-axis values\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showLimits\", \"Display limits\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"rotateNames\", \"Rotate category names\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"animation\", \"Animate chart\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"showColumnShadow\", \"Show Column Shadow\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartLeftMargin\", \"Chart Left Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartRightMargin\", \"Chart Right Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartTopMargin\", \"Chart Top Margin\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"chartBottomMargin\", \"Chart Bottom Margin\", \"number\", null);\r\n\t\t// Area\r\n\t\t$this->chart_types[$cname][4][] = array(\"showAreaBorder\", \"Show area border\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaBorderThickness\", \"Area border thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaBorderColor\", \"Area border color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaBgColor\", \"Area background color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"areaAlpha\", \"Area alpha\", \"number\", null);\r\n\t\t// Fonts\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFont\", \"Canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontSize\", \"Canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"baseFontColor\", \"Canvas font color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFont\", \"Outside canvas font\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontSze\", \"Outside canvas font size\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"outCnvBaseFontColor\", \"Outside canvas font color\", \"HexColorCode\", null);\r\n\t\t// Number formatting\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberPrefix\", \"Number prefix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"numberSuffix\", \"Number suffix\", \"text\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumber\", \"Format numbers\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t$this->chart_types[$cname][4][] = array(\"formatNumberScale\", \"Scale numbers (1k, 2m)\", \"bool\", array(\"true\"=>1, \"false\"=>0));\r\n\t\t// Zero Plane\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneThickness\", \"Zero-plane thickness\", \"number\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneColor\", \"Zero-Plane color\", \"HexColorCode\", null);\r\n\t\t$this->chart_types[$cname][4][] = array(\"zeroPlaneAlpha\", \"Zero-Plane alpha\", \"number\", null);\r\n\t}", "function setAllMargins($value) {\n $this->fields['margin_top'] = $value;\n $this->fields['margin_right'] = $value;\n $this->fields['margin_bottom'] = $value;\n $this->fields['margin_left'] = $value;\n }", "public function getAxisYLabelOffsetX()\n\t{\n\t\treturn $this->axis_ylabel_offX;\n\t}", "protected function cellSettings()\n {\n $this->SetCellPadding(\n Config::get('laravel-tcpdf::cell_padding')\n );\n\n $this->setCellHeightRatio(\n Config::get('laravel-tcpdf::cell_height_ratio')\n );\n }", "public function test_default_border_thickness()\n {\n $this->assertEquals($this->mappr->border_thickness, 1.25);\n }", "protected function cellSettings()\n {\n $this->SetCellPadding(\n RC_Config::get('tcpdf::config.cell_padding')\n );\n\n $this->setCellHeightRatio(\n RC_Config::get('tcpdf::config.cell_height_ratio')\n );\n }", "protected function draw_axis_name(){\n\n\t\t$valid_axis = array('x1', 'y', 'y2');\n\n\t\tforeach($valid_axis as $axis) {\n\n\t\t\t$var_title = 'axis_title_' . $axis;\n\t\t\t$var_unit = 'axis_unit_' . $axis;\n\t\t\t$var_position = 'axis_position_' . $axis;\n\n\t\t\tif($this->$var_title) {\n\n\t\t\t\t$title = $this->$var_title . (($this->$var_unit != '') ? ' [' . $this->$var_unit . ']' : '');\n\t\t\t\tif($axis == 'y') {\n\t\t\t\t\t$angle = 90;\n\t\t\t\t}elseif($axis == 'y2') {\n\t\t\t\t\t$angle = 270;\n\t\t\t\t}else {\n\t\t\t\t\t$angle = 0;\n\t\t\t\t}\n\n\t\t\t\t/* calculate the size of the title */\n\t\t\t\t$title_box = imageftbbox($this->axis_font_size, $angle, $this->axis_font, $title);\n\n\t\t\t\tif($axis == 'x1'){\n\t\t\t\t\t$y = $this->canvas_height - 2*$this->axis_font_size;\n\t\t\t\t\t$x = ($this->$var_position == 'middle') ? ($this->chart_width / 2) - ($title_box[4] / 2) + $this->offset_left\n\t\t\t\t\t : $this->canvas_width - $this->offset_right - $title_box[4];\n\t\t\t\t}elseif($axis == 'y') {\n\t\t\t\t\t$x = 3*$this->axis_font_size;\n\t\t\t\t\t$y = ($this->$var_position == 'middle') ? ($this->chart_height / 2) - ($title_box[3] / 2) + $this->offset_top\n\t\t\t\t\t : -$title_box[3] + $this->offset_top;\n\t\t\t\t}else{\n\t\t\t\t\t$x = $this->canvas_width - 3*$this->axis_font_size;;\n\t\t\t\t\t$y = ($this->$var_position == 'middle') ? ($this->chart_height / 2) - ($title_box[3] / 2) + $this->offset_top\n\t\t\t\t\t : -$title_box[3] + $this->offset_top;\n\t\t\t\t}\n\n\t\t\t\t/* draw the y-title */\n\t\t\t\timagefttext($this->img, $this->axis_font_size, $angle,$x ,$y , $this->axis_font_color, $this->axis_font, $title);\n\t\t\t}\n\t\t}\n\t}", "private function set_axes($x_labels, $y_max) { \n\n if ($y_max > 50) {\n $steps = ceil($y_max / 50);\n $scaled_max = $steps * 50;\n } else {\n $scaled_max = 50;\n }\n \n $chart_x_legend = new OFC_Elements_Legend_X((string)$this->x_legend );\n $chart_x_legend->set_style((string)$this->style);\n $this->chart->set_x_legend($chart_x_legend );\n $chart_y_legend = new OFC_Elements_Legend_Y((string)$this->y_legend );\n $chart_y_legend->set_style((string)$this->style); \n $this->chart->set_y_legend($chart_y_legend );\n $x = new OFC_Elements_Axis_X();\n $x->set_labels_from_array($x_labels);\n $this->chart->set_x_axis($x); \n $y = new OFC_Elements_Axis_Y();\n $y->set_range(0, $scaled_max, 50);\n $this->chart->add_y_axis( $y );\n }", "function _survey_cygnal_toplines_set_data_toplines(&$data,&$quota){\n\t\t#Asigna en la columna B, de la información de las quotas, representa a la solumna SAM \n\t\t$question=array();\n\t\tforeach ($data[\"datos\"] as $row => $row_value) {\n\t\t\tforeach ($row_value as $col => $col_value) {\n\t\t\t\t#_debug_t($row,\"row\",false,true); #Variable, exit, print\n\t\t\t\tif($row==0){\n\t\t\t\t\t#_debug_t($col,\"col\",false,true); #Variable, exit, print\n\t\t\t\t\tif(_survey_cygnal_toplines_excluir_columnas($col_value)){ # valida que se incluyan solo las columnas de preguntas y demographics\n\t\t\t\t\t\t$question[$col][\"key\"]=$col;\n\t\t\t\t\t\t$question[$col][\"value\"]=$col_value;\n\t\t\t\t\t\t$question[$col][\"answers\"]=array();\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t#_debug_t($data[\"datos\"][0][$col],\"col\",false,true); #Variable, exit, print\n\t\t\t\t\tif(_survey_cygnal_toplines_excluir_columnas($data[\"datos\"][0][$col])){ # valida que se incluyan solo las columnas de preguntas y demographics\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(isset($question[$col][\"answers\"][$col_value])){\n\t\t\t\t\t\t\t$question[$col][\"answers\"][$col_value]=$question[$col][\"answers\"][$col_value] + $row_value['height'];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$question[$col][\"answers\"][$col_value]=$row_value['height'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\n\t\t#_debug_t($question,\"question\",true,true); #Variable, exit, print\t\n\t\t$data[\"toplines\"]=$question;\n\t}", "function defaultProfitMargin_HH()\n {\n return 25;\n }", "function saveYMargin($value) {\r\n $this->data[\"YMargin\"] = $value;\r\n }", "public function __construct() {\n parent::__construct();\n\n $this->maxX = 145;\n $this->maxY = 135;\n }", "function astra_addon_responsive_shop_button_padding() {\n\t$theme_options = get_option( 'astra-settings', array() );\n\t$vertical_button_padding = isset( $theme_options['shop-button-v-padding'] ) ? $theme_options['shop-button-v-padding'] : '';\n\t$horizontal_button_padding = isset( $theme_options['shop-button-h-padding'] ) ? $theme_options['shop-button-h-padding'] : '';\n\tif ( ! isset( $theme_options['shop-button-padding'] ) ) {\n\t\t$theme_options['shop-button-padding'] = array(\n\t\t\t'desktop' => array(\n\t\t\t\t'top' => $vertical_button_padding,\n\t\t\t\t'right' => $horizontal_button_padding,\n\t\t\t\t'bottom' => $vertical_button_padding,\n\t\t\t\t'left' => $horizontal_button_padding,\n\t\t\t),\n\t\t\t'tablet' => array(\n\t\t\t\t'top' => '',\n\t\t\t\t'right' => '',\n\t\t\t\t'bottom' => '',\n\t\t\t\t'left' => '',\n\t\t\t),\n\t\t\t'mobile' => array(\n\t\t\t\t'top' => '',\n\t\t\t\t'right' => '',\n\t\t\t\t'bottom' => '',\n\t\t\t\t'left' => '',\n\t\t\t),\n\t\t\t'desktop-unit' => 'px',\n\t\t\t'tablet-unit' => 'px',\n\t\t\t'mobile-unit' => 'px',\n\t\t);\n\t\tupdate_option( 'astra-settings', $theme_options );\n\t}\n}", "public function setPadding(\n int $top,\n int $right,\n int $bottom,\n int $left\n ): void {\n $this->padding = [$top, $right, $bottom, $left];\n }", "function set_x_tick_size($size) {\n\t\tif ($size > 0)\n\t\t\t$this->x_tick_size = $size;\n\t}", "function calYposition($widths, $yTop, $yBottom) {\n\t\t$totalWidth = array_sum($widths);\n\t\t$y = $yTop + ($yBottom-$yTop-$totalWidth)/2;\n\t\treturn $y;\n\t}", "function Header() {\n\t//$this->Image(\"D:\\logo.jpg\",170,8,30);\n $this->SetFont('Times','',14);\n $this->SetY(0.25);\n\t$this->Cell(0, .25, \" Vz-BOSS \", 'T', 2, \"C\");\n\t$this->SetY(0.25);\n //reset Y\n $this->SetY(1);\n}", "public function create() {\n \t$this->img = imagecreatetruecolor($this->canvas_width, $this->canvas_height);\n\n /* setup image colors */\n $this->image_background_color = $this->get_image_color($this->image_background_color, $this->alpha_image_background_color);\n $this->image_border_color = $this->get_image_color($this->image_border_color, $this->alpha_image_border_color);\n $this->chart_background_color = $this->get_image_color($this->chart_background_color, $this->alpha_chart_background_color);\n\n $this->x_axis_color_small_tics = $this->get_image_color($this->x_axis_color, $this->alpha_x_axis_color+50);\n\t\t$this->x_axis_color = $this->get_image_color($this->x_axis_color, $this->alpha_x_axis_color);\n\n $this->y_axis_color_small_tics\t= $this->get_image_color($this->y_axis_color, $this->alpha_y_axis_color+50);\n $this->y_axis_color = $this->get_image_color($this->y_axis_color, $this->alpha_y_axis_color);\n\n $this->y2_axis_color_small_tics\t= $this->get_image_color($this->y2_axis_color, $this->alpha_y2_axis_color+20);\n $this->y2_axis_color = $this->get_image_color($this->y2_axis_color, $this->alpha_y2_axis_color);\n $this->grid_color = $this->get_image_color($this->grid_color, $this->alpha_grid_color);\n\t\t$this->chart_value_border\t\t= $this->get_image_color($this->chart_value_border, 50);\n\n /* setup font colors */\n $this->axis_font_color = $this->get_image_color($this->axis_font_color, $this->alpha_axis_font_color);\n $this->title_font_color = $this->get_image_color($this->title_font_color, $this->alpha_title_font_color);\n $this->legend_font_color = $this->get_image_color($this->legend_font_color, $this->alpha_title_font_color);\n\n\t\t/* setup series colors */\n\t\tforeach($this->data_series_color as &$color) { $color = $this->get_series_color($color[\"color\"], $color[\"alpha\"]); }\n\n \t/* setup grid style */\n $this->valid_grid_styles = array('dotted' => array($this->grid_color, IMG_COLOR_TRANSPARENT),\n 'dashed' => array(IMG_COLOR_TRANSPARENT, IMG_COLOR_TRANSPARENT, IMG_COLOR_TRANSPARENT, IMG_COLOR_TRANSPARENT, $this->grid_color, $this->grid_color, $this->grid_color, $this->grid_color),\n 'drawn_through' => array($this->grid_color));\n $this->x_grid_style = $this->valid_grid_styles[$this->x_grid_style];\n $this->y_grid_style = $this->valid_grid_styles[$this->y_grid_style];\n\n /* draw the background */\n imagefilltoborder($this->img, 0, 0, 1, $this->image_background_color);\n\n /* draw image border */\n imagerectangle($this->img, 1, 1, $this->canvas_width-2, $this->canvas_height-2, $this->image_border_color);\n\n\t\t/* execute the \"constructor\" of the sub class */\n\t\tchart::_construct();\n\n\n imagepng($this->img);\n imagedestroy($this->img);\n\n\n }", "public function setPadding($v) { $this->_padding = (int)$v; }", "function kvell_edge_get_title_content_padding() {\n\t\t$title_content_padding = apply_filters( 'kvell_edge_title_content_padding', 0 );\n\t\t\n\t\treturn intval( $title_content_padding );\n\t}", "function setAxisXY($axis_id, $identity = AXIS_Y) { \r\n if ( isset($this->data[\"Axis\"][$axis_id] ) ) { \r\n $this->data[\"Axis\"][$axis_id][\"Identity\"] = $identity; \r\n } \r\n }", "function setScatterSerieTicks($id, $width = 0) { \r\n if ( isset($this->data[\"ScatterSeries\"][$id]) ) { \r\n $this->data[\"ScatterSeries\"][$id][\"Ticks\"] = $width; \r\n } \r\n }", "function SetMargins($left, $top, $right=null)\n{\n\t$this->lMargin = $left;\n\t$this->tMargin = $top;\n\tif($right===null)\n\t\t$right = $left;\n\t$this->rMargin = $right;\n}", "function _fillBottom()\n {\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_BOTTOM) {\n return $this->_top;\n }\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_CENTER_Y) {\n return $this->_top + $this->_font->_centerHeight($this->_text);\n } else {\n return $this->_top + $this->_font->height($this->_text);\n }\n }", "function setSerieTicks($series, $width = 0) {\r\n if ( !is_array($series) ) { \r\n $series = $this->convertToArray($series); \r\n }\r\n \r\n foreach($series as $key => $serie) { \r\n if ( isset($this->data[\"Series\"][$serie]) ) { \r\n $this->data[\"Series\"][$serie][\"Ticks\"] = $width; \r\n } \r\n }\r\n }", "public function getAxisXLabelOffsetY()\n\t{\n\t\treturn $this->axis_xlabel_offY;\n\t}", "function SetXLabelOffset($aLabelOff, $aTickOff = -1)\n {\n $this->xlabel_offset = $aLabelOff;\n if ($aTickOff == -1) // Same as label offset\n $this->xtick_offset = $aLabelOff;\n else\n $this->xtick_offset = $aTickOff;\n if ($aLabelOff > 0)\n $this->SupressLast(); // The last tick wont fit\n }", "private function\n\t\tset_frame_height_and_width()\n\t{\n\t\t$this->set_no_of_options_and_no_of_characters_with_options();\n\n\t\t$this->frame_width = \n\t\t\t$this->label_width \n\t\t\t+ ($this->column_width * ( $this->get_no_of_characters() + 1)) \n\t\t\t+ ($this->get_frame_padding() * 2);\n\n\t\t$this->frame_height = \n\t\t\t(\n\t\t\t\t($this->label_height * 0.8) \n\t\t\t\t*\n\t\t\t\t($this->no_of_options + $this->no_of_characters_with_options + 1)\n\t\t\t);\n\t}", "function createChart(&$info,&$cfg)\r\n{\r\n $backgndColor=array('R' => 255, 'G' => 255, 'B' => 254);\r\n $chartCfg=new stdClass();\r\n $chartCfg->XSize = $info->canDraw ? $cfg->XSize : 600;\r\n $chartCfg->YSize = $info->canDraw ? $cfg->YSize : 50; \r\n \r\n $chartCfg->border = new stdClass();\r\n $chartCfg->border->width = 1;\r\n $chartCfg->border->color = array('R' => 0, 'G' => 0, 'B' => 0);\r\n\r\n $chartCfg->graphArea = new stdClass();\r\n $chartCfg->graphArea->color=array('R' => 213, 'G' => 217, 'B' => 221);\r\n \r\n $chartCfg->graphArea->beginX = property_exists($cfg,'beginX') ? $cfg->beginX : 40; \r\n $chartCfg->graphArea->beginY = property_exists($cfg,'beginY') ? $cfg->beginY : 100; \r\n \r\n $chartCfg->graphArea->endX = $chartCfg->XSize - $chartCfg->graphArea->beginX;\r\n $chartCfg->graphArea->endY = $chartCfg->YSize - $chartCfg->graphArea->beginY;\r\n\r\n $chartCfg->scale=new stdClass();\r\n\r\n\t// 20100914 - franciscom \r\n\t// After reading documentation\r\n\t// drawScale\r\n\t// Today there is four way of computing scales :\r\n\t//\r\n // - Getting Max & Min values per serie : ScaleMode = SCALE_NORMAL\r\n // - Like the previous one but setting the min value to 0 : ScaleMode = SCALE_START0\r\n // - Getting the series cumulative Max & Min values : ScaleMode = SCALE_ADDALL\r\n // - Like the previous one but setting the min value to 0 : ScaleMode = SCALE_ADDALLSTART0\r\n\t//\r\n\t// This will depends on the kind of graph you are drawing, today only the stacked bar chart \r\n\t// can use the SCALE_ADDALL mode. \r\n\t// Drawing graphs were you want to fix the min value to 0 you must use the SCALE_START0 option. \r\n\t//\r\n $chartCfg->scale->mode = SCALE_ADDALLSTART0;\r\n $chartCfg->scale->color = array('R' => 0, 'G' => 0, 'B' => 0);\r\n $chartCfg->scale->drawTicks = TRUE;\r\n $chartCfg->scale->angle=$cfg->scale->legendXAngle;\r\n $chartCfg->scale->decimals=1;\r\n $chartCfg->scale->withMargin=TRUE;\r\n \r\n $chartCfg->legend=new stdClass();\r\n $chartCfg->legend->X=$chartCfg->XSize-80; \r\n $chartCfg->legend->Y=15;\r\n $chartCfg->legend->color=array('R' => 236, 'G' => 238, 'B' => 240);\r\n\r\n $chartCfg->title=new stdClass();\r\n $chartCfg->title->value=$cfg->chartTitle; \r\n \r\n $chartCfg->title->X=2*$chartCfg->graphArea->beginX; \r\n $chartCfg->title->Y=$chartCfg->legend->Y;\r\n $chartCfg->title->color=array('R' => 0, 'G' => 0, 'B' => 255);\r\n \r\n $Test = new pChart($chartCfg->XSize,$chartCfg->YSize);\r\n $Test->reportWarnings(\"GD\");\r\n $Test->drawBackground($backgndColor['R'],$backgndColor['G'],$backgndColor['B']);\r\n $Test->drawGraphArea($chartCfg->graphArea->color['R'],\r\n $chartCfg->graphArea->color['G'],$chartCfg->graphArea->color['B']);\r\n $Test->setGraphArea($chartCfg->graphArea->beginX,$chartCfg->graphArea->beginY,\r\n $chartCfg->graphArea->endX,$chartCfg->graphArea->endY);\r\n \r\n $Test->setFontProperties(config_get('charts_font_path'),config_get('charts_font_size'));\r\n \r\n if($info->canDraw)\r\n {\r\n $DataSet = new pData;\r\n foreach($info->chart_data as $key => $values)\r\n {\r\n $id=$key+1;\r\n $DataSet->AddPoint($values,\"Serie{$id}\"); \r\n $DataSet->SetSerieName($info->series_label[$key],\"Serie{$id}\");\r\n \r\n }\r\n $DataSet->AddPoint($info->xAxis->values,$info->xAxis->serieName);\r\n $DataSet->AddAllSeries();\r\n $DataSet->RemoveSerie($info->xAxis->serieName);\r\n $DataSet->SetAbsciseLabelSerie($info->xAxis->serieName);\r\n $chartData=$DataSet->GetData();\r\n $chartLegend=$DataSet->GetDataDescription();\r\n \r\n \r\n foreach( $info->series_color as $key => $hexrgb)\r\n {\r\n $rgb=str_split($hexrgb,2);\r\n $Test->setColorPalette($key,hexdec($rgb[0]),hexdec($rgb[1]),hexdec($rgb[2])); \r\n }\r\n // $Test->setFixedScale($info->scale->minY,$info->scale->maxY,$info->scale->divisions);\r\n $Test->drawScale($chartData,$chartLegend,$chartCfg->scale->mode,\r\n $chartCfg->scale->color['R'],$chartCfg->scale->color['G'],$chartCfg->scale->color['B'],\r\n $chartCfg->scale->drawTicks,$chartCfg->scale->angle,$chartCfg->scale->decimals,\r\n $chartCfg->scale->withMargin);\r\n \r\n $Test->drawStackedBarGraph($chartData,$chartLegend,70);\r\n \r\n // Draw the legend\r\n $Test->setFontProperties(config_get('charts_font_path'),config_get('charts_font_size'));\r\n $Test->drawLegend($chartCfg->legend->X,$chartCfg->legend->Y,$chartLegend,\r\n $chartCfg->legend->color['R'],$chartCfg->legend->color['G'],\r\n $chartCfg->legend->color['B']);\r\n \r\n $Test->addBorder($chartCfg->border->width,\r\n $chartCfg->border->color['R'],$chartCfg->border->color['G'],\r\n $chartCfg->border->color['B']);\r\n }\r\n else\r\n {\r\n $chartCfg->title->value .= '/' . lang_get('no_data_available'); \r\n }\r\n\r\n $Test->drawTitle($chartCfg->title->X,$chartCfg->title->Y,$chartCfg->title->value,\r\n $chartCfg->title->color['R'],$chartCfg->title->color['G'],$chartCfg->title->color['B']);\r\n $Test->Stroke();\r\n}", "public function setPaddingStandard($padding);", "function remove_caption_padding( $width ) {\n\treturn $width - 10;\n}", "public function removeInset() {\n\n\t\t$this->options['inset'] = false;\n\t}", "function drawChart(&$viewer) {\n #\n # For simplicity, in this demo, the data arrays are filled with hard coded data. In a real\n # application, you may use a database or other data source to load up the arrays, and only\n # visible data (data within the view port) need to be loaded.\n #\n $dataX0 = array(10, 15, 6, -12, 14, -8, 13, -3, 16, 12, 10.5, -7, 3, -10, -5, 2, 5);\n $dataY0 = array(130, 150, 80, 110, -110, -105, -130, -15, -170, 125, 125, 60, 25, 150, 150, 15,\n 120);\n $dataX1 = array(6, 7, -4, 3.5, 7, 8, -9, -10, -12, 11, 8, -3, -2, 8, 4, -15, 15);\n $dataY1 = array(65, -40, -40, 45, -70, -80, 80, 10, -100, 105, 60, 50, 20, 170, -25, 50, 75);\n $dataX2 = array(-10, -12, 11, 8, 6, 12, -4, 3.5, 7, 8, -9, 3, -13, 16, -7.5, -10, -15);\n $dataY2 = array(65, -80, -40, 45, -70, -80, 80, 90, -100, 105, 60, -75, -150, -40, 120, -50, -30\n );\n\n # Create an XYChart object 500 x 480 pixels in size, with light blue (c0c0ff) background\n $c = new XYChart(500, 480, 0xc0c0ff);\n\n # Set the plotarea at (50, 40) and of size 400 x 400 pixels. Use light grey (c0c0c0) horizontal\n # and vertical grid lines. Set 4 quadrant coloring, where the colors alternate between lighter\n # and deeper grey (dddddd/eeeeee).\n $plotAreaObj = $c->setPlotArea(50, 40, 400, 400, -1, -1, -1, 0xc0c0c0, 0xc0c0c0);\n $plotAreaObj->set4QBgColor(0xdddddd, 0xeeeeee, 0xdddddd, 0xeeeeee, 0x000000);\n\n # As the data can lie outside the plotarea in a zoomed chart, we need enable clipping\n $c->setClipping();\n\n # Set 4 quadrant mode, with both x and y axes symetrical around the origin\n $c->setAxisAtOrigin(XYAxisAtOrigin, XAxisSymmetric + YAxisSymmetric);\n\n # Add a legend box at (450, 40) (top right corner of the chart) with vertical layout and 8pt\n # Arial Bold font. Set the background color to semi-transparent grey (40dddddd).\n $legendBox = $c->addLegend(450, 40, true, \"arialbd.ttf\", 8);\n $legendBox->setAlignment(TopRight);\n $legendBox->setBackground(0x40dddddd);\n\n # Add titles to axes\n $c->xAxis->setTitle(\"Alpha Index\");\n $c->yAxis->setTitle(\"Beta Index\");\n\n # Set axes line width to 2 pixels\n $c->xAxis->setWidth(2);\n $c->yAxis->setWidth(2);\n\n # The default ChartDirector settings has a denser y-axis grid spacing and less-dense x-axis grid\n # spacing. In this demo, we want the tick spacing to be symmetrical. We use around 40 pixels\n # between major ticks and 20 pixels between minor ticks.\n $c->xAxis->setTickDensity(40, 20);\n $c->yAxis->setTickDensity(40, 20);\n\n #\n # In this example, we represent the data by scatter points. You may modify the code below to use\n # other layer types (lines, areas, etc).\n #\n\n # Add scatter layer, using 11 pixels red (ff33333) X shape symbols\n $c->addScatterLayer($dataX0, $dataY0, \"Group A\", Cross2Shape(), 11, 0xff3333);\n\n # Add scatter layer, using 11 pixels green (33ff33) circle symbols\n $c->addScatterLayer($dataX1, $dataY1, \"Group B\", CircleShape, 11, 0x33ff33);\n\n # Add scatter layer, using 11 pixels blue (3333ff) triangle symbols\n $c->addScatterLayer($dataX2, $dataY2, \"Group C\", TriangleSymbol, 11, 0x3333ff);\n\n #\n # In this example, we have not explicitly configured the full x and y range. In this case, the\n # first time syncLinearAxisWithViewPort is called, ChartDirector will auto-scale the axis and\n # assume the resulting range is the full range. In subsequent calls, ChartDirector will set the\n # axis range based on the view port and the full range.\n #\n $viewer->syncLinearAxisWithViewPort(\"x\", $c->xAxis);\n $viewer->syncLinearAxisWithViewPort(\"y\", $c->yAxis);\n\n # Output the chart\n $chartQuery = $c->makeSession($viewer->getId());\n\n # Include tool tip for the chart\n $imageMap = $c->getHTMLImageMap(\"\", \"\",\n \"title='[{dataSetName}] Alpha = {x|G}, Beta = {value|G}'\");\n\n # Set the chart URL, image map and chart metrics to the viewer\n $viewer->setImageUrl(\"getchart.php?\".$chartQuery);\n $viewer->setImageMap($imageMap);\n $viewer->setChartMetrics($c->getChartMetrics());\n}", "function lalita_side_padding() { \n\t$lalita_settings = wp_parse_args(\n\t\tget_option( 'lalita_spacing_settings', array() ),\n\t\tlalita_spacing_get_defaults()\n\t);\n\t\n\tif ( ( $lalita_settings[ 'side_top' ] != 0 ) || ( $lalita_settings[ 'side_right' ] != 0 ) || ( $lalita_settings[ 'side_bottom' ] != 0 ) || ( $lalita_settings[ 'side_left' ] != 0 ) ) {\n\t?>\n\t<div class=\"lalita-side-padding-inside\">\n\t<?php\n\t}\n}", "private function drawLabels()\n {\n $min_value = CArray::amin($this->data[0]);\n $max_value = CArray::amax($this->data[0]);\n\n $left = CArray::toArray(\n CArray::linspace($min_value, 0, 5, false)\n );\n\n $right = CArray::toArray(\n CArray::linspace(0, $max_value, 5)\n );\n\n # Remove 0 so it don't repeat\n array_shift($right);\n\n $bottom_values = array_merge(\n $left,\n $right\n );\n\n $padding = CArray::toArray(\n CArray::linspace($this->grid_padding, $this->gridWidth(), count($bottom_values))\n );\n\n foreach($bottom_values as $k => $value) {\n $this->addLine(\n $padding[$k] + ($this->grid_padding/2),\n $this->height - $this->grid_padding,\n $padding[$k] + ($this->grid_padding/2),\n $this->height - ($this->grid_padding/1.5)\n );\n $this->addText(\n $value,\n $padding[$k] + ($this->grid_padding/2.5),\n $this->height - ($this->grid_padding/2)\n );\n }\n\n\n\n $min_value = CArray::amin($this->data[1]);\n $max_value = CArray::amax($this->data[1]);\n\n $side_values = CArray::toArray(\n CArray::linspace($min_value, $max_value, 6, false)\n );\n\n $padding = CArray::toArray(\n CArray::linspace($this->gridHeight(), $this->grid_padding, count($side_values))\n );\n\n\n foreach($side_values as $k => $value) {\n $this->addLine(\n $this->grid_padding,\n $padding[$k] + ($this->grid_padding/2),\n ($this->grid_padding/1.5),\n $padding[$k] + ($this->grid_padding/2)\n );\n $this->addText(\n round($value, 2),\n $this->grid_padding * 0.2,\n $padding[$k] + ($this->grid_padding/2.5)\n );\n }\n }", "function set_x_axis_3d($size) {\n\t\tif ($size > 0)\n\t\t\t$this->x_axis_3d = intval ( $size );\n\t}", "public static function get_logo_top_margin_css() {\n\t\treturn sprintf( '\n\t\t\t@media (min-width: 992px){\n\t\t\t\t.header__logo img {\n\t\t\t\t\tmargin-top: %dpx;\n\t\t\t\t}\n\t\t\t}',\n\t\t\tabsint( get_theme_mod( 'logo_top_margin', 35 ) )\n\t\t);\n\t}", "function PMA_PDF_setXyScale($x, $y)\n {\n $x = ($x - $this->_xMin) / $this->scale + $this->leftMargin;\n $y = ($y - $this->_yMin) / $this->scale + $this->topMargin;\n $this->SetXY($x, $y);\n }", "function _plotHeight()\n {\n return (min($this->height(), $this->width())) * 0.80;\n }", "function setHorizontalMargin($value) {\n $this->fields['margin_right'] = $this->fields['margin_left'] = $value;\n }", "function dokanee_additional_spacing() {\n\t\t// No longer needed\n\t}", "function SetTickLabelMargin($aMargin)\n {\n if (ERR_DEPRECATED)\n JpGraphError::RaiseL(25056);//('SetTickLabelMargin() is deprecated. Use Axis::SetLabelMargin() instead.');\n $this->tick_label_margin = $aMargin;\n }", "function clear() {\n\t\t$this->user_width = 0;\n\t\t$this->user_height = 0;\n\t\t$this->user_x_axis = '';\n\t\t$this->user_y_axis = '';\n\t\t\n\t\treturn parent::clear ();\n\t}", "function set_containing_block($x = null, $y = null, $w = null, $h = null)\n {\n parent::set_containing_block($x, $y, $w, $h);\n //$w = $this->get_containing_block(\"w\");\n if (isset($h)) {\n $this->_bottom_page_margin = $h;\n } // - $this->_frame->get_style()->length_in_pt($this->_frame->get_style()->margin_bottom, $w);\n }", "function Canvas($width = 1, $height = 1) {\n\t\tparent::Image();\n\t\t$this->width = $width;\n\t\t$this->height = $height;\n\t\t$this->padding = new Insets();\n\t}", "function graph()\n {\n // Set font path for True Type Fonts\n $FONT_PATH = ROOT_PATH.\"files/fonts/graph/tahoma.ttf\";\n\n // Create colors\n $black = imagecolorallocate($this->png_image, 0, 0, 0);\n $white = imagecolorallocate($this->png_image, 255, 255, 255);\n\n // Set background to white\n imagefill($this->png_image, 0, 0, $this->bg_color);\n\n // Get values for placement of axis and labels\n $line_spacer = $this->font_size; \n $font_width = $this->font_size; \n\n // Need values to center labels\n $y_label_size = strlen($this->y_label) * $font_width;\n $x_label_size = strlen($this->x_label) * $font_width;\n $x_axis_x = (imagesx($this->png_image) - $x_label_size) / 2;\n $x_axis_y = imagesy($this->png_image) - .25 * $line_spacer;\n $y_axis_x = 1.25 * $line_spacer;\n $y_axis_y = (imagesy($this->png_image) + $y_label_size) / 2;\n\n // Add labels to image\n imagettftext($this->png_image, $this->font_size, 90, $y_axis_x, $y_axis_y, $this->font_color, $FONT_PATH, $this->y_label);\n imagettftext($this->png_image, $this->font_size, 0, $x_axis_x, $x_axis_y, $this->font_color, $FONT_PATH, $this->x_label);\n\n // Create axis lines\n $origin_x = $line_spacer * 4;\n $origin_y = imagesy($this->png_image) - $line_spacer * 3;\n $x_end = imagesx($this->png_image) - $line_spacer;\n $y_end = $line_spacer;\n\n // Create bars and labels\n $graph_width = $x_end - $origin_x;\n $graph_height = $origin_y - $y_end;\n\n // Check for multiple data sets\n if(is_array($this->data[0]))\n {\n $max_value = 0;\n $num_values = 0;\n $data_sets = sizeof($this->data);\n for($i = 0; $i < sizeof($this->data); ++$i)\n {\n for($j = 0; $j < sizeof($this->data[$i]); ++$j)\n {\n $max_value = $this->data[$i][$j] > $max_value ? $this->data[$i][$j] : $max_value;\n ++$num_values;\n }\n }\n }\n else\n {\n $max_value = max($this->data);\n $num_values = sizeof($this->data);\n $data_sets = 1;\n }\n\n $bar_width = round(($graph_width - $this->bar_space - ($this->bar_space * $data_sets)) / ($num_values + .5));\n $left = $origin_x + $this->bar_space - $bar_width;\n\n for($i = 0; $i < sizeof($this->data[0]); ++$i)\n {\n for($j = 0; $j < sizeof($this->data); ++$j)\n {\n if(!is_array($this->data[$j]))\n {\n settype($this->data[$j], 'array');\n }\n\n // Bar setup \n $height = $this->data[$j][$i] / $max_value * ($graph_height - $line_spacer); // Line spacer for cussion\n $top = $origin_y - $height;\n $left += $bar_width; \n $bottom = $origin_y;\n $right = $left + $bar_width;\n\n // Add bars and labels\n imagefilledrectangle($this->png_image, $left, $top, $right, $bottom, is_array($this->bar_color) ? $this->bar_color[$j] : $this->bar_color);\n if(!isset($this->data[$j+1][$i]))\n {\n $left += $this->bar_space;\n }\n }\n }\n\n // Label setup and adding\n $label_top = $origin_y + 1.25 * $line_spacer;\n $label_left = $origin_x + $this->bar_space + $bar_width * $data_sets * .5;\n for($k = 0; $k < sizeof($this->x_tags); ++$k)\n {\n $k_left = $label_left - strlen($this->x_tags[$k]) * 3;\n imagettftext($this->png_image, $this->font_size, 0, $k_left, $label_top, $this->font_color, $FONT_PATH, $this->x_tags[$k]); \n $label_left += $this->bar_space + $bar_width * $data_sets;\n }\n\n // Draw axis last to be on top of bars\n imageline($this->png_image, $origin_x, $origin_y, $origin_x, $y_end, $this->font_color);\n imageline($this->png_image, $origin_x, $origin_y, $x_end, $origin_y, $this->font_color);\n\n // Add ticks \n $tick_spacer = $this->y_interval / $max_value * ($graph_height - $line_spacer);\n for($i = 1; $i * $tick_spacer <= $graph_height; ++$i)\n {\n $tick_y = $origin_y - $tick_spacer * $i;\n imageline($this->png_image, $origin_x - 5, $tick_y, $origin_x, $tick_y, $this->font_color);\n imagettftext($this->png_image, $this->font_size, 90, $origin_x - 8, $tick_y + 6, $this->font_color, $FONT_PATH, $i * $this->y_interval);\n }\n\n // Add the key if needed\n if($this->key_labels !== NULL)\n {\n // Find longest label\n $longest = 0;\n for($i = 0; $i < sizeof($this->key_labels); ++$i)\n {\n $longest = strlen($this->key_labels[$i]) > strlen($this->key_labels[$longest]) ? $i : $longest;\n }\n \n // Set up key outline and dimensions\n $key_right = imagesx($this->png_image) - $line_spacer;\n $key_top = $line_spacer;\n $key_bottom = $key_top + $line_spacer + 2 * $line_spacer * sizeof($this->key_labels);\n $key_left = $key_right - 2 * $line_spacer - strlen($this->key_labels[$longest]) * $font_width;\n $box_left = $key_left + $line_spacer;\n $box_right = $box_left + $line_spacer;\n $text_left = $box_right + $line_spacer;\n\n // Finish alignment and add elements\n for($i = 0; $i < sizeof($this->key_labels); ++$i)\n {\n $box_top = $key_top + $line_spacer + 2 * $line_spacer * $i;\n $box_bottom = $box_top + $line_spacer;\n imagefilledrectangle($this->png_image, $box_left, $box_top, $box_right, $box_bottom, $this->bar_color[$i]);\n imagettftext($this->png_image, $this->font_size, 0, $text_left, $box_bottom, $this->font_color, $FONT_PATH, $this->key_labels[$i]);\n }\n imagerectangle($this->png_image, $key_left, $key_top, $key_right, $key_bottom, $this->font_color);\n }\n\n // Send headers and display image\n header(\"Content-Type: image/png\");\n imagepng($this->png_image);\n\n return TRUE;\n }", "public function SetY_axis($arraydata) {\n \n }", "function setDimensions($orig_width=DEFAULT_SCREEN_WIDTH,$orig_height=DEFAULT_SCREEN_HEIGHT)\r\n\t{\r\n\t\t$screens = Model_PCP_Screens::getScreens();\r\n\t\t$width = $orig_width;\r\n\t\t$height = $orig_height;\r\n\t\tforeach($screens as $screen)\r\n\t\t{\r\n\t\t\tif (($orig_width >= $screen['w'])&&($orig_width >= $screen['h']))\r\n\t\t\t{\t\t\t\t\r\n\t\t\t\t$width = $screen['w'];\r\n\t\t\t\t$height = $screen['h'];\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->scene_width = $width;\r\n\t\t$this->scene_height = $height;\t\r\n\t\t$this->real_scene_width = $width - ($width * (SCENE_IMAGE_REDUCTION_PERCENT * 0.01));\r\n\t\t$this->real_scene_height = $height - ($height * (SCENE_IMAGE_REDUCTION_PERCENT * 0.01));\r\n\t\t$this->screen_size = $width.'x'.$height;\r\n\t\t\r\n\t\t$this->cell_width = intval($this->real_scene_width / $this->grid_x);\r\n\t\t$this->cell_height = intval($this->real_scene_height / $this->grid_y);\r\n\t}", "public function getItemMarginTop() {\n return $this->itemMarginTop;\n }", "public function setHAxis($hAxis) {\n $this->HAxis = $hAxis;\n }", "public function spacerSetting()\n {\n ?>\n <div class=\"isc-main-title\">\n <h3>Spacer Setting</h3>\n </div>\n <div class=\"isc-main-content\">\n <form class=\"isc-form\" action=\"\" method=\"post\">\n <table class=\"form-table\">\n <tbody>\n <tr valign=\"top\">\n <th scope=\"row\">\n <label for=\"isc-input-height\"><?php _e( 'Spacer height in pixels' ); ?></label>\n </th>\n <td>\n <input type=\"text\" id=\"isc-input-height\" name=\"isc_height\" value=\"\" />\n </td>\n </tr>\n </tbody>\n </table>\n <?php \n $this->buttonInsert( 'spacer' );\n ?>\n </form>\n </div>\n <?php\n }", "function SetMargin($lm, $rm, $tm, $bm)\n {\n $this->img->SetMargin($lm, $rm, $tm, $bm);\n }", "function drawFullChart(&$vp, &$viewer) {\n #\n # For simplicity, in this demo, the data arrays are filled with hard coded data. In a real\n # application, you may use a database or other data source to load up the arrays. As this is a\n # small thumbnail chart, complete data may not be needed. For exmaple, if there are a million\n # points, a random sample may already be sufficient for the thumbnail chart.\n #\n $dataX0 = array(10, 15, 6, -12, 14, -8, 13, -3, 16, 12, 10.5, -7, 3, -10, -5, 2, 5);\n $dataY0 = array(130, 150, 80, 110, -110, -105, -130, -15, -170, 125, 125, 60, 25, 150, 150, 15,\n 120);\n $dataX1 = array(6, 7, -4, 3.5, 7, 8, -9, -10, -12, 11, 8, -3, -2, 8, 4, -15, 15);\n $dataY1 = array(65, -40, -40, 45, -70, -80, 80, 10, -100, 105, 60, 50, 20, 170, -25, 50, 75);\n $dataX2 = array(-10, -12, 11, 8, 6, 12, -4, 3.5, 7, 8, -9, 3, -13, 16, -7.5, -10, -15);\n $dataY2 = array(65, -80, -40, 45, -70, -80, 80, 90, -100, 105, 60, -75, -150, -40, 120, -50, -30\n );\n\n # Create an XYChart object 120 x 120 pixels in size\n $c = new XYChart(120, 120);\n\n # Set the plotarea to cover the entire chart and with no grid lines. Set 4 quadrant coloring,\n # where the colors alternate between lighter and deeper grey (d8d8d8/eeeeee).\n $plotAreaObj = $c->setPlotArea(0, 0, $c->getWidth() - 1, $c->getHeight() - 1, -1, -1, -1,\n Transparent);\n $plotAreaObj->set4QBgColor(0xd8d8d8, 0xeeeeee, 0xd8d8d8, 0xeeeeee, 0x000000);\n\n # Set 4 quadrant mode, with both x and y axes symetrical around the origin\n $c->setAxisAtOrigin(XYAxisAtOrigin, XAxisSymmetric + YAxisSymmetric);\n\n # The x and y axis scales reflect the full range of the view port\n $c->xAxis->setLinearScale($viewer->getValueAtViewPort(\"x\", 0), $viewer->getValueAtViewPort(\"x\",\n 1), NoValue);\n $c->yAxis->setLinearScale($viewer->getValueAtViewPort(\"y\", 0), $viewer->getValueAtViewPort(\"y\",\n 1), NoValue);\n\n # Add scatter layer, using 5 pixels red (ff33333) X shape symbols\n $c->addScatterLayer($dataX0, $dataY0, \"Group A\", Cross2Shape(), 5, 0xff3333);\n\n # Add scatter layer, using 5 pixels green (33ff33) circle symbols\n $c->addScatterLayer($dataX1, $dataY1, \"Group B\", CircleShape, 5, 0x33ff33);\n\n # Add scatter layer, using 5 pixels blue (3333ff) triangle symbols\n $c->addScatterLayer($dataX2, $dataY2, \"Group C\", TriangleSymbol, 5, 0x3333ff);\n\n # Output the chart\n $chartQuery = $c->makeSession($vp->getId());\n\n # Set the chart URL and chart metrics to the viewport control\n $vp->setImageUrl(\"getchart.php?\".$chartQuery);\n $vp->setChartMetrics($c->getChartMetrics());\n}", "protected function draw_chart_title(){\n\n\t\tif($this->chart_title) {\n\n\t\t\t/* calculate the size of the title */\n\t\t\t$title_box = imageftbbox($this->title_font_size, 0, $this->title_font, $this->chart_title);\n\t\t\t$x = $title_box[0] + ($this->canvas_width / 2) - ($title_box[4] / 2);\n\t\t\t$y = 2*$this->title_font_size;\n\n\t\t\t/* draw the title */\n\t\t\timagefttext($this->img, $this->title_font_size,0 ,$x ,$y , $this->title_font_color, $this->title_font, $this->chart_title);\n\n\t\t}\n\t}", "public function getTitleOffsetTop()\n\t{\n\t\treturn $this->title_offY;\n\t}", "public function setButtonPadding(string $value)\n {\n $this->styles['button_padding'] = $value;\n }", "public function setTitleOffsetTop($dy)\n\t{\n\t\t$this->title_offY = $dy;\n\t}", "public function testPropertyPadding($value)\n {\n $object = new ConditionalComponentLayout();\n $object->setPadding($value);\n\n $this->assertEquals($value, $object->getPadding());\n }", "public function resizeUpsizeToMoreVerticalAspect()\n {\n $source = new \\Imagick('pattern:gray0');\n $source->scaleImage(100, 50);\n\n $imagick = Image::resize($source, 200, 400);\n\n //making sure source didnt resize\n $this->assertSame(100, $source->getImageWidth());\n $this->assertSame(50, $source->getImageHeight());\n\n $this->assertSame(200, $imagick->getImageWidth());\n $this->assertSame(400, $imagick->getImageHeight());\n\n $whiteBarLeft = $imagick->getImagePixelColor(49, 200)->getHsl();\n $whiteBarRight = $imagick->getImagePixelColor(151, 200)->getHsl();\n\n $imageTop = $imagick->getImagePixelColor(100, 176)->getHsl();\n $imageBottom = $imagick->getImagePixelColor(100, 224)->getHsl();\n $imageLeft = $imagick->getImagePixelColor(51, 200)->getHsl();\n $imageRight = $imagick->getImagePixelColor(149, 200)->getHsl();\n\n $this->assertGreaterThan(0.9, $whiteBarLeft['luminosity']);\n $this->assertGreaterThan(0.9, $whiteBarRight['luminosity']);\n\n $this->assertLessThan(0.1, $imageLeft['luminosity']);\n $this->assertLessThan(0.1, $imageRight['luminosity']);\n $this->assertLessThan(0.1, $imageTop['luminosity']);\n $this->assertLessThan(0.1, $imageBottom['luminosity']);\n }", "public function showCrossTab($a, $y_axis) {\n $x = $a['x'];\n $y = $a['y'];\n $width = $a['width'];\n $height = $a['height'];\n $dataset = $a['dataset'];\n $rowgroup = $a['rowgroup'][0];\n\n $colgroup = $a['colgroup'][0];\n $measuremethod = $a['measuremethod'];\n $measurefield = str_replace(array('$F{', '}'), \"\", $a['measurefield']);\n $ce = $a['crosstabcell'];\n $this->pdf->SetXY($x + $this->arrayPageSetting[\"leftMargin\"], $y + $y_axis);\n\n\n foreach ($ce as $no => $v) {\n // echo $no.$v[\"style\"][\"ceheaderalign\"];\n if ($no == 0) {\n// echo $no.\"<br/>\";\n // echo $no.$v[\"style\"][\"ceheaderalign\"];\n $cellbgcolor = $v[\"style\"][\"ceheaderbgcolor\"];\n $cellvalign = $v[\"style\"][\"ceheadervalign\"];\n $cellalign = $v[\"style\"][\"ceheaderalign\"];\n if ($cellalign == \"\")\n $cellalign = \"Center\";\n $cellisbold = $v[\"style\"][\"ceheaderisbold\"];\n /* array(\"ceheaderalign\"=>$ceheaderalign,\"ceheadervalign\"=>$ceheadervalign,\"ceheaderbgcolor\"=>$ceheaderbgcolor,\n \"ceheaderisbold\"=>$ceheaderisbold,\"width\"=>$width); */\n }\n if ($no == 1) {\n // echo $no.$v[\"style\"][\"ceheaderalign\"];\n $coltotalbgcolor = $v[\"style\"][\"ceheaderbgcolor\"];\n $coltotalvalign = $v[\"style\"][\"ceheadervalign\"];\n $coltotalalign = $v[\"style\"][\"ceheaderalign\"];\n $coltotalisbold = $v[\"style\"][\"ceheaderisbold\"];\n if ($coltotalalign == \"\")\n $coltotalalign = \"Center\";\n /* array(\"ceheaderalign\"=>$ceheaderalign,\"ceheadervalign\"=>$ceheadervalign,\"ceheaderbgcolor\"=>$ceheaderbgcolor,\n \"ceheaderisbold\"=>$ceheaderisbold,\"width\"=>$width); */\n }\n if ($no == 2) {\n $rowtotalbgcolor = $v[\"style\"][\"ceheaderbgcolor\"];\n $rowtotalvalign = $v[\"style\"][\"ceheadervalign\"];\n $rowtotalalign = $v[\"style\"][\"ceheaderalign\"];\n $rowtotalisbold = $v[\"style\"][\"ceheaderisbold\"];\n if ($rowtotalalign == \"\")\n $rowtotalalign = \"Center\";\n // echo $no.$v[\"style\"][\"ceheaderalign\"];\n /* array(\"ceheaderalign\"=>$ceheaderalign,\"ceheadervalign\"=>$ceheadervalign,\"ceheaderbgcolor\"=>$ceheaderbgcolor,\n \"ceheaderisbold\"=>$ceheaderisbold,\"width\"=>$width); */\n }\n if ($no == 3) {\n // echo $no.$v[\"style\"][\"ceheaderalign\"];\n $alltotalbgcolor = $v[\"style\"][\"ceheaderbgcolor\"];\n $alltotalvalign = $v[\"style\"][\"ceheadervalign\"];\n $alltotalalign = $v[\"style\"][\"ceheaderalign\"];\n $alltotalisbold = $v[\"style\"][\"ceheaderisbold\"];\n if ($alltotalalign == \"\")\n $alltotalalign = \"Center\";\n /* array(\"ceheaderalign\"=>$ceheaderalign,\"ceheadervalign\"=>$ceheadervalign,\"ceheaderbgcolor\"=>$ceheaderbgcolor,\n \"ceheaderisbold\"=>$ceheaderisbold,\"width\"=>$width); */\n }\n }\n /* $rowheight=\"\";\n $colwidth=\"\";\n $colheadbackcolor\n $rowheadbackcolor\n $cellbackcolor\n $coltotalbackcolor\n $rowtotalbackcolor */\n\n $rowtitle = $rowgroup['name'];\n $coltitle = $colgroup['name'];\n\n\n /* if($dataset!=\"\"){\n $sql=$this->subdataset[$dataset];\n $param=$data['param'];\n foreach($param as $p)\n foreach($p as $tag =>$value)\n $sql=str_replace('$P{'.$tag.'}',$value, $sql);\n $sql=$this->changeSubDataSetSql($sql);\n\n }\n else */\n\n $sql = $this->sql;\n\n $q = $this->query($sql); //query from db\n $arrdata = array();\n $colarr = array();\n while ($row = $this->fetchArray($q)) {\n $rowname = $row[$rowtitle];\n $colname = $row[$coltitle];\n array_push($colarr, $colname);\n if ($arrdata[$rowname][$colname] == \"\")\n $arrdata[$rowname][$colname] = 0;\n\n if ($measuremethod == 'Count')\n $arrdata[$rowname][$colname]+=1;\n elseif ($measuremethod == 'Sum')\n $arrdata[$rowname][$colname]+=$row[$measurefield];\n\n //$this->pdf->Cell(10,10,print_r($row,true));\n //$this->pdf->Ln();\n }\n $colarr = array_unique($colarr);\n\n $table = '<table border=\"1\" cellspacing=\"0\" cellpadding=\"2\" width=\"' . $width . 'px\"><tr><td style=\"background-color:' . $colgroup['style']['colheaderbgcolor'] . '\"></td>';\n $rowtotal = 0;\n $coltotal = 0;\n $grantotal = 0;\n foreach ($colarr as $cv)\n $table.='<td style=\"background-color:' . $colgroup['style']['colheaderbgcolor'] . ';\n text-align:' . $colgroup['style']['colheaderalign'] . '\">' . $cv . '</td>';\n\n $table.='<td style=\"background-color:' . $rowtotalbgcolor . '\">Total</td></tr>';\n\n\n foreach ($arrdata as $r => $v) {\n //$rowgroup $rowheaderbgcolor\n\n\n $table.='<tr><td style=\"background-color:' . $rowgroup['style']['rowheaderbgcolor'] . ';\n text-align:' . $rowgroup['style']['rowheaderalign'] . ';' .\n '\">' . $r . '</td>';\n foreach ($colarr as $cv) {\n if ($arrdata[$r][$cv] == \"\") {\n $arrdata[$r][$cv] = 0;\n }\n\n\n $table.='<td style=\"text-align:' . $cellalign . ';background-color:' . $cellbgcolor . '\">' . $arrdata[$r][$cv] . '</td>';\n $rowtotal+= $arrdata[$r][$cv];\n\n if ($coltotalarr[$cv] == \"\")\n $coltotalarr[$cv] = 0;\n $coltotalarr[$cv]+= $arrdata[$r][$cv];\n $grantotal+=$arrdata[$r][$cv];\n }\n\n\n\n $table.='<td style=\"background-color:' . $rowtotalbgcolor . '; text-align:' . $rowtotalalign . '\">' . $rowtotal . '</td></tr>';\n $rowtotal = 0;\n }\n\n $table.='<tr><td style=\"background-color:' . $rowtotalbgcolor . '; text-align:' . $rowgroup['style']['rowheaderbgcolor'] . '\">Total</td>';\n foreach ($colarr as $cv)\n $table.='<td style=\"background-color:' . $coltotalbgcolor . ';text-align:' . $coltotalalign . '\">' . $coltotalarr[$cv] . \"</td>\";\n\n\n $table.='<td style=\"text-align:' . $coltotalalign . ';background-color:' . $rowtotalbgcolor . '\">' . $grantotal . '</td></tr></table>';\n $this->pdf->writeHTML($table);\n }", "function &Image_Graph_Plotarea_Radar()\n {\n parent::Image_Graph_Element();\n $this->_padding = 10;\n $this->_axisX = & new Image_Graph_Axis_Radar();\n $this->_axisX->_setParent($this);\n $this->_axisY = & new Image_Graph_Axis(IMAGE_GRAPH_AXIS_Y);\n $this->_axisY->_setParent($this);\n $this->_axisY->_setMinimum(0);\n }", "function setTopFrame($Frame) {\n\n\t\t$this->TopFrame = $Frame;\n\t\t$this->EditorBodyFrame = $Frame . '.resize.right.editor.edbody';\n\t\t$this->EditorBodyForm = $this->EditorBodyFrame . '.document.we_form';\n\t\t$this->EditorHeaderFrame = $Frame . '.resize.right.editor.edheader';\n\n\t}", "function Footer() {\r\n $this->SetY(-19);\r\n }", "protected function __construct()\n {\n $this->setOffsetX(0);\n $this->setOffsetY(0);\n $this->setForegroundColor(0x000000);\n $this->setBackgroundColor(0xffffff);\n $this->setScale(1);\n }", "function setPageMargins($top, $right, $bottom, $left) {\n $this->fields['margin_top'] = $top;\n $this->fields['margin_right'] = $right;\n $this->fields['margin_bottom'] = $bottom;\n $this->fields['margin_left'] = $left;\n }", "function yfi_control_style_admin_head() {\n echo '<style type=\"text/css\">\n .yfi-control-container {\n margin-top: 20px;\n }\n </style>';\n }", "protected function getDefaultTerminalDimensions()\n {\n return new Rectangle(80, 20);\n }", "function wsm_yoasttobottom() {\n\treturn 'low';\n}", "public function unsetHeight();", "function xx_thumb_cols() {\n return 4;\n}", "public function disableCenter();", "function moments_qodef_get_footer_top_border() {\n\n\t\t$footer_top_border = '';\n\n\t\tif (moments_qodef_options()->getOptionValue('footer_top_border_color')) {\n\t\t\tif (moments_qodef_options()->getOptionValue('footer_top_border_width') !== '') {\n\t\t\t\t$footer_border_height = moments_qodef_options()->getOptionValue('footer_top_border_width');\n\t\t\t} else {\n\t\t\t\t$footer_border_height = '1';\n\t\t\t}\n\n\t\t\t$footer_top_border = 'height: '.esc_attr($footer_border_height).'px; background-color: '.esc_attr(moments_qodef_options()->getOptionValue('footer_top_border_color')).';';\n\t\t}\n\n\t\treturn $footer_top_border;\n\t}", "public function getAxisYLabelOffsetY()\n\t{\n\t\treturn $this->axis_ylabel_offY;\n\t}", "function StrokeMargin($aImg)\n {\n return true;\n }", "private function getAxis() {\n\t\t$offset = ceil(self::ZBX_ARROW_SIZE / 2);\n\n\t\tif ($this->type == GRAPH_YAXIS_SIDE_BOTTOM) {\n\t\t\t$x = $this->x + $this->width + self::ZBX_ARROW_OFFSET;\n\t\t\t$y = $this->y;\n\n\t\t\treturn [\n\t\t\t\t// Draw axis line.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->setAttribute('shape-rendering', 'crispEdges')\n\t\t\t\t\t->moveTo($this->x, $y)\n\t\t\t\t\t->lineTo($x, $y),\n\t\t\t\t// Draw arrow.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->moveTo($x + self::ZBX_ARROW_SIZE, $y)\n\t\t\t\t\t->lineTo($x, $y - $offset)\n\t\t\t\t\t->lineTo($x, $y + $offset)\n\t\t\t\t\t->closePath()\n\t\t\t];\n\t\t}\n\t\telse {\n\t\t\t$x = ($this->type == GRAPH_YAXIS_SIDE_RIGHT) ? $this->x : $this->x + $this->width;\n\t\t\t$y = $this->y - self::ZBX_ARROW_OFFSET;\n\n\t\t\treturn [\n\t\t\t\t// Draw axis line.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->setAttribute('shape-rendering', 'crispEdges')\n\t\t\t\t\t->moveTo($x, $y)\n\t\t\t\t\t->lineTo($x, $this->height + $y + self::ZBX_ARROW_OFFSET),\n\t\t\t\t// Draw arrow.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->moveTo($x, $y - self::ZBX_ARROW_SIZE)\n\t\t\t\t\t->lineTo($x - $offset, $y)\n\t\t\t\t\t->lineTo($x + $offset, $y)\n\t\t\t\t\t->closePath()\n\t\t\t];\n\t\t}\n\t}" ]
[ "0.69470054", "0.6407889", "0.59226364", "0.541855", "0.53156817", "0.52524364", "0.5167947", "0.5128964", "0.51248103", "0.5119322", "0.5055121", "0.49918717", "0.49859765", "0.49753094", "0.49343318", "0.49064374", "0.4809912", "0.4806654", "0.47313836", "0.470538", "0.46956274", "0.46662876", "0.4661876", "0.46577877", "0.46138987", "0.46087655", "0.4601739", "0.45440894", "0.4513222", "0.45095313", "0.44914323", "0.4471469", "0.4452786", "0.4451155", "0.44349578", "0.44144034", "0.43998742", "0.43779752", "0.43601045", "0.43478838", "0.43463212", "0.4337829", "0.43360528", "0.43348932", "0.43240446", "0.43182448", "0.431804", "0.43016416", "0.42985025", "0.42910218", "0.42883638", "0.4280846", "0.4276669", "0.42656377", "0.4260989", "0.42494416", "0.42489737", "0.4238114", "0.42352274", "0.4229598", "0.4209596", "0.4197693", "0.4181113", "0.41780773", "0.41682598", "0.41575357", "0.4151895", "0.41508782", "0.41255984", "0.41149673", "0.41142017", "0.4111786", "0.4111569", "0.41062602", "0.41052592", "0.4104066", "0.4099536", "0.40994018", "0.4091563", "0.40798575", "0.4063476", "0.40604913", "0.4059643", "0.40581098", "0.40475777", "0.4043932", "0.40378198", "0.40337765", "0.40317738", "0.40317193", "0.40262392", "0.40259558", "0.40256777", "0.40220386", "0.40183592", "0.4012979", "0.39991456", "0.39961848", "0.39953148", "0.39929593" ]
0.7253467
0
Sets the font size axis labels use
Устанавливает размер шрифта меток оси
public function setAxisFontSize($size) { $this->axis_fontsize = $size; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTitleFontSize($size)\n\t{\n\t\t$this->title_fontsize = $size;\n\t}", "public function getAxisFontSize()\n\t{\n\t\treturn $this->axis_fontsize;\n\t}", "function set_font_size($size) {\n $this->__font_size_calculated = false;\n $this->_props[\"font_size\"] = $size;\n }", "public function setFontSize ($pointsize) {}", "function PMA_PDF_setFontSizeScale($size)\n {\n // Set font size in points\n $size = $size / $this->scale;\n $this->SetFontSize($size);\n }", "function setTextFontSize($iSize){\n\t\t\t$this->excel->getActiveSheet()->getStyle('A:Z')->getFont()->setSize($iSize);\n\t\t\t$this->excel->getActiveSheet()->getDefaultRowDimension()->setRowHeight($iSize+3);\n\n\t\t}", "function SetTextFontSize($fontSize)\n\t\t\t\t{ \n\t\t\t\t\t$this->t_font_size = $fontSize; \n }", "public function updateFontSize($size);", "function set_y_label_style($size, $colour = '') {\n\t\t$this->y_label_style = $this->_set_y_label_style ( $size, $colour );\n\t}", "public function setFontsize($fontsize){\n $this->fontsize=$fontsize;\n }", "public function setFontsize($fontsize){\n $this->fontsize=$fontsize;\n }", "function set_x_tick_size($size) {\n\t\tif ($size > 0)\n\t\t\t$this->x_tick_size = $size;\n\t}", "public function setDefaultFontSize($pValue) {\n\t\t$pValue = $pValue * 2;\n\t\t$this->_defaultFontSize = $pValue;\n\t}", "public function setFontSize($size)\n {\n $this->fontSize = $size;\n }", "public function set_fontsize ($fontsize) {\n $this->fontsize = $fontsize;\n }", "function set_font_size($size)\n {\n $this->font_size = $size;\n return TRUE;\n }", "protected function get_size_label()\n {\n $x_name = get_option(self::X_NAME_KEY, self::DEFAULT_X_NAME);\n $y_name = get_option(self::Y_NAME_KEY, self::DEFAULT_Y_NAME);\n $label = $x_name;\n if (get_option(self::USE_TWO_FIELDS_KEY, self::DEFAULT_USE_TWO_FIELDS) == 1) {\n $label .= \" x {$y_name}\";\n }\n return $label;\n }", "public function setDefaultFontSize($pValue)\n {\n $this->_defaultFontSize = $pValue;\n }", "function SetNumberFontSize($fontSize)\n\t\t\t\t{ \n\t\t\t\t\t$this->n_font_size = $fontSize; \n }", "public function setFontSize($size = null) {\n $this->fontSize = $size;\n }", "protected function setSize(): void\n\t{\n\t\t$size = $this->getField('SIZE');\n\n\t\t$assets = Assets\\Manager::getInstance();\n\t\t$assets->addString(\n\t\t\t'<style>\n\t\t\thtml {font-size: ' . self::BASE_HTML_SIZE . ';}\n\t\t\tbody {font-size: ' . $size . 'rem;}\n\t\t\t.g-font-size-default {font-size: ' . $size . 'rem;}\n\t\t</style>'\n\t\t);\n\t}", "function SetFontSize($size){\n \n $this->Ticket .= chr(29) . chr(33) . chr($size);\n \n /*PRINT #1, CHR$(&H1D);\"!\";CHR$(17);\n AAAAA ← Select quadruple (double-height x double-width)\n PRINT #1, \"AAAAA\"; CHR$(&HA); BBBBB\n PRINT #1, CHR$(&H1D);\"!\";CHR$(0);\n PRINT #1, \"BBBBB\"; CHR$(&HA);*/\n //$this->Ticket .= chr(29) . chr(33) . $size;\n }", "function _set_y_label_style($size, $colour) {\n\t\t$tmp = $size;\n\t\t\n\t\tif (strlen ( $colour ) > 0)\n\t\t\t$tmp .= ',' . $colour;\n\t\treturn $tmp;\n\t}", "public function setFont ($font_name) {}", "public function getFontSize () {}", "public function setFontResolution($x, $y) { }", "public function getTitleFontSize()\n\t{\n\t\treturn $this->title_fontsize;\n\t}", "public function setDefaultFont($font_name, $font_size) {\n\t}", "function setSize($iconSize = 8)\n\t{\n\t\t$this->sizeX = $iconSize * 4.5;\n\t\t$this->sizeY = $iconSize;\n\t\t\n\t\t$this->arrowNext->setSize($iconSize, $iconSize);\n\t\t$this->arrowPrev->setSize($iconSize, $iconSize);\n\t\t$this->arrowFastNext->setSize($iconSize, $iconSize);\n\t\t$this->arrowFastPrev->setSize($iconSize, $iconSize);\n\t\t$this->arrowLast->setSize($iconSize, $iconSize);\n\t\t$this->arrowFirst->setSize($iconSize, $iconSize);\n\t\t$this->text = new Label(2*$iconSize - 2);\n\t\t$this->textBg = new Bgs1(2*$iconSize, $iconSize-2);\n\t}", "public function SetFont()\n\t{\n\t\t$numargs = func_num_args();\n\t\tif ($numargs == 2 || $numargs == 3) {\n\t\t\t$aFF = func_get_arg(0);\n\t\t\t$aFS = func_get_arg(1);\n\t\t\tif ($numargs == 3) {\n\t\t\t\t$aFSize = func_get_arg(2);\n\t\t\t} else {\n\t\t\t\t$aFSize = 10;\n\t\t\t}\n\n\t\t\t$aR2 = $this->iSize[0] - 1;\n\t\t\t$aR1 = 0;\n\t\t\t$aC2 = $this->iSize[1] - 1;\n\t\t\t$aC1 = 0;\n\t\t} elseif ($numargs == 6 || $numargs == 7) {\n\t\t\t$aR1 = func_get_arg(0);\n\t\t\t$aC1 = func_get_arg(1);\n\t\t\t$aR2 = func_get_arg(2);\n\t\t\t$aC2 = func_get_arg(3);\n\t\t\t$aFF = func_get_arg(4);\n\t\t\t$aFS = func_get_arg(5);\n\t\t\tif ($numargs == 7) {\n\t\t\t\t$aFSize = func_get_arg(6);\n\t\t\t} else {\n\t\t\t\t$aFSize = 10;\n\t\t\t}\n\t\t} else {\n\t\t\tUtil\\JpGraphError::RaiseL(27003);\n\t\t\t//('Wrong number of arguments to GTextTable::SetColor()');\n\t\t}\n\t\t$this->_chkR($aR1);\n\t\t$this->_chkC($aC1);\n\t\t$this->_chkR($aR2);\n\t\t$this->_chkC($aC2);\n\t\tfor ($i = $aR1; $i <= $aR2; ++$i) {\n\t\t\tfor ($j = $aC1; $j <= $aC2; ++$j) {\n\t\t\t\t$this->iCells[$i][$j]->SetFont($aFF, $aFS, $aFSize);\n\t\t\t}\n\t\t}\n\t}", "public function getFontsize(){\n return $this->fontsize;\n }", "public function getFontsize(){\n return $this->fontsize;\n }", "public function size()\n {\n return (float) $this->data->textElement->font['size'] ? (float) $this->data->textElement->font['size'] : 10;\n }", "public function SetFont($arraydata) {\n \n }", "public function setFont( $name ){\n\t\t$this->font_name = $name;\n\t}", "public function useFont($name, $size, $color = null);", "static public function getLabelDefaultSize()\n\t{\n\t\treturn self::$lsize_default;\n\t}", "function tinymce_customize_text_sizes($initArray) {\n $initArray['fontsize_formats'] = \"8px 9px 10px 11px 12px 13px 14px 15px 16px 17px 18px 19px 20px 21px 22px 23px 24px 25px 26px 27px 28px 29px 30px 32px 48px\";\n return $initArray;\n}", "public function setAxisLabelLineLength($length)\n\t{\n\t\t$this->axis_label_linelength = $length;\n\t}", "public function setFont ($font) {}", "function set_y_right_label_style($size, $colour = '') {\n\t\t$this->y_label_style_right = $this->_set_y_label_style ( $size, $colour );\n\t}", "public function large()\n\t{\n\t\t$this->css(array(\n\t\t\t'font-size' \t=> '18px',\n\t\t\t'font-weight'\t=> 'bold',\n\t\t));\n\t}", "function set_x_label_style($size, $colour = '', $orientation = 0, $step = -1, $grid_colour = '') {\n\t\t$this->x_label_style = $size;\n\t\t\n\t\tif (strlen ( $colour ) > 0)\n\t\t\t$this->x_label_style .= ',' . $colour;\n\t\t\n\t\tif ($orientation > - 1)\n\t\t\t$this->x_label_style .= ',' . $orientation;\n\t\t\n\t\tif ($step > 0)\n\t\t\t$this->x_label_style .= ',' . $step;\n\t\t\n\t\tif (strlen ( $grid_colour ) > 0)\n\t\t\t$this->x_label_style .= ',' . $grid_colour;\n\t}", "protected function set_font()\n\t{\n\t\t$this->font = $this->config['font_directory'].$this->config['font_list'][array_rand($this->config['font_list'], 1)];\n\t\t$this->font_height = $this->config['font_height'];\n\t\t$this->font_width = (int) ceil($this->calculate_size($this->config['font_png_width']));\n\t\treturn true;\n\t}", "function setControlSize($size) {\n if(in_array($size,array('large','small')))\n $this->control_size = $size;\n }", "abstract protected function setFont($fontFamily, $fontSize, $fontColor);", "public function getAxisLabelLineLength()\n\t{\n\t\treturn $this->axis_label_linelength;\n\t}", "public function set_response_font_scale ($response_font_scale) {\n $this->response_font_scale = $response_font_scale;\n }", "public function get_fontsize() {\n return $this->fontsize;\n }", "public function setFontSize($size)\n {\n $this->set('font.size', $size);\n\n return $this;\n }", "function get_font_size() {\n\n if ( $this->__font_size_calculated )\n return $this->_props[\"font_size\"];\n \n if ( !isset($this->_props[\"font_size\"]) )\n $fs = self::$_defaults[\"font_size\"];\n else \n $fs = $this->_props[\"font_size\"];\n \n if ( !isset($this->_parent_font_size) )\n $this->_parent_font_size = self::$default_font_size;\n \n switch ($fs) {\n \n case \"xx-small\":\n $fs = 3/5 * $this->_parent_font_size;\n break;\n\n case \"x-small\":\n $fs = 3/4 * $this->_parent_font_size;\n break;\n\n case \"smaller\":\n case \"small\":\n $fs = 8/9 * $this->_parent_font_size;\n break;\n\n case \"medium\":\n $fs = $this->_parent_font_size;\n break;\n\n case \"larger\":\n case \"large\":\n $fs = 6/5 * $this->_parent_font_size;\n break;\n\n case \"x-large\":\n $fs = 3/2 * $this->_parent_font_size;\n break;\n\n case \"xx-large\":\n $fs = 2/1 * $this->_parent_font_size;\n break;\n\n default:\n break;\n }\n\n // Ensure relative sizes resolve to something\n if ( ($i = mb_strpos($fs, \"em\")) !== false ) \n $fs = mb_substr($fs, 0, $i) * $this->_parent_font_size;\n\n else if ( ($i = mb_strpos($fs, \"ex\")) !== false ) \n $fs = mb_substr($fs, 0, $i) * $this->_parent_font_size;\n\n else\n $fs = $this->length_in_pt($fs);\n\n $this->_props[\"font_size\"] = $fs; \n $this->__font_size_calculated = true;\n return $this->_props[\"font_size\"];\n\n }", "function random_font_size() {\n\t\n\t\t$this -> size = mt_rand($this -> font_size_min, $this -> font_size_max );\n\t}", "function set_y_legend($text, $size = -1, $colour = '') {\n\t\t$this->y_legend = $this->_set_y_legend ( $text, $size, $colour );\n\t}", "function SetTextFont($font)\n\t\t\t\t{ \n\t\t\t\t\t$this->t_font = $font; \n }", "function set_x_legend($text, $size = -1, $colour = '') {\n\t\t$this->x_legend = $this->esc ( $text );\n\t\tif ($size > - 1)\n\t\t\t$this->x_legend_size = $size;\n\t\t\n\t\tif (strlen ( $colour ) > 0)\n\t\t\t$this->x_legend_colour = $colour;\n\t}", "public function getFontSize()\n {\n return $this->font_size;\n }", "function SetTickLabels($aLabelArray,$aLabelColorArray=null) {\n $this->ticks_label = $aLabelArray;\n $this->ticks_label_colors = $aLabelColorArray;\n }", "public function getFontSize()\n {\n return $this->get('font.size');\n }", "function SetNumberFont($font)\n\t\t\t\t{ \n\t\t\t\t\t$this->n_font = $font; \n }", "public function setFontStretch ($fontStretch) {}", "public function get_size() {\r\n if ($this->sizefixed == false) {\r\n $this->recompute_size();\r\n }\r\n return $this->labelsize;\r\n }", "public function get_response_font_scale() {\n return $this->response_font_scale;\n }", "public function setFontWeight ($font_weight) {}", "public function fontSize($value) {\n return $this->setProperty('fontSize', $value);\n }", "public function fontSize($value) {\n return $this->setProperty('fontSize', $value);\n }", "public function fontSize($value) {\n return $this->setProperty('fontSize', $value);\n }", "function SetTickLabelMargin($aMargin)\n {\n if (ERR_DEPRECATED)\n JpGraphError::RaiseL(25056);//('SetTickLabelMargin() is deprecated. Use Axis::SetLabelMargin() instead.');\n $this->tick_label_margin = $aMargin;\n }", "function width()\n {\n $this->_font->width($this->_text);\n }", "public function setSizeText(){\n\t\t$this->sizeText = Helper::fileSize($this->size);\n\t\treturn $this;\n\t}", "private function\n\t\tset_frame_height_and_width()\n\t{\n\t\t$this->set_no_of_options_and_no_of_characters_with_options();\n\n\t\t$this->frame_width = \n\t\t\t$this->label_width \n\t\t\t+ ($this->column_width * ( $this->get_no_of_characters() + 1)) \n\t\t\t+ ($this->get_frame_padding() * 2);\n\n\t\t$this->frame_height = \n\t\t\t(\n\t\t\t\t($this->label_height * 0.8) \n\t\t\t\t*\n\t\t\t\t($this->no_of_options + $this->no_of_characters_with_options + 1)\n\t\t\t);\n\t}", "function resurrect_customize_logo_text_size_choices() {\n\n\t$choices = \tarray(\n\t\t'extra-small'\t=> _x( 'Extra Small', 'customizer', 'resurrect' ),\n\t\t'small'\t\t\t=> _x( 'Small', 'customizer', 'resurrect' ),\n\t\t'medium'\t\t=> _x( 'Medium', 'customizer', 'resurrect' ),\n\t\t'large'\t\t\t=> _x( 'Large', 'customizer', 'resurrect' ),\n\t\t'extra-large'\t=> _x( 'Extra Large', 'customizer', 'resurrect' ),\n\t);\n\n\treturn apply_filters( 'resurrect_customize_logo_text_size_choices', $choices );\n\n}", "function setFont($font) {\n $this->font = $font;\n }", "public function setFontFamily ($font_family) {}", "public function setSizeAxis(SizeAxis $axis) {\n $this->setOption(\"sizeAxis\", $axis);\n }", "public function setTextSize($widthMultiplier, $heightMultiplier)\n {\n self::validateInteger($widthMultiplier, 1, 8, __FUNCTION__);\n self::validateInteger($heightMultiplier, 1, 8, __FUNCTION__);\n $c = pow(2, 4) * ($widthMultiplier - 1) + ($heightMultiplier - 1);\n return self::GS . \"!\" . chr($c);\n }", "public function getFontResolution() { }", "function SetTickLabels($aLabelArray, $aLabelColorArray = null)\n {\n $this->ticks_label = $aLabelArray;\n $this->ticks_label_colors = $aLabelColorArray;\n }", "public function setDefaultFontName($pValue)\n {\n $this->_defaultFontName = $pValue;\n }", "public function setDefaultFontName($pValue) {\n\t\t$this->_defaultFontName = $pValue;\n\t}", "public function setTextAlign($s){\n\t\t\t$valid = array(\"TOP LEFT\",\"TOP CENTER\",\"TOP RIGHT\",\"CENTER LEFT\",\"CENTER CENTER\",\"CENTER RIGHT\",\"BOTTOM LEFT\",\"BOTTOM CENTER\",\"BOTTOM RIGHT\");\n\t\t\tif(in_array($s,$valid)){\n\t\t\t\t$this->fontAlign = $s;\n\t\t\t}\n\t\t}", "public function getDefaultFont() {\n\t}", "public function setFont($path)\n {\n $font = new Font($path);\n $this->font = $font->utilise();\n }", "public function setHeaderFontSize($size = 12)\n {\n $this->arguments['header-font-size'] = intval($size);\n\n return $this;\n }", "public function set_labels (numberlineplot_labels $labels) {\n $this->labels = $labels;\n }", "public function getDefaultFontSize()\n {\n return $this->_defaultFontSize;\n }", "public function getFontSize()\n {\n return $this->helper->getWebsiteConfig(\n Config::XML_PATH_CONNECTOR_DYNAMIC_COUPON_FONT_SIZE\n );\n }", "function codesigner_font_settings( $wp_customize ) {\n\n\t$wp_customize->add_section( 'fonts_settings' , array(\n\t\t'panel' \t\t=> __( 'codesigner_defaults_panel' ),\n\t\t'title' \t\t=> __( 'Textos', 'codesigner' ),\n\t\t'priority' \t\t=> 20,\n\t\t'description' \t=> '<strong>DEFINIÇÕES DO TEXTO GERAL DO SITE</strong> <br><br>Este tema utiliza <strong>Google Fonts</strong> como base de fontes. Para encontrar suas fontes, visite o <a href=\"https://fonts.google.com/\" target=\"_blank\">site oficial</a> e faça uma busca.',\n\t) );\n\n\n\n\t$wp_customize->add_setting( 'font_size', array('default' => '15'));\n\t$wp_customize->add_setting( 'font_color', array('default' => '#333'));\n\t$wp_customize->add_setting( 'blockquote_size', array('default' => '20'));\n\t$wp_customize->add_setting( 'blockquote_color', array('default' => '#333'));\n\t$wp_customize->add_setting( 'title_color', array('default' => '#333'));\n\t$wp_customize->add_setting( 'h1_size', array('default' => '24'));\n\t$wp_customize->add_setting( 'h2_size', array('default' => '22'));\n\t$wp_customize->add_setting( 'h3_size', array('default' => '20'));\n\t$wp_customize->add_setting( 'h4_size', array('default' => '18'));\n\t$wp_customize->add_setting( 'h5_size', array('default' => '16'));\n\n\n\n\t$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'font_size', array(\n\t\t'label'\t\t\t=> 'TAMANHO DOS PARÁGRAFOS',\n\t\t'section' \t\t=> 'fonts_settings',\n\t\t'settings'\t\t=> 'font_size',\n\t\t'type' \t=> 'number',\n\t) ) );\n\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'font_color', array(\n\t\t'label'\t\t\t=> 'COR DOS PARÁGRAFOS',\n\t\t'section' \t\t=> 'fonts_settings',\n\t\t'settings' \t\t=> 'font_color',\n\t) ) );\n\n\t$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'blockquote_size', array(\n\t\t'label'\t\t\t=> 'TAMANHO DAS CITAÇÕES',\n\t\t'section' \t\t=> 'fonts_settings',\n\t\t'settings'\t\t=> 'blockquote_size',\n\t\t'type' \t=> 'number',\n\t) ) );\n\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'blockquote_color', array(\n\t\t'label'\t\t\t=> 'COR DAS CITAÇÕES',\n\t\t'section' \t\t=> 'fonts_settings',\n\t\t'settings' \t\t=> 'blockquote_color',\n\t) ) );\n\n\t$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'title_color', array(\n\t\t'label'\t\t\t=> 'COR DOS TÍTULOS',\n\t\t'section' \t\t=> 'fonts_settings',\n\t\t'settings' \t\t=> 'title_color',\n\t) ) );\n\t$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'h1_size', array(\n\t\t'label'\t\t\t=> 'TAMANHO DOS TÍTULOS H1',\n\t\t'section' \t\t=> 'fonts_settings',\n\t\t'settings'\t\t=> 'h1_size',\n\t\t'type' \t=> 'number',\n\t) ) );\n\t$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'h2_size', array(\n\t\t'label'\t\t\t=> 'TAMANHO DOS TÍTULOS H2',\n\t\t'section' \t\t=> 'fonts_settings',\n\t\t'settings'\t\t=> 'h2_size',\n\t\t'type' \t=> 'number',\n\t) ) );\n\t$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'h3_size', array(\n\t\t'label'\t\t\t=> 'TAMANHO DOS TÍTULOS H3',\n\t\t'section' \t\t=> 'fonts_settings',\n\t\t'settings'\t\t=> 'h3_size',\n\t\t'type' \t=> 'number',\n\t) ) );\n\t$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'h4_size', array(\n\t\t'label'\t\t\t=> 'TAMANHO DOS TÍTULOS H4',\n\t\t'section' \t\t=> 'fonts_settings',\n\t\t'settings'\t\t=> 'h4_size',\n\t\t'type' \t=> 'number',\n\t) ) );\n\t$wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'h5_size', array(\n\t\t'label'\t\t\t=> 'TAMANHO DOS TÍTULOS H5',\n\t\t'section' \t\t=> 'fonts_settings',\n\t\t'settings'\t\t=> 'h5_size',\n\t\t'type' \t=> 'number',\n\t) ) );\n\n\n}", "public function getFontSize() {\n return $this->fontSize;\n }", "function mai_get_image_size_labels() {\n\treturn array(\n\t\t'banner' => __( 'Banner', 'mai-theme-engine' ),\n\t\t'section' => __( 'Section', 'mai-theme-engine' ),\n\t\t'full-width' => __( 'Full Width', 'mai-theme-engine' ),\n\t\t'featured' => __( 'Featured', 'mai-theme-engine' ),\n\t\t'one-half' => __( 'One Half', 'mai-theme-engine' ),\n\t\t'one-third' => __( 'One Third', 'mai-theme-engine' ),\n\t\t'one-fourth' => __( 'One Fourth', 'mai-theme-engine' ),\n\t\t'tiny' => __( 'Tiny', 'mai-theme-engine' ),\n\t);\n}", "public function setLabelPos($pos) {\r\n\t\t$this->labelPos = $pos;\r\n\t\t$this->positionLabel();\r\n\t}", "function yLabelFormat( $label ){\n return number_format( $label / 100000 ).\"k\"; \n }", "function ideaSetTextAreaSize($options)\n{\n if (isset($options['size'])) {\n\n $segments = explode('x', $options['size']);\n return array_merge($options, ['cols' => $segments[0], 'rows' => $segments[1]]);\n }\n // If the \"size\" attribute was not specified, we will just look for the regular\n // columns and rows attributes, using sane defaults if these do not exist on\n // the attributes array. We'll then return this entire options array back.\n $cols = array_get($options, 'cols', 50);\n $rows = array_get($options, 'rows', 10);\n return array_merge($options, compact('cols', 'rows'));\n}", "public function setTextFont($font){\n\t\t\t$this->font = $font;\n\t\t}", "function StrokeLabels($aPos, $aMinor = false, $aAbsLabel = false)\n {\n\n $this->img->SetColor($this->label_color);\n $this->img->SetFont($this->font_family, $this->font_style, $this->font_size);\n $yoff = $this->img->GetFontHeight() / 2;\n\n // Only draw labels at major tick marks\n $nbr = count($this->scale->ticks->maj_ticks_label);\n\n // We have the option to not-display the very first mark\n // (Usefull when the first label might interfere with another\n // axis.)\n $i = $this->show_first_label ? 0 : 1;\n if (!$this->show_last_label) --$nbr;\n // Now run through all labels making sure we don't overshoot the end\n // of the scale.\n $ncolor = 0;\n if (isset($this->ticks_label_colors))\n $ncolor = count($this->ticks_label_colors);\n while ($i < $nbr) {\n // $tpos holds the absolute text position for the label\n $tpos = $this->scale->ticks->maj_ticklabels_pos[$i];\n\n // Note. the $limit is only used for the x axis since we\n // might otherwise overshoot if the scale has been centered\n // This is due to us \"loosing\" the last tick mark if we center.\n if ($this->scale->type == \"x\" && $tpos > $this->img->width - $this->img->right_margin + 1) {\n return;\n }\n // we only draw every $label_step label\n if (($i % $this->label_step) == 0) {\n\n // Set specific label color if specified\n if ($ncolor > 0)\n $this->img->SetColor($this->ticks_label_colors[$i % $ncolor]);\n\n // If the label has been specified use that and in other case\n // just label the mark with the actual scale value\n $m = $this->scale->ticks->GetMajor();\n\n // ticks_label has an entry for each data point and is the array\n // that holds the labels set by the user. If the user hasn't\n // specified any values we use whats in the automatically asigned\n // labels in the maj_ticks_label\n if (isset($this->ticks_label[$i * $m]))\n $label = $this->ticks_label[$i * $m];\n else {\n if ($aAbsLabel)\n $label = abs($this->scale->ticks->maj_ticks_label[$i]);\n else\n $label = $this->scale->ticks->maj_ticks_label[$i];\n if ($this->scale->textscale && $this->scale->ticks->label_formfunc == '') {\n ++$label;\n }\n }\n\n if ($this->scale->type == \"x\") {\n if ($this->labelPos == SIDE_DOWN) {\n if ($this->label_angle == 0 || $this->label_angle == 90) {\n if ($this->label_halign == '' && $this->label_valign == '')\n $this->img->SetTextAlign('center', 'top');\n else\n $this->img->SetTextAlign($this->label_halign, $this->label_valign);\n\n } else {\n if ($this->label_halign == '' && $this->label_valign == '')\n $this->img->SetTextAlign(\"right\", \"top\");\n else\n $this->img->SetTextAlign($this->label_halign, $this->label_valign);\n }\n $this->img->StrokeText($tpos, $aPos + $this->tick_label_margin + 1, $label,\n $this->label_angle, $this->label_para_align);\n } else {\n if ($this->label_angle == 0 || $this->label_angle == 90) {\n if ($this->label_halign == '' && $this->label_valign == '')\n $this->img->SetTextAlign(\"center\", \"bottom\");\n else\n $this->img->SetTextAlign($this->label_halign, $this->label_valign);\n } else {\n if ($this->label_halign == '' && $this->label_valign == '')\n $this->img->SetTextAlign(\"right\", \"bottom\");\n else\n $this->img->SetTextAlign($this->label_halign, $this->label_valign);\n }\n $this->img->StrokeText($tpos, $aPos - $this->tick_label_margin - 1, $label,\n $this->label_angle, $this->label_para_align);\n }\n } else {\n // scale->type == \"y\"\n //if( $this->label_angle!=0 )\n //JpGraphError::Raise(\" Labels at an angle are not supported on Y-axis\");\n if ($this->labelPos == SIDE_LEFT) { // To the left of y-axis\n if ($this->label_halign == '' && $this->label_valign == '')\n $this->img->SetTextAlign(\"right\", \"center\");\n else\n $this->img->SetTextAlign($this->label_halign, $this->label_valign);\n $this->img->StrokeText($aPos - $this->tick_label_margin, $tpos, $label, $this->label_angle, $this->label_para_align);\n } else { // To the right of the y-axis\n if ($this->label_halign == '' && $this->label_valign == '')\n $this->img->SetTextAlign(\"left\", \"center\");\n else\n $this->img->SetTextAlign($this->label_halign, $this->label_valign);\n $this->img->StrokeText($aPos + $this->tick_label_margin, $tpos, $label, $this->label_angle, $this->label_para_align);\n }\n }\n }\n ++$i;\n }\n }", "function fl_query_font_render_size( $font, $size, $color, $text ) {\n $d=new ImagickDraw();\n $d->setFont($font);\n $d->setFontSize(intval($size));\n $d->setGravity(Imagick::GRAVITY_CENTER);\n $d->setFillColor($color);\n $c=new Imagick();\n $m=$c->queryFontMetrics($d,$text);\n $c->clear();\n $c->destroy();\n $d->clear();\n $d->destroy();\n $dim=array( 'w'=>$m['textWidth'], 'h'=>$m['textHeight'] );\n return $dim;\n}", "function getLegendSize($Format=\"\")\n {\n $FontName\t\t= isset($Format[\"FontName\"]) ? $Format[\"FontName\"] : $this->FontName;\n $FontSize\t\t= isset($Format[\"FontSize\"]) ? $Format[\"FontSize\"] : $this->FontSize;\n $BoxSize\t\t= isset($Format[\"BoxSize\"]) ? $Format[\"BoxSize\"] : 5;\n $Margin\t\t= isset($Format[\"Margin\"]) ? $Format[\"Margin\"] : 5;\n $Style\t\t= isset($Format[\"Style\"]) ? $Format[\"Style\"] : LEGEND_ROUND;\n $Mode\t\t= isset($Format[\"Mode\"]) ? $Format[\"Mode\"] : LEGEND_VERTICAL;\n $BoxWidth\t\t= isset($Format[\"BoxWidth\"]) ? $Format[\"BoxWidth\"] : 5;\n $BoxHeight\t\t= isset($Format[\"BoxHeight\"]) ? $Format[\"BoxHeight\"] : 5;\n $IconAreaWidth\t= isset($Format[\"IconAreaWidth\"]) ? $Format[\"IconAreaWidth\"] : $BoxWidth;\n $IconAreaHeight\t= isset($Format[\"IconAreaHeight\"]) ? $Format[\"IconAreaHeight\"] : $BoxHeight;\n $XSpacing\t\t= isset($Format[\"XSpacing\"]) ? $Format[\"XSpacing\"] : 5;\n\n $Data = $this->DataSet->getData();\n\n foreach($Data[\"Series\"] as $SerieName => $Serie)\n {\n if ( $Serie[\"isDrawable\"] == TRUE && $SerieName != $Data[\"Abscissa\"] && isset($Serie[\"Picture\"]))\n {\n list($PicWidth,$PicHeight) = $this->getPicInfo($Serie[\"Picture\"]);\n if ( $IconAreaWidth < $PicWidth ) { $IconAreaWidth = $PicWidth; }\n if ( $IconAreaHeight < $PicHeight ) { $IconAreaHeight = $PicHeight; }\n }\n }\n\n $YStep = max($this->FontSize,$IconAreaHeight) + 5;\n $XStep = $IconAreaWidth + 5;\n $XStep = $XSpacing;\n\n $X=100; $Y=100;\n\n $Boundaries = \"\"; $Boundaries[\"L\"] = $X; $Boundaries[\"T\"] = $Y; $Boundaries[\"R\"] = 0; $Boundaries[\"B\"] = 0; $vY = $Y; $vX = $X;\n foreach($Data[\"Series\"] as $SerieName => $Serie)\n {\n if ( $Serie[\"isDrawable\"] == TRUE && $SerieName != $Data[\"Abscissa\"] )\n {\n if ( $Mode == LEGEND_VERTICAL )\n {\n $BoxArray = $this->getTextBox($vX+$IconAreaWidth+4,$vY+$IconAreaHeight/2,$FontName,$FontSize,0,$Serie[\"Description\"]);\n\n if ( $Boundaries[\"T\"] > $BoxArray[2][\"Y\"]+$IconAreaHeight/2 ) { $Boundaries[\"T\"] = $BoxArray[2][\"Y\"]+$IconAreaHeight/2; }\n if ( $Boundaries[\"R\"] < $BoxArray[1][\"X\"]+2 ) { $Boundaries[\"R\"] = $BoxArray[1][\"X\"]+2; }\n if ( $Boundaries[\"B\"] < $BoxArray[1][\"Y\"]+2+$IconAreaHeight/2 ) { $Boundaries[\"B\"] = $BoxArray[1][\"Y\"]+2+$IconAreaHeight/2; }\n\n $Lines = preg_split(\"/\\n/\",$Serie[\"Description\"]);\n $vY = $vY + max($this->FontSize*count($Lines),$IconAreaHeight) + 5;\n }\n elseif ( $Mode == LEGEND_HORIZONTAL )\n {\n $Lines = preg_split(\"/\\n/\",$Serie[\"Description\"]);\n $Width = \"\";\n foreach($Lines as $Key => $Value)\n {\n $BoxArray = $this->getTextBox($vX+$IconAreaWidth+6,$Y+$IconAreaHeight/2+(($this->FontSize+3)*$Key),$FontName,$FontSize,0,$Value);\n\n if ( $Boundaries[\"T\"] > $BoxArray[2][\"Y\"]+$IconAreaHeight/2 ) { $Boundaries[\"T\"] = $BoxArray[2][\"Y\"]+$IconAreaHeight/2; }\n if ( $Boundaries[\"R\"] < $BoxArray[1][\"X\"]+2 ) { $Boundaries[\"R\"] = $BoxArray[1][\"X\"]+2; }\n if ( $Boundaries[\"B\"] < $BoxArray[1][\"Y\"]+2+$IconAreaHeight/2 ) { $Boundaries[\"B\"] = $BoxArray[1][\"Y\"]+2+$IconAreaHeight/2; }\n\n $Width[] = $BoxArray[1][\"X\"];\n }\n\n $vX=max($Width)+$XStep;\n }\n }\n }\n $vY=$vY-$YStep; $vX=$vX-$XStep;\n\n $TopOffset = $Y - $Boundaries[\"T\"];\n if ( $Boundaries[\"B\"]-($vY+$IconAreaHeight) < $TopOffset ) { $Boundaries[\"B\"] = $vY+$IconAreaHeight+$TopOffset; }\n\n $Width = ($Boundaries[\"R\"]+$Margin) - ($Boundaries[\"L\"]-$Margin);\n $Height = ($Boundaries[\"B\"]+$Margin) - ($Boundaries[\"T\"]-$Margin);\n\n return(array(\"Width\"=>$Width,\"Height\"=>$Height));\n }", "public function setFont($val)\n {\n $this->_propDict[\"font\"] = $val;\n return $this;\n }", "function SetTextTickInterval($aStep,$aStart=0) {\n $this->scale->ticks->SetTextLabelStart($aStart);\n $this->tick_step=$aStep;\n }", "public function getDefaultFontSize() {\n\t\treturn $this->_defaultFontSize;\n\t}", "protected function onResize($oldX, $oldY) {\n $this->label->setPosX(($this->sizeX - 2) / 2);\n $this->label->setPosZ($this->posZ);\n $this->setScale(0.7);\n }" ]
[ "0.6971018", "0.6705004", "0.6623687", "0.65656674", "0.6514488", "0.63529646", "0.63476294", "0.63325953", "0.63025135", "0.6276709", "0.6276709", "0.6261442", "0.6184777", "0.61407316", "0.6134875", "0.6131948", "0.61094177", "0.61021715", "0.60026634", "0.5995596", "0.5941653", "0.591157", "0.584781", "0.5829027", "0.582471", "0.5822985", "0.5817541", "0.58110195", "0.57678694", "0.57287276", "0.5728588", "0.5728588", "0.5672837", "0.5666837", "0.5652596", "0.56007123", "0.5581883", "0.5578831", "0.5538305", "0.5498353", "0.5470028", "0.5419083", "0.54077226", "0.5382566", "0.53567153", "0.53518", "0.5345734", "0.5341527", "0.5338982", "0.53292984", "0.5318812", "0.5300782", "0.52969176", "0.52733666", "0.5260111", "0.5250868", "0.52463937", "0.5243202", "0.52310044", "0.5229961", "0.52075934", "0.5197448", "0.51897466", "0.518131", "0.518131", "0.518131", "0.5178703", "0.51773703", "0.5175197", "0.51702636", "0.51601034", "0.51537865", "0.514817", "0.51476955", "0.51456994", "0.5145288", "0.50929576", "0.50922036", "0.5074923", "0.5074805", "0.50734293", "0.50673395", "0.50651616", "0.5062572", "0.50535303", "0.504423", "0.5040395", "0.50401604", "0.50374967", "0.50151587", "0.5012697", "0.5007251", "0.5001007", "0.49847668", "0.49744478", "0.49701935", "0.49670628", "0.4964953", "0.49407557", "0.49365544" ]
0.754901
0
Sets x offset of the x axis labels
Устанавливает смещение x оси меток
public function setAxisXLabelOffsetX($dx) { $this->axis_xlabel_offX = $dx; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetXLabelOffset($aLabelOff, $aTickOff = -1)\n {\n $this->xlabel_offset = $aLabelOff;\n if ($aTickOff == -1) // Same as label offset\n $this->xtick_offset = $aLabelOff;\n else\n $this->xtick_offset = $aTickOff;\n if ($aLabelOff > 0)\n $this->SupressLast(); // The last tick wont fit\n }", "public function getAxisXLabelOffsetX()\n\t{\n\t\treturn $this->axis_xlabel_offX;\n\t}", "function set_x_labels($a) {\n\t\t$tmp = array ();\n\t\tforeach ( $a as $item )\n\t\t\t$tmp [] = $this->esc ( $item );\n\t\t$this->x_labels = $tmp;\n\t}", "function set_x_offset($val) {\n\t\t$this->x_offset = $val ? 'true' : 'false';\n\t}", "function set_x_axis_steps($steps) {\n\t\tif ($steps > 0)\n\t\t\t$this->x_axis_steps = $steps;\n\t}", "function setPositionX($positionX = 0){\n\t\t\t$this -> positionX = $positionX;\n\t\t}", "public function setXOffset($measure, $unit = null);", "public function setAxisYLabelOffsetX($dx)\n\t{\n\t\t$this->axis_ylabel_offX = $dx;\n\t}", "public function setXPosition($measure, $unit = null, $ignoreOffset = false);", "protected function tbMarkMarginX()\n {\n\n\n if (isset($this->aTableType['TB_ALIGN'])) {\n $tb_align = $this->aTableType['TB_ALIGN'];\n } else {\n $tb_align = '';\n }\n\n //set the table align\n switch ($tb_align) {\n case 'C':\n $this->iTableStartX = $this->lMargin + $this->aTableType['L_MARGIN'] + ($this->PageWidth() - $this->tbGetWidth()) / 2;\n break;\n case 'R':\n $this->iTableStartX = $this->lMargin + $this->aTableType['L_MARGIN'] + ($this->PageWidth() - $this->tbGetWidth());\n break;\n default:\n $this->iTableStartX = $this->lMargin + $this->aTableType['L_MARGIN'];\n break;\n }//\n\n }", "public function getAxisYLabelOffsetX()\n\t{\n\t\treturn $this->axis_ylabel_offX;\n\t}", "public function setAxisPaddingLeft($left)\n\t{\n\t\t$this->axis_padding_left = $left;\n\t}", "public function set_x_pos($x_pos = 0) {\n if( intval($x_pos) >= 0 && intval($x_pos) < self::TABLE_SIZE_X ) {\n $this->x_pos = $x_pos;\n }\n }", "public function setAxisDistanceX($dx)\n\t{\n\t\t$this->axis_distance_x = $dx;\n\t}", "function set_x_tick_size($size) {\n\t\tif ($size > 0)\n\t\t\t$this->x_tick_size = $size;\n\t}", "function set_x_label_style($size, $colour = '', $orientation = 0, $step = -1, $grid_colour = '') {\n\t\t$this->x_label_style = $size;\n\t\t\n\t\tif (strlen ( $colour ) > 0)\n\t\t\t$this->x_label_style .= ',' . $colour;\n\t\t\n\t\tif ($orientation > - 1)\n\t\t\t$this->x_label_style .= ',' . $orientation;\n\t\t\n\t\tif ($step > 0)\n\t\t\t$this->x_label_style .= ',' . $step;\n\t\t\n\t\tif (strlen ( $grid_colour ) > 0)\n\t\t\t$this->x_label_style .= ',' . $grid_colour;\n\t}", "public function assign_x_positions(): void\n {\n // column[0][\"x\"] must be set.\n\n if ($this->_columns_locked) {\n return;\n }\n\n $x = $this->_columns[0][\"x\"];\n foreach (array_keys($this->_columns) as $j) {\n $this->_columns[$j][\"x\"] = $x;\n $x += $this->_columns[$j][\"used-width\"];\n }\n }", "public function setXPos($intNewXPos){\n\t\t\t$this->intXPos = $intNewXPos;\n\t\t}", "function SetTickLabelMargin($aMargin)\n {\n if (ERR_DEPRECATED)\n JpGraphError::RaiseL(25056);//('SetTickLabelMargin() is deprecated. Use Axis::SetLabelMargin() instead.');\n $this->tick_label_margin = $aMargin;\n }", "function PMA_PDF_setXScale($x)\n {\n $x = ($x - $this->_xMin) / $this->scale + $this->leftMargin;\n $this->SetX($x);\n }", "function setXAxisName($name){ \r\n $this->data[\"XAxisName\"] = $name; \r\n }", "public function setYDescriptionOffsetLeft($dx)\n\t{\n\t\t$this->ydescr_offX = $dy;\n\t}", "public function getAxisDistanceX()\n\t{\n\t\treturn $this->axis_distance_x;\n\t}", "public function setOffsetX(int $offsetX): void\n {\n $offsetX = intval($offsetX);\n if ($offsetX < 0) {\n throw new BCGArgumentException('The offset X must be 0 or larger.', 'offsetX');\n }\n\n $this->offsetX = $offsetX;\n }", "public function setAxisXLabelOffsetY($dy)\n\t{\n\t\t$this->axis_xlabel_offY = $dy;\n\t}", "function set_x_axis_3d($size) {\n\t\tif ($size > 0)\n\t\t\t$this->x_axis_3d = intval ( $size );\n\t}", "public function setLabelPos($pos) {\r\n\t\t$this->labelPos = $pos;\r\n\t\t$this->positionLabel();\r\n\t}", "public function getAxisPaddingLeft()\n\t{\n\t\treturn $this->axis_padding_left;\n\t}", "function SetTickPositions($aMajPos,$aMinPos=NULL,$aLabels=NULL) {\n $this->scale->ticks->SetTickPositions($aMajPos,$aMinPos,$aLabels);\n }", "public function offsetX($value) {\n return $this->setProperty('offsetX', $value);\n }", "function SetLabelPos($aSidePos)\n {\n // This will be deprecated from 1.7\n if (ERR_DEPRECATED)\n JpGraphError::RaiseL(25059);//('SetLabelPos() is deprecated. Use Axis::SetLabelSide() instead.');\n $this->labelPos = $aSidePos;\n }", "private function set_axes($x_labels, $y_max) { \n\n if ($y_max > 50) {\n $steps = ceil($y_max / 50);\n $scaled_max = $steps * 50;\n } else {\n $scaled_max = 50;\n }\n \n $chart_x_legend = new OFC_Elements_Legend_X((string)$this->x_legend );\n $chart_x_legend->set_style((string)$this->style);\n $this->chart->set_x_legend($chart_x_legend );\n $chart_y_legend = new OFC_Elements_Legend_Y((string)$this->y_legend );\n $chart_y_legend->set_style((string)$this->style); \n $this->chart->set_y_legend($chart_y_legend );\n $x = new OFC_Elements_Axis_X();\n $x->set_labels_from_array($x_labels);\n $this->chart->set_x_axis($x); \n $y = new OFC_Elements_Axis_Y();\n $y->set_range(0, $scaled_max, 50);\n $this->chart->add_y_axis( $y );\n }", "public function set_labels (numberlineplot_labels $labels) {\n $this->labels = $labels;\n }", "function _pointX($value)\n {\n if (is_array($value)) {\n $radius = (($value['Y'] === false) ? 1 : ($value['Y'] - $this->_axisY->_getMinimum()) / ($this->_axisY->_getMaximum() - $this->_axisY->_getMinimum()));\n $x = ($this->_left + $this->_right) / 2 - $radius * ($this->_plotWidth() / 2) * cos(deg2rad($this->_axisX->_point($value['X'])));\n }\n return max($this->_plotLeft, min($this->_plotRight, $x));\n }", "protected function canvasSpacingX()\n {\n $this->canvas['spacing']['x'] = 0;\n\n if ($this->intermediate['width'] < $this->canvas['width']) {\n $difference = $this->canvas['width'] - $this->intermediate['width'];\n\n if ($difference % 2 === 0) {\n $this->canvas['spacing']['x'] = $difference / 2;\n } else {\n if ($difference > 1) {\n $this->canvas['spacing']['x'] = ($difference - 1) / 2 + 1;\n } else {\n $this->canvas['spacing']['x'] = 1;\n }\n }\n }\n }", "public function get_x_pos() {\n return $this->x_pos;\n }", "function SetTickPositions($aMajPos, $aMinPos = NULL, $aLabels = NULL)\n {\n $this->scale->ticks->SetTickPositions($aMajPos, $aMinPos, $aLabels);\n }", "function setXAxisUnit($unit) { \r\n $this->data[\"XAxisUnit\"] = $unit; \r\n }", "public function getAxisXLabelOffsetY()\n\t{\n\t\treturn $this->axis_xlabel_offY;\n\t}", "function setHorizontalMargin($value) {\n $this->fields['margin_right'] = $this->fields['margin_left'] = $value;\n }", "function get_x_min()\n\t{\n\t\treturn 0;\n\t}", "public function setDimensionX($dimensionX);", "public function getPosx()\n\t{\n\t\treturn $this->posx;\n\t}", "public function setStartOfWeek( $offset ) {\n\t\tif( is_int($offset) ) {\n\t\t\t$this->offset = $offset % 7;\n\t\t} elseif( $this->weekDayNames !== null && ($weekOffset = array_search($offset, $this->weekDayNames, true)) !== false ) {\n\t\t\t$this->offset = $weekOffset;\n\t\t} else {\n\t\t\t$weekTime = strtotime($offset);\n\t\t\tif( $weekTime === 0 ) {\n\t\t\t\tthrow new \\InvalidArgumentException('invalid offset');\n\t\t\t}\n\n\t\t\t$this->offset = date('N', $weekTime) % 7;\n\t\t}\n\t}", "public function setXAxisValue($value)\n {\n $this->xAxisValue = $value;\n\n return $this;\n }", "public function Get_X()\n\t{\n\t\t$this->current_x = pdf_get_value($this->pdf, \"textx\", 0);\n\t\treturn ($this->current_x);\n\t}", "public function getStartX() {\n return $this->cells[0]->x;\n }", "function setAxisPosition($axis_id, $position = AXIS_POSITION_LEFT) { \r\n if ( isset($this->data[\"Axis\"][$axis_id] ) ) { \r\n $this->data[\"Axis\"][$axis_id][\"Position\"] = $position; \r\n } \r\n }", "function setX($newx) {\n $this->x = $newx;\n }", "function getPositionX(){\n\t\t\treturn $this -> positionX;\n\t\t}", "protected function _tbAlign()\n {\n $this->SetX($this->iTableStartX);\n }", "public function getOffsetX(): int\n {\n return $this->offsetX;\n }", "public function hide_x_axis()\n\t{\n\t\t// x-axis\n\t\t$this->axis_x()->grid_visible(false)->label()->visible(false);\n\t\tif (isset($this->bg_colour)) $this->axis_x()->colour($this->bg_colour);\n\t\treturn $this;\n\t}", "function setWeekMarkers()\n {\n $dIW = $this->cE->getDaysInWeek(\n $this->thisYear(),\n $this->thisMonth(),\n $this->thisDay()\n );\n $sDOM = $this->tableHelper->getNumTableDaysInMonth();\n for ($i=1; $i <= $sDOM; $i+= $dIW) {\n $this->children[$i]->setFirst();\n $this->children[$i+($dIW-1)]->setLast();\n }\n }", "function setXAxisDisplay($mode, $format = null) { \r\n $this->data[\"XAxisDisplay\"] = $mode; \r\n $this->data[\"XAxisFormat\"] = $format; \r\n }", "public function setX($x)\n {\n if(is_numeric($x))\n $this->x = $x;\n else\n throw new \\InvalidArgumentException('The x coordinate of a point must be a numeric value.');\n }", "public function setXCoordinate(int $x) {\n return $this->setParam(\"sx\", $x);\n }", "public function setOffset( int $offset ): void {\n\t\t\t$this->offset = abs( $offset );\n\t\t}", "public function setDimensionX($dimensionX)\n {\n $this->dimensionX = $dimensionX;\n }", "public function set_baseline_offset($offset) {\r\n $this->recompute_size();\r\n $height = $this->labelsize[1] - $this->baselineoffset;\r\n $this->connectiontopoffset = $offset - $this->baselineoffset;\r\n $this->baselineoffset = $offset;\r\n $this->labelsize[1] = $this->baselineoffset + $height;\r\n $this->sizefixed = true;\r\n }", "public function getYDescriptionOffsetLeft()\n\t{\n\t\treturn $this->ydescr_offX;\n\t}", "public function setLeftColumnOffsetClass(string $class): void\n {\n $this->leftColumnOffsetClass = $class;\n }", "public function testGetOffsetX()\n {\n $filter = new Watermark();\n $this->assertEquals(0, $filter->getOffsetX());\n }", "function SetTickLabels($aLabelArray,$aLabelColorArray=null) {\n $this->ticks_label = $aLabelArray;\n $this->ticks_label_colors = $aLabelColorArray;\n }", "function SetMajTickPositions($aMajPos,$aLabels=NULL) {\n $this->scale->ticks->SetTickPositions($aMajPos,NULL,$aLabels);\n }", "public function getXPos(){\n\t\t\treturn $this->intXPos;\n\t\t}", "public function setLabels() {\n\t\ttry {\n\t\t\t$labels = $this->getTemplate()->getPrefixedMarkers('label');\n\t\t} catch (Exception $exception) {\n\t\t\t$labels = array();\n\t\t}\n\n\t\tforeach ($labels as $currentLabel) {\n\t\t\t$this->getTemplate()->setMarker(\n\t\t\t\t$currentLabel, $this->translate(strtolower($currentLabel))\n\t\t\t);\n\t\t}\n\t}", "public function set_label_position($position)\n\t{\n\t\tif ( strtolower($position) == 'before' ) {\n\t\t\t$this->_label_position = 'before';\n\t\t} else {\n\t\t\t$this->_label_position = 'after';\n\t\t}\n\t}", "public function PreStrokeAdjust($graph)\n\t{\n\t\tif ($this->center) {\n\t\t\t$a = 0.5;\n\t\t\t$b = 0.5;\n\t\t\t++$this->numpoints;\n\t\t} else {\n\t\t\t$a = 0;\n\t\t\t$b = 0;\n\t\t}\n\t\t$graph->xaxis->scale->ticks->SetXLabelOffset($a);\n\t\t$graph->SetTextScaleOff($b);\n\t}", "public function setTitleBeginning($titleBeginning) \n {\n $this->titleBeginning = $titleBeginning;\n }", "Function setX($val) { $this->_x = $val; }", "public function offsetset($xOffset, $xValue)\n {\n $this->__set($xOffset, $xValue);\n }", "function _axis_options($x_grid=true, $y_grid=true)\r\n{\r\n\t$x_grid_colour = \"color:'transparent',\";\t\t// hide the grid but we still want to specify the count\r\n\t$y_grid_colour = \"color:'transparent',\";\t\t// .. because it determines the number of labels\r\n\r\n\tif (($this->chart_data->show_grid) and ($x_grid))\r\n\t\t$x_grid_colour = \"\";\r\n\t\t\r\n\tif (($this->chart_data->show_grid) and ($y_grid))\r\n\t\t$y_grid_colour = \"\";\r\n\t\t\r\n\tif (($this->chart_data->x_labels == -1) or ($this->chart_data->x_labels == ''))\t\t\t// auto, which means 5\r\n\t\t$x_grid_count = \"count:5\";\r\n\telse\r\n\t\t$x_grid_count = \"count:\".$this->chart_data->x_labels;\r\n\t\r\n\tif (($this->chart_data->y_labels == -1) or ($this->chart_data->y_labels == ''))\t\t\t// auto, which means 5\r\n\t\t$y_grid_count = \"count:5\";\r\n\telse\r\n\t\t$y_grid_count = \"count:\".$this->chart_data->y_labels;\r\n\t\r\n\t$x_gridlines = \",gridlines:{\".$x_grid_colour.$x_grid_count.\"}\";\r\n\t$y_gridlines = \",gridlines:{\".$y_grid_colour.$y_grid_count.\"}\";\r\n\r\n// axis label formats\r\n\r\n\tif ($this->chart_data->x_format == FORMAT_NONE)\r\n\t\t$x_format = '';\r\n\telse\r\n\t\t$x_format = ',format:\"'.$this->_gcFormatString($this->chart_data->x_format).'\"';\r\n\t\t\r\n\tif ($this->chart_data->y_format == FORMAT_NONE)\r\n\t\t$y_format = '';\r\n\telse\r\n\t\t$y_format = ',format:\"'.$this->_gcFormatString($this->chart_data->y_format).'\"';\r\n\t\t\r\n// X axis ranges\r\n\r\n\tif (($this->chart_data->x_start == '') and ($this->chart_data->x_end == ''))\r\n\t\t$x_range = '';\r\n\telse\r\n\t\t{\r\n\t\t$x_min = $this->_gcFormatNumber($this->chart_x_min,$this->chart_data->x_format);\r\n\t\t$x_max = $this->_gcFormatNumber($this->chart_x_max,$this->chart_data->x_format);\r\n\t\t$x_range = \",viewWindowMode:'explicit',viewWindow:{min:$x_min,max:$x_max}\";\r\n\t\t}\r\n\r\n// Y axis ranges\r\n\r\n\tif (($this->chart_data->y_start == '') and ($this->chart_data->y_end == ''))\r\n\t\t$y_range = '';\r\n\telse\r\n\t\t$y_range = \",viewWindowMode:'explicit',viewWindow:{min:\".$this->chart_y_min.\",max:\".$this->chart_y_max.\"}\";\r\n\r\n// finally we are ready to specify the axis objects\r\n\r\n\t$this->gvOptions .= \",hAxis:{title:'\".$this->x_title.\"'\".$x_gridlines.$x_format.$x_range.\"}\";\r\n\t$this->gvOptions .= \",vAxis:{title:'\".$this->y_title.\"'\".$y_gridlines.$y_format.$y_range.\"}\";\r\n}", "function setScatterSerieTicks($id, $width = 0) { \r\n if ( isset($this->data[\"ScatterSeries\"][$id]) ) { \r\n $this->data[\"ScatterSeries\"][$id][\"Ticks\"] = $width; \r\n } \r\n }", "public function getCenterX()\n {\n return $this->getX() + $this->getWidth() / 2.0;\n }", "public function getMinXValue()\r\n {\r\n\r\n if($this->iMultiBar == MultiBars::$SELFSTACK)\r\n {\r\n return $this->getChart()->getSeriesIndexOf($this);\r\n }\r\n else\r\n {\r\n return parent::getMinXValue();\r\n }\r\n }", "protected function all_axes_change_spaces_to_newline(){\n\t\tif (strcmp($this->x_label, \"Frame #\") == 0){\n\t\t\t$this->x_label = \"Frame\\\\n#\";\n\t\t}\n\t\tif (strcmp($this->x_label, \"Column 1\") == 0){\n\t\t\t$this->x_label = \"Column\\\\n1\";\n\t\t}\n\t\tif (strcmp($this->x_label, \"Column 2\") == 0){\n\t\t\t$this->x_label = \"Column\\\\n2\";\n\t\t}\n\t\tif (strcmp($this->x_label, \"Column 3\") == 0){\n\t\t\t$this->x_label = \"Column\\\\n3\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Frame #\") == 0){\n\t\t\t$this->y_label = \"Frame\\\\n#\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Column 1\") == 0){\n\t\t\t$this->y_label = \"Column\\\\n1\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Column 2\") == 0){\n\t\t\t$this->y_label = \"Column\\\\n2\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Column 3\") == 0){\n\t\t\t$this->y_label = \"Column\\\\n3\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Frame #\") == 0){\n\t\t\t$this->z_label = \"Frame\\\\n#\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Column 1\") == 0){\n\t\t\t$this->z_label = \"Column\\\\n1\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Column 2\") == 0){\n\t\t\t$this->z_label = \"Column\\\\n2\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Column 3\") == 0){\n\t\t\t$this->z_label = \"Column\\\\n3\";\n\t\t}\n\t}", "public function setMarginLeft(?int $marginLeft) : self\n {\n $this->initialized['marginLeft'] = true;\n $this->marginLeft = $marginLeft;\n return $this;\n }", "public function set_ticks (numberlineplot_ticks $ticks) {\n $this->ticks = $ticks;\n }", "function HideFirstLastLabel() {\n // automatically generated scale values. However, that\n // will not affect manually specified value, e.g text-scales.\n // therefor we also make a kludge here to supress manually\n // specified scale labels.\n $this->scale->ticks->SupressLast();\n $this->scale->ticks->SupressFirst();\n $this->show_first_label = false;\n $this->show_last_label = false;\n }", "function SetTickLabels($aLabelArray, $aLabelColorArray = null)\n {\n $this->ticks_label = $aLabelArray;\n $this->ticks_label_colors = $aLabelColorArray;\n }", "function SetTitleMargin($aMargin) {\n $this->title_margin=$aMargin;\n }", "function HideFirstLastLabel()\n {\n // automatically generated scale values. However, that\n // will not affect manually specified value, e.g text-scales.\n // therefor we also make a kludge here to supress manually\n // specified scale labels.\n $this->scale->ticks->SupressLast();\n $this->scale->ticks->SupressFirst();\n $this->show_first_label = false;\n $this->show_last_label = false;\n }", "public function testGetPositionX()\n {\n $filter = new Watermark();\n $this->assertEquals(Watermark::POS_X_RIGHT, $filter->getPositionX());\n }", "public function x($value) {\n return $this->setProperty('x', $value);\n }", "public function setOffset( $offset )\n {\n \t$this->offset = $offset;\n }", "function SetMajTickPositions($aMajPos, $aLabels = NULL)\n {\n $this->scale->ticks->SetTickPositions($aMajPos, NULL, $aLabels);\n }", "function setSerieTicks($series, $width = 0) {\r\n if ( !is_array($series) ) { \r\n $series = $this->convertToArray($series); \r\n }\r\n \r\n foreach($series as $key => $serie) { \r\n if ( isset($this->data[\"Series\"][$serie]) ) { \r\n $this->data[\"Series\"][$serie][\"Ticks\"] = $width; \r\n } \r\n }\r\n }", "function _setDefaultHeaders()\r\n {\r\n if ((!count($this->columnSet)) && (count($this->recordSet))) {\r\n $arrayKeys = array_keys($this->recordSet[0]);\r\n foreach ($arrayKeys as $key) {\r\n $width = ceil(100/count($arrayKeys));\r\n $column = new Structures_DataGrid_Column($key, $key, $key,\r\n array('width' =>\r\n $width.'%'));\r\n $this->addColumn($column);\r\n }\r\n }\r\n }", "public function getDimensionX()\n {\n return $this->dimensionX;\n }", "public function SetTickPositions($aMajPos, $aMinPos = null, $aLabels = null)\n\t{\n\t\t$this->scale->ticks->SetTickPositions($aMajPos, $aMinPos, $aLabels);\n\t}", "public function setOffset( $offset )\r\n {\r\n \t$this->offset = $offset;\r\n }", "function storeElementPositionLeft($locator, $variableName) {\r\n\t\t\techo $this->__getRow('storeElementPositionLeft', $locator, $variableName);\r\n\t\t}", "public function setIndentationLeft(float $indentation) {\n $this->indentationLeft = $indentation;\n }", "public function setLeftAlign() { $this->_isLeft = true; }", "function SetTextLabelStart($aTextLabelOff)\n {\n $this->text_label_start = $aTextLabelOff;\n }", "public function setOffset($offset='')\n\t{\n\t\t$this->offset = $offset;\n\t}", "function SetTitleMargin($aMargin)\n {\n $this->title_margin = $aMargin;\n }", "public function setTitleOffsetTop($dy)\n\t{\n\t\t$this->title_offY = $dy;\n\t}", "function set_x_legend($text, $size = -1, $colour = '') {\n\t\t$this->x_legend = $this->esc ( $text );\n\t\tif ($size > - 1)\n\t\t\t$this->x_legend_size = $size;\n\t\t\n\t\tif (strlen ( $colour ) > 0)\n\t\t\t$this->x_legend_colour = $colour;\n\t}" ]
[ "0.73113114", "0.7182818", "0.6065389", "0.6048728", "0.59724045", "0.58603543", "0.5836432", "0.57753307", "0.5755031", "0.57440215", "0.57134855", "0.5695325", "0.5654066", "0.56115884", "0.56056136", "0.55479485", "0.55103785", "0.54947436", "0.54434353", "0.5423305", "0.53744876", "0.5298858", "0.5252901", "0.52456367", "0.5242159", "0.52348274", "0.52309334", "0.5171321", "0.5161787", "0.51114607", "0.51085085", "0.50913024", "0.507886", "0.5073084", "0.50336605", "0.50241524", "0.5015841", "0.5002475", "0.49892014", "0.49160066", "0.48827183", "0.48638427", "0.48308292", "0.4798213", "0.47834077", "0.47822228", "0.47820932", "0.4781896", "0.47721758", "0.47698674", "0.47698474", "0.47668", "0.47607642", "0.4754418", "0.4735589", "0.4720401", "0.47200343", "0.46961895", "0.46905214", "0.46869448", "0.46646044", "0.46623114", "0.46476737", "0.46276706", "0.46152255", "0.46092838", "0.4600644", "0.45998314", "0.45963714", "0.45839477", "0.45772684", "0.45638245", "0.45617262", "0.4561604", "0.45581794", "0.4556174", "0.45279136", "0.45243376", "0.45169732", "0.4510908", "0.4509601", "0.45094815", "0.45063996", "0.4504358", "0.45006686", "0.44748703", "0.4452912", "0.44508722", "0.44508487", "0.443842", "0.44310197", "0.4420318", "0.44143334", "0.4411682", "0.43988916", "0.43987364", "0.43973327", "0.43925983", "0.43862334", "0.43847755" ]
0.73084515
1
Sets x offset of the y axis labels
Устанавливает смещение x меток оси y
public function setAxisYLabelOffsetX($dx) { $this->axis_ylabel_offX = $dx; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAxisYLabelOffsetX()\n\t{\n\t\treturn $this->axis_ylabel_offX;\n\t}", "function SetXLabelOffset($aLabelOff, $aTickOff = -1)\n {\n $this->xlabel_offset = $aLabelOff;\n if ($aTickOff == -1) // Same as label offset\n $this->xtick_offset = $aLabelOff;\n else\n $this->xtick_offset = $aTickOff;\n if ($aLabelOff > 0)\n $this->SupressLast(); // The last tick wont fit\n }", "private function drawYaxis()\n {\n\n $min =\n round($this->min, $this->precision);\n $max =\n round($this->max, $this->precision);\n\n if (!isset($this->y_axis_legend_increment)) {\n\n $increment =\n round(($max - $min) / $this->total_values, $this->precision);\n } else {\n $increment = $this->y_axis_legend_increment;\n }\n\n if ($increment == 0) {\n $increment = 1;\n }\n\n //$spacing = \\round($spacing, 10);\n for ($label = $min; $label <= $max + $increment; $label+=$increment) {\n\n $px_position = $this->plotValue($label);\n if ($this->x_axis_hints == 1) {\n \\imageline($this->im, 0, $px_position, $this->width,\n $px_position, $this->ink['axis']);\n }\n imagestring($this->im, 1, 10, $px_position - 4, $label,\n $this->ink['text']);\n }\n }", "public function setAxisXLabelOffsetY($dy)\n\t{\n\t\t$this->axis_xlabel_offY = $dy;\n\t}", "public function getAxisXLabelOffsetY()\n\t{\n\t\treturn $this->axis_xlabel_offY;\n\t}", "private function set_axes($x_labels, $y_max) { \n\n if ($y_max > 50) {\n $steps = ceil($y_max / 50);\n $scaled_max = $steps * 50;\n } else {\n $scaled_max = 50;\n }\n \n $chart_x_legend = new OFC_Elements_Legend_X((string)$this->x_legend );\n $chart_x_legend->set_style((string)$this->style);\n $this->chart->set_x_legend($chart_x_legend );\n $chart_y_legend = new OFC_Elements_Legend_Y((string)$this->y_legend );\n $chart_y_legend->set_style((string)$this->style); \n $this->chart->set_y_legend($chart_y_legend );\n $x = new OFC_Elements_Axis_X();\n $x->set_labels_from_array($x_labels);\n $this->chart->set_x_axis($x); \n $y = new OFC_Elements_Axis_Y();\n $y->set_range(0, $scaled_max, 50);\n $this->chart->add_y_axis( $y );\n }", "public function setAxisXLabelOffsetX($dx)\n\t{\n\t\t$this->axis_xlabel_offX = $dx;\n\t}", "public function getAxisXLabelOffsetX()\n\t{\n\t\treturn $this->axis_xlabel_offX;\n\t}", "public function setYaxisLabelIncrement($increment = '')\n {\n\n if (is_numeric($increment)) {\n $this->y_axis_legend_increment = $increment;\n }\n }", "public function getAxisYLabelOffsetY()\n\t{\n\t\treturn $this->axis_ylabel_offY;\n\t}", "public function setAxisYLabelOffsetY($dy)\n\t{\n\t\t$this->axis_ylabel_offY = $dy;\n\t}", "public function setYDescriptionOffsetLeft($dx)\n\t{\n\t\t$this->ydescr_offX = $dy;\n\t}", "function SetLabelPos($aSidePos)\n {\n // This will be deprecated from 1.7\n if (ERR_DEPRECATED)\n JpGraphError::RaiseL(25059);//('SetLabelPos() is deprecated. Use Axis::SetLabelSide() instead.');\n $this->labelPos = $aSidePos;\n }", "function attach_to_y_right_axis($data_number) {\n\t\t$this->y2_lines [] = $data_number;\n\t}", "function PMA_PDF_setXyScale($x, $y)\n {\n $x = ($x - $this->_xMin) / $this->scale + $this->leftMargin;\n $y = ($y - $this->_yMin) / $this->scale + $this->topMargin;\n $this->SetXY($x, $y);\n }", "function y_label_steps($val) {\n\t\t$this->y_steps = intval ( $val );\n\t}", "public function ezSetY ($y)\n\t{\n\t\tpdf_set_text_pos($this->pdf, $this->current_x, $y);\n\t\t$this->current_y = $y;\n\t}", "public function SetY_axis($arraydata) {\n \n }", "public function setTitleOffsetTop($dy)\n\t{\n\t\t$this->title_offY = $dy;\n\t}", "public function setXDescriptionOffsetBottom($dy)\n\t{\n\t\t$this->xdescr_offY = $dy;\n\t}", "function yLabelFormat( $label ){\n return number_format( $label / 100000 ).\"k\"; \n }", "public function getYDescriptionOffsetLeft()\n\t{\n\t\treturn $this->ydescr_offX;\n\t}", "public function set_y_pos($y_pos = 0) {\n if( intval($y_pos) >= 0 && intval($y_pos) < self::TABLE_SIZE_Y ) {\n $this->y_pos = $y_pos;\n }\n }", "public function setLabelPos($pos) {\r\n\t\t$this->labelPos = $pos;\r\n\t\t$this->positionLabel();\r\n\t}", "public function set_labels (numberlineplot_labels $labels) {\n $this->labels = $labels;\n }", "function SetTickLabelMargin($aMargin)\n {\n if (ERR_DEPRECATED)\n JpGraphError::RaiseL(25056);//('SetTickLabelMargin() is deprecated. Use Axis::SetLabelMargin() instead.');\n $this->tick_label_margin = $aMargin;\n }", "protected function draw_axis_name(){\n\n\t\t$valid_axis = array('x1', 'y', 'y2');\n\n\t\tforeach($valid_axis as $axis) {\n\n\t\t\t$var_title = 'axis_title_' . $axis;\n\t\t\t$var_unit = 'axis_unit_' . $axis;\n\t\t\t$var_position = 'axis_position_' . $axis;\n\n\t\t\tif($this->$var_title) {\n\n\t\t\t\t$title = $this->$var_title . (($this->$var_unit != '') ? ' [' . $this->$var_unit . ']' : '');\n\t\t\t\tif($axis == 'y') {\n\t\t\t\t\t$angle = 90;\n\t\t\t\t}elseif($axis == 'y2') {\n\t\t\t\t\t$angle = 270;\n\t\t\t\t}else {\n\t\t\t\t\t$angle = 0;\n\t\t\t\t}\n\n\t\t\t\t/* calculate the size of the title */\n\t\t\t\t$title_box = imageftbbox($this->axis_font_size, $angle, $this->axis_font, $title);\n\n\t\t\t\tif($axis == 'x1'){\n\t\t\t\t\t$y = $this->canvas_height - 2*$this->axis_font_size;\n\t\t\t\t\t$x = ($this->$var_position == 'middle') ? ($this->chart_width / 2) - ($title_box[4] / 2) + $this->offset_left\n\t\t\t\t\t : $this->canvas_width - $this->offset_right - $title_box[4];\n\t\t\t\t}elseif($axis == 'y') {\n\t\t\t\t\t$x = 3*$this->axis_font_size;\n\t\t\t\t\t$y = ($this->$var_position == 'middle') ? ($this->chart_height / 2) - ($title_box[3] / 2) + $this->offset_top\n\t\t\t\t\t : -$title_box[3] + $this->offset_top;\n\t\t\t\t}else{\n\t\t\t\t\t$x = $this->canvas_width - 3*$this->axis_font_size;;\n\t\t\t\t\t$y = ($this->$var_position == 'middle') ? ($this->chart_height / 2) - ($title_box[3] / 2) + $this->offset_top\n\t\t\t\t\t : -$title_box[3] + $this->offset_top;\n\t\t\t\t}\n\n\t\t\t\t/* draw the y-title */\n\t\t\t\timagefttext($this->img, $this->axis_font_size, $angle,$x ,$y , $this->axis_font_color, $this->axis_font, $title);\n\t\t\t}\n\t\t}\n\t}", "function set_x_labels($a) {\n\t\t$tmp = array ();\n\t\tforeach ( $a as $item )\n\t\t\t$tmp [] = $this->esc ( $item );\n\t\t$this->x_labels = $tmp;\n\t}", "function set_x_offset($val) {\n\t\t$this->x_offset = $val ? 'true' : 'false';\n\t}", "function setAxisXY($axis_id, $identity = AXIS_Y) { \r\n if ( isset($this->data[\"Axis\"][$axis_id] ) ) { \r\n $this->data[\"Axis\"][$axis_id][\"Identity\"] = $identity; \r\n } \r\n }", "public function setY($y)\n {\n $this->y = $y;\n }", "function _axis_options($x_grid=true, $y_grid=true)\r\n{\r\n\t$x_grid_colour = \"color:'transparent',\";\t\t// hide the grid but we still want to specify the count\r\n\t$y_grid_colour = \"color:'transparent',\";\t\t// .. because it determines the number of labels\r\n\r\n\tif (($this->chart_data->show_grid) and ($x_grid))\r\n\t\t$x_grid_colour = \"\";\r\n\t\t\r\n\tif (($this->chart_data->show_grid) and ($y_grid))\r\n\t\t$y_grid_colour = \"\";\r\n\t\t\r\n\tif (($this->chart_data->x_labels == -1) or ($this->chart_data->x_labels == ''))\t\t\t// auto, which means 5\r\n\t\t$x_grid_count = \"count:5\";\r\n\telse\r\n\t\t$x_grid_count = \"count:\".$this->chart_data->x_labels;\r\n\t\r\n\tif (($this->chart_data->y_labels == -1) or ($this->chart_data->y_labels == ''))\t\t\t// auto, which means 5\r\n\t\t$y_grid_count = \"count:5\";\r\n\telse\r\n\t\t$y_grid_count = \"count:\".$this->chart_data->y_labels;\r\n\t\r\n\t$x_gridlines = \",gridlines:{\".$x_grid_colour.$x_grid_count.\"}\";\r\n\t$y_gridlines = \",gridlines:{\".$y_grid_colour.$y_grid_count.\"}\";\r\n\r\n// axis label formats\r\n\r\n\tif ($this->chart_data->x_format == FORMAT_NONE)\r\n\t\t$x_format = '';\r\n\telse\r\n\t\t$x_format = ',format:\"'.$this->_gcFormatString($this->chart_data->x_format).'\"';\r\n\t\t\r\n\tif ($this->chart_data->y_format == FORMAT_NONE)\r\n\t\t$y_format = '';\r\n\telse\r\n\t\t$y_format = ',format:\"'.$this->_gcFormatString($this->chart_data->y_format).'\"';\r\n\t\t\r\n// X axis ranges\r\n\r\n\tif (($this->chart_data->x_start == '') and ($this->chart_data->x_end == ''))\r\n\t\t$x_range = '';\r\n\telse\r\n\t\t{\r\n\t\t$x_min = $this->_gcFormatNumber($this->chart_x_min,$this->chart_data->x_format);\r\n\t\t$x_max = $this->_gcFormatNumber($this->chart_x_max,$this->chart_data->x_format);\r\n\t\t$x_range = \",viewWindowMode:'explicit',viewWindow:{min:$x_min,max:$x_max}\";\r\n\t\t}\r\n\r\n// Y axis ranges\r\n\r\n\tif (($this->chart_data->y_start == '') and ($this->chart_data->y_end == ''))\r\n\t\t$y_range = '';\r\n\telse\r\n\t\t$y_range = \",viewWindowMode:'explicit',viewWindow:{min:\".$this->chart_y_min.\",max:\".$this->chart_y_max.\"}\";\r\n\r\n// finally we are ready to specify the axis objects\r\n\r\n\t$this->gvOptions .= \",hAxis:{title:'\".$this->x_title.\"'\".$x_gridlines.$x_format.$x_range.\"}\";\r\n\t$this->gvOptions .= \",vAxis:{title:'\".$this->y_title.\"'\".$y_gridlines.$y_format.$y_range.\"}\";\r\n}", "public function set_baseline_offset($offset) {\r\n $this->recompute_size();\r\n $height = $this->labelsize[1] - $this->baselineoffset;\r\n $this->connectiontopoffset = $offset - $this->baselineoffset;\r\n $this->baselineoffset = $offset;\r\n $this->labelsize[1] = $this->baselineoffset + $height;\r\n $this->sizefixed = true;\r\n }", "function setY($newy) {\n $this->y = $newy;\n }", "function set_y_label_style($size, $colour = '') {\n\t\t$this->y_label_style = $this->_set_y_label_style ( $size, $colour );\n\t}", "public function setYOffset($measure, $unit = null);", "function SetTickPositions($aMajPos,$aMinPos=NULL,$aLabels=NULL) {\n $this->scale->ticks->SetTickPositions($aMajPos,$aMinPos,$aLabels);\n }", "private function getLabels() {\n\t\t$x = 0;\n\t\t$y = 0;\n\t\t$labels = [];\n\n\t\tif ($this->type == GRAPH_YAXIS_SIDE_BOTTOM) {\n\t\t\t$axis = 'x';\n\t\t\t$y = $this->height - CSvgGraph::SVG_GRAPH_X_AXIS_LABEL_MARGIN;\n\t\t}\n\t\telse {\n\t\t\t$axis = 'y';\n\t\t\t$x = ($this->type == GRAPH_YAXIS_SIDE_RIGHT)\n\t\t\t\t? CSvgGraph::SVG_GRAPH_Y_AXIS_RIGHT_LABEL_MARGIN\n\t\t\t\t: $this->width - CSvgGraph::SVG_GRAPH_Y_AXIS_LEFT_LABEL_MARGIN;\n\t\t}\n\n\t\tforeach ($this->labels as $pos => $label) {\n\t\t\t$$axis = $pos;\n\n\t\t\tif ($this->type == GRAPH_YAXIS_SIDE_LEFT || $this->type == GRAPH_YAXIS_SIDE_RIGHT) {\n\t\t\t\t// Flip upside down.\n\t\t\t\t$y = $this->height - $y;\n\t\t\t}\n\n\t\t\tif ($this->type == GRAPH_YAXIS_SIDE_BOTTOM) {\n\t\t\t\tif (count($labels) == 0) {\n\t\t\t\t\t$text_tag_x = max($this->x + $x, strlen($label) * 4);\n\t\t\t\t}\n\t\t\t\telseif (end($this->labels) === $label) {\n\t\t\t\t\t$text_tag_x = (strlen($label) * 4 > $this->width - $x) ? $this->x + $x - 10 : $this->x + $x;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$text_tag_x = $this->x + $x;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$text_tag_x = $this->x + $x;\n\t\t\t}\n\n\t\t\t$labels[] = new CSvgText($text_tag_x, $this->y + $y, $label);\n\t\t}\n\n\t\treturn $labels;\n\t}", "function SetTickLabels($aLabelArray,$aLabelColorArray=null) {\n $this->ticks_label = $aLabelArray;\n $this->ticks_label_colors = $aLabelColorArray;\n }", "function set_y_min($min) {\n\t\t$this->y_min = floatval ( $min );\n\t}", "function SetLabels($aLabels,$aLblPosAdj=\"auto\") {\n $this->labels = array_reverse($aLabels);\n $this->ilabelposadj=$aLblPosAdj;\n }", "protected function all_axes_change_spaces_to_newline(){\n\t\tif (strcmp($this->x_label, \"Frame #\") == 0){\n\t\t\t$this->x_label = \"Frame\\\\n#\";\n\t\t}\n\t\tif (strcmp($this->x_label, \"Column 1\") == 0){\n\t\t\t$this->x_label = \"Column\\\\n1\";\n\t\t}\n\t\tif (strcmp($this->x_label, \"Column 2\") == 0){\n\t\t\t$this->x_label = \"Column\\\\n2\";\n\t\t}\n\t\tif (strcmp($this->x_label, \"Column 3\") == 0){\n\t\t\t$this->x_label = \"Column\\\\n3\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Frame #\") == 0){\n\t\t\t$this->y_label = \"Frame\\\\n#\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Column 1\") == 0){\n\t\t\t$this->y_label = \"Column\\\\n1\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Column 2\") == 0){\n\t\t\t$this->y_label = \"Column\\\\n2\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Column 3\") == 0){\n\t\t\t$this->y_label = \"Column\\\\n3\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Frame #\") == 0){\n\t\t\t$this->z_label = \"Frame\\\\n#\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Column 1\") == 0){\n\t\t\t$this->z_label = \"Column\\\\n1\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Column 2\") == 0){\n\t\t\t$this->z_label = \"Column\\\\n2\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Column 3\") == 0){\n\t\t\t$this->z_label = \"Column\\\\n3\";\n\t\t}\n\t}", "function yLabelNumberFormat( $label ){\n return number_format( $label ); \n }", "function saveYMargin($value) {\r\n $this->data[\"YMargin\"] = $value;\r\n }", "private function axisLabelsSeries($rect) {\r\n $tmpNum = 0;\r\n $tmpSt = \"\";\r\n $tmpValue = 0;\r\n\r\n $this->calcAllSeries();\r\n $tmpRange = $this->calcFirstLastAllSeries($rect);\r\n\r\n if ($tmpRange->first != intval('1000000000000')) { // MAX_VALUE\r\n $oldPosLabel = -1;\r\n $oldSizeLabel = 0;\r\n $tmpLabelW = $this->axis->getHorizontal();\r\n switch ($this->axis->getLabels()->iAngle) {\r\n case 90:\r\n case 270:\r\n $tmpLabelW = !$tmpLabelW;\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n $axisLabels = $this->axis->getLabels();\r\n for ( $t = $tmpRange->first; $t <= $tmpRange->last; $t++) {\r\n $r = $this->getAxisSeriesLabel($t);\r\n if ($r->result) {\r\n $tmpValue = $r->value;\r\n $tmpSt = $r->label;\r\n\r\n if (($tmpValue >= $this->axis->iMinimum) &&\r\n ($this->tmpValue <= $this->axis->iMaximum)) {\r\n $tmp = $this->axis->calcPosValue($tmpValue);\r\n if (!$this->axis->getTickOnLabelsOnly()) {\r\n $this->addTick($tmp);\r\n }\r\n\r\n if ($axisLabels->getVisible() &&\r\n (strlen($tmpSt) != 0)) {\r\n\r\n $tmpMulti = $this->axis->chart->multiLineTextWidth(\r\n $tmpSt);\r\n\r\n $tmpLabelSize = $tmpMulti->width;\r\n $tmpNum = $tmpMulti->count;\r\n\r\n if (!$tmpLabelW) {\r\n $tmpLabelSize = $this->chart->getGraphics3D()->getFontHeight() * $tmpNum;\r\n }\r\n if (($axisLabels->iSeparation != 0) &&\r\n ($this->oldPosLabel != -1)) {\r\n $tmpLabelSize += (int) (0.02 * $tmpLabelSize *\r\n $axisLabels->iSeparation);\r\n $tmpLabelSize *= 0.5;\r\n\r\n if ($tmp >= $oldPosLabel) {\r\n $tmpDraw = (($tmp -\r\n $tmpLabelSize) >=\r\n ($this->oldPosLabel +\r\n $oldSizeLabel));\r\n } else {\r\n $tmpDraw = (($tmp +\r\n $tmpLabelSize) <=\r\n ($this->oldPosLabel -\r\n $oldSizeLabel));\r\n }\r\n\r\n if ($tmpDraw) {\r\n $this->drawThisLabel($tmp, $tmpSt, null);\r\n $oldPosLabel = $tmp;\r\n $oldSizeLabel = $tmpLabelSize;\r\n }\r\n } else {\r\n $this->drawThisLabel($tmp, $tmpSt, null);\r\n $oldPosLabel = $tmp;\r\n $oldSizeLabel = $tmpLabelSize / 2;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n $this->axis->iSeriesList->clear(false);\r\n }\r\n }", "function SetTickLabels($aLabelArray, $aLabelColorArray = null)\n {\n $this->ticks_label = $aLabelArray;\n $this->ticks_label_colors = $aLabelColorArray;\n }", "function setAxisPosition($axis_id, $position = AXIS_POSITION_LEFT) { \r\n if ( isset($this->data[\"Axis\"][$axis_id] ) ) { \r\n $this->data[\"Axis\"][$axis_id][\"Position\"] = $position; \r\n } \r\n }", "function SetTickPositions($aMajPos, $aMinPos = NULL, $aLabels = NULL)\n {\n $this->scale->ticks->SetTickPositions($aMajPos, $aMinPos, $aLabels);\n }", "public function setAxisDistanceY($dy)\n\t{\n\t\t$this->axis_distance_y = $dy;\n\t}", "function set_y_right_min($min) {\n\t\t$this->y2_min = floatval ( $min );\n\t}", "function StrokeLabels($aPos, $aMinor = false, $aAbsLabel = false)\n {\n\n $this->img->SetColor($this->label_color);\n $this->img->SetFont($this->font_family, $this->font_style, $this->font_size);\n $yoff = $this->img->GetFontHeight() / 2;\n\n // Only draw labels at major tick marks\n $nbr = count($this->scale->ticks->maj_ticks_label);\n\n // We have the option to not-display the very first mark\n // (Usefull when the first label might interfere with another\n // axis.)\n $i = $this->show_first_label ? 0 : 1;\n if (!$this->show_last_label) --$nbr;\n // Now run through all labels making sure we don't overshoot the end\n // of the scale.\n $ncolor = 0;\n if (isset($this->ticks_label_colors))\n $ncolor = count($this->ticks_label_colors);\n while ($i < $nbr) {\n // $tpos holds the absolute text position for the label\n $tpos = $this->scale->ticks->maj_ticklabels_pos[$i];\n\n // Note. the $limit is only used for the x axis since we\n // might otherwise overshoot if the scale has been centered\n // This is due to us \"loosing\" the last tick mark if we center.\n if ($this->scale->type == \"x\" && $tpos > $this->img->width - $this->img->right_margin + 1) {\n return;\n }\n // we only draw every $label_step label\n if (($i % $this->label_step) == 0) {\n\n // Set specific label color if specified\n if ($ncolor > 0)\n $this->img->SetColor($this->ticks_label_colors[$i % $ncolor]);\n\n // If the label has been specified use that and in other case\n // just label the mark with the actual scale value\n $m = $this->scale->ticks->GetMajor();\n\n // ticks_label has an entry for each data point and is the array\n // that holds the labels set by the user. If the user hasn't\n // specified any values we use whats in the automatically asigned\n // labels in the maj_ticks_label\n if (isset($this->ticks_label[$i * $m]))\n $label = $this->ticks_label[$i * $m];\n else {\n if ($aAbsLabel)\n $label = abs($this->scale->ticks->maj_ticks_label[$i]);\n else\n $label = $this->scale->ticks->maj_ticks_label[$i];\n if ($this->scale->textscale && $this->scale->ticks->label_formfunc == '') {\n ++$label;\n }\n }\n\n if ($this->scale->type == \"x\") {\n if ($this->labelPos == SIDE_DOWN) {\n if ($this->label_angle == 0 || $this->label_angle == 90) {\n if ($this->label_halign == '' && $this->label_valign == '')\n $this->img->SetTextAlign('center', 'top');\n else\n $this->img->SetTextAlign($this->label_halign, $this->label_valign);\n\n } else {\n if ($this->label_halign == '' && $this->label_valign == '')\n $this->img->SetTextAlign(\"right\", \"top\");\n else\n $this->img->SetTextAlign($this->label_halign, $this->label_valign);\n }\n $this->img->StrokeText($tpos, $aPos + $this->tick_label_margin + 1, $label,\n $this->label_angle, $this->label_para_align);\n } else {\n if ($this->label_angle == 0 || $this->label_angle == 90) {\n if ($this->label_halign == '' && $this->label_valign == '')\n $this->img->SetTextAlign(\"center\", \"bottom\");\n else\n $this->img->SetTextAlign($this->label_halign, $this->label_valign);\n } else {\n if ($this->label_halign == '' && $this->label_valign == '')\n $this->img->SetTextAlign(\"right\", \"bottom\");\n else\n $this->img->SetTextAlign($this->label_halign, $this->label_valign);\n }\n $this->img->StrokeText($tpos, $aPos - $this->tick_label_margin - 1, $label,\n $this->label_angle, $this->label_para_align);\n }\n } else {\n // scale->type == \"y\"\n //if( $this->label_angle!=0 )\n //JpGraphError::Raise(\" Labels at an angle are not supported on Y-axis\");\n if ($this->labelPos == SIDE_LEFT) { // To the left of y-axis\n if ($this->label_halign == '' && $this->label_valign == '')\n $this->img->SetTextAlign(\"right\", \"center\");\n else\n $this->img->SetTextAlign($this->label_halign, $this->label_valign);\n $this->img->StrokeText($aPos - $this->tick_label_margin, $tpos, $label, $this->label_angle, $this->label_para_align);\n } else { // To the right of the y-axis\n if ($this->label_halign == '' && $this->label_valign == '')\n $this->img->SetTextAlign(\"left\", \"center\");\n else\n $this->img->SetTextAlign($this->label_halign, $this->label_valign);\n $this->img->StrokeText($aPos + $this->tick_label_margin, $tpos, $label, $this->label_angle, $this->label_para_align);\n }\n }\n }\n ++$i;\n }\n }", "private function drawLabels()\n {\n $min_value = CArray::amin($this->data[0]);\n $max_value = CArray::amax($this->data[0]);\n\n $left = CArray::toArray(\n CArray::linspace($min_value, 0, 5, false)\n );\n\n $right = CArray::toArray(\n CArray::linspace(0, $max_value, 5)\n );\n\n # Remove 0 so it don't repeat\n array_shift($right);\n\n $bottom_values = array_merge(\n $left,\n $right\n );\n\n $padding = CArray::toArray(\n CArray::linspace($this->grid_padding, $this->gridWidth(), count($bottom_values))\n );\n\n foreach($bottom_values as $k => $value) {\n $this->addLine(\n $padding[$k] + ($this->grid_padding/2),\n $this->height - $this->grid_padding,\n $padding[$k] + ($this->grid_padding/2),\n $this->height - ($this->grid_padding/1.5)\n );\n $this->addText(\n $value,\n $padding[$k] + ($this->grid_padding/2.5),\n $this->height - ($this->grid_padding/2)\n );\n }\n\n\n\n $min_value = CArray::amin($this->data[1]);\n $max_value = CArray::amax($this->data[1]);\n\n $side_values = CArray::toArray(\n CArray::linspace($min_value, $max_value, 6, false)\n );\n\n $padding = CArray::toArray(\n CArray::linspace($this->gridHeight(), $this->grid_padding, count($side_values))\n );\n\n\n foreach($side_values as $k => $value) {\n $this->addLine(\n $this->grid_padding,\n $padding[$k] + ($this->grid_padding/2),\n ($this->grid_padding/1.5),\n $padding[$k] + ($this->grid_padding/2)\n );\n $this->addText(\n round($value, 2),\n $this->grid_padding * 0.2,\n $padding[$k] + ($this->grid_padding/2.5)\n );\n }\n }", "function yLabelFormat($aLabel) {\n\treturn ($aLabel / 1000);\n}", "function SetMajTickPositions($aMajPos,$aLabels=NULL) {\n $this->scale->ticks->SetTickPositions($aMajPos,NULL,$aLabels);\n }", "public function setLabels() {\n\t\ttry {\n\t\t\t$labels = $this->getTemplate()->getPrefixedMarkers('label');\n\t\t} catch (Exception $exception) {\n\t\t\t$labels = array();\n\t\t}\n\n\t\tforeach ($labels as $currentLabel) {\n\t\t\t$this->getTemplate()->setMarker(\n\t\t\t\t$currentLabel, $this->translate(strtolower($currentLabel))\n\t\t\t);\n\t\t}\n\t}", "public function setYCoordinate(int $y) {\n return $this->setParam(\"sy\", $y);\n }", "function _set_y_label_style($size, $colour) {\n\t\t$tmp = $size;\n\t\t\n\t\tif (strlen ( $colour ) > 0)\n\t\t\t$tmp .= ',' . $colour;\n\t\treturn $tmp;\n\t}", "public function getTitleOffsetTop()\n\t{\n\t\treturn $this->title_offY;\n\t}", "public function set_label_position($position)\n\t{\n\t\tif ( strtolower($position) == 'before' ) {\n\t\t\t$this->_label_position = 'before';\n\t\t} else {\n\t\t\t$this->_label_position = 'after';\n\t\t}\n\t}", "function calYposition($widths, $yTop, $yBottom) {\n\t\t$totalWidth = array_sum($widths);\n\t\t$y = $yTop + ($yBottom-$yTop-$totalWidth)/2;\n\t\treturn $y;\n\t}", "function set_y_right_label_style($size, $colour = '') {\n\t\t$this->y_label_style_right = $this->_set_y_label_style ( $size, $colour );\n\t}", "public function y($value) {\n return $this->setProperty('y', $value);\n }", "public function getXDescriptionOffsetBottom()\n\t{\n\t\treturn $this->xdescr_offY;\n\t}", "public function testLabels() {\n $this->assertInstanceOf('GoogleChartGenerator\\Axis', $this->axis->setLabels(array(5 => 'label')));\n // test get method\n $this->assertEquals(1, count($this->axis->getLabels()));\n }", "public function setYPosition($measure, $unit = null, $ignoreOffset = false);", "public function setFontResolution($x, $y) { }", "public function PreventY_axis($arraydata) {\n \n }", "function setScatterSerieTicks($id, $width = 0) { \r\n if ( isset($this->data[\"ScatterSeries\"][$id]) ) { \r\n $this->data[\"ScatterSeries\"][$id][\"Ticks\"] = $width; \r\n } \r\n }", "function set_x_axis_steps($steps) {\n\t\tif ($steps > 0)\n\t\t\t$this->x_axis_steps = $steps;\n\t}", "function Footer() {\r\n $this->SetY(-19);\r\n }", "function setPositionY($positionY = 0){\n\t\t\t$this -> positionY = $positionY;\n\t\t}", "protected function _tbAlign()\n {\n $this->SetX($this->iTableStartX);\n }", "function StrokeLabel($label,$img,$xc,$yc,$a,$r) {\n\n // Default value\n if( $this->ilabelposadj === 'auto' )\n $this->ilabelposadj = 0.65;\n\n // We position the values diferently depending on if they are inside\n // or outside the pie\n if( $this->ilabelposadj < 1.0 ) {\n\n $this->value->SetAlign('center','center');\n $this->value->margin = 0;\n\n $xt=round($this->ilabelposadj*$r*cos($a)+$xc);\n $yt=round($yc-$this->ilabelposadj*$r*sin($a));\n\n $this->value->Stroke($img,$label,$xt,$yt);\n }\n else {\n\n $this->value->halign = \"left\";\n $this->value->valign = \"top\";\n $this->value->margin = 0;\n\n // Position the axis title.\n // dx, dy is the offset from the top left corner of the bounding box that sorrounds the text\n // that intersects with the extension of the corresponding axis. The code looks a little\n // bit messy but this is really the only way of having a reasonable position of the\n // axis titles.\n $this->value->ApplyFont($img);\n $h=$img->GetTextHeight($label);\n // For numeric values the format of the display value\n // must be taken into account\n if( is_numeric($label) ) {\n if( $label > 0 )\n $w=$img->GetTextWidth(sprintf($this->value->format,$label));\n else\n $w=$img->GetTextWidth(sprintf($this->value->negformat,$label));\n }\n else\n $w=$img->GetTextWidth($label);\n\n if( $this->ilabelposadj > 1.0 && $this->ilabelposadj < 5.0) {\n $r *= $this->ilabelposadj;\n }\n\n $r += $img->GetFontHeight()/1.5;\n\n $xt=round($r*cos($a)+$xc);\n $yt=round($yc-$r*sin($a));\n\n // Normalize angle\n while( $a < 0 ) $a += 2*M_PI;\n while( $a > 2*M_PI ) $a -= 2*M_PI;\n\n if( $a>=7*M_PI/4 || $a <= M_PI/4 ) $dx=0;\n if( $a>=M_PI/4 && $a <= 3*M_PI/4 ) $dx=($a-M_PI/4)*2/M_PI;\n if( $a>=3*M_PI/4 && $a <= 5*M_PI/4 ) $dx=1;\n if( $a>=5*M_PI/4 && $a <= 7*M_PI/4 ) $dx=(1-($a-M_PI*5/4)*2/M_PI);\n\n if( $a>=7*M_PI/4 ) $dy=(($a-M_PI)-3*M_PI/4)*2/M_PI;\n if( $a<=M_PI/4 ) $dy=(1-$a*2/M_PI);\n if( $a>=M_PI/4 && $a <= 3*M_PI/4 ) $dy=1;\n if( $a>=3*M_PI/4 && $a <= 5*M_PI/4 ) $dy=(1-($a-3*M_PI/4)*2/M_PI);\n if( $a>=5*M_PI/4 && $a <= 7*M_PI/4 ) $dy=0;\n\n $this->value->Stroke($img,$label,$xt-$dx*$w,$yt-$dy*$h);\n }\n }", "function set_x_tick_size($size) {\n\t\tif ($size > 0)\n\t\t\t$this->x_tick_size = $size;\n\t}", "function SetMajTickPositions($aMajPos, $aLabels = NULL)\n {\n $this->scale->ticks->SetTickPositions($aMajPos, NULL, $aLabels);\n }", "function setSerieTicks($series, $width = 0) {\r\n if ( !is_array($series) ) { \r\n $series = $this->convertToArray($series); \r\n }\r\n \r\n foreach($series as $key => $serie) { \r\n if ( isset($this->data[\"Series\"][$serie]) ) { \r\n $this->data[\"Series\"][$serie][\"Ticks\"] = $width; \r\n } \r\n }\r\n }", "function _calcLabelInterval()\n {\n $result = parent::_calcLabelInterval();\n $this->_axisValueSpan = $this->_value($this->_axisSpan); \n return $result;\n }", "function HideFirstLastLabel()\n {\n // automatically generated scale values. However, that\n // will not affect manually specified value, e.g text-scales.\n // therefor we also make a kludge here to supress manually\n // specified scale labels.\n $this->scale->ticks->SupressLast();\n $this->scale->ticks->SupressFirst();\n $this->show_first_label = false;\n $this->show_last_label = false;\n }", "function set_y_max($max) {\n\t\t$this->y_max = floatval ( $max );\n\t}", "function HideFirstLastLabel() {\n // automatically generated scale values. However, that\n // will not affect manually specified value, e.g text-scales.\n // therefor we also make a kludge here to supress manually\n // specified scale labels.\n $this->scale->ticks->SupressLast();\n $this->scale->ticks->SupressFirst();\n $this->show_first_label = false;\n $this->show_last_label = false;\n }", "public function setY($y)\n {\n $this->y = (int)$y;\n return $this;\n }", "function set_y_right_max($max) {\n\t\t$this->y2_max = floatval ( $max );\n\t}", "protected function canvasSpacingY()\n {\n $this->canvas['spacing']['y'] = 0;\n\n if ($this->intermediate['height'] < $this->canvas['height']) {\n\n $difference = $this->canvas['height'] - $this->intermediate['height'];\n\n if ($difference % 2 === 0) {\n $this->canvas['spacing']['y'] = $difference / 2;\n } else {\n if ($difference > 1) {\n $this->canvas['spacing']['y'] = ($difference - 1) / 2 + 1;\n } else {\n $this->canvas['spacing']['y'] = 1;\n }\n }\n }\n }", "public function pathLineToVerticalRelative ($y) {}", "public function setLabels( $labels=array() )\n\t\t{\n\t\t\tif( !empty($labels) ) {\n\t\t\t\t$this->_data['labels'] = thb_array_asum($this->_data['labels'], $labels);\n\t\t\t}\n\t\t}", "public function setLabels(...$labels): void\n {\n $this->labels = [];\n $this->addLabel(...$labels);\n }", "public function set_ticks (numberlineplot_ticks $ticks) {\n $this->ticks = $ticks;\n }", "public function setOffset( int $offset ): void {\n\t\t\t$this->offset = abs( $offset );\n\t\t}", "public function setAxisPaddingBottom($bottom)\n\t{\n\t\t$this->axis_padding_bottom = $bottom;\n\t}", "public function getStartY() {\n return $this->cells[0]->y;\n }", "function setStampPosition ( $Xposition, $Yposition) {\n\t\t// set X position\n\t\tswitch ($Xposition) {\n\t\t\tcase transparentWatermarkOnLeft: \n\t\t\tcase transparentWatermarkOnCenter:\n\t\t\tcase transparentWatermarkOnRight:\n\t\t\t$this->stampPositionX=$Xposition;\n\t\t\tbreak;\n\t\t}\n\t\t// set Y position\n\t\tswitch ($Yposition) {\n\t\t\tcase transparentWatermarkOnTop:\n\t\t\tcase transparentWatermarkOnMiddle:\n\t\t\tcase transparentWatermarkOnBottom:\n\t\t\t$this->stampPositionY=$Yposition;\n\t\t\tbreak;\n\t\t}\n\t}", "function yLabelFormat($aLabel) {\n return number_format($aLabel);\n // Format '1000 french style\n //return number_format($aLabel, 2, ',', ' ');\n}", "public function setLabels($labels) {\r\n $this->labels = (array) $labels;\r\n }", "public function SetTickLabels($aLabelArray, $aLabelColorArray = null)\n\t{\n\t\t$this->ticks_label\t\t= $aLabelArray;\n\t\t$this->ticks_label_colors = $aLabelColorArray;\n\t}", "public function pathLineToVerticalAbsolute ($y) {}", "public function hide_y_axis()\n\t{\n\t\t// y-axis\n\t\t$this->axis_y()->visible(false)->labels()->visible(false);\n\t\treturn $this;\n\t}", "public function get_label_position()\n\t{\n\t\treturn $this->_label_position;\n\t}", "public function HideFirstLastLabel()\n\t{\n\t\t// automatically generated scale values. However, that\n\t\t// will not affect manually specified value, e.g text-scales.\n\t\t// therefor we also make a kludge here to supress manually\n\t\t// specified scale labels.\n\t\t$this->scale->ticks->SupressLast();\n\t\t$this->scale->ticks->SupressFirst();\n\t\t$this->show_first_label = false;\n\t\t$this->show_last_label = false;\n\t}", "function setLabels($array) {\n\t\n\t\t$this->labels = $array;\n\t\treturn;\n\t}", "public function PreStrokeAdjust($graph)\n\t{\n\t\tif ($this->center) {\n\t\t\t$a = 0.5;\n\t\t\t$b = 0.5;\n\t\t\t++$this->numpoints;\n\t\t} else {\n\t\t\t$a = 0;\n\t\t\t$b = 0;\n\t\t}\n\t\t$graph->xaxis->scale->ticks->SetXLabelOffset($a);\n\t\t$graph->SetTextScaleOff($b);\n\t}" ]
[ "0.7103413", "0.6919237", "0.68455154", "0.68163884", "0.6529134", "0.6226573", "0.61032045", "0.6079454", "0.5956729", "0.59459305", "0.59337956", "0.56866825", "0.56463844", "0.5635977", "0.5626719", "0.55960226", "0.5500501", "0.54530096", "0.5433868", "0.5401433", "0.5329962", "0.52860296", "0.5273797", "0.52715576", "0.5243063", "0.52254343", "0.5202326", "0.51894236", "0.518699", "0.5177516", "0.51520514", "0.51449084", "0.51446277", "0.512712", "0.5118788", "0.5080392", "0.5076847", "0.5072545", "0.5038998", "0.5018923", "0.5002661", "0.4985283", "0.4981302", "0.49658394", "0.49416918", "0.4936406", "0.49294472", "0.49238196", "0.49210787", "0.4902446", "0.4892257", "0.48916516", "0.48707756", "0.4844662", "0.48273137", "0.48212537", "0.481807", "0.48176482", "0.48094234", "0.4805553", "0.48035395", "0.48030573", "0.47846708", "0.47780412", "0.47747007", "0.47735867", "0.47699273", "0.47644895", "0.47428155", "0.47289646", "0.46888128", "0.4684112", "0.46838441", "0.46814302", "0.46512845", "0.4644805", "0.46338886", "0.46338066", "0.4633551", "0.4629337", "0.46094984", "0.46060893", "0.45812845", "0.45563978", "0.4548667", "0.45413274", "0.45352766", "0.45248136", "0.45247486", "0.4514847", "0.45085853", "0.4501878", "0.4499219", "0.44946542", "0.44887066", "0.44875938", "0.44850194", "0.44849482", "0.44799617", "0.44783175" ]
0.7178576
0
Sets y offset of the y axis labels
Устанавливает смещение оси y меток оси y
public function setAxisYLabelOffsetY($dy) { $this->axis_ylabel_offY = $dy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function drawYaxis()\n {\n\n $min =\n round($this->min, $this->precision);\n $max =\n round($this->max, $this->precision);\n\n if (!isset($this->y_axis_legend_increment)) {\n\n $increment =\n round(($max - $min) / $this->total_values, $this->precision);\n } else {\n $increment = $this->y_axis_legend_increment;\n }\n\n if ($increment == 0) {\n $increment = 1;\n }\n\n //$spacing = \\round($spacing, 10);\n for ($label = $min; $label <= $max + $increment; $label+=$increment) {\n\n $px_position = $this->plotValue($label);\n if ($this->x_axis_hints == 1) {\n \\imageline($this->im, 0, $px_position, $this->width,\n $px_position, $this->ink['axis']);\n }\n imagestring($this->im, 1, 10, $px_position - 4, $label,\n $this->ink['text']);\n }\n }", "public function getAxisYLabelOffsetY()\n\t{\n\t\treturn $this->axis_ylabel_offY;\n\t}", "public function setAxisXLabelOffsetY($dy)\n\t{\n\t\t$this->axis_xlabel_offY = $dy;\n\t}", "public function setAxisYLabelOffsetX($dx)\n\t{\n\t\t$this->axis_ylabel_offX = $dx;\n\t}", "public function getAxisYLabelOffsetX()\n\t{\n\t\treturn $this->axis_ylabel_offX;\n\t}", "public function getAxisXLabelOffsetY()\n\t{\n\t\treturn $this->axis_xlabel_offY;\n\t}", "public function SetY_axis($arraydata) {\n \n }", "public function setYaxisLabelIncrement($increment = '')\n {\n\n if (is_numeric($increment)) {\n $this->y_axis_legend_increment = $increment;\n }\n }", "public function ezSetY ($y)\n\t{\n\t\tpdf_set_text_pos($this->pdf, $this->current_x, $y);\n\t\t$this->current_y = $y;\n\t}", "function set_y_label_style($size, $colour = '') {\n\t\t$this->y_label_style = $this->_set_y_label_style ( $size, $colour );\n\t}", "function setY($newy) {\n $this->y = $newy;\n }", "public function setY($y)\n {\n $this->y = $y;\n }", "public function set_y_pos($y_pos = 0) {\n if( intval($y_pos) >= 0 && intval($y_pos) < self::TABLE_SIZE_Y ) {\n $this->y_pos = $y_pos;\n }\n }", "public function setYOffset($measure, $unit = null);", "public function setAxisDistanceY($dy)\n\t{\n\t\t$this->axis_distance_y = $dy;\n\t}", "function attach_to_y_right_axis($data_number) {\n\t\t$this->y2_lines [] = $data_number;\n\t}", "public function setYPosition($measure, $unit = null, $ignoreOffset = false);", "function y_label_steps($val) {\n\t\t$this->y_steps = intval ( $val );\n\t}", "function setPositionY($positionY = 0){\n\t\t\t$this -> positionY = $positionY;\n\t\t}", "public function setYCoordinate(int $y) {\n return $this->setParam(\"sy\", $y);\n }", "function SetXLabelOffset($aLabelOff, $aTickOff = -1)\n {\n $this->xlabel_offset = $aLabelOff;\n if ($aTickOff == -1) // Same as label offset\n $this->xtick_offset = $aLabelOff;\n else\n $this->xtick_offset = $aTickOff;\n if ($aLabelOff > 0)\n $this->SupressLast(); // The last tick wont fit\n }", "protected function canvasSpacingY()\n {\n $this->canvas['spacing']['y'] = 0;\n\n if ($this->intermediate['height'] < $this->canvas['height']) {\n\n $difference = $this->canvas['height'] - $this->intermediate['height'];\n\n if ($difference % 2 === 0) {\n $this->canvas['spacing']['y'] = $difference / 2;\n } else {\n if ($difference > 1) {\n $this->canvas['spacing']['y'] = ($difference - 1) / 2 + 1;\n } else {\n $this->canvas['spacing']['y'] = 1;\n }\n }\n }\n }", "function yLabelFormat( $label ){\n return number_format( $label / 100000 ).\"k\"; \n }", "function saveYMargin($value) {\r\n $this->data[\"YMargin\"] = $value;\r\n }", "function set_y_right_label_style($size, $colour = '') {\n\t\t$this->y_label_style_right = $this->_set_y_label_style ( $size, $colour );\n\t}", "function set_y_legend($text, $size = -1, $colour = '') {\n\t\t$this->y_legend = $this->_set_y_legend ( $text, $size, $colour );\n\t}", "public function setTitleOffsetTop($dy)\n\t{\n\t\t$this->title_offY = $dy;\n\t}", "public function y($value) {\n return $this->setProperty('y', $value);\n }", "function calYposition($widths, $yTop, $yBottom) {\n\t\t$totalWidth = array_sum($widths);\n\t\t$y = $yTop + ($yBottom-$yTop-$totalWidth)/2;\n\t\treturn $y;\n\t}", "private function set_axes($x_labels, $y_max) { \n\n if ($y_max > 50) {\n $steps = ceil($y_max / 50);\n $scaled_max = $steps * 50;\n } else {\n $scaled_max = 50;\n }\n \n $chart_x_legend = new OFC_Elements_Legend_X((string)$this->x_legend );\n $chart_x_legend->set_style((string)$this->style);\n $this->chart->set_x_legend($chart_x_legend );\n $chart_y_legend = new OFC_Elements_Legend_Y((string)$this->y_legend );\n $chart_y_legend->set_style((string)$this->style); \n $this->chart->set_y_legend($chart_y_legend );\n $x = new OFC_Elements_Axis_X();\n $x->set_labels_from_array($x_labels);\n $this->chart->set_x_axis($x); \n $y = new OFC_Elements_Axis_Y();\n $y->set_range(0, $scaled_max, 50);\n $this->chart->add_y_axis( $y );\n }", "public function getAxisDistanceY()\n\t{\n\t\treturn $this->axis_distance_y;\n\t}", "function set_y_max($max) {\n\t\t$this->y_max = floatval ( $max );\n\t}", "function _set_y_label_style($size, $colour) {\n\t\t$tmp = $size;\n\t\t\n\t\tif (strlen ( $colour ) > 0)\n\t\t\t$tmp .= ',' . $colour;\n\t\treturn $tmp;\n\t}", "function _pointY($value)\n {\n if (is_array($value)) {\n $radius = (($value['Y'] === false) ? 1 : ($value['Y'] - $this->_axisY->_getMinimum()) / ($this->_axisY->_getMaximum() - $this->_axisY->_getMinimum()));\n $y = ($this->_top + $this->_bottom) / 2 + $radius * ($this->_plotHeight() / 2) * sin(deg2rad($this->_axisX->_point($value['X'])));\n }\n return max($this->_plotTop, min($this->_plotBottom, $y));\n }", "public function setXDescriptionOffsetBottom($dy)\n\t{\n\t\t$this->xdescr_offY = $dy;\n\t}", "function set_y_right_max($max) {\n\t\t$this->y2_max = floatval ( $max );\n\t}", "function set_y_right_legend($text, $size = -1, $colour = '') {\n\t\t$this->y_legend_right = $this->_set_y_legend ( $text, $size, $colour );\n\t}", "public function get_y_pos() {\n return $this->y_pos;\n }", "public function hide_y_axis()\n\t{\n\t\t// y-axis\n\t\t$this->axis_y()->visible(false)->labels()->visible(false);\n\t\treturn $this;\n\t}", "public function setYAxisValue($value)\n {\n $this->yAxisValue = $value;\n\n return $this;\n }", "public function setY($y)\n {\n $this->y = (int)$y;\n return $this;\n }", "function yLabelFormat($aLabel) {\n\treturn ($aLabel / 1000);\n}", "public function PreventY_axis($arraydata) {\n \n }", "function Footer() {\r\n $this->SetY(-19);\r\n }", "public function setPosY(Vertical $pos_y)\n {\n $this->pos_y = $pos_y;\n }", "public function setY(float $y): void\n {\n $this->params[self::PARAMETER_FPY] = $y;\n }", "public function setY($y)\n {\n $this->y = $y;\n return $this;\n }", "public function setY($y)\n {\n if(is_numeric($y))\n $this->y = $y;\n else\n throw new \\InvalidArgumentException('The y coordinate of a point must be a numeric value.');\n }", "public function pathLineToVerticalAbsolute ($y) {}", "public function getMaxYValue()\r\n {\r\n return $this->maxMandatoryValue(parent::getMaxYValue());\r\n }", "public function pathLineToVerticalRelative ($y) {}", "public function getMaxY()\n {\n return $this->getY() + $this->getHeight();\n }", "function yLabelNumberFormat( $label ){\n return number_format( $label ); \n }", "function SetLabelPos($aSidePos)\n {\n // This will be deprecated from 1.7\n if (ERR_DEPRECATED)\n JpGraphError::RaiseL(25059);//('SetLabelPos() is deprecated. Use Axis::SetLabelSide() instead.');\n $this->labelPos = $aSidePos;\n }", "public function setAxisPaddingBottom($bottom)\n\t{\n\t\t$this->axis_padding_bottom = $bottom;\n\t}", "public function testBlocksY() {\n $this->assertInstanceOf('GoogleChartGenerator\\Grid', $this->grid->setBlocksY(10));\n // test get method\n $this->assertEquals(10, $this->grid->getBlocksY());\n }", "function set_y_right_min($min) {\n\t\t$this->y2_min = floatval ( $min );\n\t}", "function SetYDeltaDist($aDist)\n {\n $this->iYAxisDeltaPos = $aDist;\n }", "public function testGetPositionY()\n {\n $filter = new Watermark();\n $this->assertEquals(Watermark::POS_Y_BOTTOM, $filter->getPositionY());\n }", "public function setY(int $y): self\n {\n $this->y = $y;\n return $this;\n }", "function set_y_min($min) {\n\t\t$this->y_min = floatval ( $min );\n\t}", "public function setY($y)\n\t{\n\t\t$this->y = $y;\n\n\t\treturn $this;\n\t}", "function PMA_PDF_setXyScale($x, $y)\n {\n $x = ($x - $this->_xMin) / $this->scale + $this->leftMargin;\n $y = ($y - $this->_yMin) / $this->scale + $this->topMargin;\n $this->SetXY($x, $y);\n }", "public function getTitleOffsetTop()\n\t{\n\t\treturn $this->title_offY;\n\t}", "public function set_baseline_offset($offset) {\r\n $this->recompute_size();\r\n $height = $this->labelsize[1] - $this->baselineoffset;\r\n $this->connectiontopoffset = $offset - $this->baselineoffset;\r\n $this->baselineoffset = $offset;\r\n $this->labelsize[1] = $this->baselineoffset + $height;\r\n $this->sizefixed = true;\r\n }", "public function getXDescriptionOffsetBottom()\n\t{\n\t\treturn $this->xdescr_offY;\n\t}", "public function getBreweryLocationY() {\n\t\t\treturn($this->breweryLocationY);\n\t\t}", "public function getLocationY()\r\n {\r\n return $this->getAttr('Location_Y');\r\n }", "public function moveY($y)\n {\n $posX = $this->GetX();\n $posY = $this->GetY();\n $posY += $y;\n $this->SetXY($posX, $posY);\n }", "function SetY2Scale($aAxisType = \"lin\", $aY2Min = 1, $aY2Max = 1)\n {\n if ($aAxisType == \"lin\")\n $this->y2scale = new LinearScale($aY2Min, $aY2Max);\n elseif ($aAxisType == \"int\") {\n $this->y2scale = new LinearScale($aY2Min, $aY2Max);\n $this->y2scale->SetIntScale();\n } elseif ($aAxisType == \"log\") {\n $this->y2scale = new LogScale($aY2Min, $aY2Max);\n } else JpGraphError::RaiseL(25023, $aAxisType);//(\"JpGraph: Unsupported Y2 axis type: $aAxisType\\nMust be one of (lin,log,int)\");\n\n $this->y2axis = new Axis($this->img, $this->y2scale);\n $this->y2axis->scale->ticks->SetDirection(SIDE_LEFT);\n $this->y2axis->SetLabelSide(SIDE_RIGHT);\n $this->y2axis->SetPos('max');\n $this->y2axis->SetTitleSide(SIDE_RIGHT);\n\n // Deafult position is the max x-value\n $this->y2grid = new Grid($this->y2axis);\n }", "function getTranslateY() { return $this->_translatey; }", "public function setYAxis($yAxis) {\n $this->yAxis = $yAxis;\n return $this;\n }", "public function getAbsY2()\n {\n return $this->absY2;\n }", "function SetYScale($aN, $aAxisType = \"lin\", $aYMin = 1, $aYMax = 1)\n {\n\n if ($aAxisType == \"lin\")\n $this->ynscale[$aN] = new LinearScale($aYMin, $aYMax);\n elseif ($aAxisType == \"int\") {\n $this->ynscale[$aN] = new LinearScale($aYMin, $aYMax);\n $this->ynscale[$aN]->SetIntScale();\n } elseif ($aAxisType == \"log\") {\n $this->ynscale[$aN] = new LogScale($aYMin, $aYMax);\n } else JpGraphError::RaiseL(25024, $aAxisType);//(\"JpGraph: Unsupported Y axis type: $aAxisType\\nMust be one of (lin,log,int)\");\n\n $this->ynaxis[$aN] = new Axis($this->img, $this->ynscale[$aN]);\n $this->ynaxis[$aN]->scale->ticks->SetDirection(SIDE_LEFT);\n $this->ynaxis[$aN]->SetLabelSide(SIDE_RIGHT);\n }", "function SetLabels($aLabels,$aLblPosAdj=\"auto\") {\n $this->labels = array_reverse($aLabels);\n $this->ilabelposadj=$aLblPosAdj;\n }", "public function getPosy()\n\t{\n\t\treturn $this->posy;\n\t}", "function y_axis_colour($axis, $grid = '') {\n\t\t$this->y_axis_colour = $axis;\n\t\t\n\t\tif (strlen ( $grid ) > 0)\n\t\t\t$this->y_grid_colour = $grid;\n\t}", "function getPositionY(){\n\t\t\treturn $this -> positionY;\n\t\t}", "public function getY();", "public function getLocationY()\n {\n return $this->locationY;\n }", "public function setDimensionY($dimensionY)\n {\n $this->dimensionY = $dimensionY;\n }", "public function getRealY()\n\t{\n\t\treturn $this->y;\n\t}", "public function setYDescriptionOffsetLeft($dx)\n\t{\n\t\t$this->ydescr_offX = $dy;\n\t}", "public function getVirtualY()\n\t{\n\t\treturn $this->y + $this->map->getRadius() - 1;\n\t}", "function getScaleY() { return $this->_scaley; }", "public function testY($data)\n {\n $coordinate = new Coordinate;\n\n $coordinate->setY($data);\n $this->assertEquals($data, $coordinate->getY());\n }", "public function getYAxis() {\n return $this->yAxis;\n }", "function y_right_axis_colour($colour) {\n\t\t$this->y2_axis_colour = $colour;\n\t}", "public function getYAxisValue()\n {\n return $this->yAxisValue;\n }", "public function getYDescriptionOffsetLeft()\n\t{\n\t\treturn $this->ydescr_offX;\n\t}", "function _set_y_legend($text, $size, $colour) {\n\t\t$tmp = $text;\n\t\t\n\t\tif ($size > - 1)\n\t\t\t$tmp .= ',' . $size;\n\t\t\n\t\tif (strlen ( $colour ) > 0)\n\t\t\t$tmp .= ',' . $colour;\n\t\t\n\t\treturn $tmp;\n\t}", "public function setDimensionY($dimensionY);", "public function drawLineY( $y ){\n\t\timageline( $this->im, 0, $y, $this->width, $y, $this->color );\n\t}", "public function setVerticalLines($do) {\r\n \r\n $this->drawVerticallLines = $do;\r\n \r\n }", "private function mapYvalue($value)\n {\n\n $rangeMapper = new \\sb\\Math\\RangeMapper(Array(30, $this->graph_height), Array($this->min, $this->max));\n return $rangeMapper->convert($value);\n }", "public function setLabelPos($pos) {\r\n\t\t$this->labelPos = $pos;\r\n\t\t$this->positionLabel();\r\n\t}", "public function setOffsetY(int $offsetY): void\n {\n $offsetY = intval($offsetY);\n if ($offsetY < 0) {\n throw new BCGArgumentException('The offset Y must be 0 or larger.', 'offsetY');\n }\n\n $this->offsetY = $offsetY;\n }", "public function setAbsY2($y2)\n {\n if(!$this->_isReadOnly){\n $this->absY2 = $y2;\n if(null !== $this->absY1){\n $this->height = $this->absY1 - $this->absY2;\n }\n }\n return $this;\n }", "public function Footer() {\n $this->SetY(-50);\n // Arial italic 8\n $this->SetMargins(10,0);\n \n\n }", "function StrokeLabels($aPos, $aMinor = false, $aAbsLabel = false)\n {\n\n $this->img->SetColor($this->label_color);\n $this->img->SetFont($this->font_family, $this->font_style, $this->font_size);\n $yoff = $this->img->GetFontHeight() / 2;\n\n // Only draw labels at major tick marks\n $nbr = count($this->scale->ticks->maj_ticks_label);\n\n // We have the option to not-display the very first mark\n // (Usefull when the first label might interfere with another\n // axis.)\n $i = $this->show_first_label ? 0 : 1;\n if (!$this->show_last_label) --$nbr;\n // Now run through all labels making sure we don't overshoot the end\n // of the scale.\n $ncolor = 0;\n if (isset($this->ticks_label_colors))\n $ncolor = count($this->ticks_label_colors);\n while ($i < $nbr) {\n // $tpos holds the absolute text position for the label\n $tpos = $this->scale->ticks->maj_ticklabels_pos[$i];\n\n // Note. the $limit is only used for the x axis since we\n // might otherwise overshoot if the scale has been centered\n // This is due to us \"loosing\" the last tick mark if we center.\n if ($this->scale->type == \"x\" && $tpos > $this->img->width - $this->img->right_margin + 1) {\n return;\n }\n // we only draw every $label_step label\n if (($i % $this->label_step) == 0) {\n\n // Set specific label color if specified\n if ($ncolor > 0)\n $this->img->SetColor($this->ticks_label_colors[$i % $ncolor]);\n\n // If the label has been specified use that and in other case\n // just label the mark with the actual scale value\n $m = $this->scale->ticks->GetMajor();\n\n // ticks_label has an entry for each data point and is the array\n // that holds the labels set by the user. If the user hasn't\n // specified any values we use whats in the automatically asigned\n // labels in the maj_ticks_label\n if (isset($this->ticks_label[$i * $m]))\n $label = $this->ticks_label[$i * $m];\n else {\n if ($aAbsLabel)\n $label = abs($this->scale->ticks->maj_ticks_label[$i]);\n else\n $label = $this->scale->ticks->maj_ticks_label[$i];\n if ($this->scale->textscale && $this->scale->ticks->label_formfunc == '') {\n ++$label;\n }\n }\n\n if ($this->scale->type == \"x\") {\n if ($this->labelPos == SIDE_DOWN) {\n if ($this->label_angle == 0 || $this->label_angle == 90) {\n if ($this->label_halign == '' && $this->label_valign == '')\n $this->img->SetTextAlign('center', 'top');\n else\n $this->img->SetTextAlign($this->label_halign, $this->label_valign);\n\n } else {\n if ($this->label_halign == '' && $this->label_valign == '')\n $this->img->SetTextAlign(\"right\", \"top\");\n else\n $this->img->SetTextAlign($this->label_halign, $this->label_valign);\n }\n $this->img->StrokeText($tpos, $aPos + $this->tick_label_margin + 1, $label,\n $this->label_angle, $this->label_para_align);\n } else {\n if ($this->label_angle == 0 || $this->label_angle == 90) {\n if ($this->label_halign == '' && $this->label_valign == '')\n $this->img->SetTextAlign(\"center\", \"bottom\");\n else\n $this->img->SetTextAlign($this->label_halign, $this->label_valign);\n } else {\n if ($this->label_halign == '' && $this->label_valign == '')\n $this->img->SetTextAlign(\"right\", \"bottom\");\n else\n $this->img->SetTextAlign($this->label_halign, $this->label_valign);\n }\n $this->img->StrokeText($tpos, $aPos - $this->tick_label_margin - 1, $label,\n $this->label_angle, $this->label_para_align);\n }\n } else {\n // scale->type == \"y\"\n //if( $this->label_angle!=0 )\n //JpGraphError::Raise(\" Labels at an angle are not supported on Y-axis\");\n if ($this->labelPos == SIDE_LEFT) { // To the left of y-axis\n if ($this->label_halign == '' && $this->label_valign == '')\n $this->img->SetTextAlign(\"right\", \"center\");\n else\n $this->img->SetTextAlign($this->label_halign, $this->label_valign);\n $this->img->StrokeText($aPos - $this->tick_label_margin, $tpos, $label, $this->label_angle, $this->label_para_align);\n } else { // To the right of the y-axis\n if ($this->label_halign == '' && $this->label_valign == '')\n $this->img->SetTextAlign(\"left\", \"center\");\n else\n $this->img->SetTextAlign($this->label_halign, $this->label_valign);\n $this->img->StrokeText($aPos + $this->tick_label_margin, $tpos, $label, $this->label_angle, $this->label_para_align);\n }\n }\n }\n ++$i;\n }\n }" ]
[ "0.7317454", "0.7122296", "0.68397766", "0.67237496", "0.6648135", "0.65865535", "0.651322", "0.64373744", "0.63361496", "0.6134063", "0.6066786", "0.6063381", "0.60373306", "0.6022237", "0.5983715", "0.598174", "0.5972843", "0.5933656", "0.58220255", "0.58182305", "0.5806966", "0.5700666", "0.5657332", "0.56186193", "0.56163687", "0.56032324", "0.5598909", "0.55711263", "0.55455726", "0.55275154", "0.5494212", "0.5488725", "0.5481436", "0.54620177", "0.544306", "0.54421544", "0.53827626", "0.53642875", "0.53574765", "0.533217", "0.5301687", "0.5286868", "0.52820456", "0.52499247", "0.5244584", "0.51946753", "0.5189461", "0.51610327", "0.51600194", "0.5158545", "0.5143096", "0.51263034", "0.5116375", "0.50676054", "0.5062865", "0.50546885", "0.5029391", "0.5028124", "0.5017308", "0.5015041", "0.498016", "0.4957717", "0.49558076", "0.49276912", "0.4914337", "0.48906586", "0.48880997", "0.4885157", "0.48672697", "0.48598927", "0.48368722", "0.4834578", "0.48276943", "0.48238978", "0.48221382", "0.48198694", "0.4806685", "0.4802355", "0.47762272", "0.47733873", "0.47731876", "0.47666034", "0.47639275", "0.47541484", "0.47262797", "0.47224844", "0.4714658", "0.47041786", "0.470023", "0.46917757", "0.46768922", "0.46673197", "0.46635306", "0.46508157", "0.46504405", "0.46400318", "0.46370345", "0.46358034", "0.46292055", "0.4618806" ]
0.7194387
1
Sets the top offset of the title text
Устанавливает верхнее смещение текста заголовка
public function setTitleOffsetTop($dy) { $this->title_offY = $dy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTitleOffsetTop()\n\t{\n\t\treturn $this->title_offY;\n\t}", "public function setTitle($title) {\n $this->title->text = $title;\n $this->title->align = 'center';\n $this->title->verticalAlign = 'middle';\n }", "function Header()\n {\n // Cabacera\n global $title;\n\n $this->SetFont('Arial', 'B', 15);\n $w = $this->GetStringWidth($title) + 6;\n $this->SetX((210 - $w) / 2);\n \n // Guardar ordenada\n $this->y0 = $this->GetY();\n }", "public static function prependTitle($title){ }", "public function set_title($title = \"\"){\n\t\t$this->_layoutData['title'] = $title;\n }", "function _fillTop()\n {\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_BOTTOM) {\n return $this->_top - $this->_font->height($this->_text);\n }\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_CENTER_Y) {\n return $this->_top - $this->_font->_centerHeight($this->_text);\n } else {\n return $this->_top;\n }\n }", "function Title($title){\n\t\t\t$this->SetFont('Arial','B',15);\n\t\t\t//Move to the right\n\t\t\t$this->Cell(80);\n\t\t\t//Framed Title\n\t\t\t$this->Cell(30,10,$title,0,0,'C');\n\t\t\t//Line break\n\t\t\t$this->Ln(20);\n\t\t}", "public static function setTitle($title){ }", "function prepend_title($title){\r\n\t\t$this->_title = \"{$title} - {$this->_title}\";\r\n\t}", "public function get_title() {\n\t\treturn __( 'Topbar', 'phoenixdigi' );\n\t}", "public function setTitle($title);", "public function setTitle($title);", "function SetWindowTitle(string $title): void { }", "function set_title($title, $style = '') {\n\t\t$this->title = $this->esc ( $title );\n\t\tif (strlen ( $style ) > 0)\n\t\t\t$this->title_style = $style;\n\t}", "function SetTitle($title)\n\t\t\t\t{ \n\t\t\t\t\t$this->title = $title; \n }", "function top($title) {\n require_once(\"sections/top.php\");\n }", "function setTitle($title){\n\t\t$this->mTitle\t= $title;\n\t}", "function setTitle($title){\n\t\t$this->mTitle\t= $title;\n\t}", "function setTitle(){\r\n\t\tglobal $Main;\r\n\t\treturn 'MAPPING KODE BARANG PERMEN 108 THN 2016';\t\r\n\r\n\t}", "function setTitle($title);", "private function drawTitle()\r\n {\r\n\t\t$_t_color = imagecolorallocate($this->image, $this->t_color[0], $this->t_color[1], $this->t_color[2]);\r\n\t\t$_font = $this->font_dir.self::$_FONT[$this->t_font];\r\n\t\timagettftext($this->image, $this->t_fsize, 0, $this->title_pos[0], $this->title_pos[1], $_t_color , $_font, $this->title);\r\n\t}", "function setWorksheetTitle ($title) {\n\n // strip out special chars first\n $title = preg_replace (\"/[\\\\\\|:|\\/|\\?|\\*|\\[|\\]]/\", \"\", $title);\n\n // now cut it to the allowed length\n $title = substr ($title, 0, 31);\n\n // set title\n $this->worksheet_title = $title;\n\n }", "public function setTitle($text);", "abstract public function setTitle();", "public function setTitleBeginning($titleBeginning) \n {\n $this->titleBeginning = $titleBeginning;\n }", "public function setTitle($title) {\n $this->Title = $title;\n }", "function set_title($title)\n {\n $this->title=$title;\n }", "public function setTitle($title)\r\n {\r\n $this->title = $title . ' | ' . $this->title;\r\n }", "public function setTitle($title) {\n $this->Title = $title;\n }", "function set_title($title){\r\n\t\t$this->_title = $title;\r\n\t}", "public function setWindowTitle($title) {\n\t\t$this->options['windowTitle'] = $title;\n\t}", "function setPageTitle($title){\n\t\t$pageContents = ob_get_contents();\n\t\tif($pageContents){\n\t\t\tob_end_clean ();\n\t\t\techo str_replace('<!--TITLE-->', $title.\" | \".APPNAME, $pageContents);\n\t\t}\n\t}", "public function showTestHeadline($title) {\n print \"*** \" . $title . \"\\n\";\n }", "function SetTitleMargin($aMargin) {\n $this->title_margin=$aMargin;\n }", "public function setTitle($title)\n {\n // there should be no docblock here\n $this->title = $title;\n }", "function set_title($title) {\n global $PAGE;\n $this->page = null;\n $this->title = $title;\n // set_title calls format_string itself so no probs there\n $PAGE->set_title($this->title);\n }", "public function setTitle($title)\r\n\t{\r\n\t $this->title = $title;\r\n\t}", "public function setTitle( $title )\n {\n // there should be no docblock here\n $this->title = $title;\n }", "public function setTitle($value = ''){\n $this->_title = $value;\n }", "public function setTitle($value = ''){\n $this->_title = $value;\n }", "function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "protected function makeTitle()\n {\n $this->replace('game_title', $this->getBuffer()->getTitle());\n }", "function setTitle($sTitle_=\"\") {\n\t\t\t$this->_sTitle=$sTitle_;\n\t\t}", "public function setCustomTitle($title)\n {\n $title = ucfirst($title) . \" - \" . $this->baseTitle();\n $this->setTitle($title);\n }", "function setTitle($title) {\n $this->title = $title;\n }", "function setTitle($inTitle){\n $this->_title=$inTitle;\n }", "public function settitle($title)\n {\n $this->title = intval($title);\n }", "public function setTitle( $title ) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title) {\n $this->title = $title ;\n }", "public function setTitle( $title )\r\n {\r\n $this->_title = $title;\r\n }", "public function setTitle(string $title);", "public function setTitle($title){\n $this->title = $title;\n }", "function set_title( $title )\n {\n $this->title = $title;\n return $title;\n }", "public function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }", "public function setTitle($title)\r\n {\r\n $this->_title = $title;\r\n }", "public function setTitle($title)\n\t{\n\t\t$this->title = $title; \n\t}", "public function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function set_title ($title) {\n $this->title = $title;\n }", "function SetTitleMargin($aMargin)\n {\n $this->title_margin = $aMargin;\n }", "function setTitle($title)\n {\n $this->_title = $title;\n }", "function title() {\n\t}", "public function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }", "protected function updateTitle()\n {\n $raw = $this->page->title;\n\n $this->page->title = $this->replacePlaceholders($raw, $this->getTitlePlaceholderReplaces());\n }", "public function set_title($title)\n\t{\n\t\t\t$this->title = $title;\n\t}", "public function setTitle( $title )\n {\n $this->title = $title;\n }", "public function set_title( $title ) {\n $this->title = $title;\n }", "public function centerTop(): string\n {\n return $this->get(__FUNCTION__);\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function writeTop() {}", "public function setTitle($title) {\n $this->title = $title;\n }", "function setTopContent($data, $align='right') {\n\t\t$this->top_content = $data;\n\t\t$this->top_content_align = $align;\n\t}", "public function setAxisPaddingTop($top)\n\t{\n\t\t$this->axis_padding_top = $top;\n\t}", "public function get_title() {\n\t\treturn __( 'Mobile Home Top', 'plugin-name' );\n\t}", "function title($toolbarTitle = \"\") {\n\t\t\t$this->toolbarTitle = (!empty($toolbarTitle)) ? $toolbarTitle : \"\";\n\t\t}", "public function setTitle($title) {\n $this->title = $title;\n }", "public function setTitle($title) {\n $this->title = $title;\n }", "public function setTitle($title) {\n $this->title = $title;\n }", "public function setTitle($title) {\n $this->title = $title;\n }", "public function setTitle($title) {\n $this->title = $title;\n }", "public function setTitle($title) {\n $this->_title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function set_title($title) {\n $this->title = $title;\n }", "public function header($title)\n {\n $title = str_pad($title, $this->getLineLength(), ' ', STR_PAD_RIGHT);\n $this->writeln($title);\n $this->separator('=');\n }", "function setTitle($title)\n {\n $this->_artwork->setTitle($title);\n $this->clearLinkCache();\n }", "protected function setPidTitle()\n\t{\n\t\t$typo3Version = GeneralUtility::makeInstance(Typo3Version::class);\n\t\t$typo3Branch = $typo3Version->getBranch();\n\t\tif (version_compare($typo3Branch, '10.4', '>=')) {\n\t\t\t$pageRepository = GeneralUtility::makeInstance(\\TYPO3\\CMS\\Core\\Domain\\Repository\\PageRepository::class);\n\t\t} else {\n\t\t\t$pageRepository = GeneralUtility::makeInstance(\\TYPO3\\CMS\\Frontend\\Page\\PageRepository::class);\n\t\t}\n\t\t$row = $pageRepository->getPage_noCheck((int)$this->getPid());\n\t\t$this->pidTitle = $this->conf['pidTitleOverride'] ?: $row['title'];\n\t}", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($value)\n {\n $this->title = $value;\n }", "public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}", "public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}", "public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}", "public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}", "public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }", "public function setTitle($title)\n {\n $this->title = $title;\n }" ]
[ "0.74312633", "0.65173787", "0.62824875", "0.60004455", "0.59903497", "0.59869474", "0.598098", "0.5972703", "0.59467", "0.59463114", "0.5914809", "0.5914809", "0.5904814", "0.5891512", "0.58648306", "0.58511335", "0.5838393", "0.5838393", "0.5829821", "0.5828475", "0.5813858", "0.58105075", "0.57795846", "0.5766064", "0.57631725", "0.5711769", "0.5703946", "0.5698812", "0.5684776", "0.56724995", "0.5669224", "0.56638664", "0.56635076", "0.564406", "0.5643082", "0.5641528", "0.5641118", "0.5639612", "0.56340694", "0.56340694", "0.5623619", "0.561895", "0.56157684", "0.5607111", "0.5602814", "0.5598941", "0.5598063", "0.55957025", "0.55948704", "0.5585624", "0.5580547", "0.55777305", "0.557165", "0.55679274", "0.55642366", "0.55640614", "0.5561732", "0.5561732", "0.5561732", "0.5561732", "0.55580115", "0.5556501", "0.55562514", "0.5556088", "0.5555592", "0.5551855", "0.5548031", "0.5543481", "0.55424356", "0.5540872", "0.55362916", "0.5536039", "0.5534169", "0.5530152", "0.55262417", "0.5524155", "0.55184996", "0.55182165", "0.55182165", "0.55182165", "0.55182165", "0.55182165", "0.5515478", "0.5513712", "0.551287", "0.55055547", "0.55041766", "0.5498648", "0.5496968", "0.5495773", "0.549543", "0.549543", "0.549543", "0.549543", "0.549543", "0.54940784", "0.54940784", "0.54940784", "0.54940784", "0.54940784" ]
0.7105375
1
Sets the font size of the title
Устанавливает размер шрифта заголовка
public function setTitleFontSize($size) { $this->title_fontsize = $size; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTitleFontSize()\n\t{\n\t\treturn $this->title_fontsize;\n\t}", "function set_font_size($size) {\n $this->__font_size_calculated = false;\n $this->_props[\"font_size\"] = $size;\n }", "function SetTextFontSize($fontSize)\n\t\t\t\t{ \n\t\t\t\t\t$this->t_font_size = $fontSize; \n }", "protected function setSize(): void\n\t{\n\t\t$size = $this->getField('SIZE');\n\n\t\t$assets = Assets\\Manager::getInstance();\n\t\t$assets->addString(\n\t\t\t'<style>\n\t\t\thtml {font-size: ' . self::BASE_HTML_SIZE . ';}\n\t\t\tbody {font-size: ' . $size . 'rem;}\n\t\t\t.g-font-size-default {font-size: ' . $size . 'rem;}\n\t\t</style>'\n\t\t);\n\t}", "function set_font_size($size)\n {\n $this->font_size = $size;\n return TRUE;\n }", "public function updateFontSize($size);", "public function setFontSize ($pointsize) {}", "public function setFontSize($size)\n {\n $this->fontSize = $size;\n }", "public function setFontsize($fontsize){\n $this->fontsize=$fontsize;\n }", "public function setFontsize($fontsize){\n $this->fontsize=$fontsize;\n }", "public function setTitleSize($titleSize)\n {\n $this->titleSize = $titleSize;\n return $this;\n }", "public function setFontSize($size = null) {\n $this->fontSize = $size;\n }", "public function set_fontsize ($fontsize) {\n $this->fontsize = $fontsize;\n }", "public function setAxisFontSize($size)\n\t{\n\t\t$this->axis_fontsize = $size;\n\t}", "function SetFontSize($size){\n \n $this->Ticket .= chr(29) . chr(33) . chr($size);\n \n /*PRINT #1, CHR$(&H1D);\"!\";CHR$(17);\n AAAAA ← Select quadruple (double-height x double-width)\n PRINT #1, \"AAAAA\"; CHR$(&HA); BBBBB\n PRINT #1, CHR$(&H1D);\"!\";CHR$(0);\n PRINT #1, \"BBBBB\"; CHR$(&HA);*/\n //$this->Ticket .= chr(29) . chr(33) . $size;\n }", "function setTextFontSize($iSize){\n\t\t\t$this->excel->getActiveSheet()->getStyle('A:Z')->getFont()->setSize($iSize);\n\t\t\t$this->excel->getActiveSheet()->getDefaultRowDimension()->setRowHeight($iSize+3);\n\n\t\t}", "public function getTitleSize()\n {\n return $this->titleSize;\n }", "public function setFont ($font_name) {}", "public function setTitle($title) {\n $this->title->text = $title;\n $this->title->align = 'center';\n $this->title->verticalAlign = 'middle';\n }", "private function drawTitle()\r\n {\r\n\t\t$_t_color = imagecolorallocate($this->image, $this->t_color[0], $this->t_color[1], $this->t_color[2]);\r\n\t\t$_font = $this->font_dir.self::$_FONT[$this->t_font];\r\n\t\timagettftext($this->image, $this->t_fsize, 0, $this->title_pos[0], $this->title_pos[1], $_t_color , $_font, $this->title);\r\n\t}", "public function setDefaultFontSize($pValue)\n {\n $this->_defaultFontSize = $pValue;\n }", "public function large()\n\t{\n\t\t$this->css(array(\n\t\t\t'font-size' \t=> '18px',\n\t\t\t'font-weight'\t=> 'bold',\n\t\t));\n\t}", "public function setDefaultFontSize($pValue) {\n\t\t$pValue = $pValue * 2;\n\t\t$this->_defaultFontSize = $pValue;\n\t}", "public function SetTitle($title, $isUTF8 = TRUE)\n {\n parent::SetTitle($title, $isUTF8);\n }", "public function setDefaultFont($font_name, $font_size) {\n\t}", "function width()\n {\n $this->_font->width($this->_text);\n }", "function PMA_PDF_setFontSizeScale($size)\n {\n // Set font size in points\n $size = $size / $this->scale;\n $this->SetFontSize($size);\n }", "public function setFont( $name ){\n\t\t$this->font_name = $name;\n\t}", "public function setFont ($font) {}", "protected function draw_chart_title(){\n\n\t\tif($this->chart_title) {\n\n\t\t\t/* calculate the size of the title */\n\t\t\t$title_box = imageftbbox($this->title_font_size, 0, $this->title_font, $this->chart_title);\n\t\t\t$x = $title_box[0] + ($this->canvas_width / 2) - ($title_box[4] / 2);\n\t\t\t$y = 2*$this->title_font_size;\n\n\t\t\t/* draw the title */\n\t\t\timagefttext($this->img, $this->title_font_size,0 ,$x ,$y , $this->title_font_color, $this->title_font, $this->chart_title);\n\n\t\t}\n\t}", "function set_title($title, $style = '') {\n\t\t$this->title = $this->esc ( $title );\n\t\tif (strlen ( $style ) > 0)\n\t\t\t$this->title_style = $style;\n\t}", "public function setFontStretch ($fontStretch) {}", "public function getFontSize () {}", "public function setHeaderFontSize($size = 12)\n {\n $this->arguments['header-font-size'] = intval($size);\n\n return $this;\n }", "abstract protected function setFont($fontFamily, $fontSize, $fontColor);", "public function fontSize($value) {\n return $this->setProperty('fontSize', $value);\n }", "public function fontSize($value) {\n return $this->setProperty('fontSize', $value);\n }", "public function fontSize($value) {\n return $this->setProperty('fontSize', $value);\n }", "public function setFontSize($size)\n {\n $this->set('font.size', $size);\n\n return $this;\n }", "public function useFont($name, $size, $color = null);", "function Title($title){\n\t\t\t$this->SetFont('Arial','B',15);\n\t\t\t//Move to the right\n\t\t\t$this->Cell(80);\n\t\t\t//Framed Title\n\t\t\t$this->Cell(30,10,$title,0,0,'C');\n\t\t\t//Line break\n\t\t\t$this->Ln(20);\n\t\t}", "function SetNumberFontSize($fontSize)\n\t\t\t\t{ \n\t\t\t\t\t$this->n_font_size = $fontSize; \n }", "public function setWindowTitle($title) {\n\t\t$this->options['windowTitle'] = $title;\n\t}", "public function getFontsize(){\n return $this->fontsize;\n }", "public function getFontsize(){\n return $this->fontsize;\n }", "function random_font_size() {\n\t\n\t\t$this -> size = mt_rand($this -> font_size_min, $this -> font_size_max );\n\t}", "public function setSizeText(){\n\t\t$this->sizeText = Helper::fileSize($this->size);\n\t\treturn $this;\n\t}", "function SetTitleMargin($aMargin) {\n $this->title_margin=$aMargin;\n }", "function SetTextFont($font)\n\t\t\t\t{ \n\t\t\t\t\t$this->t_font = $font; \n }", "function SetTitleMargin($aMargin)\n {\n $this->title_margin = $aMargin;\n }", "public function setFontWeight ($font_weight) {}", "function SetTitle($title)\n\t\t\t\t{ \n\t\t\t\t\t$this->title = $title; \n }", "function setSize($iconSize = 8)\n\t{\n\t\t$this->sizeX = $iconSize * 4.5;\n\t\t$this->sizeY = $iconSize;\n\t\t\n\t\t$this->arrowNext->setSize($iconSize, $iconSize);\n\t\t$this->arrowPrev->setSize($iconSize, $iconSize);\n\t\t$this->arrowFastNext->setSize($iconSize, $iconSize);\n\t\t$this->arrowFastPrev->setSize($iconSize, $iconSize);\n\t\t$this->arrowLast->setSize($iconSize, $iconSize);\n\t\t$this->arrowFirst->setSize($iconSize, $iconSize);\n\t\t$this->text = new Label(2*$iconSize - 2);\n\t\t$this->textBg = new Bgs1(2*$iconSize, $iconSize-2);\n\t}", "function setFont($font) {\n $this->font = $font;\n }", "protected function set_font()\n\t{\n\t\t$this->font = $this->config['font_directory'].$this->config['font_list'][array_rand($this->config['font_list'], 1)];\n\t\t$this->font_height = $this->config['font_height'];\n\t\t$this->font_width = (int) ceil($this->calculate_size($this->config['font_png_width']));\n\t\treturn true;\n\t}", "public function set_title ($title) {\n $this->title = $title;\n }", "public function set_title($title = \"\"){\n\t\t$this->_layoutData['title'] = $title;\n }", "function setTitle($title)\n {\n $this->pageTitle = $title;\n $this->renderer->title->setContents($title);\n }", "public function setTitle($title) {\n\t\t$this->options['title'] = $title;\n\t}", "function set_title($title)\n {\n $this->title=$title;\n }", "public function set_title( $title ) {\n $this->title = $title;\n }", "public function SetFont()\n\t{\n\t\t$numargs = func_num_args();\n\t\tif ($numargs == 2 || $numargs == 3) {\n\t\t\t$aFF = func_get_arg(0);\n\t\t\t$aFS = func_get_arg(1);\n\t\t\tif ($numargs == 3) {\n\t\t\t\t$aFSize = func_get_arg(2);\n\t\t\t} else {\n\t\t\t\t$aFSize = 10;\n\t\t\t}\n\n\t\t\t$aR2 = $this->iSize[0] - 1;\n\t\t\t$aR1 = 0;\n\t\t\t$aC2 = $this->iSize[1] - 1;\n\t\t\t$aC1 = 0;\n\t\t} elseif ($numargs == 6 || $numargs == 7) {\n\t\t\t$aR1 = func_get_arg(0);\n\t\t\t$aC1 = func_get_arg(1);\n\t\t\t$aR2 = func_get_arg(2);\n\t\t\t$aC2 = func_get_arg(3);\n\t\t\t$aFF = func_get_arg(4);\n\t\t\t$aFS = func_get_arg(5);\n\t\t\tif ($numargs == 7) {\n\t\t\t\t$aFSize = func_get_arg(6);\n\t\t\t} else {\n\t\t\t\t$aFSize = 10;\n\t\t\t}\n\t\t} else {\n\t\t\tUtil\\JpGraphError::RaiseL(27003);\n\t\t\t//('Wrong number of arguments to GTextTable::SetColor()');\n\t\t}\n\t\t$this->_chkR($aR1);\n\t\t$this->_chkC($aC1);\n\t\t$this->_chkR($aR2);\n\t\t$this->_chkC($aC2);\n\t\tfor ($i = $aR1; $i <= $aR2; ++$i) {\n\t\t\tfor ($j = $aC1; $j <= $aC2; ++$j) {\n\t\t\t\t$this->iCells[$i][$j]->SetFont($aFF, $aFS, $aFSize);\n\t\t\t}\n\t\t}\n\t}", "public function set_title($title) {\n $this->title = $title;\n }", "function setTitle($title)\n {\n $this->_options['title'] = $title;\n }", "public function set_title($title)\n\t{\n\t\t\t$this->title = $title;\n\t}", "function set_title($title){\r\n\t\t$this->_title = $title;\r\n\t}", "public function size()\n {\n return (float) $this->data->textElement->font['size'] ? (float) $this->data->textElement->font['size'] : 10;\n }", "protected function setHFontTheme(): void\n\t{\n\t\t$font = $this->getField('CODE_H');\n\t\t$font = self::convertFontName($font);\n\n\t\t$assets = Assets\\Manager::getInstance();\n\t\t$assets->addString(self::getFontLink($font));\n\t\t$assets->addString(\n\t\t\t'<style>\n\t\t\t\th1, h2, h3, h4, h5, h6 {\n\t\t\t\t\tfont-family: ' . $font . ';\n\t\t\t\t}\n\t\t\t</style>'\n\t\t);\n\t}", "function setTitle($title)\n {\n $this->_artwork->setTitle($title);\n $this->clearLinkCache();\n }", "function setTitle($title){\n\t\t$this->mTitle\t= $title;\n\t}", "function setTitle($title){\n\t\t$this->mTitle\t= $title;\n\t}", "public function setCustomTitle($title)\n {\n $title = ucfirst($title) . \" - \" . $this->baseTitle();\n $this->setTitle($title);\n }", "public function SetFont($arraydata) {\n \n }", "public function setTitle($title) {\n $this->Title = $title;\n }", "public function set_title(string $title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }", "public function setTitle( $title )\r\n {\r\n $this->_title = $title;\r\n }", "public function setTitle($title) {\n $this->Title = $title;\n }", "public function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }", "public function setTitle($newTitle) {\n $this->title = $newTitle;\n }", "public function setFontResolution($x, $y) { }", "public function setTitle( $title ) {\n\t\t$this->title = $title;\n\t}", "public static function setTitle($title){ }", "function _setWidth($fontSize)\n {\n global $pdf;\n\n foreach ($this->fields as $field) {\n $this->width = max($this->width, $pdf->GetStringWidth($field));\n }\n $this->width += $pdf->GetStringWidth(' ');\n $pdf->SetFont($this->_ff, 'B', $fontSize);\n /*\n * it is unknown what value must be added, because\n * table title is affected by the tabe width value\n */\n while ($this->width < $pdf->GetStringWidth($this->_getTitle())) {\n $this->width += 5;\n }\n $pdf->SetFont($this->_ff, '', $fontSize);\n }", "function setTitle($title) {\n $this->title = $title;\n }", "function set_title($title) {\n global $PAGE;\n $this->page = null;\n $this->title = $title;\n // set_title calls format_string itself so no probs there\n $PAGE->set_title($this->title);\n }", "public function setFontFamily ($font_family) {}", "public function setTitle($title)\r\n\t{\r\n\t $this->title = $title;\r\n\t}", "function setTitle($title) {\n\t\t$this->title = $title;\n\t}", "public function setTitle($title){\n $this->title = $title;\n }", "public function setTitle( $title )\n {\n $this->title = $title;\n }", "public function setTitle($title) {\n $this->title = $title ;\n }", "public function setTitle($value) {\n $this->title = $value;\n }", "public function setTitle($value)\n {\n $this->title = $value;\n }", "function setSize($size) {\n $this->size = $size;\n }", "public function setTitle($title) {\n $this->title = $title;\n }", "public function setTitle($title) {\n $this->title = $title;\n }", "public function setTitle($title) {\n $this->title = $title;\n }", "public function setTitle($title) {\n $this->title = $title;\n }", "public function setTitle($title) {\n $this->title = $title;\n }" ]
[ "0.71660733", "0.7130442", "0.6885898", "0.6834722", "0.683373", "0.67933035", "0.67846364", "0.67667156", "0.6737422", "0.6737422", "0.6714915", "0.6597496", "0.6536285", "0.65310377", "0.64880526", "0.6424817", "0.6406492", "0.6348087", "0.6290912", "0.6271157", "0.6249274", "0.619241", "0.6142829", "0.6093592", "0.6087495", "0.6081348", "0.60702324", "0.6064044", "0.6044082", "0.60386544", "0.6004279", "0.5984551", "0.5966365", "0.59535956", "0.59363824", "0.5931611", "0.5931611", "0.5931611", "0.5910402", "0.58876586", "0.58518356", "0.58356136", "0.58352494", "0.58280796", "0.58280796", "0.58241653", "0.57976407", "0.5767845", "0.57442325", "0.57241064", "0.5723772", "0.5720577", "0.5710985", "0.5709021", "0.56987023", "0.5693087", "0.56853557", "0.5676164", "0.5645047", "0.56440145", "0.5641593", "0.56412226", "0.562883", "0.5623858", "0.561341", "0.5607525", "0.5589901", "0.5559466", "0.55351704", "0.5528999", "0.5528999", "0.5527031", "0.55207396", "0.551232", "0.55020255", "0.5494645", "0.5494514", "0.54871106", "0.54854876", "0.5484385", "0.5480583", "0.5476662", "0.54765826", "0.54761463", "0.546487", "0.5457856", "0.54578096", "0.5456578", "0.54549325", "0.54538786", "0.5452925", "0.54489607", "0.5448916", "0.5446459", "0.544415", "0.5443858", "0.5443858", "0.5443858", "0.5443858", "0.5443858" ]
0.8417755
0
Gets the distance the y axis has from the left border of the axis canvas
Получает расстояние, на которое ось Y отстоит от левой границы холста оси
public function getAxisDistanceY() { return $this->axis_distance_y; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAxisYLabelOffsetX()\n\t{\n\t\treturn $this->axis_ylabel_offX;\n\t}", "public function getAxisStrokeDistance()\n\t{\n\t\treturn $this->delta_pixel;\n\t}", "public function getAxisXLabelOffsetY()\n\t{\n\t\treturn $this->axis_xlabel_offY;\n\t}", "public function getAxisPaddingLeft()\n\t{\n\t\treturn $this->axis_padding_left;\n\t}", "public function getCenterY()\n {\n return $this->getY() + $this->getHeight() / 2.0;\n }", "public function getMaxY()\n {\n return $this->getY() + $this->getHeight();\n }", "public function getDimensionY();", "public function getYDescriptionOffsetLeft()\n\t{\n\t\treturn $this->ydescr_offX;\n\t}", "public function getAxisPaddingRight()\n\t{\n\t\treturn $this->axis_padding_right;\n\t}", "public function getMinY()\n {\n return $this->getY();\n }", "public function getDimensionY()\n {\n return $this->dimensionY;\n }", "public function getAxisLabelLineLength()\n\t{\n\t\treturn $this->axis_label_linelength;\n\t}", "public function getAxisYLabelOffsetY()\n\t{\n\t\treturn $this->axis_ylabel_offY;\n\t}", "public function getAxisDistanceX()\n\t{\n\t\treturn $this->axis_distance_x;\n\t}", "public function getAreaY()\n {\n return $this->area_y;\n }", "public function getOffsetY(): int\n {\n return $this->offsetY;\n }", "public function getStartY() {\n return $this->cells[0]->y;\n }", "public function getMaxX()\n {\n return $this->getX() + $this->getWidth();\n }", "function getHeight()\n\t{\n\t\treturn $this->YSize;\n\t}", "public function getAxisPaddingBottom()\n\t{\n\t\treturn $this->axis_padding_bottom;\n\t}", "private function _getSlope() {\n\t\t$compare_x = $this->pointB->x - $this->pointA->x;\n\t\t$compare_y = $this->pointB->y - $this->pointA->y;\n\n\t\treturn $compare_y / $compare_x;\n\t}", "public function getRealY()\n\t{\n\t\treturn $this->y;\n\t}", "function _fillRight()\n {\n return (int) (($this->_left + $this->_right + $this->_plotWidth()) / 2);\n }", "public function get_y_pos() {\n return $this->y_pos;\n }", "function _fillLeft()\n {\n return (int) (($this->_left + $this->_right - $this->_plotWidth()) / 2);\n }", "public function getMinYValue()\r\n {\r\n return $this->minMandatoryValue(parent::getMinYValue());\r\n }", "public function getFullY()\r\n\t{\r\n\t\treturn $this->getSizeY() + $this->getSpaceTop() + $this->getSpaceBottom();\r\n\t}", "public function getAxisXLabelOffsetX()\n\t{\n\t\treturn $this->axis_xlabel_offX;\n\t}", "protected function canvasSpacingY()\n {\n $this->canvas['spacing']['y'] = 0;\n\n if ($this->intermediate['height'] < $this->canvas['height']) {\n\n $difference = $this->canvas['height'] - $this->intermediate['height'];\n\n if ($difference % 2 === 0) {\n $this->canvas['spacing']['y'] = $difference / 2;\n } else {\n if ($difference > 1) {\n $this->canvas['spacing']['y'] = ($difference - 1) / 2 + 1;\n } else {\n $this->canvas['spacing']['y'] = 1;\n }\n }\n }\n }", "public function getAbsY1()\n {\n return $this->absY1;\n }", "function getWidth()\n\t{\n\t\treturn $this->XSize;\n\t}", "function _plotHeight()\n {\n return (min($this->height(), $this->width())) * 0.80;\n }", "public function getRelY1()\n {\n return $this->getParentBB()->getAbsY1() - $this->getAbsY1();\n }", "public function getWidth(): int\n {\n // So we don't do -box[0].\n return max($this->box[2], $this->box[4]);\n }", "public function getMaxYValue()\r\n {\r\n return $this->maxMandatoryValue(parent::getMaxYValue());\r\n }", "public function getCurrentY(): int\n {\n return $this->currentCoordinate->getY();\n }", "public function getY(): int\n {\n return $this->y;\n }", "function width()\n {\n return $this->_canvas->getWidth();\n }", "public function getYAxis() {\n return $this->yAxis;\n }", "public function getPosy()\n\t{\n\t\treturn $this->posy;\n\t}", "public function getAbsY2()\n {\n return $this->absY2;\n }", "function height()\n {\n return $this->_canvas->getHeight();\n }", "public function getY() {\n\t\treturn ($this->y);\n\t}", "function getY() {\n return $this->y;\n }", "public function getSizeY() \n\t{\n\t\treturn imagesy($this->getImage());\n\t}", "public function getWidth(): float;", "function _plotWidth()\n {\n return (min($this->height(), $this->width())) * 0.80;\n }", "public function getAxisPaddingTop()\n\t{\n\t\treturn $this->axis_padding_top;\n\t}", "protected function getSideBordersLength()\n\t{\n\t\t$border = (static::BORDER_WIDTH + static::MIN_SPACE_FROM_BORDER_X);\n\n\t\treturn $border * $this->nesting;\n\t}", "function getScaleY() { return $this->_scaley; }", "public function getYAxisValue()\n {\n return $this->yAxisValue;\n }", "public function getVirtualY()\n\t{\n\t\treturn $this->y + $this->map->getRadius() - 1;\n\t}", "protected function getBordersLength()\n\t{\n\t\treturn $this->getSideBordersLength() * 2;\n\t}", "public function getY()\n {\n return $this->y;\n }", "public function getY()\n {\n return $this->y;\n }", "public function getY()\n {\n return $this->y;\n }", "public function getY()\n {\n return $this->y;\n }", "public function getY()\n {\n return $this->y;\n }", "function GetMouseY(): int { return 0; }", "function getPositionY(){\n\t\t\treturn $this -> positionY;\n\t\t}", "public function getXDescriptionOffsetBottom()\n\t{\n\t\treturn $this->xdescr_offY;\n\t}", "public function getBottomLeft() {\n return $this->bottom_left;\n }", "public function y()\n {\n return $this->y;\n }", "public function getWidthButBorders()\n\t{\n\t\treturn $this->getTotalWidth() - $this->getBordersLength();\n\t}", "function _pointY($value)\n {\n if (is_array($value)) {\n $radius = (($value['Y'] === false) ? 1 : ($value['Y'] - $this->_axisY->_getMinimum()) / ($this->_axisY->_getMaximum() - $this->_axisY->_getMinimum()));\n $y = ($this->_top + $this->_bottom) / 2 + $radius * ($this->_plotHeight() / 2) * sin(deg2rad($this->_axisX->_point($value['X'])));\n }\n return max($this->_plotTop, min($this->_plotBottom, $y));\n }", "public function getY()\n\t{\n\t\treturn $this->y;\n\t}", "public function getCenterX()\n {\n return $this->getX() + $this->getWidth() / 2.0;\n }", "private function getAxis() {\n\t\t$offset = ceil(self::ZBX_ARROW_SIZE / 2);\n\n\t\tif ($this->type == GRAPH_YAXIS_SIDE_BOTTOM) {\n\t\t\t$x = $this->x + $this->width + self::ZBX_ARROW_OFFSET;\n\t\t\t$y = $this->y;\n\n\t\t\treturn [\n\t\t\t\t// Draw axis line.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->setAttribute('shape-rendering', 'crispEdges')\n\t\t\t\t\t->moveTo($this->x, $y)\n\t\t\t\t\t->lineTo($x, $y),\n\t\t\t\t// Draw arrow.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->moveTo($x + self::ZBX_ARROW_SIZE, $y)\n\t\t\t\t\t->lineTo($x, $y - $offset)\n\t\t\t\t\t->lineTo($x, $y + $offset)\n\t\t\t\t\t->closePath()\n\t\t\t];\n\t\t}\n\t\telse {\n\t\t\t$x = ($this->type == GRAPH_YAXIS_SIDE_RIGHT) ? $this->x : $this->x + $this->width;\n\t\t\t$y = $this->y - self::ZBX_ARROW_OFFSET;\n\n\t\t\treturn [\n\t\t\t\t// Draw axis line.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->setAttribute('shape-rendering', 'crispEdges')\n\t\t\t\t\t->moveTo($x, $y)\n\t\t\t\t\t->lineTo($x, $this->height + $y + self::ZBX_ARROW_OFFSET),\n\t\t\t\t// Draw arrow.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->moveTo($x, $y - self::ZBX_ARROW_SIZE)\n\t\t\t\t\t->lineTo($x - $offset, $y)\n\t\t\t\t\t->lineTo($x + $offset, $y)\n\t\t\t\t\t->closePath()\n\t\t\t];\n\t\t}\n\t}", "public function getLeftPositionResized()\n {\n if (is_null($this->getLeftPosition())) {\n return 0;\n }\n if (is_null($this->leftPositionResized)) {\n $leftPositionResized = $this->getLeftPosition() / self::MAP_SCALE;\n $this->setLeftPositionResized($leftPositionResized);\n return $leftPositionResized;\n } else {\n return $this->leftPositionResized;\n }\n }", "public function getOffsetX(): int\n {\n return $this->offsetX;\n }", "function _fillBottom()\n {\n return (int) (($this->_top + $this->_bottom + $this->_plotHeight()) / 2);\n }", "public function getY();", "public function getY(): float\n {\n return $this->params[self::PARAMETER_FPY] ?? 0.5;\n }", "function getBottomRight() { return $this->_bottomright; }", "public function getY()\n {\n return $y;\n }", "public function getY()\n {\n return $y;\n }", "public function get_line_width() {\n return $this->line_width;\n }", "function get_y_min()\n\t{\n\t\t$values = array();\n\n\t\tforeach($this->_config[self::VALUES] as $index=>$value)\n\t\t{\n\t\t\trsort($value);\n\t\t\t$values[] = array_pop($value);\n\t\t}\n\n\t\t$x = array_values($values);\n\t\trsort($x);\n\t\treturn array_pop($x);\n\t}", "function GetMinTickAbsSize()\n {\n return $this->minor_abs_size;\n }", "public function getLineWidth()\n {\n return $this->lineWidth;\n }", "public function getWidth() {\n\t\treturn $this->originalDimensions['width'];\n\t}", "public function getWidth() {\n\t\treturn $this->originalDimensions['width'];\n\t}", "public function getMaxXValue()\r\n {\r\n if($this->iMultiBar == MultiBars::$SELFSTACK)\r\n {\r\n return $this->getMinXValue();\r\n }\r\n else\r\n {\r\n return($this->iMultiBar == MultiBars::$SIDEALL) ?\r\n $this->iPreviousCount + $this->getCount() - 1 :\r\n parent::getMaxXValue();\r\n }\r\n }", "function getBottomLeft() { return $this->_bottomleft; }", "public function getCurrentLineHeight()\n {\n return $this->size;\n }", "private function getLen($x1, $y1, $x2, $y2 ){\n if ($y1 == $y2) return abs($x1 - $x2);\n else\n {\n if ($x1 == $x2) return abs($y1 - $y2);\n else return bcsqrt(pow(abs($x1 - $x2), 2) + pow(abs($y1 - $y2), 2));\n }\n }", "public function getHeight() {\n\t\treturn $this->originalDimensions['height'];\n\t}", "public function getHeight() {\n\t\treturn $this->originalDimensions['height'];\n\t}", "public function getWidth()\n {\n return 280;\n }", "public function getAxis()\n {\n return $this->axis;\n }", "public function getAxis()\n {\n return $this->axis;\n }", "public function get_nAxis(): int\n {\n // $res is a int;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::NAXIS_INVALID;\n }\n }\n $res = $this->_nAxis;\n return $res;\n }", "public function get_nAxis(): int\n {\n // $res is a int;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::NAXIS_INVALID;\n }\n }\n $res = $this->_nAxis;\n return $res;\n }", "function calYposition($widths, $yTop, $yBottom) {\n\t\t$totalWidth = array_sum($widths);\n\t\t$y = $yTop + ($yBottom-$yTop-$totalWidth)/2;\n\t\treturn $y;\n\t}", "public function heightTopLeft();", "public function getAreaX()\n {\n return $this->area_x;\n }", "public function getWidth() {}", "public function getHeight() { \n list($width, $height) = explode('x', $this->getSize());\n return $height;\n }", "private function drawYaxis()\n {\n\n $min =\n round($this->min, $this->precision);\n $max =\n round($this->max, $this->precision);\n\n if (!isset($this->y_axis_legend_increment)) {\n\n $increment =\n round(($max - $min) / $this->total_values, $this->precision);\n } else {\n $increment = $this->y_axis_legend_increment;\n }\n\n if ($increment == 0) {\n $increment = 1;\n }\n\n //$spacing = \\round($spacing, 10);\n for ($label = $min; $label <= $max + $increment; $label+=$increment) {\n\n $px_position = $this->plotValue($label);\n if ($this->x_axis_hints == 1) {\n \\imageline($this->im, 0, $px_position, $this->width,\n $px_position, $this->ink['axis']);\n }\n imagestring($this->im, 1, 10, $px_position - 4, $label,\n $this->ink['text']);\n }\n }", "function get_y_max()\n\t{\n\t\t$values = array();\n\n\t\tforeach($this->_config[self::VALUES] as $index=>$value)\n\t\t{\n\t\t\t$values[] = array_sum($value);\n\t\t}\n\n\t\t$x = array_values($values);\n\t\tsort($x);\n\t\treturn array_pop($x);\n\t}" ]
[ "0.6873446", "0.6773739", "0.6478053", "0.6416718", "0.64082193", "0.63126785", "0.63050425", "0.62461066", "0.62173456", "0.6193308", "0.6102243", "0.6083615", "0.6077891", "0.60456717", "0.6021101", "0.59724116", "0.58949375", "0.5887123", "0.58793896", "0.5847245", "0.5831027", "0.58204305", "0.57996696", "0.57866484", "0.5755575", "0.5745568", "0.5733948", "0.57335424", "0.57223165", "0.57038796", "0.5656792", "0.56152034", "0.56145984", "0.559449", "0.55909514", "0.5575795", "0.5567324", "0.55577344", "0.5556876", "0.5556638", "0.55468667", "0.5535367", "0.550236", "0.54912645", "0.5491217", "0.547088", "0.54566437", "0.5454275", "0.5454121", "0.5450996", "0.5442983", "0.5436128", "0.542171", "0.54183406", "0.54183406", "0.54183406", "0.54183406", "0.54183406", "0.5396673", "0.53925747", "0.5384029", "0.53813255", "0.5372337", "0.53582877", "0.53552866", "0.53504884", "0.5322968", "0.53136474", "0.53088176", "0.53082204", "0.5293388", "0.5292141", "0.5272202", "0.52662855", "0.52375185", "0.52375185", "0.523515", "0.52316326", "0.5220241", "0.5216512", "0.5204325", "0.5204325", "0.51964", "0.51955754", "0.5194337", "0.51841384", "0.514603", "0.514603", "0.51221234", "0.5115172", "0.5115172", "0.5111762", "0.5111762", "0.51040494", "0.51000136", "0.5098073", "0.50971097", "0.5095168", "0.50935006", "0.5093244" ]
0.7179383
0
Gets the left padding of the axis canvas from the chart picture
Получает левое отступление оси canvas из изображения диаграммы
public function getAxisPaddingLeft() { return $this->axis_padding_left; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAxisPaddingRight()\n\t{\n\t\treturn $this->axis_padding_right;\n\t}", "public function getAxisPaddingTop()\n\t{\n\t\treturn $this->axis_padding_top;\n\t}", "public function setAxisPaddingLeft($left)\n\t{\n\t\t$this->axis_padding_left = $left;\n\t}", "public function getAxisPaddingBottom()\n\t{\n\t\treturn $this->axis_padding_bottom;\n\t}", "public function getAxisXLabelOffsetX()\n\t{\n\t\treturn $this->axis_xlabel_offX;\n\t}", "function _fillLeft()\n {\n return (int) (($this->_left + $this->_right - $this->_plotWidth()) / 2);\n }", "function _fillLeft()\n {\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_RIGHT) {\n return $this->_left - $this->_font->width($this->_text);\n }\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_CENTER_X) {\n return $this->_left - $this->_font->_centerWidth($this->_text);\n } else {\n return $this->_left;\n }\n }", "public function getAxisYLabelOffsetX()\n\t{\n\t\treturn $this->axis_ylabel_offX;\n\t}", "public function getHorizontalConfig()\n {\n $model = \\Magento\\Framework\\App\\ObjectManager::getInstance()->create('Magento\\Framework\\App\\Config\\ScopeConfigInterface');\n $hor = $model->getValue('imagegallery/gallerypage/horizontaldimension', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n\n return $hor;\n }", "public function getYDescriptionOffsetLeft()\n\t{\n\t\treturn $this->ydescr_offX;\n\t}", "function kvell_edge_get_title_content_padding() {\n\t\t$title_content_padding = apply_filters( 'kvell_edge_title_content_padding', 0 );\n\t\t\n\t\treturn intval( $title_content_padding );\n\t}", "public function getPadding()\n {\n return $this->padding;\n }", "public function getPadding()\n {\n return $this->padding;\n }", "public function getPadding()\n {\n return $this->_padding;\n }", "function getWidth()\n\t{\n\t\treturn $this->XSize;\n\t}", "public function getPadding() { return $this->_padding; }", "protected function canvasSpacingX()\n {\n $this->canvas['spacing']['x'] = 0;\n\n if ($this->intermediate['width'] < $this->canvas['width']) {\n $difference = $this->canvas['width'] - $this->intermediate['width'];\n\n if ($difference % 2 === 0) {\n $this->canvas['spacing']['x'] = $difference / 2;\n } else {\n if ($difference > 1) {\n $this->canvas['spacing']['x'] = ($difference - 1) / 2 + 1;\n } else {\n $this->canvas['spacing']['x'] = 1;\n }\n }\n }\n }", "public function getDimensionX();", "function mediadesk_edge_get_title_content_padding() {\n\t\t$title_content_padding = apply_filters( 'mediadesk_edge_filter_title_content_padding', 0 );\n\t\t\n\t\treturn intval($title_content_padding);\n\t}", "public function getAxisXLabelOffsetY()\n\t{\n\t\treturn $this->axis_xlabel_offY;\n\t}", "public function getPaddingStandard();", "public function getMarginLeft() : ?int\n {\n return $this->marginLeft;\n }", "function _fillRight()\n {\n return (int) (($this->_left + $this->_right + $this->_plotWidth()) / 2);\n }", "public function getImgBorder()\n {\n return $this->strImgBorder;\n }", "function _fillRight()\n {\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_RIGHT) {\n return $this->_left;\n }\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_CENTER_X) {\n return $this->_left + $this->_font->_centerWidth($this->_text);\n } else {\n return $this->_left + $this->_font->width($this->_text);\n }\n }", "function getAbscissaMargin($Data)\n {\n foreach($Data[\"Axis\"] as $AxisID => $Values) { if ( $Values[\"Identity\"] == AXIS_X ) { return($Values[\"Margin\"]); } }\n return(0);\n }", "public function getOuterWidth(){\n return $this->getWidth(false, true);\n }", "public function getWidthButBorders()\n\t{\n\t\treturn $this->getTotalWidth() - $this->getBordersLength();\n\t}", "public function getBottomLeft() {\n return $this->bottom_left;\n }", "function width()\n {\n return $this->_canvas->getWidth();\n }", "function getBottomLeft() { return $this->_bottomleft; }", "function get_width() {\n //ignore image width, use same width as on predefined bullet List_Bullet_Frame_Decorator\n //for proper alignment of bullet image and text. Allow image to not fitting on left border.\n //This controls the distance between bullet image and text \n //return $this->_width;\n return $this->_frame->get_style()->get_font_size()*List_Bullet_Frame_Decorator::BULLET_SIZE + \n 2 * List_Bullet_Frame_Decorator::BULLET_PADDING;\n }", "public function setAxisPaddingRight($right)\n\t{\n\t\t$this->axis_padding_right = $right;\n\t}", "protected function draw_axis_name(){\n\n\t\t$valid_axis = array('x1', 'y', 'y2');\n\n\t\tforeach($valid_axis as $axis) {\n\n\t\t\t$var_title = 'axis_title_' . $axis;\n\t\t\t$var_unit = 'axis_unit_' . $axis;\n\t\t\t$var_position = 'axis_position_' . $axis;\n\n\t\t\tif($this->$var_title) {\n\n\t\t\t\t$title = $this->$var_title . (($this->$var_unit != '') ? ' [' . $this->$var_unit . ']' : '');\n\t\t\t\tif($axis == 'y') {\n\t\t\t\t\t$angle = 90;\n\t\t\t\t}elseif($axis == 'y2') {\n\t\t\t\t\t$angle = 270;\n\t\t\t\t}else {\n\t\t\t\t\t$angle = 0;\n\t\t\t\t}\n\n\t\t\t\t/* calculate the size of the title */\n\t\t\t\t$title_box = imageftbbox($this->axis_font_size, $angle, $this->axis_font, $title);\n\n\t\t\t\tif($axis == 'x1'){\n\t\t\t\t\t$y = $this->canvas_height - 2*$this->axis_font_size;\n\t\t\t\t\t$x = ($this->$var_position == 'middle') ? ($this->chart_width / 2) - ($title_box[4] / 2) + $this->offset_left\n\t\t\t\t\t : $this->canvas_width - $this->offset_right - $title_box[4];\n\t\t\t\t}elseif($axis == 'y') {\n\t\t\t\t\t$x = 3*$this->axis_font_size;\n\t\t\t\t\t$y = ($this->$var_position == 'middle') ? ($this->chart_height / 2) - ($title_box[3] / 2) + $this->offset_top\n\t\t\t\t\t : -$title_box[3] + $this->offset_top;\n\t\t\t\t}else{\n\t\t\t\t\t$x = $this->canvas_width - 3*$this->axis_font_size;;\n\t\t\t\t\t$y = ($this->$var_position == 'middle') ? ($this->chart_height / 2) - ($title_box[3] / 2) + $this->offset_top\n\t\t\t\t\t : -$title_box[3] + $this->offset_top;\n\t\t\t\t}\n\n\t\t\t\t/* draw the y-title */\n\t\t\t\timagefttext($this->img, $this->axis_font_size, $angle,$x ,$y , $this->axis_font_color, $this->axis_font, $title);\n\t\t\t}\n\t\t}\n\t}", "public function widthTopLeft();", "public function getOffsetX(): int\n {\n return $this->offsetX;\n }", "public function getWidth(): int;", "public function getWidth(): int;", "public function getWidth(): int;", "public function getPad()\n {\n return $this->pad;\n }", "public function getBorderWidth() {\n return $this->borderWidth;\n }", "public function getInnerWidth(){\n return $this->getWidth(true, false);\n }", "public function get_baseline_offset() {\r\n if ($this->sizefixed == false) {\r\n $this->recompute_size();\r\n }\r\n return $this->baselineoffset;\r\n }", "function getOrientation()\n {\n if (imagesx($this->img) > imagesy($this->img)) $rect = \"horizontal\";\n if (imagesy($this->img) > imagesx($this->img)) $rect = \"vertical\";\n if (imagesx($this->img) == imagesx($this->img)) $rect = \"square\";\n\n return $rect;\n }", "public function getDimensionX()\n {\n return $this->dimensionX;\n }", "public function getOriginalWidth()\n {\n return $this->_getImageObj()->getOriginalWidth();\n }", "public function getWidth()\n\t{\n\t\treturn imagesx($this->image());\n\t}", "public function paddingProvider()\n {\n return [[1]];\n }", "private function axisLabelsSeries($rect) {\r\n $tmpNum = 0;\r\n $tmpSt = \"\";\r\n $tmpValue = 0;\r\n\r\n $this->calcAllSeries();\r\n $tmpRange = $this->calcFirstLastAllSeries($rect);\r\n\r\n if ($tmpRange->first != intval('1000000000000')) { // MAX_VALUE\r\n $oldPosLabel = -1;\r\n $oldSizeLabel = 0;\r\n $tmpLabelW = $this->axis->getHorizontal();\r\n switch ($this->axis->getLabels()->iAngle) {\r\n case 90:\r\n case 270:\r\n $tmpLabelW = !$tmpLabelW;\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n $axisLabels = $this->axis->getLabels();\r\n for ( $t = $tmpRange->first; $t <= $tmpRange->last; $t++) {\r\n $r = $this->getAxisSeriesLabel($t);\r\n if ($r->result) {\r\n $tmpValue = $r->value;\r\n $tmpSt = $r->label;\r\n\r\n if (($tmpValue >= $this->axis->iMinimum) &&\r\n ($this->tmpValue <= $this->axis->iMaximum)) {\r\n $tmp = $this->axis->calcPosValue($tmpValue);\r\n if (!$this->axis->getTickOnLabelsOnly()) {\r\n $this->addTick($tmp);\r\n }\r\n\r\n if ($axisLabels->getVisible() &&\r\n (strlen($tmpSt) != 0)) {\r\n\r\n $tmpMulti = $this->axis->chart->multiLineTextWidth(\r\n $tmpSt);\r\n\r\n $tmpLabelSize = $tmpMulti->width;\r\n $tmpNum = $tmpMulti->count;\r\n\r\n if (!$tmpLabelW) {\r\n $tmpLabelSize = $this->chart->getGraphics3D()->getFontHeight() * $tmpNum;\r\n }\r\n if (($axisLabels->iSeparation != 0) &&\r\n ($this->oldPosLabel != -1)) {\r\n $tmpLabelSize += (int) (0.02 * $tmpLabelSize *\r\n $axisLabels->iSeparation);\r\n $tmpLabelSize *= 0.5;\r\n\r\n if ($tmp >= $oldPosLabel) {\r\n $tmpDraw = (($tmp -\r\n $tmpLabelSize) >=\r\n ($this->oldPosLabel +\r\n $oldSizeLabel));\r\n } else {\r\n $tmpDraw = (($tmp +\r\n $tmpLabelSize) <=\r\n ($this->oldPosLabel -\r\n $oldSizeLabel));\r\n }\r\n\r\n if ($tmpDraw) {\r\n $this->drawThisLabel($tmp, $tmpSt, null);\r\n $oldPosLabel = $tmp;\r\n $oldSizeLabel = $tmpLabelSize;\r\n }\r\n } else {\r\n $this->drawThisLabel($tmp, $tmpSt, null);\r\n $oldPosLabel = $tmp;\r\n $oldSizeLabel = $tmpLabelSize / 2;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n $this->axis->iSeriesList->clear(false);\r\n }\r\n }", "protected function all_axes_change_spaces_to_newline(){\n\t\tif (strcmp($this->x_label, \"Frame #\") == 0){\n\t\t\t$this->x_label = \"Frame\\\\n#\";\n\t\t}\n\t\tif (strcmp($this->x_label, \"Column 1\") == 0){\n\t\t\t$this->x_label = \"Column\\\\n1\";\n\t\t}\n\t\tif (strcmp($this->x_label, \"Column 2\") == 0){\n\t\t\t$this->x_label = \"Column\\\\n2\";\n\t\t}\n\t\tif (strcmp($this->x_label, \"Column 3\") == 0){\n\t\t\t$this->x_label = \"Column\\\\n3\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Frame #\") == 0){\n\t\t\t$this->y_label = \"Frame\\\\n#\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Column 1\") == 0){\n\t\t\t$this->y_label = \"Column\\\\n1\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Column 2\") == 0){\n\t\t\t$this->y_label = \"Column\\\\n2\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Column 3\") == 0){\n\t\t\t$this->y_label = \"Column\\\\n3\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Frame #\") == 0){\n\t\t\t$this->z_label = \"Frame\\\\n#\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Column 1\") == 0){\n\t\t\t$this->z_label = \"Column\\\\n1\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Column 2\") == 0){\n\t\t\t$this->z_label = \"Column\\\\n2\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Column 3\") == 0){\n\t\t\t$this->z_label = \"Column\\\\n3\";\n\t\t}\n\t}", "private function getPosition()\n {\n if ($this->labelCounter == 1) {\n return [0, 0];\n }\n\n if ($this->labelCounter == 2) {\n return [0, Fpdi::PAGE_SIZE_A6_WIDTH];\n }\n\n if ($this->labelCounter == 3) {\n return [Fpdi::PAGE_SIZE_A6_HEIGHT, 0];\n }\n\n if ($this->labelCounter == 4) {\n return [Fpdi::PAGE_SIZE_A6_HEIGHT, Fpdi::PAGE_SIZE_A6_WIDTH];\n }\n }", "public function getHorizontal(): int\n {\n return $this->horizontalChars;\n }", "private function getPadding($dataCount, $ecCount)\n\t{\n\t\t// reserve 1 code word for the length descriptor\n\t\t$totalCount = $dataCount + $ecCount + 1;\n\t\t$mod = $totalCount % $this->options['columns'];\n\n\t\tif ($mod > 0) {\n\t\t\t$padCount = $this->options['columns'] - $mod;\n\t\t\t$padding = array_fill(0, $padCount, 900);\n\t\t} else {\n\t\t\t$padding = [];\n\t\t}\n\n\t\treturn $padding;\n\t}", "public function getCenterX()\n {\n return $this->getX() + $this->getWidth() / 2.0;\n }", "public function getImgAdjustment()\n\t{\n\t\treturn $this->imgAdjustment;\n\t}", "public function getWidth()\n {\n return imagesx($this->currentImage);\n }", "public function getOriginalWidth()\n {\n return $this->_getModel()->getImageProcessor()->getOriginalWidth();\n }", "public function getWidth() {\n return imagesx($this->image);\n }", "public function getHorizontalAlignment()\n {\n if (array_key_exists(\"horizontalAlignment\", $this->_propDict)) {\n return $this->_propDict[\"horizontalAlignment\"];\n } else {\n return null;\n }\n }", "public function getSizeX()\n\t{\n\t\treturn imagesx($this->getImage());\n\t}", "function codeless_image_crop_positions() {\n\treturn array(\n\t\t'' => esc_html__( 'Default', 'folie' ),\n\t\t'left-top' => esc_html__( 'Top Left', 'folie' ),\n\t\t'right-top' => esc_html__( 'Top Right', 'folie' ),\n\t\t'center-top' => esc_html__( 'Top Center', 'folie' ),\n\t\t'left-center' => esc_html__( 'Center Left', 'folie' ),\n\t\t'right-center' => esc_html__( 'Center Right', 'folie' ),\n\t\t'center-center' => esc_html__( 'Center Center', 'folie' ),\n\t\t'left-bottom' => esc_html__( 'Bottom Left', 'folie' ),\n\t\t'right-bottom' => esc_html__( 'Bottom Right', 'folie' ),\n\t\t'center-bottom' => esc_html__( 'Bottom Center', 'folie' ),\n\t);\n}", "public function getWidth(): float;", "function row_seperator($col_length){\n$row = '';\nforeach($col_length as $column_length)\n{\n$row .= PLUS . str_repeat(Xaxis, (Xspace * 2) + $column_length);\n}\n$row .= PLUS;\n \nreturn $row;\n}", "public function getFullX()\r\n\t{\r\n\t\treturn $this->getSizeX() + $this->getSpaceLeft() + $this->getSpaceRight();\r\n\t}", "protected function getSideBordersLength()\n\t{\n\t\t$border = (static::BORDER_WIDTH + static::MIN_SPACE_FROM_BORDER_X);\n\n\t\treturn $border * $this->nesting;\n\t}", "public function getWidth();", "public function getWidth();", "public function getWidth();", "public function getWidth();", "public function getWidth();", "public function cropLeftBottom()\n {\n $crop = new Crop([\n 'image' => $this->image,\n 'width' => 100,\n 'height' => 100,\n 'horizontalAlign' => Crop::LEFT,\n 'verticalAlign' => Crop::BOTTOM\n ]);\n $image = $crop->applyFilter();\n $size = $image->getResourceImage()->getSize();\n $this->assertEquals(100, $size->getHeight());\n $this->assertEquals(100, $size->getWidth());\n $color = new Color('6e1aec', 0);\n $this->assertEquals(\n $color,\n $image->getResourceImage()->getColorAt(new Point(10, 10))\n );\n }", "public function getIndentationLeft() {\n return $this->indentationLeft;\n }", "public function getAxisLabelLineLength()\n\t{\n\t\treturn $this->axis_label_linelength;\n\t}", "public function getWidth(){ }", "function getWidth();", "function getWidth();", "function remove_caption_padding( $width ) {\n\treturn $width - 10;\n}", "protected function getBordersLength()\n\t{\n\t\treturn $this->getSideBordersLength() * 2;\n\t}", "protected function tbMarkMarginX()\n {\n\n\n if (isset($this->aTableType['TB_ALIGN'])) {\n $tb_align = $this->aTableType['TB_ALIGN'];\n } else {\n $tb_align = '';\n }\n\n //set the table align\n switch ($tb_align) {\n case 'C':\n $this->iTableStartX = $this->lMargin + $this->aTableType['L_MARGIN'] + ($this->PageWidth() - $this->tbGetWidth()) / 2;\n break;\n case 'R':\n $this->iTableStartX = $this->lMargin + $this->aTableType['L_MARGIN'] + ($this->PageWidth() - $this->tbGetWidth());\n break;\n default:\n $this->iTableStartX = $this->lMargin + $this->aTableType['L_MARGIN'];\n break;\n }//\n\n }", "public function width()\n {\n return imagesx($this->image);\n }", "private function getAxis() {\n\t\t$offset = ceil(self::ZBX_ARROW_SIZE / 2);\n\n\t\tif ($this->type == GRAPH_YAXIS_SIDE_BOTTOM) {\n\t\t\t$x = $this->x + $this->width + self::ZBX_ARROW_OFFSET;\n\t\t\t$y = $this->y;\n\n\t\t\treturn [\n\t\t\t\t// Draw axis line.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->setAttribute('shape-rendering', 'crispEdges')\n\t\t\t\t\t->moveTo($this->x, $y)\n\t\t\t\t\t->lineTo($x, $y),\n\t\t\t\t// Draw arrow.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->moveTo($x + self::ZBX_ARROW_SIZE, $y)\n\t\t\t\t\t->lineTo($x, $y - $offset)\n\t\t\t\t\t->lineTo($x, $y + $offset)\n\t\t\t\t\t->closePath()\n\t\t\t];\n\t\t}\n\t\telse {\n\t\t\t$x = ($this->type == GRAPH_YAXIS_SIDE_RIGHT) ? $this->x : $this->x + $this->width;\n\t\t\t$y = $this->y - self::ZBX_ARROW_OFFSET;\n\n\t\t\treturn [\n\t\t\t\t// Draw axis line.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->setAttribute('shape-rendering', 'crispEdges')\n\t\t\t\t\t->moveTo($x, $y)\n\t\t\t\t\t->lineTo($x, $this->height + $y + self::ZBX_ARROW_OFFSET),\n\t\t\t\t// Draw arrow.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->moveTo($x, $y - self::ZBX_ARROW_SIZE)\n\t\t\t\t\t->lineTo($x - $offset, $y)\n\t\t\t\t\t->lineTo($x + $offset, $y)\n\t\t\t\t\t->closePath()\n\t\t\t];\n\t\t}\n\t}", "public function getCenter();", "public function getCenter();", "public function getXDescriptionOffsetBottom()\n\t{\n\t\treturn $this->xdescr_offY;\n\t}", "public function getEditLayoutLeft() {\n return '';\n }", "public function getWidth() {}", "public function getWidth(): int|null;", "function _plotWidth()\n {\n return (min($this->height(), $this->width())) * 0.80;\n }", "public function getDimensionY();", "public function getWidth(): ?int;", "public function calculate_auto_width()\n {\n return $this->_frame->get_margin_width();\n }", "public function getThePlatformSetIconWidth(){\n \n $criteria = new CDbCriteria();\n $criteria->select = '*';\n // $criteria->condition='id=:id';\n // $criteria->params = array(':id'=>$id);\n $icon = PlatformSettings::model()->find($criteria); \n \n return $icon['icon_width'];\n }", "public function getWidth() {\n\t\treturn $this->originalDimensions['width'];\n\t}", "public function getWidth() {\n\t\treturn $this->originalDimensions['width'];\n\t}", "function getLeft() ;", "function getPaddingCharFloat()\n {\n return $this->_paddingCharFloat;\n }", "public function getWidth()\n {\n return null;\n }", "function GetGamepadAxisCount(int $gamepad): int { return 0; }", "public function getLeftPositionResized()\n {\n if (is_null($this->getLeftPosition())) {\n return 0;\n }\n if (is_null($this->leftPositionResized)) {\n $leftPositionResized = $this->getLeftPosition() / self::MAP_SCALE;\n $this->setLeftPositionResized($leftPositionResized);\n return $leftPositionResized;\n } else {\n return $this->leftPositionResized;\n }\n }", "function setHorizontalMargin($value) {\n $this->fields['margin_right'] = $this->fields['margin_left'] = $value;\n }" ]
[ "0.68826663", "0.6522984", "0.6473026", "0.6332954", "0.5965808", "0.5802207", "0.5780925", "0.56983", "0.56146735", "0.560156", "0.5551525", "0.54042566", "0.54042566", "0.5326966", "0.52957994", "0.52897525", "0.5278702", "0.5258682", "0.52489716", "0.52026695", "0.5183006", "0.516252", "0.5150138", "0.5147136", "0.5111544", "0.5095752", "0.5071793", "0.50688964", "0.50563866", "0.5056037", "0.50513905", "0.50482243", "0.50342447", "0.50213975", "0.498613", "0.49344626", "0.49324864", "0.49324864", "0.49324864", "0.4932013", "0.492237", "0.4921016", "0.4916501", "0.4913441", "0.48971164", "0.4870582", "0.48545763", "0.48540923", "0.4852653", "0.48451158", "0.48360702", "0.48298547", "0.48242885", "0.48148456", "0.481167", "0.48017973", "0.48004955", "0.4799922", "0.4796172", "0.47902948", "0.47901806", "0.47808433", "0.47713107", "0.47709545", "0.4751682", "0.47483072", "0.47483072", "0.47483072", "0.47483072", "0.47483072", "0.47432774", "0.47403356", "0.47399244", "0.4736633", "0.47292897", "0.47292897", "0.47287396", "0.47205514", "0.47012845", "0.46973607", "0.46927232", "0.46892986", "0.46892986", "0.4685109", "0.4679186", "0.4676735", "0.46671733", "0.46495652", "0.46478552", "0.46460873", "0.46327418", "0.4631739", "0.46305814", "0.46305814", "0.4624404", "0.46166772", "0.46157494", "0.46068105", "0.46034136", "0.45948505" ]
0.8003556
0
Gets the right padding of the axis canvas from the chart picture
Получает правое отступление оси canvas из изображения графика
public function getAxisPaddingRight() { return $this->axis_padding_right; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAxisPaddingLeft()\n\t{\n\t\treturn $this->axis_padding_left;\n\t}", "public function getAxisPaddingBottom()\n\t{\n\t\treturn $this->axis_padding_bottom;\n\t}", "public function getAxisPaddingTop()\n\t{\n\t\treturn $this->axis_padding_top;\n\t}", "public function setAxisPaddingRight($right)\n\t{\n\t\t$this->axis_padding_right = $right;\n\t}", "function _fillRight()\n {\n return (int) (($this->_left + $this->_right + $this->_plotWidth()) / 2);\n }", "public function getAxisYLabelOffsetX()\n\t{\n\t\treturn $this->axis_ylabel_offX;\n\t}", "public function getDimensionY();", "function _fillRight()\n {\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_RIGHT) {\n return $this->_left;\n }\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_CENTER_X) {\n return $this->_left + $this->_font->_centerWidth($this->_text);\n } else {\n return $this->_left + $this->_font->width($this->_text);\n }\n }", "public function getPadding()\n {\n return $this->padding;\n }", "public function getPadding()\n {\n return $this->padding;\n }", "public function getAxisXLabelOffsetY()\n\t{\n\t\treturn $this->axis_xlabel_offY;\n\t}", "public function getPadding()\n {\n return $this->_padding;\n }", "public function getImgBorder()\n {\n return $this->strImgBorder;\n }", "public function getPadding() { return $this->_padding; }", "public function getPaddingStandard();", "public function getWidthButBorders()\n\t{\n\t\treturn $this->getTotalWidth() - $this->getBordersLength();\n\t}", "protected function getBordersLength()\n\t{\n\t\treturn $this->getSideBordersLength() * 2;\n\t}", "public function getAxisStrokeDistance()\n\t{\n\t\treturn $this->delta_pixel;\n\t}", "protected function getSideBordersLength()\n\t{\n\t\t$border = (static::BORDER_WIDTH + static::MIN_SPACE_FROM_BORDER_X);\n\n\t\treturn $border * $this->nesting;\n\t}", "public function setAxisPaddingLeft($left)\n\t{\n\t\t$this->axis_padding_left = $left;\n\t}", "public function getInnerWidth(){\n return $this->getWidth(true, false);\n }", "function width()\n {\n return $this->_canvas->getWidth();\n }", "function getOrientation()\n {\n if (imagesx($this->img) > imagesy($this->img)) $rect = \"horizontal\";\n if (imagesy($this->img) > imagesx($this->img)) $rect = \"vertical\";\n if (imagesx($this->img) == imagesx($this->img)) $rect = \"square\";\n\n return $rect;\n }", "function kvell_edge_get_title_content_padding() {\n\t\t$title_content_padding = apply_filters( 'kvell_edge_title_content_padding', 0 );\n\t\t\n\t\treturn intval( $title_content_padding );\n\t}", "private function getAxis() {\n\t\t$offset = ceil(self::ZBX_ARROW_SIZE / 2);\n\n\t\tif ($this->type == GRAPH_YAXIS_SIDE_BOTTOM) {\n\t\t\t$x = $this->x + $this->width + self::ZBX_ARROW_OFFSET;\n\t\t\t$y = $this->y;\n\n\t\t\treturn [\n\t\t\t\t// Draw axis line.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->setAttribute('shape-rendering', 'crispEdges')\n\t\t\t\t\t->moveTo($this->x, $y)\n\t\t\t\t\t->lineTo($x, $y),\n\t\t\t\t// Draw arrow.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->moveTo($x + self::ZBX_ARROW_SIZE, $y)\n\t\t\t\t\t->lineTo($x, $y - $offset)\n\t\t\t\t\t->lineTo($x, $y + $offset)\n\t\t\t\t\t->closePath()\n\t\t\t];\n\t\t}\n\t\telse {\n\t\t\t$x = ($this->type == GRAPH_YAXIS_SIDE_RIGHT) ? $this->x : $this->x + $this->width;\n\t\t\t$y = $this->y - self::ZBX_ARROW_OFFSET;\n\n\t\t\treturn [\n\t\t\t\t// Draw axis line.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->setAttribute('shape-rendering', 'crispEdges')\n\t\t\t\t\t->moveTo($x, $y)\n\t\t\t\t\t->lineTo($x, $this->height + $y + self::ZBX_ARROW_OFFSET),\n\t\t\t\t// Draw arrow.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->moveTo($x, $y - self::ZBX_ARROW_SIZE)\n\t\t\t\t\t->lineTo($x - $offset, $y)\n\t\t\t\t\t->lineTo($x + $offset, $y)\n\t\t\t\t\t->closePath()\n\t\t\t];\n\t\t}\n\t}", "public function getPad()\n {\n return $this->pad;\n }", "function getTopRight() { return $this->_topright; }", "function _fillLeft()\n {\n return (int) (($this->_left + $this->_right - $this->_plotWidth()) / 2);\n }", "function getWidth()\n\t{\n\t\treturn $this->XSize;\n\t}", "protected function draw_axis_name(){\n\n\t\t$valid_axis = array('x1', 'y', 'y2');\n\n\t\tforeach($valid_axis as $axis) {\n\n\t\t\t$var_title = 'axis_title_' . $axis;\n\t\t\t$var_unit = 'axis_unit_' . $axis;\n\t\t\t$var_position = 'axis_position_' . $axis;\n\n\t\t\tif($this->$var_title) {\n\n\t\t\t\t$title = $this->$var_title . (($this->$var_unit != '') ? ' [' . $this->$var_unit . ']' : '');\n\t\t\t\tif($axis == 'y') {\n\t\t\t\t\t$angle = 90;\n\t\t\t\t}elseif($axis == 'y2') {\n\t\t\t\t\t$angle = 270;\n\t\t\t\t}else {\n\t\t\t\t\t$angle = 0;\n\t\t\t\t}\n\n\t\t\t\t/* calculate the size of the title */\n\t\t\t\t$title_box = imageftbbox($this->axis_font_size, $angle, $this->axis_font, $title);\n\n\t\t\t\tif($axis == 'x1'){\n\t\t\t\t\t$y = $this->canvas_height - 2*$this->axis_font_size;\n\t\t\t\t\t$x = ($this->$var_position == 'middle') ? ($this->chart_width / 2) - ($title_box[4] / 2) + $this->offset_left\n\t\t\t\t\t : $this->canvas_width - $this->offset_right - $title_box[4];\n\t\t\t\t}elseif($axis == 'y') {\n\t\t\t\t\t$x = 3*$this->axis_font_size;\n\t\t\t\t\t$y = ($this->$var_position == 'middle') ? ($this->chart_height / 2) - ($title_box[3] / 2) + $this->offset_top\n\t\t\t\t\t : -$title_box[3] + $this->offset_top;\n\t\t\t\t}else{\n\t\t\t\t\t$x = $this->canvas_width - 3*$this->axis_font_size;;\n\t\t\t\t\t$y = ($this->$var_position == 'middle') ? ($this->chart_height / 2) - ($title_box[3] / 2) + $this->offset_top\n\t\t\t\t\t : -$title_box[3] + $this->offset_top;\n\t\t\t\t}\n\n\t\t\t\t/* draw the y-title */\n\t\t\t\timagefttext($this->img, $this->axis_font_size, $angle,$x ,$y , $this->axis_font_color, $this->axis_font, $title);\n\t\t\t}\n\t\t}\n\t}", "public function getOuterWidth(){\n return $this->getWidth(false, true);\n }", "function get_width() {\n //ignore image width, use same width as on predefined bullet List_Bullet_Frame_Decorator\n //for proper alignment of bullet image and text. Allow image to not fitting on left border.\n //This controls the distance between bullet image and text \n //return $this->_width;\n return $this->_frame->get_style()->get_font_size()*List_Bullet_Frame_Decorator::BULLET_SIZE + \n 2 * List_Bullet_Frame_Decorator::BULLET_PADDING;\n }", "public function getMarginRight() : ?int\n {\n return $this->marginRight;\n }", "public function get_baseline_offset() {\r\n if ($this->sizefixed == false) {\r\n $this->recompute_size();\r\n }\r\n return $this->baselineoffset;\r\n }", "public function getYDescriptionOffsetLeft()\n\t{\n\t\treturn $this->ydescr_offX;\n\t}", "public function getImgAdjustment()\n\t{\n\t\treturn $this->imgAdjustment;\n\t}", "public function getWidth(): int;", "public function getWidth(): int;", "public function getWidth(): int;", "public function getAxisXLabelOffsetX()\n\t{\n\t\treturn $this->axis_xlabel_offX;\n\t}", "public function getPaddingReservedSize();", "public function getHorizontalConfig()\n {\n $model = \\Magento\\Framework\\App\\ObjectManager::getInstance()->create('Magento\\Framework\\App\\Config\\ScopeConfigInterface');\n $hor = $model->getValue('imagegallery/gallerypage/horizontaldimension', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n\n return $hor;\n }", "private function drawYaxis()\n {\n\n $min =\n round($this->min, $this->precision);\n $max =\n round($this->max, $this->precision);\n\n if (!isset($this->y_axis_legend_increment)) {\n\n $increment =\n round(($max - $min) / $this->total_values, $this->precision);\n } else {\n $increment = $this->y_axis_legend_increment;\n }\n\n if ($increment == 0) {\n $increment = 1;\n }\n\n //$spacing = \\round($spacing, 10);\n for ($label = $min; $label <= $max + $increment; $label+=$increment) {\n\n $px_position = $this->plotValue($label);\n if ($this->x_axis_hints == 1) {\n \\imageline($this->im, 0, $px_position, $this->width,\n $px_position, $this->ink['axis']);\n }\n imagestring($this->im, 1, 10, $px_position - 4, $label,\n $this->ink['text']);\n }\n }", "public function getBorderWidth() {\n return $this->borderWidth;\n }", "function xx_thumb_cols() {\n return 4;\n}", "public function getOriginalWidth()\n {\n return $this->_getImageObj()->getOriginalWidth();\n }", "public function getWidth()\n\t{\n\t\treturn imagesx($this->image());\n\t}", "function GetGamepadAxisCount(int $gamepad): int { return 0; }", "public function getDimension(): array\n {\n $fontInfo = $this->getFontInfo();\n $rotationAngle = $this->getRotationAngle();\n $width = $fontInfo->getWidth();\n $height = $fontInfo->getHeight();\n if ($rotationAngle === 90 || $rotationAngle === 270) {\n return array($height, $width);\n } else {\n return array($width, $height);\n }\n }", "public function getWidth() {\n return imagesx($this->image);\n }", "public function getDimensionX();", "public function getAxisYLabelOffsetY()\n\t{\n\t\treturn $this->axis_ylabel_offY;\n\t}", "public function getAxisLabelLineLength()\n\t{\n\t\treturn $this->axis_label_linelength;\n\t}", "protected function generateCropSize(): string\n {\n $this->updateTargetDimensions();\n $command = [];\n $command[] = $this->getResizeOperator();\n $command[] = $this->getDimensions() . '^';\n $command[] = '-gravity ' . $this->options->getOption('gravity');\n $command[] = '-extent ' . $this->getDimensions();\n\n return implode(' ', $command);\n }", "function mediadesk_edge_get_title_content_padding() {\n\t\t$title_content_padding = apply_filters( 'mediadesk_edge_filter_title_content_padding', 0 );\n\t\t\n\t\treturn intval($title_content_padding);\n\t}", "public function getOriginalWidth()\n {\n return $this->_getModel()->getImageProcessor()->getOriginalWidth();\n }", "public function setAxisPaddingBottom($bottom)\n\t{\n\t\t$this->axis_padding_bottom = $bottom;\n\t}", "public function getIndentationRight() {\n return $this->indentationRight;\n }", "function getAbscissaMargin($Data)\n {\n foreach($Data[\"Axis\"] as $AxisID => $Values) { if ( $Values[\"Identity\"] == AXIS_X ) { return($Values[\"Margin\"]); } }\n return(0);\n }", "public function getWidth();", "public function getWidth();", "public function getWidth();", "public function getWidth();", "public function getWidth();", "public function getWidth()\n {\n return imagesx($this->currentImage);\n }", "public function getSizeY() \n\t{\n\t\treturn imagesy($this->getImage());\n\t}", "protected function canvasSpacingX()\n {\n $this->canvas['spacing']['x'] = 0;\n\n if ($this->intermediate['width'] < $this->canvas['width']) {\n $difference = $this->canvas['width'] - $this->intermediate['width'];\n\n if ($difference % 2 === 0) {\n $this->canvas['spacing']['x'] = $difference / 2;\n } else {\n if ($difference > 1) {\n $this->canvas['spacing']['x'] = ($difference - 1) / 2 + 1;\n } else {\n $this->canvas['spacing']['x'] = 1;\n }\n }\n }\n }", "public function getWidth(){ }", "public function getDimensions()\r\n {\r\n return round($this->dimension1, 1) . \"x\" . round($this->dimension2, 1) . \"x\" . round($this->dimension3, 1) . ' ' . self::DIMENSION_UNIT;\r\n }", "protected function _calculateBarcodeWidth()\n {\n $quietZone = $this->getQuietZone();\n $startCharacter = (2 * $this->_barThinWidth) * $this->_factor;\n $stopCharacter = (1 * $this->_barThinWidth) * $this->_factor;\n $encodedData = (10 * $this->_barThinWidth) * $this->_factor * strlen($this->getText());\n return $quietZone + $startCharacter + $encodedData + $stopCharacter + $quietZone;\n }", "private function axisLabelsSeries($rect) {\r\n $tmpNum = 0;\r\n $tmpSt = \"\";\r\n $tmpValue = 0;\r\n\r\n $this->calcAllSeries();\r\n $tmpRange = $this->calcFirstLastAllSeries($rect);\r\n\r\n if ($tmpRange->first != intval('1000000000000')) { // MAX_VALUE\r\n $oldPosLabel = -1;\r\n $oldSizeLabel = 0;\r\n $tmpLabelW = $this->axis->getHorizontal();\r\n switch ($this->axis->getLabels()->iAngle) {\r\n case 90:\r\n case 270:\r\n $tmpLabelW = !$tmpLabelW;\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n $axisLabels = $this->axis->getLabels();\r\n for ( $t = $tmpRange->first; $t <= $tmpRange->last; $t++) {\r\n $r = $this->getAxisSeriesLabel($t);\r\n if ($r->result) {\r\n $tmpValue = $r->value;\r\n $tmpSt = $r->label;\r\n\r\n if (($tmpValue >= $this->axis->iMinimum) &&\r\n ($this->tmpValue <= $this->axis->iMaximum)) {\r\n $tmp = $this->axis->calcPosValue($tmpValue);\r\n if (!$this->axis->getTickOnLabelsOnly()) {\r\n $this->addTick($tmp);\r\n }\r\n\r\n if ($axisLabels->getVisible() &&\r\n (strlen($tmpSt) != 0)) {\r\n\r\n $tmpMulti = $this->axis->chart->multiLineTextWidth(\r\n $tmpSt);\r\n\r\n $tmpLabelSize = $tmpMulti->width;\r\n $tmpNum = $tmpMulti->count;\r\n\r\n if (!$tmpLabelW) {\r\n $tmpLabelSize = $this->chart->getGraphics3D()->getFontHeight() * $tmpNum;\r\n }\r\n if (($axisLabels->iSeparation != 0) &&\r\n ($this->oldPosLabel != -1)) {\r\n $tmpLabelSize += (int) (0.02 * $tmpLabelSize *\r\n $axisLabels->iSeparation);\r\n $tmpLabelSize *= 0.5;\r\n\r\n if ($tmp >= $oldPosLabel) {\r\n $tmpDraw = (($tmp -\r\n $tmpLabelSize) >=\r\n ($this->oldPosLabel +\r\n $oldSizeLabel));\r\n } else {\r\n $tmpDraw = (($tmp +\r\n $tmpLabelSize) <=\r\n ($this->oldPosLabel -\r\n $oldSizeLabel));\r\n }\r\n\r\n if ($tmpDraw) {\r\n $this->drawThisLabel($tmp, $tmpSt, null);\r\n $oldPosLabel = $tmp;\r\n $oldSizeLabel = $tmpLabelSize;\r\n }\r\n } else {\r\n $this->drawThisLabel($tmp, $tmpSt, null);\r\n $oldPosLabel = $tmp;\r\n $oldSizeLabel = $tmpLabelSize / 2;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n $this->axis->iSeriesList->clear(false);\r\n }\r\n }", "public function getWidth(): float;", "public function paddingProvider()\n {\n return [[1]];\n }", "public function getWidth(){\n return imagesx($this->outputImage);\n }", "public function widthTopLeft();", "protected function getAttributesPaddingRules(): array\n {\n return [\n 'accountNumber' => [9, ' ', \\STR_PAD_LEFT],\n 'amount' => [10, '0', \\STR_PAD_LEFT],\n 'amountOfWithholdingTax' => [8, '0', \\STR_PAD_LEFT],\n 'indicator' => [1],\n 'lodgementReference' => [18],\n 'nameOfRemitter' => [16],\n 'titleOfAccount' => [32],\n 'traceAccountNumber' => [9, ' ', \\STR_PAD_LEFT],\n ];\n }", "public function getXDescriptionOffsetBottom()\n\t{\n\t\treturn $this->xdescr_offY;\n\t}", "public function getWidth()\n {\n return 280;\n }", "public function getWidth() {}", "protected function encodePixelAspectRatio(): string\n {\n return pack('C', $this->source->getPixelAspectRatio());\n }", "function getWidth();", "function getWidth();", "public function width()\n {\n return imagesx($this->image);\n }", "function getBottomRight() { return $this->_bottomright; }", "public function getDimensionY()\n {\n return $this->dimensionY;\n }", "public function getAxisFontSize()\n\t{\n\t\treturn $this->axis_fontsize;\n\t}", "public function getWidth() {\n\t\treturn $this->originalDimensions['width'];\n\t}", "public function getWidth() {\n\t\treturn $this->originalDimensions['width'];\n\t}", "function shop_isle_thumb_cols() {\n\treturn 6;\n}", "function get_width()\n\t{\n\t\treturn 12;\n\t}", "function _plotWidth()\n {\n return (min($this->height(), $this->width())) * 0.80;\n }", "protected function canvasSpacingY()\n {\n $this->canvas['spacing']['y'] = 0;\n\n if ($this->intermediate['height'] < $this->canvas['height']) {\n\n $difference = $this->canvas['height'] - $this->intermediate['height'];\n\n if ($difference % 2 === 0) {\n $this->canvas['spacing']['y'] = $difference / 2;\n } else {\n if ($difference > 1) {\n $this->canvas['spacing']['y'] = ($difference - 1) / 2 + 1;\n } else {\n $this->canvas['spacing']['y'] = 1;\n }\n }\n }\n }", "protected function getDefaultTerminalDimensions()\n {\n return new Rectangle(80, 20);\n }", "public function getImagenY()\n{\nreturn imagesy($this->_imagen);\n}", "private function getPadding($dataCount, $ecCount)\n\t{\n\t\t// reserve 1 code word for the length descriptor\n\t\t$totalCount = $dataCount + $ecCount + 1;\n\t\t$mod = $totalCount % $this->options['columns'];\n\n\t\tif ($mod > 0) {\n\t\t\t$padCount = $this->options['columns'] - $mod;\n\t\t\t$padding = array_fill(0, $padCount, 900);\n\t\t} else {\n\t\t\t$padding = [];\n\t\t}\n\n\t\treturn $padding;\n\t}", "function get_margin_height()\n {\n $style = $this->_frame->get_style();\n\n if ($style->list_style_type === \"none\") {\n return 0;\n }\n\n return $style->get_font_size() * self::BULLET_SIZE + 2 * self::BULLET_PADDING;\n }", "function _axis_options($x_grid=true, $y_grid=true)\r\n{\r\n\t$x_grid_colour = \"color:'transparent',\";\t\t// hide the grid but we still want to specify the count\r\n\t$y_grid_colour = \"color:'transparent',\";\t\t// .. because it determines the number of labels\r\n\r\n\tif (($this->chart_data->show_grid) and ($x_grid))\r\n\t\t$x_grid_colour = \"\";\r\n\t\t\r\n\tif (($this->chart_data->show_grid) and ($y_grid))\r\n\t\t$y_grid_colour = \"\";\r\n\t\t\r\n\tif (($this->chart_data->x_labels == -1) or ($this->chart_data->x_labels == ''))\t\t\t// auto, which means 5\r\n\t\t$x_grid_count = \"count:5\";\r\n\telse\r\n\t\t$x_grid_count = \"count:\".$this->chart_data->x_labels;\r\n\t\r\n\tif (($this->chart_data->y_labels == -1) or ($this->chart_data->y_labels == ''))\t\t\t// auto, which means 5\r\n\t\t$y_grid_count = \"count:5\";\r\n\telse\r\n\t\t$y_grid_count = \"count:\".$this->chart_data->y_labels;\r\n\t\r\n\t$x_gridlines = \",gridlines:{\".$x_grid_colour.$x_grid_count.\"}\";\r\n\t$y_gridlines = \",gridlines:{\".$y_grid_colour.$y_grid_count.\"}\";\r\n\r\n// axis label formats\r\n\r\n\tif ($this->chart_data->x_format == FORMAT_NONE)\r\n\t\t$x_format = '';\r\n\telse\r\n\t\t$x_format = ',format:\"'.$this->_gcFormatString($this->chart_data->x_format).'\"';\r\n\t\t\r\n\tif ($this->chart_data->y_format == FORMAT_NONE)\r\n\t\t$y_format = '';\r\n\telse\r\n\t\t$y_format = ',format:\"'.$this->_gcFormatString($this->chart_data->y_format).'\"';\r\n\t\t\r\n// X axis ranges\r\n\r\n\tif (($this->chart_data->x_start == '') and ($this->chart_data->x_end == ''))\r\n\t\t$x_range = '';\r\n\telse\r\n\t\t{\r\n\t\t$x_min = $this->_gcFormatNumber($this->chart_x_min,$this->chart_data->x_format);\r\n\t\t$x_max = $this->_gcFormatNumber($this->chart_x_max,$this->chart_data->x_format);\r\n\t\t$x_range = \",viewWindowMode:'explicit',viewWindow:{min:$x_min,max:$x_max}\";\r\n\t\t}\r\n\r\n// Y axis ranges\r\n\r\n\tif (($this->chart_data->y_start == '') and ($this->chart_data->y_end == ''))\r\n\t\t$y_range = '';\r\n\telse\r\n\t\t$y_range = \",viewWindowMode:'explicit',viewWindow:{min:\".$this->chart_y_min.\",max:\".$this->chart_y_max.\"}\";\r\n\r\n// finally we are ready to specify the axis objects\r\n\r\n\t$this->gvOptions .= \",hAxis:{title:'\".$this->x_title.\"'\".$x_gridlines.$x_format.$x_range.\"}\";\r\n\t$this->gvOptions .= \",vAxis:{title:'\".$this->y_title.\"'\".$y_gridlines.$y_format.$y_range.\"}\";\r\n}", "function _fillBottom()\n {\n return (int) (($this->_top + $this->_bottom + $this->_plotHeight()) / 2);\n }", "function remove_caption_padding( $width ) {\n\treturn $width - 10;\n}", "protected function all_axes_change_spaces_to_newline(){\n\t\tif (strcmp($this->x_label, \"Frame #\") == 0){\n\t\t\t$this->x_label = \"Frame\\\\n#\";\n\t\t}\n\t\tif (strcmp($this->x_label, \"Column 1\") == 0){\n\t\t\t$this->x_label = \"Column\\\\n1\";\n\t\t}\n\t\tif (strcmp($this->x_label, \"Column 2\") == 0){\n\t\t\t$this->x_label = \"Column\\\\n2\";\n\t\t}\n\t\tif (strcmp($this->x_label, \"Column 3\") == 0){\n\t\t\t$this->x_label = \"Column\\\\n3\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Frame #\") == 0){\n\t\t\t$this->y_label = \"Frame\\\\n#\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Column 1\") == 0){\n\t\t\t$this->y_label = \"Column\\\\n1\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Column 2\") == 0){\n\t\t\t$this->y_label = \"Column\\\\n2\";\n\t\t}\n\t\tif (strcmp($this->y_label, \"Column 3\") == 0){\n\t\t\t$this->y_label = \"Column\\\\n3\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Frame #\") == 0){\n\t\t\t$this->z_label = \"Frame\\\\n#\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Column 1\") == 0){\n\t\t\t$this->z_label = \"Column\\\\n1\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Column 2\") == 0){\n\t\t\t$this->z_label = \"Column\\\\n2\";\n\t\t}\n\t\tif (strcmp($this->z_label, \"Column 3\") == 0){\n\t\t\t$this->z_label = \"Column\\\\n3\";\n\t\t}\n\t}" ]
[ "0.70485604", "0.6670785", "0.6617558", "0.6090766", "0.5666615", "0.5580978", "0.54951113", "0.546198", "0.5417242", "0.5417242", "0.536776", "0.53496933", "0.53446364", "0.53433025", "0.53060085", "0.52617335", "0.5234681", "0.52012724", "0.51785845", "0.51543766", "0.5100557", "0.5098811", "0.50953573", "0.5078747", "0.50717515", "0.5061755", "0.50278485", "0.5025098", "0.50124943", "0.4976888", "0.4971563", "0.49542302", "0.49377936", "0.49228847", "0.49145415", "0.49003685", "0.48983854", "0.48983854", "0.48983854", "0.4882814", "0.48709998", "0.48705247", "0.4859489", "0.48553383", "0.48463133", "0.4840111", "0.4831811", "0.48217812", "0.48159313", "0.48069793", "0.48050517", "0.48045212", "0.47964022", "0.479163", "0.47868344", "0.47659805", "0.47593796", "0.47586688", "0.47585702", "0.47576463", "0.47576463", "0.47576463", "0.47576463", "0.47576463", "0.47571754", "0.47550854", "0.47435275", "0.4736005", "0.4735484", "0.47332484", "0.4729559", "0.47238374", "0.47225174", "0.47176638", "0.47150633", "0.47109973", "0.4705739", "0.4704828", "0.47047937", "0.4704686", "0.47029138", "0.47029138", "0.46971768", "0.46942872", "0.46899742", "0.46859783", "0.46780187", "0.46780187", "0.46753308", "0.4674324", "0.4664312", "0.46617857", "0.46601442", "0.46538422", "0.464753", "0.46225643", "0.46154648", "0.46044022", "0.45910984", "0.45883587" ]
0.783036
0
Gets the bottom padding of the axis canvas from the chart picture
Получает нижнее отступление оси canvas из изображения диаграммы
public function getAxisPaddingBottom() { return $this->axis_padding_bottom; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAxisPaddingTop()\n\t{\n\t\treturn $this->axis_padding_top;\n\t}", "public function getAxisPaddingRight()\n\t{\n\t\treturn $this->axis_padding_right;\n\t}", "public function getAxisPaddingLeft()\n\t{\n\t\treturn $this->axis_padding_left;\n\t}", "public function setAxisPaddingBottom($bottom)\n\t{\n\t\t$this->axis_padding_bottom = $bottom;\n\t}", "function _fillBottom()\n {\n return (int) (($this->_top + $this->_bottom + $this->_plotHeight()) / 2);\n }", "public function getBottomOfImage()\n {\n return $this->bottomOfImage;\n }", "public function getImageBottom()\n {\n return $this->imageBottom;\n }", "function _fillBottom()\n {\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_BOTTOM) {\n return $this->_top;\n }\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_CENTER_Y) {\n return $this->_top + $this->_font->_centerHeight($this->_text);\n } else {\n return $this->_top + $this->_font->height($this->_text);\n }\n }", "public function getXDescriptionOffsetBottom()\n\t{\n\t\treturn $this->xdescr_offY;\n\t}", "public function getBottomDecoration()\n {\n if ($this->hasDijitParam('bottomDecoration')) {\n return $this->getDijitParam('bottomDecoration');\n }\n return [];\n }", "public function getDimensionY();", "public function getItemMarginBottom() {\n return $this->itemMarginBottom;\n }", "public function getImgBorder()\n {\n return $this->strImgBorder;\n }", "function getHeight()\n\t{\n\t\treturn $this->YSize;\n\t}", "public function getAxisXLabelOffsetY()\n\t{\n\t\treturn $this->axis_xlabel_offY;\n\t}", "function height()\n {\n return $this->_canvas->getHeight();\n }", "public function getPeri_bottom()\n {\n return $this->peri_bottom;\n }", "function _plotHeight()\n {\n return (min($this->height(), $this->width())) * 0.80;\n }", "function get_margin_height()\n {\n $style = $this->_frame->get_style();\n\n if ($style->list_style_type === \"none\") {\n return 0;\n }\n\n return $style->get_font_size() * self::BULLET_SIZE + 2 * self::BULLET_PADDING;\n }", "public function getAxisYLabelOffsetX()\n\t{\n\t\treturn $this->axis_ylabel_offX;\n\t}", "public function getBottom() : int\n {\n return $this->bottom;\n }", "public function getPadding()\n {\n return $this->padding;\n }", "public function getPadding()\n {\n return $this->padding;\n }", "protected function getBordersLength()\n\t{\n\t\treturn $this->getSideBordersLength() * 2;\n\t}", "function getBottomLeft() { return $this->_bottomleft; }", "public function getPadding()\n {\n return $this->_padding;\n }", "public function getBottom() {\r\n return $this->bottom;\r\n }", "public function getBottom()\n {\n return $this->bottom;\n }", "public function getBottom()\n {\n return $this->bottom;\n }", "public function getAxisStrokeDistance()\n\t{\n\t\treturn $this->delta_pixel;\n\t}", "public function bottom_area()\n {\n $line1 = $this->hbdb->get_string('sharegroop_bottom_text_line_1');\n $output = '<i><small>';\n\n if ($line1) {\n $output .= '<span>' . $line1 . ' &nbsp;</span>';\n $output .= $this->get_payment_method_icons();\n }\n\n $output .= '</small></i>';\n return apply_filters('hb_sharegroop_bottom_area', $output);\n }", "public function getOuterHeight(){\n return $this->getHeight(false, true);\n }", "function getBottomRight() { return $this->_bottomright; }", "public function getAxisYLabelOffsetY()\n\t{\n\t\treturn $this->axis_ylabel_offY;\n\t}", "public function getPadding() { return $this->_padding; }", "public function getBottomLeft() {\n return $this->bottom_left;\n }", "function moments_qodef_get_footer_bottom_bottom_border() {\n\n\t\t$footer_bottom_border = '';\n\n\t\tif (moments_qodef_options()->getOptionValue('footer_bottom_border_bottom_color')) {\n\t\t\tif (moments_qodef_options()->getOptionValue('footer_bottom_border_bottom_width') !== '') {\n\t\t\t\t$footer_border_height = moments_qodef_options()->getOptionValue('footer_bottom_border_bottom_width');\n\t\t\t} else {\n\t\t\t\t$footer_border_height = '1';\n\t\t\t}\n\n\t\t\t$footer_bottom_border = 'height: '.esc_attr($footer_border_height).'px; background-color: '.esc_attr(moments_qodef_options()->getOptionValue('footer_bottom_border_bottom_color')).';';\n\t\t}\n\n\t\treturn $footer_bottom_border;\n\t}", "function moments_qodef_get_footer_bottom_border() {\n\n\t\t$footer_bottom_border = '';\n\n\t\tif (moments_qodef_options()->getOptionValue('footer_bottom_border_color')) {\n\t\t\tif (moments_qodef_options()->getOptionValue('footer_bottom_border_width') !== '') {\n\t\t\t\t$footer_border_height = moments_qodef_options()->getOptionValue('footer_bottom_border_width');\n\t\t\t} else {\n\t\t\t\t$footer_border_height = '1';\n\t\t\t}\n\n\t\t\t$footer_bottom_border = 'height: '.esc_attr($footer_border_height).'px; background-color: '.esc_attr(moments_qodef_options()->getOptionValue('footer_bottom_border_color')).';';\n\t\t}\n\n\t\treturn $footer_bottom_border;\n\t}", "public function getInnerHeight(){\n return $this->getHeight(true, false);\n }", "function kvell_edge_get_title_content_padding() {\n\t\t$title_content_padding = apply_filters( 'kvell_edge_title_content_padding', 0 );\n\t\t\n\t\treturn intval( $title_content_padding );\n\t}", "public function getHeaderborderbottom(){\n return $this->headerborderbottom;\n }", "public function getSizeY() \n\t{\n\t\treturn imagesy($this->getImage());\n\t}", "public function getHeight()\n {\n return imagesy($this->currentImage);\n }", "public function getBorders()\n {\n if (array_key_exists(\"borders\", $this->_propDict)) {\n return $this->_propDict[\"borders\"];\n } else {\n return null;\n }\n }", "public function getHeight()\n {\n return 164;\n }", "public function getHeight() {\n return imagesy($this->image);\n }", "public function getHeight() {\n\t\treturn $this->originalDimensions['height'];\n\t}", "public function getHeight() {\n\t\treturn $this->originalDimensions['height'];\n\t}", "private function createDividerBottom() {\r\n\t\tglobal $VERSION;\r\n\t\t$ver = str_pad(\"=[ $VERSION ]=\", \"70\", \"=\", STR_PAD_LEFT);\r\n\t\treturn ($ver);\r\n\t}", "public function getHeight()\n\t{\n\t\treturn imagesy($this->image());\n\t}", "public function getHeight(){\n return imagesy($this->outputImage);\n }", "public function getWidthButBorders()\n\t{\n\t\treturn $this->getTotalWidth() - $this->getBordersLength();\n\t}", "public function getMarginBottom() : ?int\n {\n return $this->marginBottom;\n }", "protected function getSideBordersLength()\n\t{\n\t\t$border = (static::BORDER_WIDTH + static::MIN_SPACE_FROM_BORDER_X);\n\n\t\treturn $border * $this->nesting;\n\t}", "public function getDimension($w, $h) {\r\n $startlength = 9;\r\n $textlength = 9 * count($this->data);\r\n $checksumlength = 2 * 9;\r\n $endlength = 9 + 1; // + final bar\r\n\r\n $w += $startlength + $textlength + $checksumlength + $endlength;\r\n $h += $this->thickness;\r\n return parent::getDimension($w, $h);\r\n }", "public function getPaddingStandard();", "public function getDimensionY()\n {\n return $this->dimensionY;\n }", "public function getThePlatformSeticonHeight(){\n \n $criteria = new CDbCriteria();\n $criteria->select = '*';\n // $criteria->condition='id=:id';\n // $criteria->params = array(':id'=>$id);\n $icon = PlatformSettings::model()->find($criteria); \n \n return $icon['icon_height'];\n }", "public function get_baseline_offset() {\r\n if ($this->sizefixed == false) {\r\n $this->recompute_size();\r\n }\r\n return $this->baselineoffset;\r\n }", "function calYposition($widths, $yTop, $yBottom) {\n\t\t$totalWidth = array_sum($widths);\n\t\t$y = $yTop + ($yBottom-$yTop-$totalWidth)/2;\n\t\treturn $y;\n\t}", "public function heightTopLeft();", "function mediadesk_edge_get_title_content_padding() {\n\t\t$title_content_padding = apply_filters( 'mediadesk_edge_filter_title_content_padding', 0 );\n\t\t\n\t\treturn intval($title_content_padding);\n\t}", "function _fillTop()\n {\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_BOTTOM) {\n return $this->_top - $this->_font->height($this->_text);\n }\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_CENTER_Y) {\n return $this->_top - $this->_font->_centerHeight($this->_text);\n } else {\n return $this->_top;\n }\n }", "public function total_height();", "public function getPad()\n {\n return $this->pad;\n }", "public function getHeight()\n {\n return $this->isImage() ? $this->imageSize[1] : null;\n }", "public function getHeight() { \n list($width, $height) = explode('x', $this->getSize());\n return $height;\n }", "public abstract function calculateHeightOfTransparency();", "private function drawYaxis()\n {\n\n $min =\n round($this->min, $this->precision);\n $max =\n round($this->max, $this->precision);\n\n if (!isset($this->y_axis_legend_increment)) {\n\n $increment =\n round(($max - $min) / $this->total_values, $this->precision);\n } else {\n $increment = $this->y_axis_legend_increment;\n }\n\n if ($increment == 0) {\n $increment = 1;\n }\n\n //$spacing = \\round($spacing, 10);\n for ($label = $min; $label <= $max + $increment; $label+=$increment) {\n\n $px_position = $this->plotValue($label);\n if ($this->x_axis_hints == 1) {\n \\imageline($this->im, 0, $px_position, $this->width,\n $px_position, $this->ink['axis']);\n }\n imagestring($this->im, 1, 10, $px_position - 4, $label,\n $this->ink['text']);\n }\n }", "protected function canvasSpacingY()\n {\n $this->canvas['spacing']['y'] = 0;\n\n if ($this->intermediate['height'] < $this->canvas['height']) {\n\n $difference = $this->canvas['height'] - $this->intermediate['height'];\n\n if ($difference % 2 === 0) {\n $this->canvas['spacing']['y'] = $difference / 2;\n } else {\n if ($difference > 1) {\n $this->canvas['spacing']['y'] = ($difference - 1) / 2 + 1;\n } else {\n $this->canvas['spacing']['y'] = 1;\n }\n }\n }\n }", "function getBorderSize() {\n return $this->borderSize;\n }", "public function getImageBorderColor () {}", "public function getOriginalHeight()\n {\n return $this->_getImageObj()->getOriginalHeight();\n }", "public function getDimension(int $width, int $height): array\n {\n $labels = $this->getBiggestLabels(false);\n $pixelsAround = array(0, 0, 0, 0); // TRBL\n if (isset($labels[BCGLabel::POSITION_TOP])) {\n $dimension = $labels[BCGLabel::POSITION_TOP]->getDimension();\n $pixelsAround[0] += $dimension[1];\n }\n\n if (isset($labels[BCGLabel::POSITION_RIGHT])) {\n $dimension = $labels[BCGLabel::POSITION_RIGHT]->getDimension();\n $pixelsAround[1] += $dimension[0];\n }\n\n if (isset($labels[BCGLabel::POSITION_BOTTOM])) {\n $dimension = $labels[BCGLabel::POSITION_BOTTOM]->getDimension();\n $pixelsAround[2] += $dimension[1];\n }\n\n if (isset($labels[BCGLabel::POSITION_LEFT])) {\n $dimension = $labels[BCGLabel::POSITION_LEFT]->getDimension();\n $pixelsAround[3] += $dimension[0];\n }\n\n $finalW = ($width + $this->offsetX) * $this->scale;\n $finalH = ($height + $this->offsetY) * $this->scale;\n\n // This section will check if a top/bottom label is too big for its width and left/right too big for its height\n $reversedLabels = $this->getBiggestLabels(true);\n foreach ($reversedLabels as $label) {\n $dimension = $label->getDimension();\n $alignment = $label->getAlignment();\n if ($label->getPosition() === BCGLabel::POSITION_LEFT || $label->getPosition() === BCGLabel::POSITION_RIGHT) {\n if ($alignment === BCGLabel::ALIGN_TOP) {\n $pixelsAround[2] = max($pixelsAround[2], $dimension[1] - $finalH);\n } elseif ($alignment === BCGLabel::ALIGN_CENTER) {\n $temp = (int)ceil(($dimension[1] - $finalH) / 2);\n $pixelsAround[0] = max($pixelsAround[0], $temp);\n $pixelsAround[2] = max($pixelsAround[2], $temp);\n } elseif ($alignment === BCGLabel::ALIGN_BOTTOM) {\n $pixelsAround[0] = max($pixelsAround[0], $dimension[1] - $finalH);\n }\n } else {\n if ($alignment === BCGLabel::ALIGN_LEFT) {\n $pixelsAround[1] = max($pixelsAround[1], $dimension[0] - $finalW);\n } elseif ($alignment === BCGLabel::ALIGN_CENTER) {\n $temp = (int)ceil(($dimension[0] - $finalW) / 2);\n $pixelsAround[1] = max($pixelsAround[1], $temp);\n $pixelsAround[3] = max($pixelsAround[3], $temp);\n } elseif ($alignment === BCGLabel::ALIGN_RIGHT) {\n $pixelsAround[3] = max($pixelsAround[3], $dimension[0] - $finalW);\n }\n }\n }\n\n $this->pushLabel[0] = $pixelsAround[3];\n $this->pushLabel[1] = $pixelsAround[0];\n\n $finalW = ($width + $this->offsetX) * $this->scale + $pixelsAround[1] + $pixelsAround[3];\n $finalH = ($height + $this->offsetY) * $this->scale + $pixelsAround[0] + $pixelsAround[2];\n\n return array((int)$finalW, (int)$finalH);\n }", "public function centerBottom(): string\n {\n return $this->get(__FUNCTION__);\n }", "public function getOriginalHeight()\n {\n return $this->_getModel()->getImageProcessor()->getOriginalHeight();\n }", "public function getHeight();", "public function getHeight();", "public function getHeight();", "public function getHeight();", "public function getHeight();", "function get_height() {\n //based on image height\n return $this->_height;\n }", "public function getImageHeight() {\n return Mage::getStoreConfig('hawksearch_datafeed/imagecache/image_height');\n }", "private function getAxis() {\n\t\t$offset = ceil(self::ZBX_ARROW_SIZE / 2);\n\n\t\tif ($this->type == GRAPH_YAXIS_SIDE_BOTTOM) {\n\t\t\t$x = $this->x + $this->width + self::ZBX_ARROW_OFFSET;\n\t\t\t$y = $this->y;\n\n\t\t\treturn [\n\t\t\t\t// Draw axis line.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->setAttribute('shape-rendering', 'crispEdges')\n\t\t\t\t\t->moveTo($this->x, $y)\n\t\t\t\t\t->lineTo($x, $y),\n\t\t\t\t// Draw arrow.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->moveTo($x + self::ZBX_ARROW_SIZE, $y)\n\t\t\t\t\t->lineTo($x, $y - $offset)\n\t\t\t\t\t->lineTo($x, $y + $offset)\n\t\t\t\t\t->closePath()\n\t\t\t];\n\t\t}\n\t\telse {\n\t\t\t$x = ($this->type == GRAPH_YAXIS_SIDE_RIGHT) ? $this->x : $this->x + $this->width;\n\t\t\t$y = $this->y - self::ZBX_ARROW_OFFSET;\n\n\t\t\treturn [\n\t\t\t\t// Draw axis line.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->setAttribute('shape-rendering', 'crispEdges')\n\t\t\t\t\t->moveTo($x, $y)\n\t\t\t\t\t->lineTo($x, $this->height + $y + self::ZBX_ARROW_OFFSET),\n\t\t\t\t// Draw arrow.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->moveTo($x, $y - self::ZBX_ARROW_SIZE)\n\t\t\t\t\t->lineTo($x - $offset, $y)\n\t\t\t\t\t->lineTo($x + $offset, $y)\n\t\t\t\t\t->closePath()\n\t\t\t];\n\t\t}\n\t}", "public static function innerHeight() {\n return '.innerHeight()';\n }", "public function getImageHeight () {}", "function StrokePlotArea()\n {\n // Note: To be consistent we really should take a possible shadow\n // into account. However, that causes some problem for the LinearScale class\n // since in the current design it does not have any links to class Graph which\n // means it has no way of compensating for the adjusted plotarea in case of a\n // shadow. So, until I redesign LinearScale we can't compensate for this.\n // So just set the two adjustment parameters to zero for now.\n $boxadj = 0; //$this->doframe ? $this->frame_weight : 0 ;\n $adj = 0; //$this->doshadow ? $this->shadow_width : 0 ;\n\n if ($this->background_image != \"\" || $this->background_cflag != \"\") {\n $this->StrokeFrameBackground();\n } else {\n $aa = $this->img->SetAngle(0);\n $this->StrokeFrame();\n $aa = $this->img->SetAngle($aa);\n $this->StrokeBackgroundGrad();\n if ($this->bkg_gradtype < 0 ||\n ($this->bkg_gradtype > 0 && $this->bkg_gradstyle == BGRAD_MARGIN)) {\n $this->FillPlotArea();\n }\n }\n }", "protected function encodePixelAspectRatio(): string\n {\n return pack('C', $this->source->getPixelAspectRatio());\n }", "function voyage_mikado_get_content_bottom_area() {\n\n\t\t$parameters = array();\n\n\t\t//Current page id\n\t\t$id = voyage_mikado_get_page_id();\n\n\t\t//is content bottom area enabled for current page?\n\t\t$parameters['content_bottom_area'] = voyage_mikado_get_meta_field_intersect('enable_content_bottom_area');\n\t\tif($parameters['content_bottom_area'] == 'yes') {\n\t\t\t//Sidebar for content bottom area\n\t\t\t$parameters['content_bottom_area_sidebar'] = voyage_mikado_get_meta_field_intersect('content_bottom_sidebar_custom_display');\n\t\t\t//Content bottom area in grid\n\t\t\t$parameters['content_bottom_area_in_grid'] = voyage_mikado_get_meta_field_intersect('content_bottom_in_grid');\n\t\t\t//Content bottom area background color\n\t\t\t$parameters['content_bottom_background_color'] = 'background-color: '.voyage_mikado_get_meta_field_intersect('content_bottom_background_color');\n\t\t}\n\n\t\tvoyage_mikado_get_module_template_part('templates/parts/content-bottom-area', 'footer', '', $parameters);\n\n\t}", "function kloe_qodef_get_content_bottom_area() {\n\n\t\t$parameters = array();\n\n\t\t//Current page id\n\t\t$id = kloe_qodef_get_page_id();\n\n\t\t//is content bottom area enabled for current page?\n\t\t$parameters['content_bottom_area'] = kloe_qodef_get_meta_field_intersect('enable_content_bottom_area');\n\t\tif ($parameters['content_bottom_area'] == 'yes') {\n\t\t\t//Sidebar for content bottom area\n\t\t\t$parameters['content_bottom_area_sidebar'] = kloe_qodef_get_meta_field_intersect('content_bottom_sidebar_custom_display');\n\t\t\t//Content bottom area in grid\n\t\t\t$parameters['content_bottom_area_in_grid'] = kloe_qodef_get_meta_field_intersect('content_bottom_in_grid');\n\t\t\t//Content bottom area background color\n\t\t\t$parameters['content_bottom_background_color'] = 'background-color: '.kloe_qodef_get_meta_field_intersect('content_bottom_background_color');\n\t\t}\n\n\t\tkloe_qodef_get_module_template_part('templates/parts/content-bottom-area', 'footer', '', $parameters);\n\n\t}", "function angle_height_actual($angle)\r\n{\r\n if (angle_right_angle($angle))\r\n {\r\n $angle_data = [object_center($angle),object_start($angle),object_end($angle)];\r\n return 2*angle_height($angle)*abs(cos(angle_angle($angle_data)/2));\r\n }\r\n if (angle_marker($angle) == 'none')\r\n {\r\n return angle_height($angle);\r\n }\r\n return max(angle_height($angle),angle_marker_height($angle));\r\n}", "function voyage_mikado_get_footer_bottom() {\n\n\t\t$parameters = array();\n\n\t\t$parameters['footer_bottom_border'] = voyage_mikado_get_footer_bottom_border();\n\t\t$parameters['footer_bottom_border_in_grid'] = (voyage_mikado_options()->getOptionValue('footer_bottom_border_in_grid') == 'yes') ? 'mkdf-in-grid' : '';\n\t\t$parameters['footer_in_grid'] = (voyage_mikado_options()->getOptionValue('footer_in_grid') == 'yes') ? true : false;\n\t\t$parameters['footer_bottom_columns'] = voyage_mikado_options()->getOptionValue('footer_bottom_columns');\n\t\t$parameters['footer_bottom_border_bottom'] = voyage_mikado_get_footer_bottom_bottom_border();\n\n\t\tvoyage_mikado_get_module_template_part('templates/parts/footer-bottom', 'footer', '', $parameters);\n\n\t}", "public function height()\n {\n return imagesy($this->image);\n }", "public function getOffsetY(): int\n {\n return $this->offsetY;\n }", "function _fillTop()\n {\n return (int) (($this->_top + $this->_bottom - $this->_plotHeight()) / 2);\n }", "public function height(){\n\t\treturn $this->p_height($this->get_root()); \n\t}", "public function getThumpnailHeight() {\n $page_map = $this->search_result_item->getPagemap();\n return isset($page_map['cse_thumbnail'][0]['height']) ? $page_map['cse_thumbnail'][0]['height'] : '';\n }", "function xx_thumb_cols() {\n return 4;\n}", "function moments_qodef_get_footer_top_border() {\n\n\t\t$footer_top_border = '';\n\n\t\tif (moments_qodef_options()->getOptionValue('footer_top_border_color')) {\n\t\t\tif (moments_qodef_options()->getOptionValue('footer_top_border_width') !== '') {\n\t\t\t\t$footer_border_height = moments_qodef_options()->getOptionValue('footer_top_border_width');\n\t\t\t} else {\n\t\t\t\t$footer_border_height = '1';\n\t\t\t}\n\n\t\t\t$footer_top_border = 'height: '.esc_attr($footer_border_height).'px; background-color: '.esc_attr(moments_qodef_options()->getOptionValue('footer_top_border_color')).';';\n\t\t}\n\n\t\treturn $footer_top_border;\n\t}", "function goodwish_edge_get_content_bottom_area() {\n\n\t\t$parameters = array();\n\n\t\t//Current page id\n\t\t$id = goodwish_edge_get_page_id();\n\n\t\t//is content bottom area enabled for current page?\n\t\t$parameters['content_bottom_area'] = goodwish_edge_get_meta_field_intersect('enable_content_bottom_area');\n\t\tif ($parameters['content_bottom_area'] == 'yes') {\n\t\t\t//Sidebar for content bottom area\n\t\t\t$parameters['content_bottom_area_sidebar'] = goodwish_edge_get_meta_field_intersect('content_bottom_sidebar_custom_display');\n\t\t\t//Content bottom area in grid\n\t\t\t$parameters['content_bottom_area_in_grid'] = goodwish_edge_get_meta_field_intersect('content_bottom_in_grid');\n\t\t\t//Content bottom area background color\n\t\t\t$parameters['content_bottom_background_color'] = 'background-color: '.goodwish_edge_get_meta_field_intersect('content_bottom_background_color');\n\t\t}\n\n\t\tgoodwish_edge_get_module_template_part('templates/parts/content-bottom-area', 'footer', '', $parameters);\n\n\t}" ]
[ "0.693555", "0.65008795", "0.6303973", "0.62847996", "0.60629696", "0.6060935", "0.5991238", "0.5980883", "0.5862139", "0.580681", "0.57657075", "0.5654202", "0.5618615", "0.5599456", "0.55984896", "0.55762386", "0.5548001", "0.55252326", "0.552373", "0.5505176", "0.5487992", "0.5458792", "0.5458792", "0.54529196", "0.54064554", "0.5386473", "0.53811145", "0.53744555", "0.53744555", "0.5336802", "0.5326514", "0.5322529", "0.5310655", "0.53106546", "0.53020895", "0.5297521", "0.5265919", "0.5259315", "0.52396864", "0.5202524", "0.51911896", "0.51732683", "0.51712805", "0.5168339", "0.5165911", "0.51469165", "0.51463646", "0.51463646", "0.5120232", "0.51091534", "0.5069182", "0.5069009", "0.50489175", "0.50381845", "0.5037137", "0.5035772", "0.5034973", "0.50190854", "0.50107217", "0.5008825", "0.499195", "0.49887836", "0.4983801", "0.49748638", "0.4967339", "0.4964456", "0.4958768", "0.4957771", "0.49484414", "0.49473655", "0.49391913", "0.4938801", "0.4935983", "0.49255157", "0.49115875", "0.49074212", "0.48993787", "0.48993787", "0.48993787", "0.48993787", "0.48993787", "0.4885782", "0.4871597", "0.48686633", "0.48652658", "0.4856139", "0.48508474", "0.48469523", "0.48416796", "0.48405784", "0.48373932", "0.48313934", "0.4829018", "0.48287886", "0.48247355", "0.48182017", "0.4815936", "0.48104715", "0.48092565", "0.47972956" ]
0.79700273
0
Gets the top padding of the axis canvas from the chart picture
Получает верхнее отступа оси визуализации из графического изображения
public function getAxisPaddingTop() { return $this->axis_padding_top; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAxisPaddingBottom()\n\t{\n\t\treturn $this->axis_padding_bottom;\n\t}", "public function getAxisPaddingLeft()\n\t{\n\t\treturn $this->axis_padding_left;\n\t}", "public function getAxisPaddingRight()\n\t{\n\t\treturn $this->axis_padding_right;\n\t}", "public function setAxisPaddingTop($top)\n\t{\n\t\t$this->axis_padding_top = $top;\n\t}", "function _fillTop()\n {\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_BOTTOM) {\n return $this->_top - $this->_font->height($this->_text);\n }\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_CENTER_Y) {\n return $this->_top - $this->_font->_centerHeight($this->_text);\n } else {\n return $this->_top;\n }\n }", "public function getAxisYLabelOffsetX()\n\t{\n\t\treturn $this->axis_ylabel_offX;\n\t}", "function _fillTop()\n {\n return (int) (($this->_top + $this->_bottom - $this->_plotHeight()) / 2);\n }", "public function getAxisXLabelOffsetY()\n\t{\n\t\treturn $this->axis_xlabel_offY;\n\t}", "public function getImageTop()\n {\n return $this->imageTop;\n }", "public function getTopDecoration()\n {\n if ($this->hasDijitParam('topDecoration')) {\n return $this->getDijitParam('topDecoration');\n }\n return [];\n }", "function klippe_mikado_header_top_bar_styles() {\n\t\t$top_header_height = klippe_mikado_options()->getOptionValue( 'top_bar_height' );\n\t\t\n\t\tif ( ! empty( $top_header_height ) ) {\n\t\t\techo klippe_mikado_dynamic_css( '.mkdf-top-bar', array( 'height' => klippe_mikado_filter_px( $top_header_height ) . 'px' ) );\n\t\t\techo klippe_mikado_dynamic_css( '.mkdf-top-bar .mkdf-logo-wrapper a', array( 'max-height' => klippe_mikado_filter_px( $top_header_height ) . 'px' ) );\n\t\t}\n\t\t\n\t\techo klippe_mikado_dynamic_css( '.mkdf-header-box .mkdf-top-bar-background', array( 'height' => klippe_mikado_get_top_bar_background_height() . 'px' ) );\n\t\t\n\t\t$top_bar_container_selector = '.mkdf-top-bar > .mkdf-vertical-align-containers';\n\t\t$top_bar_container_styles = array();\n\t\t$container_side_padding = klippe_mikado_options()->getOptionValue( 'top_bar_side_padding' );\n\t\t\n\t\tif ( $container_side_padding !== '' ) {\n\t\t\tif ( klippe_mikado_string_ends_with( $container_side_padding, 'px' ) || klippe_mikado_string_ends_with( $container_side_padding, '%' ) ) {\n\t\t\t\t$top_bar_container_styles['padding-left'] = $container_side_padding;\n\t\t\t\t$top_bar_container_styles['padding-right'] = $container_side_padding;\n\t\t\t} else {\n\t\t\t\t$top_bar_container_styles['padding-left'] = klippe_mikado_filter_px( $container_side_padding ) . 'px';\n\t\t\t\t$top_bar_container_styles['padding-right'] = klippe_mikado_filter_px( $container_side_padding ) . 'px';\n\t\t\t}\n\t\t\t\n\t\t\techo klippe_mikado_dynamic_css( $top_bar_container_selector, $top_bar_container_styles );\n\t\t}\n\t\t\n\t\tif ( klippe_mikado_options()->getOptionValue( 'top_bar_in_grid' ) == 'yes' ) {\n\t\t\t$top_bar_grid_selector = '.mkdf-top-bar .mkdf-grid .mkdf-vertical-align-containers';\n\t\t\t$top_bar_grid_styles = array();\n\t\t\t$top_bar_grid_background_color = klippe_mikado_options()->getOptionValue( 'top_bar_grid_background_color' );\n\t\t\t$top_bar_grid_background_transparency = klippe_mikado_options()->getOptionValue( 'top_bar_grid_background_transparency' );\n\t\t\t\n\t\t\tif ( !empty($top_bar_grid_background_color) ) {\n\t\t\t\t$grid_background_color = $top_bar_grid_background_color;\n\t\t\t\t$grid_background_transparency = 1;\n\t\t\t\t\n\t\t\t\tif ( $top_bar_grid_background_transparency !== '' ) {\n\t\t\t\t\t$grid_background_transparency = $top_bar_grid_background_transparency;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$grid_background_color = klippe_mikado_rgba_color( $grid_background_color, $grid_background_transparency );\n\t\t\t\t$top_bar_grid_styles['background-color'] = $grid_background_color;\n\t\t\t}\n\t\t\t\n\t\t\techo klippe_mikado_dynamic_css( $top_bar_grid_selector, $top_bar_grid_styles );\n\t\t}\n\t\t\n\t\t$top_bar_styles = array();\n\t\t$background_color = klippe_mikado_options()->getOptionValue( 'top_bar_background_color' );\n\t\t$border_color = klippe_mikado_options()->getOptionValue( 'top_bar_border_color' );\n\t\t\n\t\tif ( $background_color !== '' ) {\n\t\t\t$background_transparency = 1;\n\t\t\tif ( klippe_mikado_options()->getOptionValue( 'top_bar_background_transparency' ) !== '' ) {\n\t\t\t\t$background_transparency = klippe_mikado_options()->getOptionValue( 'top_bar_background_transparency' );\n\t\t\t}\n\t\t\t\n\t\t\t$background_color = klippe_mikado_rgba_color( $background_color, $background_transparency );\n\t\t\t$top_bar_styles['background-color'] = $background_color;\n\t\t\t\n\t\t\techo klippe_mikado_dynamic_css( '.mkdf-header-box .mkdf-top-bar-background', array( 'background-color' => $background_color ) );\n\t\t}\n\t\t\n\t\tif ( klippe_mikado_options()->getOptionValue( 'top_bar_border' ) == 'yes' && $border_color != '' ) {\n\t\t\t$top_bar_styles['border-bottom'] = '1px solid ' . $border_color;\n\t\t}\n\t\t\n\t\techo klippe_mikado_dynamic_css( '.mkdf-top-bar', $top_bar_styles );\n\t}", "function kvell_edge_get_title_content_padding() {\n\t\t$title_content_padding = apply_filters( 'kvell_edge_title_content_padding', 0 );\n\t\t\n\t\treturn intval( $title_content_padding );\n\t}", "public function getItemMarginTop() {\n return $this->itemMarginTop;\n }", "public function getDimensionY();", "public function getImgBorder()\n {\n return $this->strImgBorder;\n }", "public function get_baseline_offset() {\r\n if ($this->sizefixed == false) {\r\n $this->recompute_size();\r\n }\r\n return $this->baselineoffset;\r\n }", "public function getTitleOffsetTop()\n\t{\n\t\treturn $this->title_offY;\n\t}", "public function getPadding()\n {\n return $this->padding;\n }", "public function getPadding()\n {\n return $this->padding;\n }", "public function setAxisPaddingBottom($bottom)\n\t{\n\t\t$this->axis_padding_bottom = $bottom;\n\t}", "public function getTopOfImage()\n {\n return $this->topOfImage;\n }", "public function getXDescriptionOffsetBottom()\n\t{\n\t\treturn $this->xdescr_offY;\n\t}", "public function getHorizontalConfig()\n {\n $model = \\Magento\\Framework\\App\\ObjectManager::getInstance()->create('Magento\\Framework\\App\\Config\\ScopeConfigInterface');\n $hor = $model->getValue('imagegallery/gallerypage/horizontaldimension', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n\n return $hor;\n }", "function _fillBottom()\n {\n return (int) (($this->_top + $this->_bottom + $this->_plotHeight()) / 2);\n }", "function calYposition($widths, $yTop, $yBottom) {\n\t\t$totalWidth = array_sum($widths);\n\t\t$y = $yTop + ($yBottom-$yTop-$totalWidth)/2;\n\t\treturn $y;\n\t}", "function getTopRight() { return $this->_topright; }", "public function getPadding()\n {\n return $this->_padding;\n }", "public function getBottomOfImage()\n {\n return $this->bottomOfImage;\n }", "public function heightTopLeft();", "public function getOuterHeight(){\n return $this->getHeight(false, true);\n }", "public function getImageBottom()\n {\n return $this->imageBottom;\n }", "public function getAxisYLabelOffsetY()\n\t{\n\t\treturn $this->axis_ylabel_offY;\n\t}", "function mediadesk_edge_get_title_content_padding() {\n\t\t$title_content_padding = apply_filters( 'mediadesk_edge_filter_title_content_padding', 0 );\n\t\t\n\t\treturn intval($title_content_padding);\n\t}", "public function getPadding() { return $this->_padding; }", "private function getPosition()\n {\n if ($this->labelCounter == 1) {\n return [0, 0];\n }\n\n if ($this->labelCounter == 2) {\n return [0, Fpdi::PAGE_SIZE_A6_WIDTH];\n }\n\n if ($this->labelCounter == 3) {\n return [Fpdi::PAGE_SIZE_A6_HEIGHT, 0];\n }\n\n if ($this->labelCounter == 4) {\n return [Fpdi::PAGE_SIZE_A6_HEIGHT, Fpdi::PAGE_SIZE_A6_WIDTH];\n }\n }", "public function getPaddingStandard();", "function moments_qodef_get_footer_top_border() {\n\n\t\t$footer_top_border = '';\n\n\t\tif (moments_qodef_options()->getOptionValue('footer_top_border_color')) {\n\t\t\tif (moments_qodef_options()->getOptionValue('footer_top_border_width') !== '') {\n\t\t\t\t$footer_border_height = moments_qodef_options()->getOptionValue('footer_top_border_width');\n\t\t\t} else {\n\t\t\t\t$footer_border_height = '1';\n\t\t\t}\n\n\t\t\t$footer_top_border = 'height: '.esc_attr($footer_border_height).'px; background-color: '.esc_attr(moments_qodef_options()->getOptionValue('footer_top_border_color')).';';\n\t\t}\n\n\t\treturn $footer_top_border;\n\t}", "function get_margin_height()\n {\n $style = $this->_frame->get_style();\n\n if ($style->list_style_type === \"none\") {\n return 0;\n }\n\n return $style->get_font_size() * self::BULLET_SIZE + 2 * self::BULLET_PADDING;\n }", "public function getAxisXLabelOffsetX()\n\t{\n\t\treturn $this->axis_xlabel_offX;\n\t}", "private function getAxis() {\n\t\t$offset = ceil(self::ZBX_ARROW_SIZE / 2);\n\n\t\tif ($this->type == GRAPH_YAXIS_SIDE_BOTTOM) {\n\t\t\t$x = $this->x + $this->width + self::ZBX_ARROW_OFFSET;\n\t\t\t$y = $this->y;\n\n\t\t\treturn [\n\t\t\t\t// Draw axis line.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->setAttribute('shape-rendering', 'crispEdges')\n\t\t\t\t\t->moveTo($this->x, $y)\n\t\t\t\t\t->lineTo($x, $y),\n\t\t\t\t// Draw arrow.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->moveTo($x + self::ZBX_ARROW_SIZE, $y)\n\t\t\t\t\t->lineTo($x, $y - $offset)\n\t\t\t\t\t->lineTo($x, $y + $offset)\n\t\t\t\t\t->closePath()\n\t\t\t];\n\t\t}\n\t\telse {\n\t\t\t$x = ($this->type == GRAPH_YAXIS_SIDE_RIGHT) ? $this->x : $this->x + $this->width;\n\t\t\t$y = $this->y - self::ZBX_ARROW_OFFSET;\n\n\t\t\treturn [\n\t\t\t\t// Draw axis line.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->setAttribute('shape-rendering', 'crispEdges')\n\t\t\t\t\t->moveTo($x, $y)\n\t\t\t\t\t->lineTo($x, $this->height + $y + self::ZBX_ARROW_OFFSET),\n\t\t\t\t// Draw arrow.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->moveTo($x, $y - self::ZBX_ARROW_SIZE)\n\t\t\t\t\t->lineTo($x - $offset, $y)\n\t\t\t\t\t->lineTo($x + $offset, $y)\n\t\t\t\t\t->closePath()\n\t\t\t];\n\t\t}\n\t}", "function height()\n {\n return $this->_canvas->getHeight();\n }", "function _plotHeight()\n {\n return (min($this->height(), $this->width())) * 0.80;\n }", "function _fillBottom()\n {\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_BOTTOM) {\n return $this->_top;\n }\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_CENTER_Y) {\n return $this->_top + $this->_font->_centerHeight($this->_text);\n } else {\n return $this->_top + $this->_font->height($this->_text);\n }\n }", "public function getBorders()\n {\n if (array_key_exists(\"borders\", $this->_propDict)) {\n return $this->_propDict[\"borders\"];\n } else {\n return null;\n }\n }", "public function getSizeY() \n\t{\n\t\treturn imagesy($this->getImage());\n\t}", "public function getAxisStrokeDistance()\n\t{\n\t\treturn $this->delta_pixel;\n\t}", "function getAbscissaMargin($Data)\n {\n foreach($Data[\"Axis\"] as $AxisID => $Values) { if ( $Values[\"Identity\"] == AXIS_X ) { return($Values[\"Margin\"]); } }\n return(0);\n }", "function getHeight()\n\t{\n\t\treturn $this->YSize;\n\t}", "public static function get_logo_top_margin_css() {\n\t\treturn sprintf( '\n\t\t\t@media (min-width: 992px){\n\t\t\t\t.header__logo img {\n\t\t\t\t\tmargin-top: %dpx;\n\t\t\t\t}\n\t\t\t}',\n\t\t\tabsint( get_theme_mod( 'logo_top_margin', 35 ) )\n\t\t);\n\t}", "protected function getBordersLength()\n\t{\n\t\treturn $this->getSideBordersLength() * 2;\n\t}", "public function getImageBorderColor () {}", "function getOrientation()\n {\n if (imagesx($this->img) > imagesy($this->img)) $rect = \"horizontal\";\n if (imagesy($this->img) > imagesx($this->img)) $rect = \"vertical\";\n if (imagesx($this->img) == imagesx($this->img)) $rect = \"square\";\n\n return $rect;\n }", "public function getYDescriptionOffsetLeft()\n\t{\n\t\treturn $this->ydescr_offX;\n\t}", "public function widthTopLeft();", "public function getWidthButBorders()\n\t{\n\t\treturn $this->getTotalWidth() - $this->getBordersLength();\n\t}", "public function getMarginTop() : ?int\n {\n return $this->marginTop;\n }", "public function getItemMarginBottom() {\n return $this->itemMarginBottom;\n }", "public function getInnerHeight(){\n return $this->getHeight(true, false);\n }", "public function getAxisFontSize()\n\t{\n\t\treturn $this->axis_fontsize;\n\t}", "public function getTopIcon()\n {\n return $this->getParent()->TopIcon;\n }", "public function getImgAdjustment()\n\t{\n\t\treturn $this->imgAdjustment;\n\t}", "public function getOffsetY(): int\n {\n return $this->offsetY;\n }", "public function getBottomDecoration()\n {\n if ($this->hasDijitParam('bottomDecoration')) {\n return $this->getDijitParam('bottomDecoration');\n }\n return [];\n }", "private function createDividerTop() {\r\n\t\t$sitename = getConfig(\"sitename\");\r\n\t\t$ver = str_pad(\"=[ $sitename ]=\", \"70\", \"=\", STR_PAD_RIGHT);\r\n\t\treturn ($ver);\r\n\t}", "protected function canvasSpacingY()\n {\n $this->canvas['spacing']['y'] = 0;\n\n if ($this->intermediate['height'] < $this->canvas['height']) {\n\n $difference = $this->canvas['height'] - $this->intermediate['height'];\n\n if ($difference % 2 === 0) {\n $this->canvas['spacing']['y'] = $difference / 2;\n } else {\n if ($difference > 1) {\n $this->canvas['spacing']['y'] = ($difference - 1) / 2 + 1;\n } else {\n $this->canvas['spacing']['y'] = 1;\n }\n }\n }\n }", "public function getFrame()\n {\n $imageFrame = $this->getAttribute('frame');\n if (empty($imageFrame)) {\n $imageFrame = $this->getConfigView()->getVarValue('Vnecoms_Vendors', 'image_white_borders');\n }\n return $imageFrame;\n }", "public function getVerticalConfig()\n {\n $model = \\Magento\\Framework\\App\\ObjectManager::getInstance()->create('Magento\\Framework\\App\\Config\\ScopeConfigInterface');\n $ver = $model->getValue('imagegallery/gallerypage/verticaldimension', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n\n return $ver;\n }", "public function getOriginalHeight()\n {\n return $this->_getImageObj()->getOriginalHeight();\n }", "public function getDimension(): array\n {\n $fontInfo = $this->getFontInfo();\n $rotationAngle = $this->getRotationAngle();\n $width = $fontInfo->getWidth();\n $height = $fontInfo->getHeight();\n if ($rotationAngle === 90 || $rotationAngle === 270) {\n return array($height, $width);\n } else {\n return array($width, $height);\n }\n }", "public function getOriginalHeight()\n {\n return $this->_getModel()->getImageProcessor()->getOriginalHeight();\n }", "function GetGamepadAxisCount(int $gamepad): int { return 0; }", "function getInset() { return $this->_inset; }", "public function getThePlatformSeticonHeight(){\n \n $criteria = new CDbCriteria();\n $criteria->select = '*';\n // $criteria->condition='id=:id';\n // $criteria->params = array(':id'=>$id);\n $icon = PlatformSettings::model()->find($criteria); \n \n return $icon['icon_height'];\n }", "private static function getTextBoxDimensions(): array {\n $box = imagettfbbox(self::$fontSize, 0, self::getFontPath(), self::getTextString());\n $x = $box[0] + (self::$width / 2) - ($box[4] / 2);\n $y = $box[1] + (self::$height / 2) - ($box[5] / 2);\n\n return ['x' => $x, 'y' => $y];\n }", "function codeless_image_crop_positions() {\n\treturn array(\n\t\t'' => esc_html__( 'Default', 'folie' ),\n\t\t'left-top' => esc_html__( 'Top Left', 'folie' ),\n\t\t'right-top' => esc_html__( 'Top Right', 'folie' ),\n\t\t'center-top' => esc_html__( 'Top Center', 'folie' ),\n\t\t'left-center' => esc_html__( 'Center Left', 'folie' ),\n\t\t'right-center' => esc_html__( 'Center Right', 'folie' ),\n\t\t'center-center' => esc_html__( 'Center Center', 'folie' ),\n\t\t'left-bottom' => esc_html__( 'Bottom Left', 'folie' ),\n\t\t'right-bottom' => esc_html__( 'Bottom Right', 'folie' ),\n\t\t'center-bottom' => esc_html__( 'Bottom Center', 'folie' ),\n\t);\n}", "private function drawYaxis()\n {\n\n $min =\n round($this->min, $this->precision);\n $max =\n round($this->max, $this->precision);\n\n if (!isset($this->y_axis_legend_increment)) {\n\n $increment =\n round(($max - $min) / $this->total_values, $this->precision);\n } else {\n $increment = $this->y_axis_legend_increment;\n }\n\n if ($increment == 0) {\n $increment = 1;\n }\n\n //$spacing = \\round($spacing, 10);\n for ($label = $min; $label <= $max + $increment; $label+=$increment) {\n\n $px_position = $this->plotValue($label);\n if ($this->x_axis_hints == 1) {\n \\imageline($this->im, 0, $px_position, $this->width,\n $px_position, $this->ink['axis']);\n }\n imagestring($this->im, 1, 10, $px_position - 4, $label,\n $this->ink['text']);\n }\n }", "protected function getSideBordersLength()\n\t{\n\t\t$border = (static::BORDER_WIDTH + static::MIN_SPACE_FROM_BORDER_X);\n\n\t\treturn $border * $this->nesting;\n\t}", "public function getInnerWidth(){\n return $this->getWidth(true, false);\n }", "public function getThickness() \r\n\t{\r\n\t\treturn $this->_thickness;\r\n\t}", "public function getDimensionY()\n {\n return $this->dimensionY;\n }", "public function getCenterY()\n {\n return $this->getY() + $this->getHeight() / 2.0;\n }", "function GetMinTickAbsSize()\n {\n return $this->minor_abs_size;\n }", "function getBottomRight() { return $this->_bottomright; }", "public function getOuterWidth(){\n return $this->getWidth(false, true);\n }", "public function getPad()\n {\n return $this->pad;\n }", "function getBottomLeft() { return $this->_bottomleft; }", "public function getThickness() : int {\n return $this -> thickness;\n }", "function getTopLeft() { return $this->_topleft; }", "public function getHeaderborderbottom(){\n return $this->headerborderbottom;\n }", "public function getImagenY()\n{\nreturn imagesy($this->_imagen);\n}", "function getBorderSize() {\n return $this->borderSize;\n }", "function getWidth()\n\t{\n\t\treturn $this->XSize;\n\t}", "public function getImageTotalInkDensity () {}", "protected function draw_axis_name(){\n\n\t\t$valid_axis = array('x1', 'y', 'y2');\n\n\t\tforeach($valid_axis as $axis) {\n\n\t\t\t$var_title = 'axis_title_' . $axis;\n\t\t\t$var_unit = 'axis_unit_' . $axis;\n\t\t\t$var_position = 'axis_position_' . $axis;\n\n\t\t\tif($this->$var_title) {\n\n\t\t\t\t$title = $this->$var_title . (($this->$var_unit != '') ? ' [' . $this->$var_unit . ']' : '');\n\t\t\t\tif($axis == 'y') {\n\t\t\t\t\t$angle = 90;\n\t\t\t\t}elseif($axis == 'y2') {\n\t\t\t\t\t$angle = 270;\n\t\t\t\t}else {\n\t\t\t\t\t$angle = 0;\n\t\t\t\t}\n\n\t\t\t\t/* calculate the size of the title */\n\t\t\t\t$title_box = imageftbbox($this->axis_font_size, $angle, $this->axis_font, $title);\n\n\t\t\t\tif($axis == 'x1'){\n\t\t\t\t\t$y = $this->canvas_height - 2*$this->axis_font_size;\n\t\t\t\t\t$x = ($this->$var_position == 'middle') ? ($this->chart_width / 2) - ($title_box[4] / 2) + $this->offset_left\n\t\t\t\t\t : $this->canvas_width - $this->offset_right - $title_box[4];\n\t\t\t\t}elseif($axis == 'y') {\n\t\t\t\t\t$x = 3*$this->axis_font_size;\n\t\t\t\t\t$y = ($this->$var_position == 'middle') ? ($this->chart_height / 2) - ($title_box[3] / 2) + $this->offset_top\n\t\t\t\t\t : -$title_box[3] + $this->offset_top;\n\t\t\t\t}else{\n\t\t\t\t\t$x = $this->canvas_width - 3*$this->axis_font_size;;\n\t\t\t\t\t$y = ($this->$var_position == 'middle') ? ($this->chart_height / 2) - ($title_box[3] / 2) + $this->offset_top\n\t\t\t\t\t : -$title_box[3] + $this->offset_top;\n\t\t\t\t}\n\n\t\t\t\t/* draw the y-title */\n\t\t\t\timagefttext($this->img, $this->axis_font_size, $angle,$x ,$y , $this->axis_font_color, $this->axis_font, $title);\n\t\t\t}\n\t\t}\n\t}", "function shop_isle_thumb_cols() {\n\treturn 6;\n}", "public function getTopLines()\n {\n return $this->topLines;\n }", "function thb_get_builder_position() {\n\t\t$builder_position = thb_get_post_meta( thb_get_page_ID(), 'builder_position' );\n\t\t$builder_position = apply_filters( 'thb_get_builder_position', $builder_position );\n\n\t\tif ( empty( $builder_position ) ) {\n\t\t\t$builder_position = 'top';\n\t\t}\n\n\t\treturn $builder_position;\n\t}", "function defaultProfitMargin_HH()\n {\n return 25;\n }", "function optimize_mikado_get_header_top() {\n\n\t\t//generate column width class\n\t\tswitch(optimize_mikado_options()->getOptionValue('top_bar_layout')) {\n\t\t\tcase ('two-columns'):\n\t\t\t\t$column_widht_class = 'mkdf-'.optimize_mikado_options()->getOptionValue('top_bar_two_column_widths');\n\t\t\t\tbreak;\n\t\t\tcase ('three-columns'):\n\t\t\t\t$column_widht_class = 'mkdf-'.optimize_mikado_options()->getOptionValue('top_bar_column_widths');\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$params = array(\n\t\t\t'column_widths' => $column_widht_class,\n\t\t\t'show_widget_center' => optimize_mikado_options()->getOptionValue('top_bar_layout') == 'three-columns' ? true : false,\n\t\t\t'show_header_top' => optimize_mikado_is_top_bar_enabled(),\n\t\t\t'top_bar_in_grid' => optimize_mikado_options()->getOptionValue('top_bar_in_grid') == 'yes' ? true : false\n\t\t);\n\n\t\t$params = apply_filters('optimize_mikado_header_top_params', $params);\n\n\t\toptimize_mikado_get_module_template_part('templates/parts/header-top', 'header', '', $params);\n\t}", "function width()\n {\n return $this->_canvas->getWidth();\n }" ]
[ "0.68620276", "0.6430259", "0.61173576", "0.6013472", "0.5767549", "0.57578635", "0.564619", "0.55566365", "0.55165374", "0.5445019", "0.54377687", "0.539008", "0.53543466", "0.5307465", "0.52959824", "0.5287579", "0.5279873", "0.5228023", "0.5228023", "0.52248055", "0.5195116", "0.5193739", "0.5186896", "0.5174184", "0.51489407", "0.5147672", "0.5146952", "0.51416326", "0.5137581", "0.51184255", "0.51105005", "0.5103473", "0.50832146", "0.50812507", "0.50634944", "0.50511307", "0.502131", "0.49758208", "0.49729148", "0.49445373", "0.49419585", "0.4940722", "0.4922749", "0.49016777", "0.48969528", "0.48934147", "0.48891345", "0.48804268", "0.48412636", "0.48374134", "0.48133516", "0.47987238", "0.47929573", "0.47826102", "0.47813305", "0.47465244", "0.47464356", "0.47463083", "0.47409418", "0.47389144", "0.47319552", "0.47289255", "0.47280833", "0.46909353", "0.4689841", "0.46837974", "0.467795", "0.4670986", "0.4668686", "0.46580026", "0.46578434", "0.46523517", "0.46512005", "0.46327573", "0.46199736", "0.46198216", "0.46098477", "0.45938885", "0.4593736", "0.45933977", "0.4592085", "0.45900184", "0.45869672", "0.45789796", "0.4578158", "0.4576235", "0.4575842", "0.45655352", "0.45631164", "0.45592898", "0.45556843", "0.45526883", "0.45526567", "0.45511225", "0.45470336", "0.4546862", "0.45455116", "0.4543005", "0.4535505", "0.45219687" ]
0.7940875
0
Gets the font size axis labels use
Получает размер шрифта меток оси
public function getAxisFontSize() { return $this->axis_fontsize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function get_size_label()\n {\n $x_name = get_option(self::X_NAME_KEY, self::DEFAULT_X_NAME);\n $y_name = get_option(self::Y_NAME_KEY, self::DEFAULT_Y_NAME);\n $label = $x_name;\n if (get_option(self::USE_TWO_FIELDS_KEY, self::DEFAULT_USE_TWO_FIELDS) == 1) {\n $label .= \" x {$y_name}\";\n }\n return $label;\n }", "public function getFontSize () {}", "public function getTitleFontSize()\n\t{\n\t\treturn $this->title_fontsize;\n\t}", "public function size()\n {\n return (float) $this->data->textElement->font['size'] ? (float) $this->data->textElement->font['size'] : 10;\n }", "public function getFontsize(){\n return $this->fontsize;\n }", "public function getFontsize(){\n return $this->fontsize;\n }", "function get_font_size() {\n\n if ( $this->__font_size_calculated )\n return $this->_props[\"font_size\"];\n \n if ( !isset($this->_props[\"font_size\"]) )\n $fs = self::$_defaults[\"font_size\"];\n else \n $fs = $this->_props[\"font_size\"];\n \n if ( !isset($this->_parent_font_size) )\n $this->_parent_font_size = self::$default_font_size;\n \n switch ($fs) {\n \n case \"xx-small\":\n $fs = 3/5 * $this->_parent_font_size;\n break;\n\n case \"x-small\":\n $fs = 3/4 * $this->_parent_font_size;\n break;\n\n case \"smaller\":\n case \"small\":\n $fs = 8/9 * $this->_parent_font_size;\n break;\n\n case \"medium\":\n $fs = $this->_parent_font_size;\n break;\n\n case \"larger\":\n case \"large\":\n $fs = 6/5 * $this->_parent_font_size;\n break;\n\n case \"x-large\":\n $fs = 3/2 * $this->_parent_font_size;\n break;\n\n case \"xx-large\":\n $fs = 2/1 * $this->_parent_font_size;\n break;\n\n default:\n break;\n }\n\n // Ensure relative sizes resolve to something\n if ( ($i = mb_strpos($fs, \"em\")) !== false ) \n $fs = mb_substr($fs, 0, $i) * $this->_parent_font_size;\n\n else if ( ($i = mb_strpos($fs, \"ex\")) !== false ) \n $fs = mb_substr($fs, 0, $i) * $this->_parent_font_size;\n\n else\n $fs = $this->length_in_pt($fs);\n\n $this->_props[\"font_size\"] = $fs; \n $this->__font_size_calculated = true;\n return $this->_props[\"font_size\"];\n\n }", "public function get_fontsize() {\n return $this->fontsize;\n }", "public function getFontSize()\n {\n return $this->get('font.size');\n }", "public function get_size() {\r\n if ($this->sizefixed == false) {\r\n $this->recompute_size();\r\n }\r\n return $this->labelsize;\r\n }", "public function getFontMetrics()\n {\n return $this->fdt;\n }", "public function getFontSize()\n {\n return $this->font_size;\n }", "public function getAxisLabelLineLength()\n\t{\n\t\treturn $this->axis_label_linelength;\n\t}", "public function get_response_font_scale() {\n return $this->response_font_scale;\n }", "static public function getLabelDefaultSize()\n\t{\n\t\treturn self::$lsize_default;\n\t}", "public function getFontSize()\n {\n return $this->helper->getWebsiteConfig(\n Config::XML_PATH_CONNECTOR_DYNAMIC_COUPON_FONT_SIZE\n );\n }", "public function getFontResolution() { }", "public function getFontSize() {\n return $this->fontSize;\n }", "function mai_get_image_size_labels() {\n\treturn array(\n\t\t'banner' => __( 'Banner', 'mai-theme-engine' ),\n\t\t'section' => __( 'Section', 'mai-theme-engine' ),\n\t\t'full-width' => __( 'Full Width', 'mai-theme-engine' ),\n\t\t'featured' => __( 'Featured', 'mai-theme-engine' ),\n\t\t'one-half' => __( 'One Half', 'mai-theme-engine' ),\n\t\t'one-third' => __( 'One Third', 'mai-theme-engine' ),\n\t\t'one-fourth' => __( 'One Fourth', 'mai-theme-engine' ),\n\t\t'tiny' => __( 'Tiny', 'mai-theme-engine' ),\n\t);\n}", "public function getDefaultFontSize()\n {\n return $this->_defaultFontSize;\n }", "public function getTitleSize()\n {\n return $this->titleSize;\n }", "public function getDefaultFontSize() {\n\t\treturn $this->_defaultFontSize;\n\t}", "public function setAxisFontSize($size)\n\t{\n\t\t$this->axis_fontsize = $size;\n\t}", "public function getDimension(): array\n {\n $fontInfo = $this->getFontInfo();\n $rotationAngle = $this->getRotationAngle();\n $width = $fontInfo->getWidth();\n $height = $fontInfo->getHeight();\n if ($rotationAngle === 90 || $rotationAngle === 270) {\n return array($height, $width);\n } else {\n return array($width, $height);\n }\n }", "function getLegendSize($Format=\"\")\n {\n $FontName\t\t= isset($Format[\"FontName\"]) ? $Format[\"FontName\"] : $this->FontName;\n $FontSize\t\t= isset($Format[\"FontSize\"]) ? $Format[\"FontSize\"] : $this->FontSize;\n $BoxSize\t\t= isset($Format[\"BoxSize\"]) ? $Format[\"BoxSize\"] : 5;\n $Margin\t\t= isset($Format[\"Margin\"]) ? $Format[\"Margin\"] : 5;\n $Style\t\t= isset($Format[\"Style\"]) ? $Format[\"Style\"] : LEGEND_ROUND;\n $Mode\t\t= isset($Format[\"Mode\"]) ? $Format[\"Mode\"] : LEGEND_VERTICAL;\n $BoxWidth\t\t= isset($Format[\"BoxWidth\"]) ? $Format[\"BoxWidth\"] : 5;\n $BoxHeight\t\t= isset($Format[\"BoxHeight\"]) ? $Format[\"BoxHeight\"] : 5;\n $IconAreaWidth\t= isset($Format[\"IconAreaWidth\"]) ? $Format[\"IconAreaWidth\"] : $BoxWidth;\n $IconAreaHeight\t= isset($Format[\"IconAreaHeight\"]) ? $Format[\"IconAreaHeight\"] : $BoxHeight;\n $XSpacing\t\t= isset($Format[\"XSpacing\"]) ? $Format[\"XSpacing\"] : 5;\n\n $Data = $this->DataSet->getData();\n\n foreach($Data[\"Series\"] as $SerieName => $Serie)\n {\n if ( $Serie[\"isDrawable\"] == TRUE && $SerieName != $Data[\"Abscissa\"] && isset($Serie[\"Picture\"]))\n {\n list($PicWidth,$PicHeight) = $this->getPicInfo($Serie[\"Picture\"]);\n if ( $IconAreaWidth < $PicWidth ) { $IconAreaWidth = $PicWidth; }\n if ( $IconAreaHeight < $PicHeight ) { $IconAreaHeight = $PicHeight; }\n }\n }\n\n $YStep = max($this->FontSize,$IconAreaHeight) + 5;\n $XStep = $IconAreaWidth + 5;\n $XStep = $XSpacing;\n\n $X=100; $Y=100;\n\n $Boundaries = \"\"; $Boundaries[\"L\"] = $X; $Boundaries[\"T\"] = $Y; $Boundaries[\"R\"] = 0; $Boundaries[\"B\"] = 0; $vY = $Y; $vX = $X;\n foreach($Data[\"Series\"] as $SerieName => $Serie)\n {\n if ( $Serie[\"isDrawable\"] == TRUE && $SerieName != $Data[\"Abscissa\"] )\n {\n if ( $Mode == LEGEND_VERTICAL )\n {\n $BoxArray = $this->getTextBox($vX+$IconAreaWidth+4,$vY+$IconAreaHeight/2,$FontName,$FontSize,0,$Serie[\"Description\"]);\n\n if ( $Boundaries[\"T\"] > $BoxArray[2][\"Y\"]+$IconAreaHeight/2 ) { $Boundaries[\"T\"] = $BoxArray[2][\"Y\"]+$IconAreaHeight/2; }\n if ( $Boundaries[\"R\"] < $BoxArray[1][\"X\"]+2 ) { $Boundaries[\"R\"] = $BoxArray[1][\"X\"]+2; }\n if ( $Boundaries[\"B\"] < $BoxArray[1][\"Y\"]+2+$IconAreaHeight/2 ) { $Boundaries[\"B\"] = $BoxArray[1][\"Y\"]+2+$IconAreaHeight/2; }\n\n $Lines = preg_split(\"/\\n/\",$Serie[\"Description\"]);\n $vY = $vY + max($this->FontSize*count($Lines),$IconAreaHeight) + 5;\n }\n elseif ( $Mode == LEGEND_HORIZONTAL )\n {\n $Lines = preg_split(\"/\\n/\",$Serie[\"Description\"]);\n $Width = \"\";\n foreach($Lines as $Key => $Value)\n {\n $BoxArray = $this->getTextBox($vX+$IconAreaWidth+6,$Y+$IconAreaHeight/2+(($this->FontSize+3)*$Key),$FontName,$FontSize,0,$Value);\n\n if ( $Boundaries[\"T\"] > $BoxArray[2][\"Y\"]+$IconAreaHeight/2 ) { $Boundaries[\"T\"] = $BoxArray[2][\"Y\"]+$IconAreaHeight/2; }\n if ( $Boundaries[\"R\"] < $BoxArray[1][\"X\"]+2 ) { $Boundaries[\"R\"] = $BoxArray[1][\"X\"]+2; }\n if ( $Boundaries[\"B\"] < $BoxArray[1][\"Y\"]+2+$IconAreaHeight/2 ) { $Boundaries[\"B\"] = $BoxArray[1][\"Y\"]+2+$IconAreaHeight/2; }\n\n $Width[] = $BoxArray[1][\"X\"];\n }\n\n $vX=max($Width)+$XStep;\n }\n }\n }\n $vY=$vY-$YStep; $vX=$vX-$XStep;\n\n $TopOffset = $Y - $Boundaries[\"T\"];\n if ( $Boundaries[\"B\"]-($vY+$IconAreaHeight) < $TopOffset ) { $Boundaries[\"B\"] = $vY+$IconAreaHeight+$TopOffset; }\n\n $Width = ($Boundaries[\"R\"]+$Margin) - ($Boundaries[\"L\"]-$Margin);\n $Height = ($Boundaries[\"B\"]+$Margin) - ($Boundaries[\"T\"]-$Margin);\n\n return(array(\"Width\"=>$Width,\"Height\"=>$Height));\n }", "function twentig_get_editor_font_sizes() {\n\t$sizes = array();\n\n\tif ( 'valentine' === get_template() ) {\n\n\t\t$h1_font_size = get_theme_mod( 'twentig_h1_font_size' );\n\t\t$h1_size_px = 84;\n\n\t\tif ( 'small' === $h1_font_size ) {\n\t\t\t$h1_size_px = 56;\n\t\t} elseif ( 'medium' === $h1_font_size ) {\n\t\t\t$h1_size_px = 64;\n\t\t} elseif ( 'large' === $h1_font_size ) {\n\t\t\t$h1_size_px = 72;\n\t\t}\n\n\t\t$sizes = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'h1',\n\t\t\t\t'size' => $h1_size_px,\n\t\t\t\t'slug' => 'h1',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'h2',\n\t\t\t\t'size' => 48,\n\t\t\t\t'slug' => 'h2',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'h3',\n\t\t\t\t'size' => 40,\n\t\t\t\t'slug' => 'h3',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'h4',\n\t\t\t\t'size' => 32.01,\n\t\t\t\t'slug' => 'h4',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'h5',\n\t\t\t\t'size' => 24.01,\n\t\t\t\t'slug' => 'h5',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'h6',\n\t\t\t\t'size' => 18.01,\n\t\t\t\t'slug' => 'h6',\n\t\t\t),\n\t\t);\n\t}\n\treturn $sizes;\n}", "private function getLabels() {\n\t\t$x = 0;\n\t\t$y = 0;\n\t\t$labels = [];\n\n\t\tif ($this->type == GRAPH_YAXIS_SIDE_BOTTOM) {\n\t\t\t$axis = 'x';\n\t\t\t$y = $this->height - CSvgGraph::SVG_GRAPH_X_AXIS_LABEL_MARGIN;\n\t\t}\n\t\telse {\n\t\t\t$axis = 'y';\n\t\t\t$x = ($this->type == GRAPH_YAXIS_SIDE_RIGHT)\n\t\t\t\t? CSvgGraph::SVG_GRAPH_Y_AXIS_RIGHT_LABEL_MARGIN\n\t\t\t\t: $this->width - CSvgGraph::SVG_GRAPH_Y_AXIS_LEFT_LABEL_MARGIN;\n\t\t}\n\n\t\tforeach ($this->labels as $pos => $label) {\n\t\t\t$$axis = $pos;\n\n\t\t\tif ($this->type == GRAPH_YAXIS_SIDE_LEFT || $this->type == GRAPH_YAXIS_SIDE_RIGHT) {\n\t\t\t\t// Flip upside down.\n\t\t\t\t$y = $this->height - $y;\n\t\t\t}\n\n\t\t\tif ($this->type == GRAPH_YAXIS_SIDE_BOTTOM) {\n\t\t\t\tif (count($labels) == 0) {\n\t\t\t\t\t$text_tag_x = max($this->x + $x, strlen($label) * 4);\n\t\t\t\t}\n\t\t\t\telseif (end($this->labels) === $label) {\n\t\t\t\t\t$text_tag_x = (strlen($label) * 4 > $this->width - $x) ? $this->x + $x - 10 : $this->x + $x;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$text_tag_x = $this->x + $x;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$text_tag_x = $this->x + $x;\n\t\t\t}\n\n\t\t\t$labels[] = new CSvgText($text_tag_x, $this->y + $y, $label);\n\t\t}\n\n\t\treturn $labels;\n\t}", "public function getAxisYLabelOffsetX()\n\t{\n\t\treturn $this->axis_ylabel_offX;\n\t}", "function fl_query_font_render_size( $font, $size, $color, $text ) {\n $d=new ImagickDraw();\n $d->setFont($font);\n $d->setFontSize(intval($size));\n $d->setGravity(Imagick::GRAVITY_CENTER);\n $d->setFillColor($color);\n $c=new Imagick();\n $m=$c->queryFontMetrics($d,$text);\n $c->clear();\n $c->destroy();\n $d->clear();\n $d->destroy();\n $dim=array( 'w'=>$m['textWidth'], 'h'=>$m['textHeight'] );\n return $dim;\n}", "function resurrect_customize_logo_text_size_choices() {\n\n\t$choices = \tarray(\n\t\t'extra-small'\t=> _x( 'Extra Small', 'customizer', 'resurrect' ),\n\t\t'small'\t\t\t=> _x( 'Small', 'customizer', 'resurrect' ),\n\t\t'medium'\t\t=> _x( 'Medium', 'customizer', 'resurrect' ),\n\t\t'large'\t\t\t=> _x( 'Large', 'customizer', 'resurrect' ),\n\t\t'extra-large'\t=> _x( 'Extra Large', 'customizer', 'resurrect' ),\n\t);\n\n\treturn apply_filters( 'resurrect_customize_logo_text_size_choices', $choices );\n\n}", "public function getFormatSize() {}", "private static function getTextBoxDimensions(): array {\n $box = imagettfbbox(self::$fontSize, 0, self::getFontPath(), self::getTextString());\n $x = $box[0] + (self::$width / 2) - ($box[4] / 2);\n $y = $box[1] + (self::$height / 2) - ($box[5] / 2);\n\n return ['x' => $x, 'y' => $y];\n }", "public function getFont () {}", "public function getFont () {}", "public function getFont()\n {\n return $this->helper->getWebsiteConfig(\n Config::XML_PATH_CONNECTOR_DYNAMIC_COUPON_FONT\n );\n }", "public static function fontSize()\r\n\t{\r\n\t\treturn self::CAPTCHA_IMAGE_HEIGHT * 0.65;\r\n\t}", "function ttsize ($text, $size=12, $full=0, $angle=0) {\n\t\t$res = imagettfbbox((float) $size, $angle, $this->fontfile, $text);\n\t\tif ($full) return $res;\n\t\treturn array($res[2]-$res[0], $res[1]-$res[7]);\n\t}", "public static function getFontSizeTestSets()\n {\n return array(\n 'font-size' => array(\n // styles\n new ezcDocumentPcssStyleMeasureValue( 23 ),\n // expected attributes\n array(\n // NS, attribute name, value\n array( ezcDocumentOdt::NS_ODT_FO, 'font-size', '23mm' ),\n array( ezcDocumentOdt::NS_ODT_STYLE, 'font-size-asian', '23mm' ),\n array( ezcDocumentOdt::NS_ODT_STYLE, 'font-size-complex', '23mm' ),\n )\n ),\n );\n }", "public function getFontWeight () {}", "public function getLabelFormatType()\n {\n return $this->LabelFormatType;\n }", "public function getNumLabels()\n {\n return $this->binStyle->getNumLabels();\n }", "public function getAxisXLabelOffsetY()\n\t{\n\t\treturn $this->axis_xlabel_offY;\n\t}", "public function textSize($faktor = null)\n {\n\n if ($faktor)\n return $this->textSize + (isset($this->sizeFactor[$faktor])?$this->sizeFactor[$faktor]:1);\n\n }", "function _set_y_label_style($size, $colour) {\n\t\t$tmp = $size;\n\t\t\n\t\tif (strlen ( $colour ) > 0)\n\t\t\t$tmp .= ',' . $colour;\n\t\treturn $tmp;\n\t}", "function get_biggest_label($labels)\n\t{\n\t\t$label_lengths = [];\n\t\tforeach ($labels as $key => $label)\n\t\t{\n\t\t\t$text = $key;\n\t\t\tif ($this->chart_info['grouped'] == 0)\n\t\t\t{\n\t\t\t\tif (is_array($label))\n\t\t\t\t{\n\t\t\t\t\t$text = $label['name'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->chart_options['filetype'] == 'svg')\n\t\t\t{\n\t\t\t\t$get_label_length = $this->text_size($text, $this->chart_options['label_font_size'], 0.6, 'UTF-8');\n\t\t\t}\n\t\t\telse if ($this->chart_options['filetype'] == 'png' || $this->chart_options['filetype'] == 'jpg')\n\t\t\t{\n\t\t\t\t$get_label_length = [imagefontwidth(3) * strlen($text)];\n\t\t\t}\n\t\t\t$label_lengths[] = $get_label_length;\n\t\t}\n\t\trsort($label_lengths);\n\n\t\t$this->biggest_label = array_slice($label_lengths[0], 0, 1)[0];\n\t}", "public function get_size_options() {\n return array(\n '416x290' => '416px by 290px',\n '516x346' => '516px by 346px',\n '616x402' => '616px by 402px',\n '816x515' => '816px by 515px',\n 'responsive' => 'responsive (full-width of container)',\n 'custom' => 'custom',\n );\n }", "public function getFont()\n {\n return $this->_sFont;\n }", "public function sizeAsString()\n\t\t{\n\t\t\tglobal $ibforums;\n\n\t\t\tif ($this->from_post_row)\n\t\t\t{\n\t\t\t\treturn sprintf($ibforums->lang['attachment_size_kb'], $this->size);\n\t\t\t}\n\t\t\t$sizes_strings = array(\n\t\t\t\t'attachment_size_b',\n\t\t\t\t'attachment_size_kb',\n\t\t\t\t'attachment_size_mb',\n\t\t\t\t'attachment_size_gb',\n\t\t\t);\n\n\t\t\t$out_size = $this->size;\n\t\t\t$i = 0;\n\t\t\twhile (($i < 4) && ($out_size >= 1024))\n\t\t\t{\n\t\t\t\t$i++;\n\t\t\t\t$out_size /= 1024.0;\n\t\t\t}\n\n\t\t\treturn (sprintf($ibforums->lang[$sizes_strings[$i]], round($out_size, 2)));\n\n\t\t}", "function yLabelFormat( $label ){\n return number_format( $label / 100000 ).\"k\"; \n }", "public static function translateIntoSizes(){\r\n\r\n\t\treturn array(\r\n\t\t\t'align_hor',\r\n\t\t\t'align_vert',\r\n\t\t\t'top',\r\n\t\t\t'left',\r\n\t\t\t'font-size',\r\n\t\t\t'line-height',\r\n\t\t\t'font-weight',\r\n\t\t\t'color',\r\n\t\t\t'max_width',\r\n\t\t\t'max_height',\r\n\t\t\t'whitespace',\r\n\t\t\t'video_height',\r\n\t\t\t'video_width',\r\n\t\t\t'scaleX',\r\n\t\t\t'scaleY'\r\n\t\t\t);\r\n\t\t\t\r\n\t}", "public function setTitleFontSize($size)\n\t{\n\t\t$this->title_fontsize = $size;\n\t}", "function bookcrossing_catalog_get_letters_levels()\n\n{\n\n $defaults = array(\n\n '0' => '14',\n\n '10' => '16',\n\n '20' => '20',\n\n '30' => '24',\n\n '40' => '28',\n\n '50' => '32',\n\n '60' => '36',\n\n '70' => '40',\n\n '80' => '44',\n\n '90' => '48',\n\n '100' => '52',\n\n );\n\n\n\n $font_sizes = variable_get('bookcrossing_catalog_font_sizes', $defaults);\n\n\n\n return $font_sizes;\n\n}", "function height()\n {\n return $this->_font->height($this->_text);\n }", "public function getNameSize()\n {\n return $this->nameSize;\n }", "public function setFontSize ($pointsize) {}", "private function getPosition()\n {\n if ($this->labelCounter == 1) {\n return [0, 0];\n }\n\n if ($this->labelCounter == 2) {\n return [0, Fpdi::PAGE_SIZE_A6_WIDTH];\n }\n\n if ($this->labelCounter == 3) {\n return [Fpdi::PAGE_SIZE_A6_HEIGHT, 0];\n }\n\n if ($this->labelCounter == 4) {\n return [Fpdi::PAGE_SIZE_A6_HEIGHT, Fpdi::PAGE_SIZE_A6_WIDTH];\n }\n }", "function setTextFontSize($iSize){\n\t\t\t$this->excel->getActiveSheet()->getStyle('A:Z')->getFont()->setSize($iSize);\n\t\t\t$this->excel->getActiveSheet()->getDefaultRowDimension()->setRowHeight($iSize+3);\n\n\t\t}", "function getTrueTypeFontSize($style)\n\t {\n\t \treturn mxUtils::getTrueTypeFontSize(\n\t \t\tmxUtils::getValue($style, mxConstants::$STYLE_FONTSIZE,\n\t\t\tmxConstants::$DEFAULT_FONTSIZE) * $this->scale);\n\t }", "public function getLabelposition()\n {\n return $this->LABELPOSITION;\n }", "public function getFontFamily () {}", "public function getIsDefaultSize()\n {\n return (string) $this->helper('breadcheckout/Catalog')->getDefaultButtonSizeCartHtml();\n }", "public function getAxisYLabelOffsetY()\n\t{\n\t\treturn $this->axis_ylabel_offY;\n\t}", "public function getCustomLegendText(){\n\n return Mage::getStoreConfig('devopentaxvatnumber/general/text_legend_input');\n }", "function GetMinTickAbsSize()\n {\n return $this->minor_abs_size;\n }", "public function fontName()\n {\n $font = (string) $this->data->textElement->font['fontName'];\n return $font != \"\" ? $font : 'times';\n }", "function tinymce_customize_text_sizes($initArray) {\n $initArray['fontsize_formats'] = \"8px 9px 10px 11px 12px 13px 14px 15px 16px 17px 18px 19px 20px 21px 22px 23px 24px 25px 26px 27px 28px 29px 30px 32px 48px\";\n return $initArray;\n}", "public function getLabelFormat() {\n return $this->labelFormat;\n }", "function PMA_PDF_setFontSizeScale($size)\n {\n // Set font size in points\n $size = $size / $this->scale;\n $this->SetFontSize($size);\n }", "function getFontNames() {\n $fontLabel = array(\n 'courier' => ts('Courier'),\n 'helvetica' => ts('Helvetica'),\n 'times' => ts('Times New Roman'),\n 'dejavusans' => ts('Deja Vu Sans (UTF-8)')\n );\n $tcpdfFonts = $this->fontlist;\n foreach ($tcpdfFonts as $fontName) {\n if (array_key_exists($fontName, $fontLabel)) {\n $list[$fontName] = $fontLabel[$fontName];\n }\n }\n return $list;\n }", "private function axisLabelsSeries($rect) {\r\n $tmpNum = 0;\r\n $tmpSt = \"\";\r\n $tmpValue = 0;\r\n\r\n $this->calcAllSeries();\r\n $tmpRange = $this->calcFirstLastAllSeries($rect);\r\n\r\n if ($tmpRange->first != intval('1000000000000')) { // MAX_VALUE\r\n $oldPosLabel = -1;\r\n $oldSizeLabel = 0;\r\n $tmpLabelW = $this->axis->getHorizontal();\r\n switch ($this->axis->getLabels()->iAngle) {\r\n case 90:\r\n case 270:\r\n $tmpLabelW = !$tmpLabelW;\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n $axisLabels = $this->axis->getLabels();\r\n for ( $t = $tmpRange->first; $t <= $tmpRange->last; $t++) {\r\n $r = $this->getAxisSeriesLabel($t);\r\n if ($r->result) {\r\n $tmpValue = $r->value;\r\n $tmpSt = $r->label;\r\n\r\n if (($tmpValue >= $this->axis->iMinimum) &&\r\n ($this->tmpValue <= $this->axis->iMaximum)) {\r\n $tmp = $this->axis->calcPosValue($tmpValue);\r\n if (!$this->axis->getTickOnLabelsOnly()) {\r\n $this->addTick($tmp);\r\n }\r\n\r\n if ($axisLabels->getVisible() &&\r\n (strlen($tmpSt) != 0)) {\r\n\r\n $tmpMulti = $this->axis->chart->multiLineTextWidth(\r\n $tmpSt);\r\n\r\n $tmpLabelSize = $tmpMulti->width;\r\n $tmpNum = $tmpMulti->count;\r\n\r\n if (!$tmpLabelW) {\r\n $tmpLabelSize = $this->chart->getGraphics3D()->getFontHeight() * $tmpNum;\r\n }\r\n if (($axisLabels->iSeparation != 0) &&\r\n ($this->oldPosLabel != -1)) {\r\n $tmpLabelSize += (int) (0.02 * $tmpLabelSize *\r\n $axisLabels->iSeparation);\r\n $tmpLabelSize *= 0.5;\r\n\r\n if ($tmp >= $oldPosLabel) {\r\n $tmpDraw = (($tmp -\r\n $tmpLabelSize) >=\r\n ($this->oldPosLabel +\r\n $oldSizeLabel));\r\n } else {\r\n $tmpDraw = (($tmp +\r\n $tmpLabelSize) <=\r\n ($this->oldPosLabel -\r\n $oldSizeLabel));\r\n }\r\n\r\n if ($tmpDraw) {\r\n $this->drawThisLabel($tmp, $tmpSt, null);\r\n $oldPosLabel = $tmp;\r\n $oldSizeLabel = $tmpLabelSize;\r\n }\r\n } else {\r\n $this->drawThisLabel($tmp, $tmpSt, null);\r\n $oldPosLabel = $tmp;\r\n $oldSizeLabel = $tmpLabelSize / 2;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n $this->axis->iSeriesList->clear(false);\r\n }\r\n }", "public function get_label_position()\n\t{\n\t\treturn $this->_label_position;\n\t}", "public function updateFontSize($size);", "function yLabelNumberFormat( $label ){\n return number_format( $label ); \n }", "public function getFontWeight()\n {\n return $this->font_weight;\n }", "public function getFontList()\n {\n return array(\n array(\n 'value' => 'HiraKakuProN-W3',\n 'label' => 'HiraKakuProN-W3',\n ),\n array(\n 'value' => 'Courier',\n 'label' => 'Courier',\n ),\n array(\n 'value' => 'Courier-BoldOblique',\n 'label' => 'Courier-BoldOblique',\n ),\n array(\n 'value' => 'Courier-Oblique',\n 'label' => 'Courier-Oblique',\n ),\n array(\n 'value' => 'Courier-Bold',\n 'label' => 'Courier-Bold',\n ),\n array(\n 'value' => 'ArialMT',\n 'label' => 'ArialMT',\n ),\n array(\n 'value' => 'Arial-BoldMT',\n 'label' => 'Arial-BoldMT',\n ),\n array(\n 'value' => 'Arial-BoldItalicMT',\n 'label' => 'Arial-BoldItalicMT',\n ),\n array(\n 'value' => 'Arial-ItalicMT',\n 'label' => 'Arial-ItalicMT',\n ),\n array(\n 'value' => 'STHeitiTC-Light',\n 'label' => 'STHeitiTC-Light',\n ),\n array(\n 'value' => 'STHeitiTC-Medium',\n 'label' => 'STHeitiTC-Medium',\n ),\n array(\n 'value' => 'AppleGothic',\n 'label' => 'AppleGothic',\n ),\n array(\n 'value' => 'CourierNewPS-BoldMT',\n 'label' => 'CourierNewPS-BoldMT',\n ),\n array(\n 'value' => 'CourierNewPS-ItalicMT',\n 'label' => 'CourierNewPS-ItalicMT',\n ),\n array(\n 'value' => 'CourierNewPS-BoldItalicMT',\n 'label' => 'CourierNewPS-BoldItalicMT',\n ),\n array(\n 'value' => 'CourierNewPSMT',\n 'label' => 'CourierNewPSMT',\n ),\n array(\n 'value' => 'Zapfino',\n 'label' => 'Zapfino',\n ),\n array(\n 'value' => 'HiraKakuProN-W6',\n 'label' => 'HiraKakuProN-W6',\n ),\n array(\n 'value' => 'ArialUnicodeMS',\n 'label' => 'ArialUnicodeMS',\n ),\n array(\n 'value' => 'STHeitiSC-Medium',\n 'label' => 'STHeitiSC-Medium',\n ),\n array(\n 'value' => 'STHeitiSC-Light',\n 'label' => 'STHeitiSC-Light',\n ),\n array(\n 'value' => 'AmericanTypewriter',\n 'label' => 'AmericanTypewriter',\n ),\n array(\n 'value' => 'AmericanTypewriter-Bold',\n 'label' => 'AmericanTypewriter-Bold',\n ),\n array(\n 'value' => 'Helvetica-Oblique',\n 'label' => 'Helvetica-Oblique',\n ),\n array(\n 'value' => 'Helvetica-BoldOblique',\n 'label' => 'Helvetica-BoldOblique',\n ),\n array(\n 'value' => 'Helvetica',\n 'label' => 'Helvetica',\n ),\n array(\n 'value' => 'Helvetica-Bold',\n 'label' => 'Helvetica-Bold',\n ),\n array(\n 'value' => 'MarkerFelt-Thin',\n 'label' => 'MarkerFelt-Thin',\n ),\n array(\n 'value' => 'HelveticaNeue',\n 'label' => 'HelveticaNeue',\n ),\n array(\n 'value' => 'HelveticaNeue-Bold',\n 'label' => 'HelveticaNeue-Bold',\n ),\n array(\n 'value' => 'DBLCDTempBlack',\n 'label' => 'DBLCDTempBlack',\n ),\n array(\n 'value' => 'Verdana-Bold',\n 'label' => 'Verdana-Bold',\n ),\n array(\n 'value' => 'Verdana-BoldItalic',\n 'label' => 'Verdana-BoldItalic',\n ),\n array(\n 'value' => 'Verdana',\n 'label' => 'Verdana',\n ),\n array(\n 'value' => 'Verdana-Italic',\n 'label' => 'Verdana-Italic',\n ),\n array(\n 'value' => 'TimesNewRomanPSMT',\n 'label' => 'TimesNewRomanPSMT',\n ),\n array(\n 'value' => 'TimesNewRomanPS-BoldMT',\n 'label' => 'TimesNewRomanPS-BoldMT',\n ),\n array(\n 'value' => 'TimesNewRomanPS-BoldItalicMT',\n 'label' => 'TimesNewRomanPS-BoldItalicMT',\n ),\n array(\n 'value' => 'TimesNewRomanPS-ItalicMT',\n 'label' => 'TimesNewRomanPS-ItalicMT',\n ),\n array(\n 'value' => 'Georgia-Bold',\n 'label' => 'Georgia-Bold',\n ),\n array(\n 'value' => 'Georgia',\n 'label' => 'Georgia',\n ),\n array(\n 'value' => 'Georgia-BoldItalic',\n 'label' => 'Georgia-BoldItalic',\n ),\n array(\n 'value' => 'Georgia-Italic',\n 'label' => 'Georgia-Italic',\n ),\n array(\n 'value' => 'STHeitiJ-Medium',\n 'label' => 'STHeitiJ-Medium',\n ),\n array(\n 'value' => 'STHeitiJ-Light',\n 'label' => 'STHeitiJ-Light',\n ),\n array(\n 'value' => 'ArialRoundedMTBold',\n 'label' => 'ArialRoundedMTBold',\n ),\n array(\n 'value' => 'TrebuchetMS-Italic',\n 'label' => 'TrebuchetMS-Italic',\n ),\n array(\n 'value' => 'TrebuchetMS',\n 'label' => 'TrebuchetMS',\n ),\n array(\n 'value' => 'Trebuchet-BoldItalic',\n 'label' => 'Trebuchet-BoldItalic',\n ),\n array(\n 'value' => 'TrebuchetMS-Bold',\n 'label' => 'TrebuchetMS-Bold',\n ),\n array(\n 'value' => 'STHeitiK-Medium',\n 'label' => 'STHeitiK-Medium',\n ),\n array(\n 'value' => 'STHeitiK-Light',\n 'label' => 'STHeitiK-Light',\n ));\n }", "public function getFont()\n {\n if (array_key_exists(\"font\", $this->_propDict)) {\n if (is_a($this->_propDict[\"font\"], \"\\Beta\\Microsoft\\Graph\\Model\\WorkbookRangeFont\") || is_null($this->_propDict[\"font\"])) {\n return $this->_propDict[\"font\"];\n } else {\n $this->_propDict[\"font\"] = new WorkbookRangeFont($this->_propDict[\"font\"]);\n return $this->_propDict[\"font\"];\n }\n }\n return null;\n }", "public function getFontFamily() {\n\t\treturn $this->_arrInfo[1];\n\t}", "public static function getAlignmentLabels()\n {\n return [\n self::ALIGNMENT_LEFT => Yii::t('app', 'Left'),\n self::ALIGNMENT_CENTER => Yii::t('app', 'Center'),\n self::ALIGNMENT_RIGHT => Yii::t('app', 'Right'),\n ];\n }", "function random_font_size() {\n\t\n\t\t$this -> size = mt_rand($this -> font_size_min, $this -> font_size_max );\n\t}", "public function getFont()\n {\n $font = (string)$this->captchaData->getConfig('font');\n $fonts = $this->captchaData->getFonts();\n\n if (isset($fonts[$font])) {\n $fontPath = $fonts[$font]['path'];\n } else {\n $fontData = array_shift($fonts);\n $fontPath = $fontData['path'];\n }\n\n return $fontPath;\n }", "function text_size($text, $font_size, $font_adjust, $encoding)\n\t{\n\t\t$height = $font_size;\n\n\t\t$len = mb_strlen($text, $encoding);\n\n\t\t$width = $len * $font_size * $font_adjust;\n\n\t\treturn [$width, $text];\n\t}", "function temlate_size_text( $arary_size = array() ) {\n $arary_size_text = array('s', 'm', 'l', 'xl', 'xxl', 'xxxl');\n foreach ($arary_size_text as $size) {\n if( array_key_exists( $size, $arary_size ) ) {\n ?>\n <input type=\"checkbox\" id=\"<?php echo $size; ?>\" name=\"size_<?php echo $size; ?>\" value=\"<?php echo $size; ?>\" class=\"check\" checked>\n <label for=\"<?php echo $size; ?>\" class=\"title-size\"><?php echo strtoupper($size); ?></label>\n <input type=\"number\" name=\"sl_<?php echo $size; ?>\" value=\"<?php echo $arary_size[$size]; ?>\" class=\"number\">\n <?php\n } else {\n ?>\n <input type=\"checkbox\" id=\"<?php echo $size; ?>\" name=\"size_<?php echo $size; ?>\" value=\"<?php echo $size; ?>\" class=\"check\">\n <label for=\"<?php echo $size; ?>\" class=\"title-size\"><?php echo strtoupper($size); ?></label>\n <input type=\"number\" name=\"sl_<?php echo $size; ?>\" value=\"10\" class=\"number\" disabled=\"disabled\">\n <?php \n }\n } \n\n }", "protected function _getSizeErrorMessage()\n {\n if($this->_hasRule($input, $this->_numericRules)) {\n $line = 'numeric';\n } else {\n $line = 'string';\n }\n\n return $this->_defaultErrorMessages[$rule][$line];\n }", "public function getFontStyle () {}", "public function getFontType()\n {\n return $this->FontType;\n }", "public function scaleType()\n {\n return (string) $this->html['scaleType'];\n }", "public static function get_image_size_names() {\n\t\treturn apply_filters( 'image_size_names_choose', array(\n\t\t\t'thumbnail' => __( 'Thumbnail', 'blazersix-widget-image-i18n' ),\n\t\t\t'medium' => __( 'Medium', 'blazersix-widget-image-i18n' ),\n\t\t\t'large' => __( 'Large', 'blazersix-widget-image-i18n' ),\n\t\t\t'full' => __( 'Full Size', 'blazersix-widget-image-i18n' )\n\t\t) );\n\t}", "function __toString() {\n return print_r(array_merge(array(\"parent_font_size\" => $this->_parent_font_size),\n $this->_props), true);\n }", "private static function getTextString(): string {\n return implode(' X ', [self::$width, self::$height]);\n }", "private static function calculateTextWidth(string $text, string $fontFile, float $size): float\n {\n // note for future: imagettfbbox is unable to calculate height properly.\n // width should be fine though.\n\n $box = imagettfbbox($size, 0, $fontFile, $text);\n\n $minX = min($box[0], $box[2], $box[4], $box[6]);\n $maxX = max($box[0], $box[2], $box[4], $box[6]);\n\n return abs($maxX - $minX);\n }", "function set_y_label_style($size, $colour = '') {\n\t\t$this->y_label_style = $this->_set_y_label_style ( $size, $colour );\n\t}", "public function getGetSizePixelValues()\n {\n return [\n 'No unit' => ['1234.5', 1235],\n 'px' => ['1234.5px', 1235],\n 'em' => ['1em', 16],\n 'ex' => ['2ex', 16],\n 'pt' => ['12pt', 16],\n 'pc' => ['1pc', 16],\n 'in' => [(1 / 6).'in', 16],\n 'cm' => [(2.54 / 6).'cm', 16],\n 'mm' => [(25.4 / 6).'mm', 16],\n 'No unit with spacing' => [\" \\r \\n \\t 1234.5 \\r \\n \\t \", 1235],\n 'em with spacing' => [\" \\r \\n \\t 1234.5em \\r \\n \\t \", 19752],\n 'unknown' => ['100vw', 0],\n 'unknown mmm' => ['1mmm', 0],\n 'invalid' => ['abc', 0],\n 'invalid number' => ['12.34.5', 0],\n ];\n }", "public function fontStyle()\n {\n\n $style = '';\n\n $font = $this->data->textElement->font;\n\n if ((string) $font['isBold'] == 'true')\n {\n $style = 'B';\n }\n if ((string) $font['isItalic'] == 'true')\n {\n $style .= 'I';\n }\n if ((string) $font['isUnderline'] == 'true')\n {\n $style .= 'U';\n }\n if ((string) $font['isStrikeThrough'] == 'true')\n {\n $style .= 'D';\n }\n return $style;\n }", "static function getTerminalSize() \n\t\t{\n\t\t\t$size = array('width' => 80, 'height' => 24);\n\t\t\tif (php_sapi_name() === 'cli' && strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {\n\t\t\t\t$size['width'] = exec('tput cols');\n\t\t\t\t$size['height'] = exec('tput lines');\n\t\t\t}\n\t\t\treturn $size;\n\t\t}", "public function getFontFamily() {\n\n return Html::getClass($this->getBaseFontFamily($this->getName()));\n }", "public function sizeForHumans() {\n $bytes = $this->size;\n\n $units = ['b', 'kb', 'gb', 'tb'];\n\n for ($i = 0; $bytes > 1024; $i++) {\n $bytes /= 1024;\n }\n\n return round($bytes, 2) . $units[$i];\n }", "public function fontExtents($context)\n {\n }", "public function getTextLabel()\n {\n return $this->text_label;\n }", "function yLabelFormat($aLabel) {\n\treturn ($aLabel / 1000);\n}", "public function getAxisXLabelOffsetX()\n\t{\n\t\treturn $this->axis_xlabel_offX;\n\t}" ]
[ "0.72463775", "0.7130616", "0.69858426", "0.69574183", "0.68869174", "0.68869174", "0.6814703", "0.67213196", "0.6705545", "0.6663947", "0.6652799", "0.6638382", "0.66172606", "0.6583034", "0.6509926", "0.6496076", "0.6404239", "0.63727874", "0.63409925", "0.61582273", "0.6118205", "0.60779494", "0.60297346", "0.6016366", "0.59279835", "0.589651", "0.58896244", "0.5836865", "0.57568514", "0.5756138", "0.57376593", "0.5719446", "0.5714669", "0.5714669", "0.5694158", "0.56797695", "0.56755775", "0.5657619", "0.5656766", "0.56294614", "0.56227654", "0.5611709", "0.5572025", "0.5556498", "0.555585", "0.55426335", "0.55421513", "0.5526296", "0.55230767", "0.5494269", "0.54686207", "0.54629594", "0.5460812", "0.5443927", "0.5440515", "0.54334277", "0.5430377", "0.5415927", "0.540716", "0.5387871", "0.5384323", "0.53813344", "0.537328", "0.53561914", "0.53513396", "0.53491306", "0.53423005", "0.5338092", "0.53360415", "0.53133696", "0.52817726", "0.5270662", "0.52633137", "0.52623874", "0.5256356", "0.52559733", "0.52370906", "0.52325463", "0.5208648", "0.52016884", "0.5191088", "0.5189165", "0.5187827", "0.51834697", "0.51727206", "0.51609486", "0.516035", "0.5140429", "0.51385623", "0.5134887", "0.51275283", "0.51268786", "0.51163197", "0.51058686", "0.5088648", "0.50832874", "0.50723296", "0.50700843", "0.5069686", "0.5064045" ]
0.7784548
0
Gets x offset of the x axis labels
Получает смещение x меток оси x
public function getAxisXLabelOffsetX() { return $this->axis_xlabel_offX; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAxisYLabelOffsetX()\n\t{\n\t\treturn $this->axis_ylabel_offX;\n\t}", "public function getAxisXLabelOffsetY()\n\t{\n\t\treturn $this->axis_xlabel_offY;\n\t}", "public function getAxisDistanceX()\n\t{\n\t\treturn $this->axis_distance_x;\n\t}", "public function setAxisXLabelOffsetX($dx)\n\t{\n\t\t$this->axis_xlabel_offX = $dx;\n\t}", "public function get_x_pos() {\n return $this->x_pos;\n }", "public function getOffsetX(): int\n {\n return $this->offsetX;\n }", "public function getAxisPaddingLeft()\n\t{\n\t\treturn $this->axis_padding_left;\n\t}", "public function getYDescriptionOffsetLeft()\n\t{\n\t\treturn $this->ydescr_offX;\n\t}", "public function getStartX() {\n return $this->cells[0]->x;\n }", "function SetXLabelOffset($aLabelOff, $aTickOff = -1)\n {\n $this->xlabel_offset = $aLabelOff;\n if ($aTickOff == -1) // Same as label offset\n $this->xtick_offset = $aLabelOff;\n else\n $this->xtick_offset = $aTickOff;\n if ($aLabelOff > 0)\n $this->SupressLast(); // The last tick wont fit\n }", "public function getPosx()\n\t{\n\t\treturn $this->posx;\n\t}", "public function Get_X()\n\t{\n\t\t$this->current_x = pdf_get_value($this->pdf, \"textx\", 0);\n\t\treturn ($this->current_x);\n\t}", "public function getXPos(){\n\t\t\treturn $this->intXPos;\n\t\t}", "function getPositionX(){\n\t\t\treturn $this -> positionX;\n\t\t}", "public function getLabelposition()\n {\n return $this->LABELPOSITION;\n }", "public function get_label_position()\n\t{\n\t\treturn $this->_label_position;\n\t}", "public function getMinXValue()\r\n {\r\n\r\n if($this->iMultiBar == MultiBars::$SELFSTACK)\r\n {\r\n return $this->getChart()->getSeriesIndexOf($this);\r\n }\r\n else\r\n {\r\n return parent::getMinXValue();\r\n }\r\n }", "function get_x_min()\n\t{\n\t\treturn 0;\n\t}", "public function getDimensionX()\n {\n return $this->dimensionX;\n }", "function _pointX($value)\n {\n if (is_array($value)) {\n $radius = (($value['Y'] === false) ? 1 : ($value['Y'] - $this->_axisY->_getMinimum()) / ($this->_axisY->_getMaximum() - $this->_axisY->_getMinimum()));\n $x = ($this->_left + $this->_right) / 2 - $radius * ($this->_plotWidth() / 2) * cos(deg2rad($this->_axisX->_point($value['X'])));\n }\n return max($this->_plotLeft, min($this->_plotRight, $x));\n }", "public function getMinX()\n {\n return $this->getX();\n }", "public function getCenterX()\n {\n return $this->getX() + $this->getWidth() / 2.0;\n }", "public function getLocationX()\n {\n return $this->locationX;\n }", "public function getLocationX()\r\n {\r\n return $this->getAttr('Location_X');\r\n }", "public function getDimensionX();", "public function getTitleOffsetTop()\n\t{\n\t\treturn $this->title_offY;\n\t}", "public function getPrintedLabelOrigin()\n {\n return $this->PrintedLabelOrigin;\n }", "public function getFullX()\r\n\t{\r\n\t\treturn $this->getSizeX() + $this->getSpaceLeft() + $this->getSpaceRight();\r\n\t}", "public function getCurrentX(): int\n {\n return $this->currentCoordinate->getX();\n }", "private function getLabels() {\n\t\t$x = 0;\n\t\t$y = 0;\n\t\t$labels = [];\n\n\t\tif ($this->type == GRAPH_YAXIS_SIDE_BOTTOM) {\n\t\t\t$axis = 'x';\n\t\t\t$y = $this->height - CSvgGraph::SVG_GRAPH_X_AXIS_LABEL_MARGIN;\n\t\t}\n\t\telse {\n\t\t\t$axis = 'y';\n\t\t\t$x = ($this->type == GRAPH_YAXIS_SIDE_RIGHT)\n\t\t\t\t? CSvgGraph::SVG_GRAPH_Y_AXIS_RIGHT_LABEL_MARGIN\n\t\t\t\t: $this->width - CSvgGraph::SVG_GRAPH_Y_AXIS_LEFT_LABEL_MARGIN;\n\t\t}\n\n\t\tforeach ($this->labels as $pos => $label) {\n\t\t\t$$axis = $pos;\n\n\t\t\tif ($this->type == GRAPH_YAXIS_SIDE_LEFT || $this->type == GRAPH_YAXIS_SIDE_RIGHT) {\n\t\t\t\t// Flip upside down.\n\t\t\t\t$y = $this->height - $y;\n\t\t\t}\n\n\t\t\tif ($this->type == GRAPH_YAXIS_SIDE_BOTTOM) {\n\t\t\t\tif (count($labels) == 0) {\n\t\t\t\t\t$text_tag_x = max($this->x + $x, strlen($label) * 4);\n\t\t\t\t}\n\t\t\t\telseif (end($this->labels) === $label) {\n\t\t\t\t\t$text_tag_x = (strlen($label) * 4 > $this->width - $x) ? $this->x + $x - 10 : $this->x + $x;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$text_tag_x = $this->x + $x;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$text_tag_x = $this->x + $x;\n\t\t\t}\n\n\t\t\t$labels[] = new CSvgText($text_tag_x, $this->y + $y, $label);\n\t\t}\n\n\t\treturn $labels;\n\t}", "public function getXAxis() {\n return $this->xAxis;\n }", "function get_xref_start_value() {\n\t\t//-------------------------------\n\t\t\t$size_shift=$this->shift;\n\t\t\t$xref_start=$this->get_xref_start();\n\t\t\treturn $xref_start+$size_shift;\n\t\t}", "public function getMaxX()\n {\n return $this->getX() + $this->getWidth();\n }", "private function getPosition()\n {\n if ($this->labelCounter == 1) {\n return [0, 0];\n }\n\n if ($this->labelCounter == 2) {\n return [0, Fpdi::PAGE_SIZE_A6_WIDTH];\n }\n\n if ($this->labelCounter == 3) {\n return [Fpdi::PAGE_SIZE_A6_HEIGHT, 0];\n }\n\n if ($this->labelCounter == 4) {\n return [Fpdi::PAGE_SIZE_A6_HEIGHT, Fpdi::PAGE_SIZE_A6_WIDTH];\n }\n }", "function getSeriesPosition() {\n\t\treturn $this->getData('seriesPosition');\n\t}", "public function getXAxisValue()\n {\n return $this->xAxisValue;\n }", "public function getVirtualX()\n\t{\n\t\treturn $this->x + $this->map->getRadius() - 1;\n\t}", "public function setAxisYLabelOffsetX($dx)\n\t{\n\t\t$this->axis_ylabel_offX = $dx;\n\t}", "public function getXDescriptionOffsetBottom()\n\t{\n\t\treturn $this->xdescr_offY;\n\t}", "function _get_offsets_starting_from_zero() {\n\t\t//-------------------------------------------\n\t\t\t$offsets=$this->offsets; \n\t\t\treturn array_values($offsets); \n\t\t}", "public function getSizeX()\n\t{\n\t\treturn imagesx($this->getImage());\n\t}", "protected function tbMarkMarginX()\n {\n\n\n if (isset($this->aTableType['TB_ALIGN'])) {\n $tb_align = $this->aTableType['TB_ALIGN'];\n } else {\n $tb_align = '';\n }\n\n //set the table align\n switch ($tb_align) {\n case 'C':\n $this->iTableStartX = $this->lMargin + $this->aTableType['L_MARGIN'] + ($this->PageWidth() - $this->tbGetWidth()) / 2;\n break;\n case 'R':\n $this->iTableStartX = $this->lMargin + $this->aTableType['L_MARGIN'] + ($this->PageWidth() - $this->tbGetWidth());\n break;\n default:\n $this->iTableStartX = $this->lMargin + $this->aTableType['L_MARGIN'];\n break;\n }//\n\n }", "public function getX()\n {\n return $this->x;\n }", "public function getX()\n {\n return $this->x;\n }", "public function getX()\n {\n return $this->x;\n }", "public function getX()\n {\n return $this->x;\n }", "public function getX()\n {\n return $this->x;\n }", "public function getBootstrapInputOffset(): int\n {\n if ( $this->form->isHorizontal() ){\n $width = (int) preg_replace(\"/[^\\d]/\", \"\", $this->bootstrapInputClass);\n $offset = 12 - $width;\n }\n else {\n $offset = 0;\n }\n return $offset;\n }", "function set_x_offset($val) {\n\t\t$this->x_offset = $val ? 'true' : 'false';\n\t}", "public function getX()\n\t{\n\t\treturn $this->x;\n\t}", "public function offsetX($value) {\n return $this->setProperty('offsetX', $value);\n }", "public\n\t\tfunction getBreweryLocationX() {\n\t\t\treturn ($this->breweryLocationX);\n\t\t}", "public function getX() {\n\t\treturn ($this->x);\n\t}", "public function getAxisLabelLineLength()\n\t{\n\t\treturn $this->axis_label_linelength;\n\t}", "function getHorizontalPosition() { return $this->_horizontalposition; }", "function getHorizontalPosition() { return $this->_horizontalposition; }", "public function getX(): int\n {\n return $this->x;\n }", "public function testGetOffsetX()\n {\n $filter = new Watermark();\n $this->assertEquals(0, $filter->getOffsetX());\n }", "public function getX()\n {\n return $x;\n }", "public function getX()\n {\n return $x;\n }", "public function getAxisYLabelOffsetY()\n\t{\n\t\treturn $this->axis_ylabel_offY;\n\t}", "function getX() {\n return $this->x;\n }", "public function getMaxXValue()\r\n {\r\n if($this->iMultiBar == MultiBars::$SELFSTACK)\r\n {\r\n return $this->getMinXValue();\r\n }\r\n else\r\n {\r\n return($this->iMultiBar == MultiBars::$SIDEALL) ?\r\n $this->iPreviousCount + $this->getCount() - 1 :\r\n parent::getMaxXValue();\r\n }\r\n }", "public function setXOffset($measure, $unit = null);", "public function getAbsX1()\n {\n return $this->absX1;\n }", "public function getOffset() {\n\t\tif($this->offset > 0) return \" OFFSET $this->offset \";\n\t}", "public function getAxisPaddingTop()\n\t{\n\t\treturn $this->axis_padding_top;\n\t}", "public function testGetPositionX()\n {\n $filter = new Watermark();\n $this->assertEquals(Watermark::POS_X_RIGHT, $filter->getPositionX());\n }", "public function calcXPos($valueIndex)\r\n {\r\n\r\n $result = 0;\r\n\r\n if($this->iMultiBar == MultiBars::$SIDEALL)\r\n {\r\n $result = $this->getHorizAxis()->calcXPosValue($this->iPreviousCount + $valueIndex) -\r\n ($this->iBarSize / 2);\r\n }\r\n else\r\n if($this->iMultiBar == MultiBars::$SELFSTACK)\r\n {\r\n $result = (parent::calcXPosValue($this->getMinXValue())) - ($this->iBarSize / 2);\r\n }\r\n else\r\n {\r\n $result = parent::calcXPos($valueIndex);\r\n\r\n if($this->iMultiBar != MultiBars::$NONE)\r\n {\r\n $result += MathUtils::round($this->iBarSize *\r\n (($this->iOrderPos - ($this->iNumBars * 0.5)) - 1.0));\r\n }\r\n else\r\n {\r\n $result -= ($this->iBarSize / 2);\r\n }\r\n }\r\n\r\n return $this->applyBarOffset($result);\r\n }", "public function getStartOffset()\n {\n return $this->start_offset;\n }", "private function getOffset()\n {\n if(is_integer($this->offset)){\n return $this->offset;\n }\n\n return $this->guessOffset();\n }", "public function getX(): mixed\n {\n if (!$this->hasX()) {\n $this->setX($this->getDefaultX());\n }\n return $this->x;\n }", "public function setXPosition($measure, $unit = null, $ignoreOffset = false);", "function set_x_labels($a) {\n\t\t$tmp = array ();\n\t\tforeach ( $a as $item )\n\t\t\t$tmp [] = $this->esc ( $item );\n\t\t$this->x_labels = $tmp;\n\t}", "public function setYDescriptionOffsetLeft($dx)\n\t{\n\t\t$this->ydescr_offX = $dy;\n\t}", "protected function getExceptionLineOffset(): int\n {\n if (\n version_compare(app()->version(), '5.8.0', '>=')\n and\n version_compare(app()->version(), '5.8.9', '<=')\n ) {\n return 2;\n }\n\n return 1;\n }", "public function getStrokeDashOffset () {}", "protected function get_size_label()\n {\n $x_name = get_option(self::X_NAME_KEY, self::DEFAULT_X_NAME);\n $y_name = get_option(self::Y_NAME_KEY, self::DEFAULT_Y_NAME);\n $label = $x_name;\n if (get_option(self::USE_TWO_FIELDS_KEY, self::DEFAULT_USE_TWO_FIELDS) == 1) {\n $label .= \" x {$y_name}\";\n }\n return $label;\n }", "public function getMatchPositionLabel()\n {\n return trim($this->getXml()->getElementsByTagName('MatchPositions')->item(0)->getAttribute('Label'));\n }", "function getOffset() ;", "function XCoord($text, $f = NULL, $s = 12, $a = 0){\n\tglobal $font;\n\tif($f == NULL)\n\t\t$f = $font;\n\n\t$bbox = imagettfbbox($s, $a, $f, $text);\n\tif($bbox)\n\t\treturn 121 - $bbox[2] / 2;\n\n\treturn false;\n}", "function getWidth()\n\t{\n\t\treturn $this->XSize;\n\t}", "public function getOffset()\r\n\t{\r\n\t\treturn $this->date->getOffset();\r\n\t}", "public function getGroupOffset(): int {}", "public function getGroupOffset(): int {}", "function get_xref_start_line() {\n\t\t//-------------------------------\n\t\t\treturn $this->value_entries['$_XREF_$'][\"infos\"][\"start\"][\"line\"];\n\t\t}", "function GetMouseX(): int { return 0; }", "public function getDisplayPosition()\n {\n return Mage::getStoreConfig(self::XML_PATH_DISPLAY_POSITION);\n }", "public function getAreaX()\n {\n return $this->area_x;\n }", "public function getOffset()\n {\n return abs($this->getCurrentPageNumber() - 1) * $this->getItemNumberPerPage();\n }", "public function getOffset()\n\t{\n\t\treturn $this->offset;\n\t}", "public function getPx() {\n return $this->get(self::PX);\n }", "public function getHeaderOffset()\n {\n return $this->header_offset;\n }", "public function getOffset()\n\t{\n\t\treturn ($this->getCurrentPage() - 1)*$this->getCount();\n\t}", "public function getX(): float\n {\n return $this->params[self::PARAMETER_FPX] ?? 0.5;\n }", "public function getOffset() {\r\n\t\treturn $this->offset;\r\n\t}", "public function getStartOffset()\n {\n return $this->_startOffset;\n }", "public function getXPosition($unit = null);", "public function setAxisPaddingLeft($left)\n\t{\n\t\t$this->axis_padding_left = $left;\n\t}", "public function getOffset()\n {\n return $this->offset;\n }" ]
[ "0.75322515", "0.6932504", "0.6615163", "0.66063195", "0.6519061", "0.6492395", "0.6438706", "0.6417721", "0.6306694", "0.63021874", "0.6300756", "0.6300229", "0.6260616", "0.62046486", "0.61199504", "0.6075851", "0.595968", "0.5950885", "0.5943768", "0.586092", "0.5857137", "0.5785811", "0.57808673", "0.5733061", "0.5729709", "0.56518847", "0.5613729", "0.55351", "0.5526654", "0.5522916", "0.55089855", "0.548308", "0.5469275", "0.54262555", "0.542577", "0.5411551", "0.5407428", "0.5407306", "0.5395125", "0.53580403", "0.5354562", "0.53514916", "0.534708", "0.534708", "0.534708", "0.534708", "0.534708", "0.5330602", "0.53041273", "0.52633315", "0.52553093", "0.5251836", "0.5215408", "0.52024513", "0.51920426", "0.51920426", "0.51860064", "0.5183332", "0.5175326", "0.5175326", "0.5159457", "0.51581955", "0.51314354", "0.5125172", "0.5123298", "0.5110802", "0.51040983", "0.50967425", "0.508833", "0.50817996", "0.50757724", "0.5071969", "0.5048749", "0.50434947", "0.5031822", "0.50171584", "0.5010773", "0.5001689", "0.4998744", "0.49904123", "0.4983421", "0.49817756", "0.4976617", "0.49732944", "0.49732944", "0.49712458", "0.4965393", "0.49484533", "0.49464554", "0.4943782", "0.4929572", "0.49212685", "0.49180573", "0.49121812", "0.49063036", "0.4906166", "0.49061581", "0.49035397", "0.49009177", "0.48971242" ]
0.86521053
0
Gets y offset of the x axis labels
Получает смещение y меток оси x
public function getAxisXLabelOffsetY() { return $this->axis_xlabel_offY; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAxisYLabelOffsetX()\n\t{\n\t\treturn $this->axis_ylabel_offX;\n\t}", "public function getAxisYLabelOffsetY()\n\t{\n\t\treturn $this->axis_ylabel_offY;\n\t}", "public function getAxisXLabelOffsetX()\n\t{\n\t\treturn $this->axis_xlabel_offX;\n\t}", "public function getYDescriptionOffsetLeft()\n\t{\n\t\treturn $this->ydescr_offX;\n\t}", "public function getXDescriptionOffsetBottom()\n\t{\n\t\treturn $this->xdescr_offY;\n\t}", "public function getTitleOffsetTop()\n\t{\n\t\treturn $this->title_offY;\n\t}", "public function setAxisYLabelOffsetX($dx)\n\t{\n\t\t$this->axis_ylabel_offX = $dx;\n\t}", "public function getLabelposition()\n {\n return $this->LABELPOSITION;\n }", "public function get_label_position()\n\t{\n\t\treturn $this->_label_position;\n\t}", "public function getStartY() {\n return $this->cells[0]->y;\n }", "public function setAxisXLabelOffsetY($dy)\n\t{\n\t\t$this->axis_xlabel_offY = $dy;\n\t}", "private function drawYaxis()\n {\n\n $min =\n round($this->min, $this->precision);\n $max =\n round($this->max, $this->precision);\n\n if (!isset($this->y_axis_legend_increment)) {\n\n $increment =\n round(($max - $min) / $this->total_values, $this->precision);\n } else {\n $increment = $this->y_axis_legend_increment;\n }\n\n if ($increment == 0) {\n $increment = 1;\n }\n\n //$spacing = \\round($spacing, 10);\n for ($label = $min; $label <= $max + $increment; $label+=$increment) {\n\n $px_position = $this->plotValue($label);\n if ($this->x_axis_hints == 1) {\n \\imageline($this->im, 0, $px_position, $this->width,\n $px_position, $this->ink['axis']);\n }\n imagestring($this->im, 1, 10, $px_position - 4, $label,\n $this->ink['text']);\n }\n }", "public function getAxisDistanceY()\n\t{\n\t\treturn $this->axis_distance_y;\n\t}", "public function get_y_pos() {\n return $this->y_pos;\n }", "private function getLabels() {\n\t\t$x = 0;\n\t\t$y = 0;\n\t\t$labels = [];\n\n\t\tif ($this->type == GRAPH_YAXIS_SIDE_BOTTOM) {\n\t\t\t$axis = 'x';\n\t\t\t$y = $this->height - CSvgGraph::SVG_GRAPH_X_AXIS_LABEL_MARGIN;\n\t\t}\n\t\telse {\n\t\t\t$axis = 'y';\n\t\t\t$x = ($this->type == GRAPH_YAXIS_SIDE_RIGHT)\n\t\t\t\t? CSvgGraph::SVG_GRAPH_Y_AXIS_RIGHT_LABEL_MARGIN\n\t\t\t\t: $this->width - CSvgGraph::SVG_GRAPH_Y_AXIS_LEFT_LABEL_MARGIN;\n\t\t}\n\n\t\tforeach ($this->labels as $pos => $label) {\n\t\t\t$$axis = $pos;\n\n\t\t\tif ($this->type == GRAPH_YAXIS_SIDE_LEFT || $this->type == GRAPH_YAXIS_SIDE_RIGHT) {\n\t\t\t\t// Flip upside down.\n\t\t\t\t$y = $this->height - $y;\n\t\t\t}\n\n\t\t\tif ($this->type == GRAPH_YAXIS_SIDE_BOTTOM) {\n\t\t\t\tif (count($labels) == 0) {\n\t\t\t\t\t$text_tag_x = max($this->x + $x, strlen($label) * 4);\n\t\t\t\t}\n\t\t\t\telseif (end($this->labels) === $label) {\n\t\t\t\t\t$text_tag_x = (strlen($label) * 4 > $this->width - $x) ? $this->x + $x - 10 : $this->x + $x;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$text_tag_x = $this->x + $x;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$text_tag_x = $this->x + $x;\n\t\t\t}\n\n\t\t\t$labels[] = new CSvgText($text_tag_x, $this->y + $y, $label);\n\t\t}\n\n\t\treturn $labels;\n\t}", "private function getPosition()\n {\n if ($this->labelCounter == 1) {\n return [0, 0];\n }\n\n if ($this->labelCounter == 2) {\n return [0, Fpdi::PAGE_SIZE_A6_WIDTH];\n }\n\n if ($this->labelCounter == 3) {\n return [Fpdi::PAGE_SIZE_A6_HEIGHT, 0];\n }\n\n if ($this->labelCounter == 4) {\n return [Fpdi::PAGE_SIZE_A6_HEIGHT, Fpdi::PAGE_SIZE_A6_WIDTH];\n }\n }", "function calYposition($widths, $yTop, $yBottom) {\n\t\t$totalWidth = array_sum($widths);\n\t\t$y = $yTop + ($yBottom-$yTop-$totalWidth)/2;\n\t\treturn $y;\n\t}", "function SetXLabelOffset($aLabelOff, $aTickOff = -1)\n {\n $this->xlabel_offset = $aLabelOff;\n if ($aTickOff == -1) // Same as label offset\n $this->xtick_offset = $aLabelOff;\n else\n $this->xtick_offset = $aTickOff;\n if ($aLabelOff > 0)\n $this->SupressLast(); // The last tick wont fit\n }", "public function getAxisLabelLineLength()\n\t{\n\t\treturn $this->axis_label_linelength;\n\t}", "public function getMinY()\n {\n return $this->getY();\n }", "function yLabelFormat( $label ){\n return number_format( $label / 100000 ).\"k\"; \n }", "public function getOffsetY(): int\n {\n return $this->offsetY;\n }", "public function getAxisPaddingLeft()\n\t{\n\t\treturn $this->axis_padding_left;\n\t}", "public function getPosy()\n\t{\n\t\treturn $this->posy;\n\t}", "public function getLocationY()\r\n {\r\n return $this->getAttr('Location_Y');\r\n }", "public function getAbsY1()\n {\n return $this->absY1;\n }", "public function getAxisPaddingTop()\n\t{\n\t\treturn $this->axis_padding_top;\n\t}", "function get_y_min()\n\t{\n\t\t$values = array();\n\n\t\tforeach($this->_config[self::VALUES] as $index=>$value)\n\t\t{\n\t\t\trsort($value);\n\t\t\t$values[] = array_pop($value);\n\t\t}\n\n\t\t$x = array_values($values);\n\t\trsort($x);\n\t\treturn array_pop($x);\n\t}", "function _calcLabelInterval()\n {\n $result = parent::_calcLabelInterval();\n $this->_axisValueSpan = $this->_value($this->_axisSpan); \n return $result;\n }", "public function getRelY1()\n {\n return $this->getParentBB()->getAbsY1() - $this->getAbsY1();\n }", "public function getY(): int\n {\n return $this->y;\n }", "public function getMinYValue()\r\n {\r\n return $this->minMandatoryValue(parent::getMinYValue());\r\n }", "public function getPrintedLabelOrigin()\n {\n return $this->PrintedLabelOrigin;\n }", "function y_label_steps($val) {\n\t\t$this->y_steps = intval ( $val );\n\t}", "function getPositionY(){\n\t\t\treturn $this -> positionY;\n\t\t}", "public function setAxisYLabelOffsetY($dy)\n\t{\n\t\t$this->axis_ylabel_offY = $dy;\n\t}", "public function getOffsetX(): int\n {\n return $this->offsetX;\n }", "public function getBreweryLocationY() {\n\t\t\treturn($this->breweryLocationY);\n\t\t}", "function yLabelFormat($aLabel) {\n\treturn ($aLabel / 1000);\n}", "public function setAxisXLabelOffsetX($dx)\n\t{\n\t\t$this->axis_xlabel_offX = $dx;\n\t}", "public function getCenterY()\n {\n return $this->getY() + $this->getHeight() / 2.0;\n }", "public function setYDescriptionOffsetLeft($dx)\n\t{\n\t\t$this->ydescr_offX = $dy;\n\t}", "public function getAxisPaddingBottom()\n\t{\n\t\treturn $this->axis_padding_bottom;\n\t}", "public function get_baseline_offset() {\r\n if ($this->sizefixed == false) {\r\n $this->recompute_size();\r\n }\r\n return $this->baselineoffset;\r\n }", "function getY() {\n return $this->y;\n }", "function getSeriesPosition() {\n\t\treturn $this->getData('seriesPosition');\n\t}", "private function axisLabelsSeries($rect) {\r\n $tmpNum = 0;\r\n $tmpSt = \"\";\r\n $tmpValue = 0;\r\n\r\n $this->calcAllSeries();\r\n $tmpRange = $this->calcFirstLastAllSeries($rect);\r\n\r\n if ($tmpRange->first != intval('1000000000000')) { // MAX_VALUE\r\n $oldPosLabel = -1;\r\n $oldSizeLabel = 0;\r\n $tmpLabelW = $this->axis->getHorizontal();\r\n switch ($this->axis->getLabels()->iAngle) {\r\n case 90:\r\n case 270:\r\n $tmpLabelW = !$tmpLabelW;\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n $axisLabels = $this->axis->getLabels();\r\n for ( $t = $tmpRange->first; $t <= $tmpRange->last; $t++) {\r\n $r = $this->getAxisSeriesLabel($t);\r\n if ($r->result) {\r\n $tmpValue = $r->value;\r\n $tmpSt = $r->label;\r\n\r\n if (($tmpValue >= $this->axis->iMinimum) &&\r\n ($this->tmpValue <= $this->axis->iMaximum)) {\r\n $tmp = $this->axis->calcPosValue($tmpValue);\r\n if (!$this->axis->getTickOnLabelsOnly()) {\r\n $this->addTick($tmp);\r\n }\r\n\r\n if ($axisLabels->getVisible() &&\r\n (strlen($tmpSt) != 0)) {\r\n\r\n $tmpMulti = $this->axis->chart->multiLineTextWidth(\r\n $tmpSt);\r\n\r\n $tmpLabelSize = $tmpMulti->width;\r\n $tmpNum = $tmpMulti->count;\r\n\r\n if (!$tmpLabelW) {\r\n $tmpLabelSize = $this->chart->getGraphics3D()->getFontHeight() * $tmpNum;\r\n }\r\n if (($axisLabels->iSeparation != 0) &&\r\n ($this->oldPosLabel != -1)) {\r\n $tmpLabelSize += (int) (0.02 * $tmpLabelSize *\r\n $axisLabels->iSeparation);\r\n $tmpLabelSize *= 0.5;\r\n\r\n if ($tmp >= $oldPosLabel) {\r\n $tmpDraw = (($tmp -\r\n $tmpLabelSize) >=\r\n ($this->oldPosLabel +\r\n $oldSizeLabel));\r\n } else {\r\n $tmpDraw = (($tmp +\r\n $tmpLabelSize) <=\r\n ($this->oldPosLabel -\r\n $oldSizeLabel));\r\n }\r\n\r\n if ($tmpDraw) {\r\n $this->drawThisLabel($tmp, $tmpSt, null);\r\n $oldPosLabel = $tmp;\r\n $oldSizeLabel = $tmpLabelSize;\r\n }\r\n } else {\r\n $this->drawThisLabel($tmp, $tmpSt, null);\r\n $oldPosLabel = $tmp;\r\n $oldSizeLabel = $tmpLabelSize / 2;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n $this->axis->iSeriesList->clear(false);\r\n }\r\n }", "public function getRealY()\n\t{\n\t\treturn $this->y;\n\t}", "public function getIndexY() : int;", "public function getY()\n {\n return $this->y;\n }", "public function getY()\n {\n return $this->y;\n }", "public function getY()\n {\n return $this->y;\n }", "public function getY()\n {\n return $this->y;\n }", "public function getY()\n {\n return $this->y;\n }", "public function getBootstrapInputOffset(): int\n {\n if ( $this->form->isHorizontal() ){\n $width = (int) preg_replace(\"/[^\\d]/\", \"\", $this->bootstrapInputClass);\n $offset = 12 - $width;\n }\n else {\n $offset = 0;\n }\n return $offset;\n }", "public function getY() {\n\t\treturn ($this->y);\n\t}", "function yLabelNumberFormat( $label ){\n return number_format( $label ); \n }", "public function getMaxY()\n {\n return $this->getY() + $this->getHeight();\n }", "function _pointY($value)\n {\n if (is_array($value)) {\n $radius = (($value['Y'] === false) ? 1 : ($value['Y'] - $this->_axisY->_getMinimum()) / ($this->_axisY->_getMaximum() - $this->_axisY->_getMinimum()));\n $y = ($this->_top + $this->_bottom) / 2 + $radius * ($this->_plotHeight() / 2) * sin(deg2rad($this->_axisX->_point($value['X'])));\n }\n return max($this->_plotTop, min($this->_plotBottom, $y));\n }", "public function getStrokeDashOffset () {}", "public function getLocationY()\n {\n return $this->locationY;\n }", "public function getAbsY2()\n {\n return $this->absY2;\n }", "protected function getExceptionLineOffset(): int\n {\n if (\n version_compare(app()->version(), '5.8.0', '>=')\n and\n version_compare(app()->version(), '5.8.9', '<=')\n ) {\n return 2;\n }\n\n return 1;\n }", "public function getAxisPaddingRight()\n\t{\n\t\treturn $this->axis_padding_right;\n\t}", "protected function get_size_label()\n {\n $x_name = get_option(self::X_NAME_KEY, self::DEFAULT_X_NAME);\n $y_name = get_option(self::Y_NAME_KEY, self::DEFAULT_Y_NAME);\n $label = $x_name;\n if (get_option(self::USE_TWO_FIELDS_KEY, self::DEFAULT_USE_TWO_FIELDS) == 1) {\n $label .= \" x {$y_name}\";\n }\n return $label;\n }", "public function getY()\n\t{\n\t\treturn $this->y;\n\t}", "public function getAxisDistanceX()\n\t{\n\t\treturn $this->axis_distance_x;\n\t}", "public function getCurrentY(): int\n {\n return $this->currentCoordinate->getY();\n }", "public function getOffsets()\n {\n return $this->offsets;\n }", "public function getOffset()\n\t{\n\t\treturn ($this->getCurrentPage() - 1)*$this->getCount();\n\t}", "public function getY()\n {\n return $y;\n }", "public function getY()\n {\n return $y;\n }", "protected function draw_axis_name(){\n\n\t\t$valid_axis = array('x1', 'y', 'y2');\n\n\t\tforeach($valid_axis as $axis) {\n\n\t\t\t$var_title = 'axis_title_' . $axis;\n\t\t\t$var_unit = 'axis_unit_' . $axis;\n\t\t\t$var_position = 'axis_position_' . $axis;\n\n\t\t\tif($this->$var_title) {\n\n\t\t\t\t$title = $this->$var_title . (($this->$var_unit != '') ? ' [' . $this->$var_unit . ']' : '');\n\t\t\t\tif($axis == 'y') {\n\t\t\t\t\t$angle = 90;\n\t\t\t\t}elseif($axis == 'y2') {\n\t\t\t\t\t$angle = 270;\n\t\t\t\t}else {\n\t\t\t\t\t$angle = 0;\n\t\t\t\t}\n\n\t\t\t\t/* calculate the size of the title */\n\t\t\t\t$title_box = imageftbbox($this->axis_font_size, $angle, $this->axis_font, $title);\n\n\t\t\t\tif($axis == 'x1'){\n\t\t\t\t\t$y = $this->canvas_height - 2*$this->axis_font_size;\n\t\t\t\t\t$x = ($this->$var_position == 'middle') ? ($this->chart_width / 2) - ($title_box[4] / 2) + $this->offset_left\n\t\t\t\t\t : $this->canvas_width - $this->offset_right - $title_box[4];\n\t\t\t\t}elseif($axis == 'y') {\n\t\t\t\t\t$x = 3*$this->axis_font_size;\n\t\t\t\t\t$y = ($this->$var_position == 'middle') ? ($this->chart_height / 2) - ($title_box[3] / 2) + $this->offset_top\n\t\t\t\t\t : -$title_box[3] + $this->offset_top;\n\t\t\t\t}else{\n\t\t\t\t\t$x = $this->canvas_width - 3*$this->axis_font_size;;\n\t\t\t\t\t$y = ($this->$var_position == 'middle') ? ($this->chart_height / 2) - ($title_box[3] / 2) + $this->offset_top\n\t\t\t\t\t : -$title_box[3] + $this->offset_top;\n\t\t\t\t}\n\n\t\t\t\t/* draw the y-title */\n\t\t\t\timagefttext($this->img, $this->axis_font_size, $angle,$x ,$y , $this->axis_font_color, $this->axis_font, $title);\n\t\t\t}\n\t\t}\n\t}", "private function getOffset()\n {\n if(is_integer($this->offset)){\n return $this->offset;\n }\n\n return $this->guessOffset();\n }", "function getOffset() ;", "public function getMaxYValue()\r\n {\r\n return $this->maxMandatoryValue(parent::getMaxYValue());\r\n }", "public function getDisplayPosition()\n {\n return Mage::getStoreConfig(self::XML_PATH_DISPLAY_POSITION);\n }", "public function y()\n {\n return $this->y;\n }", "public function getYAxis() {\n return $this->yAxis;\n }", "public function getY();", "public function getDimensionY();", "function getTranslateY() { return $this->_translatey; }", "public function getYAxisValue()\n {\n return $this->yAxisValue;\n }", "private function getAxis() {\n\t\t$offset = ceil(self::ZBX_ARROW_SIZE / 2);\n\n\t\tif ($this->type == GRAPH_YAXIS_SIDE_BOTTOM) {\n\t\t\t$x = $this->x + $this->width + self::ZBX_ARROW_OFFSET;\n\t\t\t$y = $this->y;\n\n\t\t\treturn [\n\t\t\t\t// Draw axis line.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->setAttribute('shape-rendering', 'crispEdges')\n\t\t\t\t\t->moveTo($this->x, $y)\n\t\t\t\t\t->lineTo($x, $y),\n\t\t\t\t// Draw arrow.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->moveTo($x + self::ZBX_ARROW_SIZE, $y)\n\t\t\t\t\t->lineTo($x, $y - $offset)\n\t\t\t\t\t->lineTo($x, $y + $offset)\n\t\t\t\t\t->closePath()\n\t\t\t];\n\t\t}\n\t\telse {\n\t\t\t$x = ($this->type == GRAPH_YAXIS_SIDE_RIGHT) ? $this->x : $this->x + $this->width;\n\t\t\t$y = $this->y - self::ZBX_ARROW_OFFSET;\n\n\t\t\treturn [\n\t\t\t\t// Draw axis line.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->setAttribute('shape-rendering', 'crispEdges')\n\t\t\t\t\t->moveTo($x, $y)\n\t\t\t\t\t->lineTo($x, $this->height + $y + self::ZBX_ARROW_OFFSET),\n\t\t\t\t// Draw arrow.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->moveTo($x, $y - self::ZBX_ARROW_SIZE)\n\t\t\t\t\t->lineTo($x - $offset, $y)\n\t\t\t\t\t->lineTo($x + $offset, $y)\n\t\t\t\t\t->closePath()\n\t\t\t];\n\t\t}\n\t}", "public function getAxisStrokeDistance()\n\t{\n\t\treturn $this->delta_pixel;\n\t}", "public function getDimensionY()\n {\n return $this->dimensionY;\n }", "public function getOffset()\n {\n return abs($this->getCurrentPageNumber() - 1) * $this->getItemNumberPerPage();\n }", "public function get_x_pos() {\n return $this->x_pos;\n }", "function GetMouseY(): int { return 0; }", "public function Get_X()\n\t{\n\t\t$this->current_x = pdf_get_value($this->pdf, \"textx\", 0);\n\t\treturn ($this->current_x);\n\t}", "public function getXPos(){\n\t\t\treturn $this->intXPos;\n\t\t}", "public function getMaxXValue()\r\n {\r\n if($this->iMultiBar == MultiBars::$SELFSTACK)\r\n {\r\n return $this->getMinXValue();\r\n }\r\n else\r\n {\r\n return($this->iMultiBar == MultiBars::$SIDEALL) ?\r\n $this->iPreviousCount + $this->getCount() - 1 :\r\n parent::getMaxXValue();\r\n }\r\n }", "public function getMaxX()\n {\n return $this->getX() + $this->getWidth();\n }", "public function getMatchPositionLabel()\n {\n return trim($this->getXml()->getElementsByTagName('MatchPositions')->item(0)->getAttribute('Label'));\n }", "public function setYaxisLabelIncrement($increment = '')\n {\n\n if (is_numeric($increment)) {\n $this->y_axis_legend_increment = $increment;\n }\n }", "public function key()\n {\n return $this->currentY;\n }", "public function getVirtualY()\n\t{\n\t\treturn $this->y + $this->map->getRadius() - 1;\n\t}", "public function getTraceOffset()\n {\n return $this->offset;\n }", "private function getOffset()\n {\n return ($this->getPage() - 1) * $this->options['itemsPerPage'];\n }", "public function getAreaY()\n {\n return $this->area_y;\n }" ]
[ "0.86098856", "0.74951506", "0.7466104", "0.69369805", "0.65043163", "0.64779764", "0.64695334", "0.6284457", "0.6264289", "0.6201853", "0.60971314", "0.60397685", "0.6036948", "0.6003872", "0.59899247", "0.58857447", "0.5863695", "0.578714", "0.578677", "0.5695724", "0.5621474", "0.5603448", "0.55880904", "0.55488324", "0.5529507", "0.552545", "0.55252117", "0.5509131", "0.5504478", "0.54973835", "0.54573274", "0.5442568", "0.543489", "0.5413035", "0.54081017", "0.53917253", "0.53722054", "0.5359866", "0.53447026", "0.53415865", "0.532548", "0.53253007", "0.53187126", "0.53125566", "0.5306257", "0.52898556", "0.52801293", "0.527601", "0.5271836", "0.52716786", "0.52716786", "0.52716786", "0.52716786", "0.52716786", "0.52671134", "0.5265086", "0.5258497", "0.5233734", "0.5232582", "0.5218979", "0.52131027", "0.52050495", "0.5201342", "0.51924515", "0.51880753", "0.51798004", "0.5156242", "0.51475346", "0.51351684", "0.51105577", "0.508731", "0.508731", "0.50845474", "0.5070802", "0.50565565", "0.50547296", "0.50473225", "0.5043632", "0.5042752", "0.5038034", "0.5028825", "0.5017175", "0.5008678", "0.50051486", "0.50018555", "0.49981436", "0.4969088", "0.49538898", "0.49384472", "0.49275342", "0.4917128", "0.49152574", "0.49062133", "0.48988643", "0.48934707", "0.4889985", "0.48887363", "0.48808262", "0.4866047", "0.48598105" ]
0.82569814
1
Gets x offset of the y axis labels
Получает смещение x меток оси y
public function getAxisYLabelOffsetX() { return $this->axis_ylabel_offX; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAxisXLabelOffsetY()\n\t{\n\t\treturn $this->axis_xlabel_offY;\n\t}", "public function getAxisYLabelOffsetY()\n\t{\n\t\treturn $this->axis_ylabel_offY;\n\t}", "public function getAxisXLabelOffsetX()\n\t{\n\t\treturn $this->axis_xlabel_offX;\n\t}", "public function getYDescriptionOffsetLeft()\n\t{\n\t\treturn $this->ydescr_offX;\n\t}", "public function setAxisYLabelOffsetX($dx)\n\t{\n\t\t$this->axis_ylabel_offX = $dx;\n\t}", "public function getXDescriptionOffsetBottom()\n\t{\n\t\treturn $this->xdescr_offY;\n\t}", "public function getTitleOffsetTop()\n\t{\n\t\treturn $this->title_offY;\n\t}", "public function getLabelposition()\n {\n return $this->LABELPOSITION;\n }", "public function get_label_position()\n\t{\n\t\treturn $this->_label_position;\n\t}", "public function getStartY() {\n return $this->cells[0]->y;\n }", "private function drawYaxis()\n {\n\n $min =\n round($this->min, $this->precision);\n $max =\n round($this->max, $this->precision);\n\n if (!isset($this->y_axis_legend_increment)) {\n\n $increment =\n round(($max - $min) / $this->total_values, $this->precision);\n } else {\n $increment = $this->y_axis_legend_increment;\n }\n\n if ($increment == 0) {\n $increment = 1;\n }\n\n //$spacing = \\round($spacing, 10);\n for ($label = $min; $label <= $max + $increment; $label+=$increment) {\n\n $px_position = $this->plotValue($label);\n if ($this->x_axis_hints == 1) {\n \\imageline($this->im, 0, $px_position, $this->width,\n $px_position, $this->ink['axis']);\n }\n imagestring($this->im, 1, 10, $px_position - 4, $label,\n $this->ink['text']);\n }\n }", "public function setAxisXLabelOffsetY($dy)\n\t{\n\t\t$this->axis_xlabel_offY = $dy;\n\t}", "public function getAxisDistanceY()\n\t{\n\t\treturn $this->axis_distance_y;\n\t}", "public function get_y_pos() {\n return $this->y_pos;\n }", "private function getLabels() {\n\t\t$x = 0;\n\t\t$y = 0;\n\t\t$labels = [];\n\n\t\tif ($this->type == GRAPH_YAXIS_SIDE_BOTTOM) {\n\t\t\t$axis = 'x';\n\t\t\t$y = $this->height - CSvgGraph::SVG_GRAPH_X_AXIS_LABEL_MARGIN;\n\t\t}\n\t\telse {\n\t\t\t$axis = 'y';\n\t\t\t$x = ($this->type == GRAPH_YAXIS_SIDE_RIGHT)\n\t\t\t\t? CSvgGraph::SVG_GRAPH_Y_AXIS_RIGHT_LABEL_MARGIN\n\t\t\t\t: $this->width - CSvgGraph::SVG_GRAPH_Y_AXIS_LEFT_LABEL_MARGIN;\n\t\t}\n\n\t\tforeach ($this->labels as $pos => $label) {\n\t\t\t$$axis = $pos;\n\n\t\t\tif ($this->type == GRAPH_YAXIS_SIDE_LEFT || $this->type == GRAPH_YAXIS_SIDE_RIGHT) {\n\t\t\t\t// Flip upside down.\n\t\t\t\t$y = $this->height - $y;\n\t\t\t}\n\n\t\t\tif ($this->type == GRAPH_YAXIS_SIDE_BOTTOM) {\n\t\t\t\tif (count($labels) == 0) {\n\t\t\t\t\t$text_tag_x = max($this->x + $x, strlen($label) * 4);\n\t\t\t\t}\n\t\t\t\telseif (end($this->labels) === $label) {\n\t\t\t\t\t$text_tag_x = (strlen($label) * 4 > $this->width - $x) ? $this->x + $x - 10 : $this->x + $x;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$text_tag_x = $this->x + $x;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$text_tag_x = $this->x + $x;\n\t\t\t}\n\n\t\t\t$labels[] = new CSvgText($text_tag_x, $this->y + $y, $label);\n\t\t}\n\n\t\treturn $labels;\n\t}", "private function getPosition()\n {\n if ($this->labelCounter == 1) {\n return [0, 0];\n }\n\n if ($this->labelCounter == 2) {\n return [0, Fpdi::PAGE_SIZE_A6_WIDTH];\n }\n\n if ($this->labelCounter == 3) {\n return [Fpdi::PAGE_SIZE_A6_HEIGHT, 0];\n }\n\n if ($this->labelCounter == 4) {\n return [Fpdi::PAGE_SIZE_A6_HEIGHT, Fpdi::PAGE_SIZE_A6_WIDTH];\n }\n }", "function calYposition($widths, $yTop, $yBottom) {\n\t\t$totalWidth = array_sum($widths);\n\t\t$y = $yTop + ($yBottom-$yTop-$totalWidth)/2;\n\t\treturn $y;\n\t}", "function SetXLabelOffset($aLabelOff, $aTickOff = -1)\n {\n $this->xlabel_offset = $aLabelOff;\n if ($aTickOff == -1) // Same as label offset\n $this->xtick_offset = $aLabelOff;\n else\n $this->xtick_offset = $aTickOff;\n if ($aLabelOff > 0)\n $this->SupressLast(); // The last tick wont fit\n }", "public function getAxisLabelLineLength()\n\t{\n\t\treturn $this->axis_label_linelength;\n\t}", "function yLabelFormat( $label ){\n return number_format( $label / 100000 ).\"k\"; \n }", "public function getMinY()\n {\n return $this->getY();\n }", "public function getOffsetY(): int\n {\n return $this->offsetY;\n }", "public function getLocationY()\r\n {\r\n return $this->getAttr('Location_Y');\r\n }", "public function getPrintedLabelOrigin()\n {\n return $this->PrintedLabelOrigin;\n }", "public function getPosy()\n\t{\n\t\treturn $this->posy;\n\t}", "function _calcLabelInterval()\n {\n $result = parent::_calcLabelInterval();\n $this->_axisValueSpan = $this->_value($this->_axisSpan); \n return $result;\n }", "public function getAbsY1()\n {\n return $this->absY1;\n }", "public function getY(): int\n {\n return $this->y;\n }", "function y_label_steps($val) {\n\t\t$this->y_steps = intval ( $val );\n\t}", "public function getRelY1()\n {\n return $this->getParentBB()->getAbsY1() - $this->getAbsY1();\n }", "public function getIndexY() : int;", "public function getAxisPaddingLeft()\n\t{\n\t\treturn $this->axis_padding_left;\n\t}", "public function setAxisYLabelOffsetY($dy)\n\t{\n\t\t$this->axis_ylabel_offY = $dy;\n\t}", "public function getAbsY2()\n {\n return $this->absY2;\n }", "function yLabelFormat($aLabel) {\n\treturn ($aLabel / 1000);\n}", "function get_y_min()\n\t{\n\t\t$values = array();\n\n\t\tforeach($this->_config[self::VALUES] as $index=>$value)\n\t\t{\n\t\t\trsort($value);\n\t\t\t$values[] = array_pop($value);\n\t\t}\n\n\t\t$x = array_values($values);\n\t\trsort($x);\n\t\treturn array_pop($x);\n\t}", "public function getAxisPaddingTop()\n\t{\n\t\treturn $this->axis_padding_top;\n\t}", "function getPositionY(){\n\t\t\treturn $this -> positionY;\n\t\t}", "public function getBreweryLocationY() {\n\t\t\treturn($this->breweryLocationY);\n\t\t}", "public function getMinYValue()\r\n {\r\n return $this->minMandatoryValue(parent::getMinYValue());\r\n }", "function getSeriesPosition() {\n\t\treturn $this->getData('seriesPosition');\n\t}", "public function getCenterY()\n {\n return $this->getY() + $this->getHeight() / 2.0;\n }", "function yLabelNumberFormat( $label ){\n return number_format( $label ); \n }", "function getY() {\n return $this->y;\n }", "function _pointY($value)\n {\n if (is_array($value)) {\n $radius = (($value['Y'] === false) ? 1 : ($value['Y'] - $this->_axisY->_getMinimum()) / ($this->_axisY->_getMaximum() - $this->_axisY->_getMinimum()));\n $y = ($this->_top + $this->_bottom) / 2 + $radius * ($this->_plotHeight() / 2) * sin(deg2rad($this->_axisX->_point($value['X'])));\n }\n return max($this->_plotTop, min($this->_plotBottom, $y));\n }", "public function getRealY()\n\t{\n\t\treturn $this->y;\n\t}", "public function getY() {\n\t\treturn ($this->y);\n\t}", "public function getY()\n {\n return $this->y;\n }", "public function getY()\n {\n return $this->y;\n }", "public function getY()\n {\n return $this->y;\n }", "public function getY()\n {\n return $this->y;\n }", "public function getY()\n {\n return $this->y;\n }", "public function getAxisPaddingRight()\n\t{\n\t\treturn $this->axis_padding_right;\n\t}", "public function getOffsetX(): int\n {\n return $this->offsetX;\n }", "public function getYAxis() {\n return $this->yAxis;\n }", "public function setAxisXLabelOffsetX($dx)\n\t{\n\t\t$this->axis_xlabel_offX = $dx;\n\t}", "private function axisLabelsSeries($rect) {\r\n $tmpNum = 0;\r\n $tmpSt = \"\";\r\n $tmpValue = 0;\r\n\r\n $this->calcAllSeries();\r\n $tmpRange = $this->calcFirstLastAllSeries($rect);\r\n\r\n if ($tmpRange->first != intval('1000000000000')) { // MAX_VALUE\r\n $oldPosLabel = -1;\r\n $oldSizeLabel = 0;\r\n $tmpLabelW = $this->axis->getHorizontal();\r\n switch ($this->axis->getLabels()->iAngle) {\r\n case 90:\r\n case 270:\r\n $tmpLabelW = !$tmpLabelW;\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n $axisLabels = $this->axis->getLabels();\r\n for ( $t = $tmpRange->first; $t <= $tmpRange->last; $t++) {\r\n $r = $this->getAxisSeriesLabel($t);\r\n if ($r->result) {\r\n $tmpValue = $r->value;\r\n $tmpSt = $r->label;\r\n\r\n if (($tmpValue >= $this->axis->iMinimum) &&\r\n ($this->tmpValue <= $this->axis->iMaximum)) {\r\n $tmp = $this->axis->calcPosValue($tmpValue);\r\n if (!$this->axis->getTickOnLabelsOnly()) {\r\n $this->addTick($tmp);\r\n }\r\n\r\n if ($axisLabels->getVisible() &&\r\n (strlen($tmpSt) != 0)) {\r\n\r\n $tmpMulti = $this->axis->chart->multiLineTextWidth(\r\n $tmpSt);\r\n\r\n $tmpLabelSize = $tmpMulti->width;\r\n $tmpNum = $tmpMulti->count;\r\n\r\n if (!$tmpLabelW) {\r\n $tmpLabelSize = $this->chart->getGraphics3D()->getFontHeight() * $tmpNum;\r\n }\r\n if (($axisLabels->iSeparation != 0) &&\r\n ($this->oldPosLabel != -1)) {\r\n $tmpLabelSize += (int) (0.02 * $tmpLabelSize *\r\n $axisLabels->iSeparation);\r\n $tmpLabelSize *= 0.5;\r\n\r\n if ($tmp >= $oldPosLabel) {\r\n $tmpDraw = (($tmp -\r\n $tmpLabelSize) >=\r\n ($this->oldPosLabel +\r\n $oldSizeLabel));\r\n } else {\r\n $tmpDraw = (($tmp +\r\n $tmpLabelSize) <=\r\n ($this->oldPosLabel -\r\n $oldSizeLabel));\r\n }\r\n\r\n if ($tmpDraw) {\r\n $this->drawThisLabel($tmp, $tmpSt, null);\r\n $oldPosLabel = $tmp;\r\n $oldSizeLabel = $tmpLabelSize;\r\n }\r\n } else {\r\n $this->drawThisLabel($tmp, $tmpSt, null);\r\n $oldPosLabel = $tmp;\r\n $oldSizeLabel = $tmpLabelSize / 2;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n $this->axis->iSeriesList->clear(false);\r\n }\r\n }", "public function get_baseline_offset() {\r\n if ($this->sizefixed == false) {\r\n $this->recompute_size();\r\n }\r\n return $this->baselineoffset;\r\n }", "protected function get_size_label()\n {\n $x_name = get_option(self::X_NAME_KEY, self::DEFAULT_X_NAME);\n $y_name = get_option(self::Y_NAME_KEY, self::DEFAULT_Y_NAME);\n $label = $x_name;\n if (get_option(self::USE_TWO_FIELDS_KEY, self::DEFAULT_USE_TWO_FIELDS) == 1) {\n $label .= \" x {$y_name}\";\n }\n return $label;\n }", "public function getAxisPaddingBottom()\n\t{\n\t\treturn $this->axis_padding_bottom;\n\t}", "public function getDimensionY();", "public function getY()\n\t{\n\t\treturn $this->y;\n\t}", "public function getLocationY()\n {\n return $this->locationY;\n }", "public function getYAxisValue()\n {\n return $this->yAxisValue;\n }", "public function getCurrentY(): int\n {\n return $this->currentCoordinate->getY();\n }", "public function getBootstrapInputOffset(): int\n {\n if ( $this->form->isHorizontal() ){\n $width = (int) preg_replace(\"/[^\\d]/\", \"\", $this->bootstrapInputClass);\n $offset = 12 - $width;\n }\n else {\n $offset = 0;\n }\n return $offset;\n }", "public function getMaxY()\n {\n return $this->getY() + $this->getHeight();\n }", "public function getStrokeDashOffset () {}", "public function setYDescriptionOffsetLeft($dx)\n\t{\n\t\t$this->ydescr_offX = $dy;\n\t}", "public function getDimensionY()\n {\n return $this->dimensionY;\n }", "public function getY()\n {\n return $y;\n }", "public function getY()\n {\n return $y;\n }", "public function y()\n {\n return $this->y;\n }", "protected function draw_axis_name(){\n\n\t\t$valid_axis = array('x1', 'y', 'y2');\n\n\t\tforeach($valid_axis as $axis) {\n\n\t\t\t$var_title = 'axis_title_' . $axis;\n\t\t\t$var_unit = 'axis_unit_' . $axis;\n\t\t\t$var_position = 'axis_position_' . $axis;\n\n\t\t\tif($this->$var_title) {\n\n\t\t\t\t$title = $this->$var_title . (($this->$var_unit != '') ? ' [' . $this->$var_unit . ']' : '');\n\t\t\t\tif($axis == 'y') {\n\t\t\t\t\t$angle = 90;\n\t\t\t\t}elseif($axis == 'y2') {\n\t\t\t\t\t$angle = 270;\n\t\t\t\t}else {\n\t\t\t\t\t$angle = 0;\n\t\t\t\t}\n\n\t\t\t\t/* calculate the size of the title */\n\t\t\t\t$title_box = imageftbbox($this->axis_font_size, $angle, $this->axis_font, $title);\n\n\t\t\t\tif($axis == 'x1'){\n\t\t\t\t\t$y = $this->canvas_height - 2*$this->axis_font_size;\n\t\t\t\t\t$x = ($this->$var_position == 'middle') ? ($this->chart_width / 2) - ($title_box[4] / 2) + $this->offset_left\n\t\t\t\t\t : $this->canvas_width - $this->offset_right - $title_box[4];\n\t\t\t\t}elseif($axis == 'y') {\n\t\t\t\t\t$x = 3*$this->axis_font_size;\n\t\t\t\t\t$y = ($this->$var_position == 'middle') ? ($this->chart_height / 2) - ($title_box[3] / 2) + $this->offset_top\n\t\t\t\t\t : -$title_box[3] + $this->offset_top;\n\t\t\t\t}else{\n\t\t\t\t\t$x = $this->canvas_width - 3*$this->axis_font_size;;\n\t\t\t\t\t$y = ($this->$var_position == 'middle') ? ($this->chart_height / 2) - ($title_box[3] / 2) + $this->offset_top\n\t\t\t\t\t : -$title_box[3] + $this->offset_top;\n\t\t\t\t}\n\n\t\t\t\t/* draw the y-title */\n\t\t\t\timagefttext($this->img, $this->axis_font_size, $angle,$x ,$y , $this->axis_font_color, $this->axis_font, $title);\n\t\t\t}\n\t\t}\n\t}", "private function getAxis() {\n\t\t$offset = ceil(self::ZBX_ARROW_SIZE / 2);\n\n\t\tif ($this->type == GRAPH_YAXIS_SIDE_BOTTOM) {\n\t\t\t$x = $this->x + $this->width + self::ZBX_ARROW_OFFSET;\n\t\t\t$y = $this->y;\n\n\t\t\treturn [\n\t\t\t\t// Draw axis line.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->setAttribute('shape-rendering', 'crispEdges')\n\t\t\t\t\t->moveTo($this->x, $y)\n\t\t\t\t\t->lineTo($x, $y),\n\t\t\t\t// Draw arrow.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->moveTo($x + self::ZBX_ARROW_SIZE, $y)\n\t\t\t\t\t->lineTo($x, $y - $offset)\n\t\t\t\t\t->lineTo($x, $y + $offset)\n\t\t\t\t\t->closePath()\n\t\t\t];\n\t\t}\n\t\telse {\n\t\t\t$x = ($this->type == GRAPH_YAXIS_SIDE_RIGHT) ? $this->x : $this->x + $this->width;\n\t\t\t$y = $this->y - self::ZBX_ARROW_OFFSET;\n\n\t\t\treturn [\n\t\t\t\t// Draw axis line.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->setAttribute('shape-rendering', 'crispEdges')\n\t\t\t\t\t->moveTo($x, $y)\n\t\t\t\t\t->lineTo($x, $this->height + $y + self::ZBX_ARROW_OFFSET),\n\t\t\t\t// Draw arrow.\n\t\t\t\t(new CSvgPath())\n\t\t\t\t\t->moveTo($x, $y - self::ZBX_ARROW_SIZE)\n\t\t\t\t\t->lineTo($x - $offset, $y)\n\t\t\t\t\t->lineTo($x + $offset, $y)\n\t\t\t\t\t->closePath()\n\t\t\t];\n\t\t}\n\t}", "public function getY();", "public function getOffsets()\n {\n return $this->offsets;\n }", "public function getAxisDistanceX()\n\t{\n\t\treturn $this->axis_distance_x;\n\t}", "public function getOffset()\n\t{\n\t\treturn ($this->getCurrentPage() - 1)*$this->getCount();\n\t}", "public function getDisplayPosition()\n {\n return Mage::getStoreConfig(self::XML_PATH_DISPLAY_POSITION);\n }", "public function getMaxYValue()\r\n {\r\n return $this->maxMandatoryValue(parent::getMaxYValue());\r\n }", "function getOffset() ;", "protected function getExceptionLineOffset(): int\n {\n if (\n version_compare(app()->version(), '5.8.0', '>=')\n and\n version_compare(app()->version(), '5.8.9', '<=')\n ) {\n return 2;\n }\n\n return 1;\n }", "public function getAxisStrokeDistance()\n\t{\n\t\treturn $this->delta_pixel;\n\t}", "public function setYaxisLabelIncrement($increment = '')\n {\n\n if (is_numeric($increment)) {\n $this->y_axis_legend_increment = $increment;\n }\n }", "private function getOffset()\n {\n if(is_integer($this->offset)){\n return $this->offset;\n }\n\n return $this->guessOffset();\n }", "function GetMouseY(): int { return 0; }", "function getScaleY() { return $this->_scaley; }", "public function getVirtualY()\n\t{\n\t\treturn $this->y + $this->map->getRadius() - 1;\n\t}", "public function getMaxX()\n {\n return $this->getX() + $this->getWidth();\n }", "public function Get_X()\n\t{\n\t\t$this->current_x = pdf_get_value($this->pdf, \"textx\", 0);\n\t\treturn ($this->current_x);\n\t}", "function getTranslateY() { return $this->_translatey; }", "public function getOffset()\n {\n return abs($this->getCurrentPageNumber() - 1) * $this->getItemNumberPerPage();\n }", "public function key()\n {\n return $this->currentY;\n }", "public function getMatchPositionLabel()\n {\n return trim($this->getXml()->getElementsByTagName('MatchPositions')->item(0)->getAttribute('Label'));\n }", "public function get_x_pos() {\n return $this->x_pos;\n }", "function min_max_labels($data, $bar_y)\n\t{\n\t\t$return_data = '';\n\n\t\t$min_max_y = $bar_y + $this->chart_options['min_max_font_size'] + $this->chart_options['min_max_y_padding'];\n\t\t$min_max_x = $this->bars_x_start + $this->chart_options['min_max_x_padding'];\n\t\t$min_max_text = NULL;\n\n\t\tif (isset($data['min']) && $data['min'] != NULL && $data['min'] > 0)\n\t\t{\n\t\t\t$min_max_text = 'Min: '.$data['min'];\n\t\t}\n\t\tif (isset($data['max']) && $data['max'] != NULL && $data['max'] > 0)\n\t\t{\n\t\t\t// if we already have a min value, add a seperator\n\t\t\tif ($min_max_text != NULL)\n\t\t\t{\n\t\t\t\t$min_max_text .= ' | ';\n\t\t\t}\n\t\t\t$min_max_text .= 'Max: '.$data['max'];\n\t\t}\n\n\t\t$return_data = '<text class=\"golsvg_minmax\" x=\"'.$min_max_x.'\" y=\"'.$min_max_y.'\" font-size=\"'.$this->chart_options['min_max_font_size'].'\">'.$min_max_text.'</text>';\n\n\t\treturn $return_data;\n\t}", "private function set_axes($x_labels, $y_max) { \n\n if ($y_max > 50) {\n $steps = ceil($y_max / 50);\n $scaled_max = $steps * 50;\n } else {\n $scaled_max = 50;\n }\n \n $chart_x_legend = new OFC_Elements_Legend_X((string)$this->x_legend );\n $chart_x_legend->set_style((string)$this->style);\n $this->chart->set_x_legend($chart_x_legend );\n $chart_y_legend = new OFC_Elements_Legend_Y((string)$this->y_legend );\n $chart_y_legend->set_style((string)$this->style); \n $this->chart->set_y_legend($chart_y_legend );\n $x = new OFC_Elements_Axis_X();\n $x->set_labels_from_array($x_labels);\n $this->chart->set_x_axis($x); \n $y = new OFC_Elements_Axis_Y();\n $y->set_range(0, $scaled_max, 50);\n $this->chart->add_y_axis( $y );\n }", "public function getOffset() {}", "public function getTraceOffset()\n {\n return $this->offset;\n }" ]
[ "0.8193099", "0.7486844", "0.7419647", "0.6868426", "0.64796895", "0.6384592", "0.6333171", "0.6326624", "0.6286165", "0.62398326", "0.62161475", "0.61223984", "0.61166793", "0.60787547", "0.5995492", "0.59750026", "0.58921695", "0.5698752", "0.565965", "0.5645089", "0.56405085", "0.56137526", "0.56135345", "0.55959654", "0.55739784", "0.5552053", "0.55430603", "0.5500137", "0.5468028", "0.5462694", "0.5458857", "0.54499763", "0.54453826", "0.542292", "0.5421424", "0.541691", "0.54088223", "0.53973496", "0.53955", "0.53952897", "0.5383124", "0.53531754", "0.53525054", "0.53349984", "0.53250176", "0.5323036", "0.5318337", "0.5313352", "0.5313352", "0.5313352", "0.5313352", "0.5313352", "0.5308781", "0.53066933", "0.5289861", "0.52830327", "0.52777916", "0.5277734", "0.5264064", "0.52388287", "0.5227407", "0.52244616", "0.522181", "0.52158374", "0.5201529", "0.5196332", "0.5183196", "0.5168922", "0.5165197", "0.5159262", "0.51479506", "0.51479506", "0.51287675", "0.51286095", "0.5120525", "0.51139605", "0.5113455", "0.51072955", "0.5102261", "0.50967824", "0.50758517", "0.5064547", "0.50618947", "0.5036479", "0.50313985", "0.5013355", "0.4994381", "0.49728015", "0.49432194", "0.49357352", "0.49335182", "0.4933386", "0.49331707", "0.4908031", "0.49008518", "0.48719856", "0.48688734", "0.48575628", "0.48519266", "0.48465768" ]
0.86691475
0
Gets y offset of the y axis labels
Получает смещение y меток оси y
public function getAxisYLabelOffsetY() { return $this->axis_ylabel_offY; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAxisYLabelOffsetX()\n\t{\n\t\treturn $this->axis_ylabel_offX;\n\t}", "public function getAxisXLabelOffsetY()\n\t{\n\t\treturn $this->axis_xlabel_offY;\n\t}", "public function getAxisDistanceY()\n\t{\n\t\treturn $this->axis_distance_y;\n\t}", "public function get_y_pos() {\n return $this->y_pos;\n }", "private function drawYaxis()\n {\n\n $min =\n round($this->min, $this->precision);\n $max =\n round($this->max, $this->precision);\n\n if (!isset($this->y_axis_legend_increment)) {\n\n $increment =\n round(($max - $min) / $this->total_values, $this->precision);\n } else {\n $increment = $this->y_axis_legend_increment;\n }\n\n if ($increment == 0) {\n $increment = 1;\n }\n\n //$spacing = \\round($spacing, 10);\n for ($label = $min; $label <= $max + $increment; $label+=$increment) {\n\n $px_position = $this->plotValue($label);\n if ($this->x_axis_hints == 1) {\n \\imageline($this->im, 0, $px_position, $this->width,\n $px_position, $this->ink['axis']);\n }\n imagestring($this->im, 1, 10, $px_position - 4, $label,\n $this->ink['text']);\n }\n }", "public function setAxisYLabelOffsetY($dy)\n\t{\n\t\t$this->axis_ylabel_offY = $dy;\n\t}", "function calYposition($widths, $yTop, $yBottom) {\n\t\t$totalWidth = array_sum($widths);\n\t\t$y = $yTop + ($yBottom-$yTop-$totalWidth)/2;\n\t\treturn $y;\n\t}", "public function getTitleOffsetTop()\n\t{\n\t\treturn $this->title_offY;\n\t}", "public function getXDescriptionOffsetBottom()\n\t{\n\t\treturn $this->xdescr_offY;\n\t}", "public function getYDescriptionOffsetLeft()\n\t{\n\t\treturn $this->ydescr_offX;\n\t}", "function _pointY($value)\n {\n if (is_array($value)) {\n $radius = (($value['Y'] === false) ? 1 : ($value['Y'] - $this->_axisY->_getMinimum()) / ($this->_axisY->_getMaximum() - $this->_axisY->_getMinimum()));\n $y = ($this->_top + $this->_bottom) / 2 + $radius * ($this->_plotHeight() / 2) * sin(deg2rad($this->_axisX->_point($value['X'])));\n }\n return max($this->_plotTop, min($this->_plotBottom, $y));\n }", "public function setAxisXLabelOffsetY($dy)\n\t{\n\t\t$this->axis_xlabel_offY = $dy;\n\t}", "public function getLocationY()\r\n {\r\n return $this->getAttr('Location_Y');\r\n }", "public function getOffsetY(): int\n {\n return $this->offsetY;\n }", "public function setAxisYLabelOffsetX($dx)\n\t{\n\t\t$this->axis_ylabel_offX = $dx;\n\t}", "public function getPosy()\n\t{\n\t\treturn $this->posy;\n\t}", "public function getMaxY()\n {\n return $this->getY() + $this->getHeight();\n }", "public function getAbsY2()\n {\n return $this->absY2;\n }", "public function getStartY() {\n return $this->cells[0]->y;\n }", "function getPositionY(){\n\t\t\treturn $this -> positionY;\n\t\t}", "public function getBreweryLocationY() {\n\t\t\treturn($this->breweryLocationY);\n\t\t}", "function yLabelFormat( $label ){\n return number_format( $label / 100000 ).\"k\"; \n }", "public function getLocationY()\n {\n return $this->locationY;\n }", "public function getMaxYValue()\r\n {\r\n return $this->maxMandatoryValue(parent::getMaxYValue());\r\n }", "public function getRealY()\n\t{\n\t\treturn $this->y;\n\t}", "public function getY() {\n\t\treturn ($this->y);\n\t}", "public function getRelY1()\n {\n return $this->getParentBB()->getAbsY1() - $this->getAbsY1();\n }", "public function getLabelposition()\n {\n return $this->LABELPOSITION;\n }", "public function get_label_position()\n\t{\n\t\treturn $this->_label_position;\n\t}", "public function getAxisXLabelOffsetX()\n\t{\n\t\treturn $this->axis_xlabel_offX;\n\t}", "public function getY()\n {\n return $this->y;\n }", "public function getY()\n {\n return $this->y;\n }", "public function getY()\n {\n return $this->y;\n }", "public function getY()\n {\n return $this->y;\n }", "public function getY()\n {\n return $this->y;\n }", "public function getYAxis() {\n return $this->yAxis;\n }", "public function getYAxisValue()\n {\n return $this->yAxisValue;\n }", "public function getCurrentY(): int\n {\n return $this->currentCoordinate->getY();\n }", "public function getY(): int\n {\n return $this->y;\n }", "function getY() {\n return $this->y;\n }", "function yLabelFormat($aLabel) {\n\treturn ($aLabel / 1000);\n}", "public function getVirtualY()\n\t{\n\t\treturn $this->y + $this->map->getRadius() - 1;\n\t}", "function y_label_steps($val) {\n\t\t$this->y_steps = intval ( $val );\n\t}", "public function getY()\n\t{\n\t\treturn $this->y;\n\t}", "public function getAbsY1()\n {\n return $this->absY1;\n }", "public function getY();", "public function getDimensionY()\n {\n return $this->dimensionY;\n }", "function getTranslateY() { return $this->_translatey; }", "public function getCenterY()\n {\n return $this->getY() + $this->getHeight() / 2.0;\n }", "public function getSizeY() \n\t{\n\t\treturn imagesy($this->getImage());\n\t}", "public function getY()\n {\n return $y;\n }", "public function getY()\n {\n return $y;\n }", "public function getMinY()\n {\n return $this->getY();\n }", "public function getFullY()\r\n\t{\r\n\t\treturn $this->getSizeY() + $this->getSpaceTop() + $this->getSpaceBottom();\r\n\t}", "public function getAxisPaddingBottom()\n\t{\n\t\treturn $this->axis_padding_bottom;\n\t}", "public function getMinYValue()\r\n {\r\n return $this->minMandatoryValue(parent::getMinYValue());\r\n }", "public function getAreaY()\n {\n return $this->area_y;\n }", "public function setYaxisLabelIncrement($increment = '')\n {\n\n if (is_numeric($increment)) {\n $this->y_axis_legend_increment = $increment;\n }\n }", "private function getLabels() {\n\t\t$x = 0;\n\t\t$y = 0;\n\t\t$labels = [];\n\n\t\tif ($this->type == GRAPH_YAXIS_SIDE_BOTTOM) {\n\t\t\t$axis = 'x';\n\t\t\t$y = $this->height - CSvgGraph::SVG_GRAPH_X_AXIS_LABEL_MARGIN;\n\t\t}\n\t\telse {\n\t\t\t$axis = 'y';\n\t\t\t$x = ($this->type == GRAPH_YAXIS_SIDE_RIGHT)\n\t\t\t\t? CSvgGraph::SVG_GRAPH_Y_AXIS_RIGHT_LABEL_MARGIN\n\t\t\t\t: $this->width - CSvgGraph::SVG_GRAPH_Y_AXIS_LEFT_LABEL_MARGIN;\n\t\t}\n\n\t\tforeach ($this->labels as $pos => $label) {\n\t\t\t$$axis = $pos;\n\n\t\t\tif ($this->type == GRAPH_YAXIS_SIDE_LEFT || $this->type == GRAPH_YAXIS_SIDE_RIGHT) {\n\t\t\t\t// Flip upside down.\n\t\t\t\t$y = $this->height - $y;\n\t\t\t}\n\n\t\t\tif ($this->type == GRAPH_YAXIS_SIDE_BOTTOM) {\n\t\t\t\tif (count($labels) == 0) {\n\t\t\t\t\t$text_tag_x = max($this->x + $x, strlen($label) * 4);\n\t\t\t\t}\n\t\t\t\telseif (end($this->labels) === $label) {\n\t\t\t\t\t$text_tag_x = (strlen($label) * 4 > $this->width - $x) ? $this->x + $x - 10 : $this->x + $x;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$text_tag_x = $this->x + $x;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$text_tag_x = $this->x + $x;\n\t\t\t}\n\n\t\t\t$labels[] = new CSvgText($text_tag_x, $this->y + $y, $label);\n\t\t}\n\n\t\treturn $labels;\n\t}", "protected function canvasSpacingY()\n {\n $this->canvas['spacing']['y'] = 0;\n\n if ($this->intermediate['height'] < $this->canvas['height']) {\n\n $difference = $this->canvas['height'] - $this->intermediate['height'];\n\n if ($difference % 2 === 0) {\n $this->canvas['spacing']['y'] = $difference / 2;\n } else {\n if ($difference > 1) {\n $this->canvas['spacing']['y'] = ($difference - 1) / 2 + 1;\n } else {\n $this->canvas['spacing']['y'] = 1;\n }\n }\n }\n }", "public function testGetPositionY()\n {\n $filter = new Watermark();\n $this->assertEquals(Watermark::POS_Y_BOTTOM, $filter->getPositionY());\n }", "public function getAxisLabelLineLength()\n\t{\n\t\treturn $this->axis_label_linelength;\n\t}", "private function getPosition()\n {\n if ($this->labelCounter == 1) {\n return [0, 0];\n }\n\n if ($this->labelCounter == 2) {\n return [0, Fpdi::PAGE_SIZE_A6_WIDTH];\n }\n\n if ($this->labelCounter == 3) {\n return [Fpdi::PAGE_SIZE_A6_HEIGHT, 0];\n }\n\n if ($this->labelCounter == 4) {\n return [Fpdi::PAGE_SIZE_A6_HEIGHT, Fpdi::PAGE_SIZE_A6_WIDTH];\n }\n }", "public function y()\n {\n return $this->y;\n }", "function yLabelNumberFormat( $label ){\n return number_format( $label ); \n }", "public function getIndexY() : int;", "public function getDimensionY();", "function getHeight()\n\t{\n\t\treturn $this->YSize;\n\t}", "function getScaleY() { return $this->_scaley; }", "function get_y_min()\n\t{\n\t\t$values = array();\n\n\t\tforeach($this->_config[self::VALUES] as $index=>$value)\n\t\t{\n\t\t\trsort($value);\n\t\t\t$values[] = array_pop($value);\n\t\t}\n\n\t\t$x = array_values($values);\n\t\trsort($x);\n\t\treturn array_pop($x);\n\t}", "public function getAxisPaddingRight()\n\t{\n\t\treturn $this->axis_padding_right;\n\t}", "public function getAxisPaddingTop()\n\t{\n\t\treturn $this->axis_padding_top;\n\t}", "public function SetY_axis($arraydata) {\n \n }", "public function setYOffset($measure, $unit = null);", "function _calcLabelInterval()\n {\n $result = parent::_calcLabelInterval();\n $this->_axisValueSpan = $this->_value($this->_axisSpan); \n return $result;\n }", "public function getYPosition($unit = null);", "public function setYPosition($measure, $unit = null, $ignoreOffset = false);", "function get_y_max()\n\t{\n\t\t$values = array();\n\n\t\tforeach($this->_config[self::VALUES] as $index=>$value)\n\t\t{\n\t\t\t$values[] = array_sum($value);\n\t\t}\n\n\t\t$x = array_values($values);\n\t\tsort($x);\n\t\treturn array_pop($x);\n\t}", "public function calcYPos($valueIndex)\r\n {\r\n $result = 0;\r\n\r\n if(($this->iMultiBar == MultiBars::$NONE)|\r\n ($this->iMultiBar == MultiBars::$SIDE)|\r\n ($this->iMultiBar == MultiBars::$SIDEALL))\r\n {\r\n $result = parent::calcYPos($valueIndex);\r\n }\r\n else\r\n {\r\n $tmpValue = $this->vyValues->value[$valueIndex] +\r\n $this->pointOrigin($valueIndex, false);\r\n if(($this->iMultiBar == MultiBars::$STACKED) ||\r\n ($this->iMultiBar == MultiBars::$SELFSTACK))\r\n {\r\n $result = $this->calcYPosValue($tmpValue);\r\n }\r\n else\r\n {\r\n $tmp = $this->pointOrigin($valueIndex, true);\r\n $result = ($tmp != 0) ? $this->calcYPosValue($tmpValue * 100.0 / $tmp) : 0;\r\n }\r\n }\r\n\r\n return $result;\r\n }", "public function set_y_pos($y_pos = 0) {\n if( intval($y_pos) >= 0 && intval($y_pos) < self::TABLE_SIZE_Y ) {\n $this->y_pos = $y_pos;\n }\n }", "function GetMouseY(): int { return 0; }", "public function getY(): float\n {\n return $this->params[self::PARAMETER_FPY] ?? 0.5;\n }", "function getVerticalPosition() { return $this->_verticalposition; }", "function getVerticalPosition() { return $this->_verticalposition; }", "abstract public function getY();", "public function getAxisStrokeDistance()\n\t{\n\t\treturn $this->delta_pixel;\n\t}", "public function getStrokeDashOffset () {}", "public function setYCoordinate(int $y) {\n return $this->setParam(\"sy\", $y);\n }", "public function get_baseline_offset() {\r\n if ($this->sizefixed == false) {\r\n $this->recompute_size();\r\n }\r\n return $this->baselineoffset;\r\n }", "function saveYMargin($value) {\r\n $this->data[\"YMargin\"] = $value;\r\n }", "public function y($value) {\n return $this->setProperty('y', $value);\n }", "public function getVerticalAlign() {\n return $this->verticalAlign;\n }", "function _set_y_label_style($size, $colour) {\n\t\t$tmp = $size;\n\t\t\n\t\tif (strlen ( $colour ) > 0)\n\t\t\t$tmp .= ',' . $colour;\n\t\treturn $tmp;\n\t}", "public function pathLineToVerticalRelative ($y) {}", "function set_y_label_style($size, $colour = '') {\n\t\t$this->y_label_style = $this->_set_y_label_style ( $size, $colour );\n\t}", "function getSkewY() { return $this->_skewy; }", "public function getOffsets()\n {\n return $this->offsets;\n }", "public function getOffset()\n\t{\n\t\treturn ($this->getCurrentPage() - 1)*$this->getCount();\n\t}", "public function setTitleOffsetTop($dy)\n\t{\n\t\t$this->title_offY = $dy;\n\t}", "public function testGetOffsetY()\n {\n $filter = new Watermark();\n $this->assertEquals(0, $filter->getOffsetY());\n }" ]
[ "0.8258082", "0.8197101", "0.6886376", "0.6738027", "0.66687906", "0.65471923", "0.64719707", "0.6436191", "0.64344704", "0.6394284", "0.6333164", "0.62177193", "0.6214148", "0.62002933", "0.6187845", "0.61662066", "0.6147097", "0.60840553", "0.6068987", "0.60383135", "0.59803444", "0.59708446", "0.59433144", "0.59405", "0.59201217", "0.59128153", "0.58712137", "0.5869748", "0.5828773", "0.5824994", "0.5820631", "0.5820631", "0.5820631", "0.5820631", "0.5820631", "0.5811625", "0.5806493", "0.57998073", "0.5793704", "0.5793129", "0.5788522", "0.5784861", "0.57840246", "0.57678175", "0.57327545", "0.57041067", "0.5695732", "0.5694219", "0.566113", "0.565103", "0.5641799", "0.5641799", "0.56244975", "0.5623456", "0.56196964", "0.5598864", "0.55612314", "0.5552002", "0.5525038", "0.552251", "0.55176014", "0.551155", "0.5509846", "0.55049336", "0.54790217", "0.5461485", "0.5422901", "0.5384486", "0.5369892", "0.53650373", "0.5357762", "0.5318432", "0.5300673", "0.5292363", "0.5290483", "0.5260929", "0.52562964", "0.52434945", "0.52411044", "0.5224632", "0.5203477", "0.5196103", "0.51922554", "0.51922554", "0.51847446", "0.51521784", "0.51346827", "0.5133127", "0.50865215", "0.50830245", "0.5074191", "0.5067805", "0.50555885", "0.5046462", "0.50351673", "0.50297445", "0.50291145", "0.5018642", "0.5001298", "0.49976486" ]
0.8450586
0
Gets the length of axis label strokes
Получает длину штрихов меток оси
public function getAxisLabelLineLength() { return $this->axis_label_linelength; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAxisStrokeDistance()\n\t{\n\t\treturn $this->delta_pixel;\n\t}", "protected function getSideBordersLength()\n\t{\n\t\t$border = (static::BORDER_WIDTH + static::MIN_SPACE_FROM_BORDER_X);\n\n\t\treturn $border * $this->nesting;\n\t}", "public function getNumLabels()\n {\n return $this->binStyle->getNumLabels();\n }", "public function get_size() {\r\n if ($this->sizefixed == false) {\r\n $this->recompute_size();\r\n }\r\n return $this->labelsize;\r\n }", "function getLength()\n\t{\n\t\treturn count($this->x);\n\t}", "protected function getBordersLength()\n\t{\n\t\treturn $this->getSideBordersLength() * 2;\n\t}", "public function getAxisYLabelOffsetX()\n\t{\n\t\treturn $this->axis_ylabel_offX;\n\t}", "protected function getTotalWidth()\n\t{\n\t\t$borders = (static::BORDER_WIDTH + static::MIN_SPACE_FROM_BORDER_X) * 2;\n\t\t\n\t\tif(empty($this->pipes))\n\t\t{\n\t\t\treturn $borders + $this->getCoreLength();\n\t\t}\n\n\t\t$borders *= count($this->pipes);\n\n\t\t$name = ($this->getLongestPipeLength() + static::SPACE_FROM_ARROW) * 2;\n\n\t\treturn $borders + $name + static::ARROW_WIDTH;\n\t}", "protected function get_size_label()\n {\n $x_name = get_option(self::X_NAME_KEY, self::DEFAULT_X_NAME);\n $y_name = get_option(self::Y_NAME_KEY, self::DEFAULT_Y_NAME);\n $label = $x_name;\n if (get_option(self::USE_TWO_FIELDS_KEY, self::DEFAULT_USE_TWO_FIELDS) == 1) {\n $label .= \" x {$y_name}\";\n }\n return $label;\n }", "public function getAxisXLabelOffsetY()\n\t{\n\t\treturn $this->axis_xlabel_offY;\n\t}", "public function getStrokeMiterLimit () {}", "public function getStrokeWidth () {}", "private function axisLabelsSeries($rect) {\r\n $tmpNum = 0;\r\n $tmpSt = \"\";\r\n $tmpValue = 0;\r\n\r\n $this->calcAllSeries();\r\n $tmpRange = $this->calcFirstLastAllSeries($rect);\r\n\r\n if ($tmpRange->first != intval('1000000000000')) { // MAX_VALUE\r\n $oldPosLabel = -1;\r\n $oldSizeLabel = 0;\r\n $tmpLabelW = $this->axis->getHorizontal();\r\n switch ($this->axis->getLabels()->iAngle) {\r\n case 90:\r\n case 270:\r\n $tmpLabelW = !$tmpLabelW;\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n $axisLabels = $this->axis->getLabels();\r\n for ( $t = $tmpRange->first; $t <= $tmpRange->last; $t++) {\r\n $r = $this->getAxisSeriesLabel($t);\r\n if ($r->result) {\r\n $tmpValue = $r->value;\r\n $tmpSt = $r->label;\r\n\r\n if (($tmpValue >= $this->axis->iMinimum) &&\r\n ($this->tmpValue <= $this->axis->iMaximum)) {\r\n $tmp = $this->axis->calcPosValue($tmpValue);\r\n if (!$this->axis->getTickOnLabelsOnly()) {\r\n $this->addTick($tmp);\r\n }\r\n\r\n if ($axisLabels->getVisible() &&\r\n (strlen($tmpSt) != 0)) {\r\n\r\n $tmpMulti = $this->axis->chart->multiLineTextWidth(\r\n $tmpSt);\r\n\r\n $tmpLabelSize = $tmpMulti->width;\r\n $tmpNum = $tmpMulti->count;\r\n\r\n if (!$tmpLabelW) {\r\n $tmpLabelSize = $this->chart->getGraphics3D()->getFontHeight() * $tmpNum;\r\n }\r\n if (($axisLabels->iSeparation != 0) &&\r\n ($this->oldPosLabel != -1)) {\r\n $tmpLabelSize += (int) (0.02 * $tmpLabelSize *\r\n $axisLabels->iSeparation);\r\n $tmpLabelSize *= 0.5;\r\n\r\n if ($tmp >= $oldPosLabel) {\r\n $tmpDraw = (($tmp -\r\n $tmpLabelSize) >=\r\n ($this->oldPosLabel +\r\n $oldSizeLabel));\r\n } else {\r\n $tmpDraw = (($tmp +\r\n $tmpLabelSize) <=\r\n ($this->oldPosLabel -\r\n $oldSizeLabel));\r\n }\r\n\r\n if ($tmpDraw) {\r\n $this->drawThisLabel($tmp, $tmpSt, null);\r\n $oldPosLabel = $tmp;\r\n $oldSizeLabel = $tmpLabelSize;\r\n }\r\n } else {\r\n $this->drawThisLabel($tmp, $tmpSt, null);\r\n $oldPosLabel = $tmp;\r\n $oldSizeLabel = $tmpLabelSize / 2;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n $this->axis->iSeriesList->clear(false);\r\n }\r\n }", "public function getAxisFontSize()\n\t{\n\t\treturn $this->axis_fontsize;\n\t}", "public function total_width();", "public function getWidth() {}", "function _plotWidth()\n {\n return (min($this->height(), $this->width())) * 0.80;\n }", "public function getSeriesLength() {\n return count( $this->_series );\n }", "public function getPointSize () {}", "public function getAxesCount() {\n return count( $this->_axes );\n }", "public function getWidthButBorders()\n\t{\n\t\treturn $this->getTotalWidth() - $this->getBordersLength();\n\t}", "public function width() : int\n {\n if (!$this->width) {\n throw new RuntimeException('Layer has not been initialized.');\n }\n\n return $this->width;\n }", "public function getWidth()\n\t{\n\t\treturn imagesx($this->image());\n\t}", "function width()\n {\n return $this->_canvas->getWidth();\n }", "function getWidth()\n\t{\n\t\treturn $this->XSize;\n\t}", "function get_width() {\n //ignore image width, use same width as on predefined bullet List_Bullet_Frame_Decorator\n //for proper alignment of bullet image and text. Allow image to not fitting on left border.\n //This controls the distance between bullet image and text \n //return $this->_width;\n return $this->_frame->get_style()->get_font_size()*List_Bullet_Frame_Decorator::BULLET_SIZE + \n 2 * List_Bullet_Frame_Decorator::BULLET_PADDING;\n }", "public function setAxisLabelLineLength($length)\n\t{\n\t\t$this->axis_label_linelength = $length;\n\t}", "public function getAxisPaddingBottom()\n\t{\n\t\treturn $this->axis_padding_bottom;\n\t}", "function _calcLabelInterval()\n {\n $result = parent::_calcLabelInterval();\n $this->_axisValueSpan = $this->_value($this->_axisSpan); \n return $result;\n }", "public function getPathArrayLength () {\r\n return $this->_path_array_length;\r\n }", "function StrokeLabel($label,$img,$xc,$yc,$a,$r) {\n\n // Default value\n if( $this->ilabelposadj === 'auto' )\n $this->ilabelposadj = 0.65;\n\n // We position the values diferently depending on if they are inside\n // or outside the pie\n if( $this->ilabelposadj < 1.0 ) {\n\n $this->value->SetAlign('center','center');\n $this->value->margin = 0;\n\n $xt=round($this->ilabelposadj*$r*cos($a)+$xc);\n $yt=round($yc-$this->ilabelposadj*$r*sin($a));\n\n $this->value->Stroke($img,$label,$xt,$yt);\n }\n else {\n\n $this->value->halign = \"left\";\n $this->value->valign = \"top\";\n $this->value->margin = 0;\n\n // Position the axis title.\n // dx, dy is the offset from the top left corner of the bounding box that sorrounds the text\n // that intersects with the extension of the corresponding axis. The code looks a little\n // bit messy but this is really the only way of having a reasonable position of the\n // axis titles.\n $this->value->ApplyFont($img);\n $h=$img->GetTextHeight($label);\n // For numeric values the format of the display value\n // must be taken into account\n if( is_numeric($label) ) {\n if( $label > 0 )\n $w=$img->GetTextWidth(sprintf($this->value->format,$label));\n else\n $w=$img->GetTextWidth(sprintf($this->value->negformat,$label));\n }\n else\n $w=$img->GetTextWidth($label);\n\n if( $this->ilabelposadj > 1.0 && $this->ilabelposadj < 5.0) {\n $r *= $this->ilabelposadj;\n }\n\n $r += $img->GetFontHeight()/1.5;\n\n $xt=round($r*cos($a)+$xc);\n $yt=round($yc-$r*sin($a));\n\n // Normalize angle\n while( $a < 0 ) $a += 2*M_PI;\n while( $a > 2*M_PI ) $a -= 2*M_PI;\n\n if( $a>=7*M_PI/4 || $a <= M_PI/4 ) $dx=0;\n if( $a>=M_PI/4 && $a <= 3*M_PI/4 ) $dx=($a-M_PI/4)*2/M_PI;\n if( $a>=3*M_PI/4 && $a <= 5*M_PI/4 ) $dx=1;\n if( $a>=5*M_PI/4 && $a <= 7*M_PI/4 ) $dx=(1-($a-M_PI*5/4)*2/M_PI);\n\n if( $a>=7*M_PI/4 ) $dy=(($a-M_PI)-3*M_PI/4)*2/M_PI;\n if( $a<=M_PI/4 ) $dy=(1-$a*2/M_PI);\n if( $a>=M_PI/4 && $a <= 3*M_PI/4 ) $dy=1;\n if( $a>=3*M_PI/4 && $a <= 5*M_PI/4 ) $dy=(1-($a-3*M_PI/4)*2/M_PI);\n if( $a>=5*M_PI/4 && $a <= 7*M_PI/4 ) $dy=0;\n\n $this->value->Stroke($img,$label,$xt-$dx*$w,$yt-$dy*$h);\n }\n }", "public function getWidth(){\n return imagesx($this->outputImage);\n }", "public function getThickness() : int {\n return $this -> thickness;\n }", "public function width() : int\n {\n if ($this->width === null) {\n throw new RuntimeException('Layer has not been initialized.');\n }\n\n return $this->width;\n }", "public function width() : int\n {\n if ($this->width === null) {\n throw new RuntimeException('Layer has not been initialized.');\n }\n\n return $this->width;\n }", "public function getAxisPaddingRight()\n\t{\n\t\treturn $this->axis_padding_right;\n\t}", "public function getDimension(): array\n {\n $fontInfo = $this->getFontInfo();\n $rotationAngle = $this->getRotationAngle();\n $width = $fontInfo->getWidth();\n $height = $fontInfo->getHeight();\n if ($rotationAngle === 90 || $rotationAngle === 270) {\n return array($height, $width);\n } else {\n return array($width, $height);\n }\n }", "public function getWidth();", "public function getWidth();", "public function getWidth();", "public function getWidth();", "public function getWidth();", "public function getLength(){\n return count($this->nodes);\n }", "public function getWidth()\n {\n return $this->attributes->mustHave('width')->asInteger();\n }", "public function getStrokeDashOffset () {}", "public function getAxisYLabelOffsetY()\n\t{\n\t\treturn $this->axis_ylabel_offY;\n\t}", "public function getWidth() {\n return imagesx($this->image);\n }", "public function getWidth(){ }", "public function getLengths();", "public function getWidth() {\n list($width, $height) = explode('x', $this->getSize());\n return $width;\n }", "public function getAxisPaddingLeft()\n\t{\n\t\treturn $this->axis_padding_left;\n\t}", "public function getLength();", "private function getTerminalWidth(): int\n {\n $application = new Terminal();\n $width = $application->getWidth();\n\n return $width ?: self::MAX_LINE_LENGTH;\n }", "public function getCssLengthSpecCount()\n {\n return $this->count(self::CSS_LENGTH_SPEC);\n }", "public function getWidth()\n {\n return $this->getAttribute('width');\n }", "public function getWidth(): int;", "public function getWidth(): int;", "public function getWidth(): int;", "public function getWidth()\n {\n return $this->get('width');\n }", "public function getThickness() \r\n\t{\r\n\t\treturn $this->_thickness;\r\n\t}", "public function getWidth() {\n\t\treturn $this->originalDimensions['width'];\n\t}", "public function getWidth() {\n\t\treturn $this->originalDimensions['width'];\n\t}", "private function getLabels() {\n\t\t$x = 0;\n\t\t$y = 0;\n\t\t$labels = [];\n\n\t\tif ($this->type == GRAPH_YAXIS_SIDE_BOTTOM) {\n\t\t\t$axis = 'x';\n\t\t\t$y = $this->height - CSvgGraph::SVG_GRAPH_X_AXIS_LABEL_MARGIN;\n\t\t}\n\t\telse {\n\t\t\t$axis = 'y';\n\t\t\t$x = ($this->type == GRAPH_YAXIS_SIDE_RIGHT)\n\t\t\t\t? CSvgGraph::SVG_GRAPH_Y_AXIS_RIGHT_LABEL_MARGIN\n\t\t\t\t: $this->width - CSvgGraph::SVG_GRAPH_Y_AXIS_LEFT_LABEL_MARGIN;\n\t\t}\n\n\t\tforeach ($this->labels as $pos => $label) {\n\t\t\t$$axis = $pos;\n\n\t\t\tif ($this->type == GRAPH_YAXIS_SIDE_LEFT || $this->type == GRAPH_YAXIS_SIDE_RIGHT) {\n\t\t\t\t// Flip upside down.\n\t\t\t\t$y = $this->height - $y;\n\t\t\t}\n\n\t\t\tif ($this->type == GRAPH_YAXIS_SIDE_BOTTOM) {\n\t\t\t\tif (count($labels) == 0) {\n\t\t\t\t\t$text_tag_x = max($this->x + $x, strlen($label) * 4);\n\t\t\t\t}\n\t\t\t\telseif (end($this->labels) === $label) {\n\t\t\t\t\t$text_tag_x = (strlen($label) * 4 > $this->width - $x) ? $this->x + $x - 10 : $this->x + $x;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$text_tag_x = $this->x + $x;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$text_tag_x = $this->x + $x;\n\t\t\t}\n\n\t\t\t$labels[] = new CSvgText($text_tag_x, $this->y + $y, $label);\n\t\t}\n\n\t\treturn $labels;\n\t}", "public function getWidth(): float;", "public function getWidth()\n {\n return 280;\n }", "public function get_line_width() {\n return $this->line_width;\n }", "function getLength()\n {\n return $this->l;\n }", "function getLength()\n {\n return $this->l;\n }", "function _plotHeight()\n {\n return (min($this->height(), $this->width())) * 0.80;\n }", "public function getWidth()\n {\n return imagesx($this->currentImage);\n }", "public final function getWidth() : int\n {\n\n return $this->disposed ? 0 : $this->size->getWidth();\n\n }", "public function getSizeAttribute() {\n\t\t$wat = mb_strlen($this->attributes['data'], 'UTF-8');\n\t\treturn $wat;\n\t}", "public function getWidthAttribute()\n {\n if ($this->isImage()) {\n $dimensions = $this->getImageDimensions();\n\n return $dimensions[0];\n }\n }", "public function getLabelCounts()\n {\n return $this->label_counts;\n }", "public function getLabelCounts()\n {\n return $this->label_counts;\n }", "function get_width()\n\t{\n\t\treturn 12;\n\t}", "public function getDimensionY();", "abstract public function getWidth();", "public function lengthInTextElements() { }", "protected function getWidth() \n {\n \treturn $this->options['width'];\n }", "public function getLength(): float\n {\n return $this->length;\n }", "protected function find_tic_length_for_frames(){\n\t\t$tic_length = (float) $this->sample_count / $this->num_of_tics;\n\t\treturn $this->custom_round_frames($tic_length);\n\t}", "private function getCommonLengthAttr() {\n /* las columnas comunes a todas las lenguas (que no sean combinaciones) son \n * 0 - id\n * 1 - ref\n * 2 - precio al por mayor\n * 3 - pvp\n * 4 - stock\n * 5 - categoria\n * 6 - imagen\n *\n * Devolvemos una propiedad estática por si esto cambia en el futuro\n *\n */\n $arr = self::csvOffsets();\n return count($arr['commonAttributes']);\n }", "public function getLength()\r\n\t{\r\n\t\treturn $this->length;\r\n\t}", "public function getDimension(int $width, int $height): array\n {\n $labels = $this->getBiggestLabels(false);\n $pixelsAround = array(0, 0, 0, 0); // TRBL\n if (isset($labels[BCGLabel::POSITION_TOP])) {\n $dimension = $labels[BCGLabel::POSITION_TOP]->getDimension();\n $pixelsAround[0] += $dimension[1];\n }\n\n if (isset($labels[BCGLabel::POSITION_RIGHT])) {\n $dimension = $labels[BCGLabel::POSITION_RIGHT]->getDimension();\n $pixelsAround[1] += $dimension[0];\n }\n\n if (isset($labels[BCGLabel::POSITION_BOTTOM])) {\n $dimension = $labels[BCGLabel::POSITION_BOTTOM]->getDimension();\n $pixelsAround[2] += $dimension[1];\n }\n\n if (isset($labels[BCGLabel::POSITION_LEFT])) {\n $dimension = $labels[BCGLabel::POSITION_LEFT]->getDimension();\n $pixelsAround[3] += $dimension[0];\n }\n\n $finalW = ($width + $this->offsetX) * $this->scale;\n $finalH = ($height + $this->offsetY) * $this->scale;\n\n // This section will check if a top/bottom label is too big for its width and left/right too big for its height\n $reversedLabels = $this->getBiggestLabels(true);\n foreach ($reversedLabels as $label) {\n $dimension = $label->getDimension();\n $alignment = $label->getAlignment();\n if ($label->getPosition() === BCGLabel::POSITION_LEFT || $label->getPosition() === BCGLabel::POSITION_RIGHT) {\n if ($alignment === BCGLabel::ALIGN_TOP) {\n $pixelsAround[2] = max($pixelsAround[2], $dimension[1] - $finalH);\n } elseif ($alignment === BCGLabel::ALIGN_CENTER) {\n $temp = (int)ceil(($dimension[1] - $finalH) / 2);\n $pixelsAround[0] = max($pixelsAround[0], $temp);\n $pixelsAround[2] = max($pixelsAround[2], $temp);\n } elseif ($alignment === BCGLabel::ALIGN_BOTTOM) {\n $pixelsAround[0] = max($pixelsAround[0], $dimension[1] - $finalH);\n }\n } else {\n if ($alignment === BCGLabel::ALIGN_LEFT) {\n $pixelsAround[1] = max($pixelsAround[1], $dimension[0] - $finalW);\n } elseif ($alignment === BCGLabel::ALIGN_CENTER) {\n $temp = (int)ceil(($dimension[0] - $finalW) / 2);\n $pixelsAround[1] = max($pixelsAround[1], $temp);\n $pixelsAround[3] = max($pixelsAround[3], $temp);\n } elseif ($alignment === BCGLabel::ALIGN_RIGHT) {\n $pixelsAround[3] = max($pixelsAround[3], $dimension[0] - $finalW);\n }\n }\n }\n\n $this->pushLabel[0] = $pixelsAround[3];\n $this->pushLabel[1] = $pixelsAround[0];\n\n $finalW = ($width + $this->offsetX) * $this->scale + $pixelsAround[1] + $pixelsAround[3];\n $finalH = ($height + $this->offsetY) * $this->scale + $pixelsAround[0] + $pixelsAround[2];\n\n return array((int)$finalW, (int)$finalH);\n }", "private static function getTerminalWidth(): int\n {\n return (new Console\\Terminal())->getWidth();\n }", "public function width()\n {\n return imagesx($this->image);\n }", "public function getLength()\n {\n return $this->attributes->mustHave('length')->asInteger();\n }", "public function getLength()\n {\n return $this->length;\n }", "public function getLength()\n {\n return $this->length;\n }", "public function getLength()\n {\n return $this->length;\n }", "public function getLength()\n {\n return $this->length;\n }", "public function getLength()\n {\n return $this->length;\n }", "public function getLength()\n {\n return $this->length;\n }", "public function get_length(){\n\t\treturn (float) $this->v_length;\n\t}", "static public function getLabelDefaultSize()\n\t{\n\t\treturn self::$lsize_default;\n\t}", "function getNumberOfEdges();", "public function getDimensions()\r\n {\r\n return round($this->dimension1, 1) . \"x\" . round($this->dimension2, 1) . \"x\" . round($this->dimension3, 1) . ' ' . self::DIMENSION_UNIT;\r\n }", "public function getLength()\n {\n return [6, 7, 8];\n }", "public function getLength(): int\n {\n return $this->getAttribute(static::ATTRIBUTE_LENGTH) ?? 0;\n }" ]
[ "0.68501633", "0.59723467", "0.597034", "0.5959281", "0.59096116", "0.5899711", "0.5768862", "0.57566506", "0.57558566", "0.57165706", "0.5684356", "0.5659088", "0.5637954", "0.5623538", "0.55940086", "0.55874914", "0.55643475", "0.556072", "0.5545634", "0.5541273", "0.55272126", "0.5526827", "0.55220944", "0.55208385", "0.5508028", "0.5497366", "0.5495535", "0.5486471", "0.5475298", "0.547394", "0.54676944", "0.54656434", "0.54638726", "0.54544914", "0.54544914", "0.5447944", "0.54445785", "0.5427604", "0.5427604", "0.5427604", "0.5427604", "0.5427604", "0.5424771", "0.5412904", "0.5386428", "0.53766966", "0.5373932", "0.53684974", "0.53671134", "0.53471744", "0.53374827", "0.5332165", "0.5322473", "0.53048384", "0.529738", "0.5285487", "0.5285487", "0.5285487", "0.5280286", "0.5270862", "0.5267644", "0.5267644", "0.52676374", "0.5265845", "0.5243574", "0.5239917", "0.5238782", "0.5238782", "0.5236234", "0.5231362", "0.5225644", "0.51993424", "0.5195866", "0.51874894", "0.51874894", "0.5173236", "0.51727533", "0.5167297", "0.5165621", "0.51655114", "0.51628256", "0.51626086", "0.5160104", "0.5158409", "0.51539534", "0.51530814", "0.51518536", "0.51486176", "0.51420903", "0.51420903", "0.51420903", "0.51420903", "0.51420903", "0.51420903", "0.51418036", "0.5135061", "0.5134391", "0.51337814", "0.5125914", "0.5122876" ]
0.76472217
0
Gets the top offset of the title text
Получает верхний сдвиг заголовка текста
public function getTitleOffsetTop() { return $this->title_offY; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTopLabel()\n {\n return $this->getParent()->TopLabel;\n }", "function getTop()\r\n\t{\r\n\t\treturn $this->_topHtml;\r\n\t}", "public function centerTop(): string\n {\n return $this->get(__FUNCTION__);\n }", "function _fillTop()\n {\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_BOTTOM) {\n return $this->_top - $this->_font->height($this->_text);\n }\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_CENTER_Y) {\n return $this->_top - $this->_font->_centerHeight($this->_text);\n } else {\n return $this->_top;\n }\n }", "public function getTitleLocKey()\n {\n return $this->titleLocKey;\n }", "public function getYDescriptionOffsetLeft()\n\t{\n\t\treturn $this->ydescr_offX;\n\t}", "public function getTitleLocArgs()\n {\n return $this->titleLocArgs;\n }", "public function getTopInShopTitle()\n {\n $oLang = oxRegistry::getLang();\n $iLang = $oLang->getBaseLanguage();\n\n return $this->_prepareFeedName($oLang->translateString('TOP_OF_THE_SHOP', $iLang));\n }", "public function getXDescriptionOffsetBottom()\n\t{\n\t\treturn $this->xdescr_offY;\n\t}", "function kvell_edge_get_title_content_padding() {\n\t\t$title_content_padding = apply_filters( 'kvell_edge_title_content_padding', 0 );\n\t\t\n\t\treturn intval( $title_content_padding );\n\t}", "public function getTop()\n {\n return $this->top;\n }", "public function getTop()\n {\n return $this->top;\n }", "public function setTitleOffsetTop($dy)\n\t{\n\t\t$this->title_offY = $dy;\n\t}", "public function get_title() {\n\t\treturn __( 'Topbar', 'phoenixdigi' );\n\t}", "function mediadesk_edge_get_title_content_padding() {\n\t\t$title_content_padding = apply_filters( 'mediadesk_edge_filter_title_content_padding', 0 );\n\t\t\n\t\treturn intval($title_content_padding);\n\t}", "public function getImageTop()\n {\n return $this->imageTop;\n }", "function jumpoff_title_firstword(){\n $title = current(explode(' ', get_the_title()));\n return $title;\n}", "public function getLabelposition()\n {\n return $this->LABELPOSITION;\n }", "public function getTopXX(){\n\t\treturn 'TOP XX';\n\t}", "public function getTooltip() {\n\t\treturn $this->getTrimmedText($this->findTooltipElement());\n\t}", "public function getMainTitle()\n {\n $mainTitle = $this->getData('blocktitle');\n return $mainTitle;\n }", "public function get_title() {\n\t\treturn __( 'Mobile Home Top', 'plugin-name' );\n\t}", "public function getOpeningLineText()\n {\n return \": \" . substr($this->obj->title, 0, self::MAX_LENGTH_LINE);\n }", "public function getHeaderOffset()\n {\n return $this->header_offset;\n }", "public function getDisplayTitleText()\n {\n return $this->displayTitleText;\n }", "public function getDisplayTitleText()\n {\n return $this->displayTitleText;\n }", "public function getTopOfImage()\n {\n return $this->topOfImage;\n }", "public function getTitle() {\n if (FALSE !== ($pos= strpos($this->commit['message'], \"\\n\"))) {\n return substr($this->commit['message'], 0, $pos);\n }\n\n return $this->commit['message'];\n }", "function kvell_edge_get_title_area_height() {\n\t\t$page_id = kvell_edge_get_page_id();\n\t\t$title_height_meta = kvell_edge_get_meta_field_intersect( 'title_area_height', $page_id );\n\t\t$title_height = ! empty( $title_height_meta ) ? intval( $title_height_meta ) : apply_filters( 'kvell_edge_title_area_default_height_value', 240 );\n\t\t\n\t\treturn apply_filters( 'kvell_edge_title_area_height', $title_height );\n\t}", "public function getAxisYLabelOffsetX()\n\t{\n\t\treturn $this->axis_ylabel_offX;\n\t}", "public static function getPosition(): string;", "public function getPlaceTopId()\n {\n return $this->place_top_id;\n }", "function getTextFirstLine($titleCandidate): string\n{\n $lineBreakPosition = mb_strpos($titleCandidate, \"\\n\");\n\n $title = '';\n if ($lineBreakPosition !== false && $lineBreakPosition > 1) {\n $title = mb_substr($titleCandidate, 0, $lineBreakPosition - 1);\n }\n\n if ($lineBreakPosition === false) {\n $title = $titleCandidate;\n }\n return $title;\n}", "public function getSmallTitle()\n {\n $size = 24;\n\n $title = $this->title;\n if(strlen($title) > $size){\n $title = substr($title, 0, $size + 3);\n $title.= \"...\";\n }\n\n return $title;\n }", "public function getTitleSize()\n {\n return $this->titleSize;\n }", "function thb_get_builder_position() {\n\t\t$builder_position = thb_get_post_meta( thb_get_page_ID(), 'builder_position' );\n\t\t$builder_position = apply_filters( 'thb_get_builder_position', $builder_position );\n\n\t\tif ( empty( $builder_position ) ) {\n\t\t\t$builder_position = 'top';\n\t\t}\n\n\t\treturn $builder_position;\n\t}", "function getScientificTitle() {\n\t\treturn $this->getData('scientificTitle');\n\t}", "public function getTopLines()\n {\n return $this->topLines;\n }", "function getTitle() ;", "function getTitle() ;", "public function top() {\n\n\t\treturn $this->tokens->top();\n\t}", "function getOffset() ;", "public function getPageTitle();", "public function getItemMarginTop() {\n return $this->itemMarginTop;\n }", "public function getTitleFontSize()\n\t{\n\t\treturn $this->title_fontsize;\n\t}", "public function get_intitle()\r\n\t{\r\n\t\treturn $this->intitle;\r\n\t}", "public function getTitle()\n {\n return $this->strTitle;\n }", "public function getTitle()\n {\n return $this->source['title'];\n }", "public function getTitle()\n {\n return $this->source['title'];\n }", "public function title()\n\t{\n\t\t$page = $this->getParent();\n\n\t\treturn count($page) == 0 ? null: $page['title'];\n\t}", "public function getHideTop()\n {\n return $this->hideTop;\n }", "protected function getTitle()\n {\n return $this->displayTitle;\n }", "public function getTitle() {\n return $this->m_title;\n }", "public function getTopDecoration()\n {\n if ($this->hasDijitParam('topDecoration')) {\n return $this->getDijitParam('topDecoration');\n }\n return [];\n }", "function get_actual_title($xp) {\n // could have got the <html:title> value maybe\n $title = $xp->query('//div[@class=\"_3b0d\"]')->item(0);\n if ($title->nodeValue) {\n $title = $title->nodeValue;\n } else {\n $title = null;\n }\n return $title;\n}", "public function getPos(): string\n {\n return $this->pos;\n }", "public function getLineTitle() : string\n {\n return $this->name;\n }", "function get_summary_text() {\r\n\t\treturn \"$this->title\";\r\n\t}", "public function getAxisXLabelOffsetY()\n\t{\n\t\treturn $this->axis_xlabel_offY;\n\t}", "public function get_label_position()\n\t{\n\t\treturn $this->_label_position;\n\t}", "protected function getTitle() {\n\t\treturn $this->title;\n\t}", "function kvell_edge_get_title_wrapper_styles() {\n\t\t$page_id = kvell_edge_get_page_id();\n\t\t$title_height = kvell_edge_get_title_area_height();\n\t\t$title_content_padding = kvell_edge_get_title_content_padding();\n\t\t$title_img_behavior = kvell_edge_get_meta_field_intersect( 'title_area_background_image_behavior', $page_id );\n\t\t$title_vertical_alignment = kvell_edge_get_meta_field_intersect( 'title_area_vertical_alignment', $page_id );\n\t\t\n\t\t$styles = array();\n\t\t\n\t\tif ( $title_vertical_alignment === 'header-bottom' ) {\n\t\t\t\n\t\t\tif ( $title_img_behavior !== 'responsive' ) {\n\t\t\t\t\n\t\t\t\tif ( ! empty( $title_content_padding ) ) {\n\t\t\t\t\t$styles[] = 'height: ' . ( $title_height - $title_content_padding ) . 'px';\n\t\t\t\t} else {\n\t\t\t\t\t$styles[] = 'height: ' . $title_height . 'px';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( ! empty( $title_content_padding ) ) {\n\t\t\t\t$styles[] = 'padding-top: ' . $title_content_padding . 'px';\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn implode( ';', $styles );\n\t}", "public static function getPageCoordinates( Title $title ) {\n\t\t$coords = self::getAllCoordinates( $title->getArticleID(), [ 'gt_primary' => 1 ] );\n\t\tif ( $coords ) {\n\t\t\treturn $coords[0];\n\t\t}\n\t\treturn false;\n\t}", "public static function getTitle()\n {\n return null;\n }", "protected function page_title() {\n return get_string('topicoutline');\n }", "protected function page_title() {\n return get_string('topicoutline');\n }", "protected function getPageTitle() {\n return $this->getWords()->getFormatted($this->pagename());\n }", "function kvell_edge_subtitle_text() {\n\t\t$page_id = kvell_edge_get_page_id();\n\t\t$subtitle_meta = get_post_meta( $page_id, 'edgtf_title_area_subtitle_meta', true );\n\t\t$subtitle = ! empty( $subtitle_meta ) ? $subtitle_meta : '';\n\t\t\n\t\treturn apply_filters( 'kvell_edge_subtitle_title_text', $subtitle );\n\t}", "function getTitle () {\n\t\t\treturn _sb('menu_most_recent');\n\t\t}", "static public function getTitle();", "public function getLabelTitle() {\r\n\t\t\treturn $this->label_title;\r\n\t\t}", "public static function calculateTitle($playerStats){\n $title = self::topTitleCalc($playerStats);\n if (count($title)>1){\n $titleID = self::arrayTitle($title);\n } else {\n $titleID = self::singleTitle($title[0]);\n }\n return self::getTitle($titleID);\n }", "public function getTitle()\r\n {\r\n return $this->getAttr('Title');\r\n }", "public function getAnnotationTitle()\n\t{\n\t\treturn $this->annotationTitle;\n\t}", "public function get_title();", "public function get_title();", "public function get_title();", "public function getTitle() {\n\t\treturn $this->title; \n\t}", "function getPageTitle($parser) {\n return $parser->getTitle()->getBaseText();\n}", "function getCleanScientificTitle() {\n\t\treturn $this->getData('cleanScientificTitle');\n\t}", "public function getTextAnchor()\n {\n return $this->text_anchor;\n }", "public function getTitle()\n\t{\n\t\treturn $this->data[self::KEY_TITLE];\n\t}", "public static function getTitle() {\n if(self::isMain()) {\n return Structure::findOne(1)->title;\n } else {\n return self::$currentTitle\n ? self::$currentTitle\n : (self::$current ? self::$current->title : null);\n }\n }", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getPageTitle() {\n return $this->modx->lexicon('pop.popupstudio_events');\n }", "public function getTitleElement()\n {\n return $this->titleElement;\n }", "public function getAxisPaddingTop()\n\t{\n\t\treturn $this->axis_padding_top;\n\t}", "public function getPageTitle() {\n\t\treturn $this->pageTitle;\n\t}", "public function linkee_title();" ]
[ "0.66977257", "0.6619052", "0.65133077", "0.65104586", "0.644319", "0.6236459", "0.61930925", "0.61265236", "0.6105456", "0.6089808", "0.60814327", "0.60814327", "0.60043985", "0.5918136", "0.59153986", "0.5905982", "0.5851829", "0.5841395", "0.5798033", "0.5778288", "0.57561034", "0.5752181", "0.5695348", "0.56712794", "0.56608415", "0.56608415", "0.5641252", "0.56366843", "0.5633055", "0.56243795", "0.56193316", "0.56070113", "0.560625", "0.55918694", "0.55812794", "0.55523056", "0.5544903", "0.55383503", "0.5528166", "0.5528166", "0.55228025", "0.5518265", "0.5513593", "0.5506569", "0.5503451", "0.5496139", "0.5494571", "0.5492516", "0.5492516", "0.54919463", "0.549153", "0.5478835", "0.54705065", "0.54701483", "0.5470137", "0.54494184", "0.544725", "0.5444769", "0.54437166", "0.5431561", "0.54239815", "0.5416423", "0.5415071", "0.5406158", "0.5400709", "0.5400709", "0.53998893", "0.53955173", "0.5390696", "0.5386689", "0.5380627", "0.5379167", "0.5377289", "0.5360499", "0.5358563", "0.5358563", "0.5358563", "0.53583765", "0.5357698", "0.53558195", "0.535395", "0.5349392", "0.53435385", "0.5340123", "0.5340123", "0.5340123", "0.5340123", "0.5340123", "0.5340123", "0.5340123", "0.5340123", "0.5340123", "0.5340123", "0.5340123", "0.5340123", "0.5330819", "0.53303736", "0.5330235", "0.53183615", "0.5315848" ]
0.89743555
0
Gets the font size of the title
Получает размер шрифта заголовка
public function getTitleFontSize() { return $this->title_fontsize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTitleSize()\n {\n return $this->titleSize;\n }", "public function getFontSize () {}", "public function size()\n {\n return (float) $this->data->textElement->font['size'] ? (float) $this->data->textElement->font['size'] : 10;\n }", "public function getFontSize()\n {\n return $this->get('font.size');\n }", "public function getFontSize()\n {\n return $this->font_size;\n }", "public function getFontsize(){\n return $this->fontsize;\n }", "public function getFontsize(){\n return $this->fontsize;\n }", "public function get_fontsize() {\n return $this->fontsize;\n }", "public function getFontSize() {\n return $this->fontSize;\n }", "public function setTitleFontSize($size)\n\t{\n\t\t$this->title_fontsize = $size;\n\t}", "function get_font_size() {\n\n if ( $this->__font_size_calculated )\n return $this->_props[\"font_size\"];\n \n if ( !isset($this->_props[\"font_size\"]) )\n $fs = self::$_defaults[\"font_size\"];\n else \n $fs = $this->_props[\"font_size\"];\n \n if ( !isset($this->_parent_font_size) )\n $this->_parent_font_size = self::$default_font_size;\n \n switch ($fs) {\n \n case \"xx-small\":\n $fs = 3/5 * $this->_parent_font_size;\n break;\n\n case \"x-small\":\n $fs = 3/4 * $this->_parent_font_size;\n break;\n\n case \"smaller\":\n case \"small\":\n $fs = 8/9 * $this->_parent_font_size;\n break;\n\n case \"medium\":\n $fs = $this->_parent_font_size;\n break;\n\n case \"larger\":\n case \"large\":\n $fs = 6/5 * $this->_parent_font_size;\n break;\n\n case \"x-large\":\n $fs = 3/2 * $this->_parent_font_size;\n break;\n\n case \"xx-large\":\n $fs = 2/1 * $this->_parent_font_size;\n break;\n\n default:\n break;\n }\n\n // Ensure relative sizes resolve to something\n if ( ($i = mb_strpos($fs, \"em\")) !== false ) \n $fs = mb_substr($fs, 0, $i) * $this->_parent_font_size;\n\n else if ( ($i = mb_strpos($fs, \"ex\")) !== false ) \n $fs = mb_substr($fs, 0, $i) * $this->_parent_font_size;\n\n else\n $fs = $this->length_in_pt($fs);\n\n $this->_props[\"font_size\"] = $fs; \n $this->__font_size_calculated = true;\n return $this->_props[\"font_size\"];\n\n }", "public function getFontSize()\n {\n return $this->helper->getWebsiteConfig(\n Config::XML_PATH_CONNECTOR_DYNAMIC_COUPON_FONT_SIZE\n );\n }", "public function getSmallTitle()\n {\n $size = 24;\n\n $title = $this->title;\n if(strlen($title) > $size){\n $title = substr($title, 0, $size + 3);\n $title.= \"...\";\n }\n\n return $title;\n }", "function height()\n {\n return $this->_font->height($this->_text);\n }", "function kvell_edge_get_title_area_height() {\n\t\t$page_id = kvell_edge_get_page_id();\n\t\t$title_height_meta = kvell_edge_get_meta_field_intersect( 'title_area_height', $page_id );\n\t\t$title_height = ! empty( $title_height_meta ) ? intval( $title_height_meta ) : apply_filters( 'kvell_edge_title_area_default_height_value', 240 );\n\t\t\n\t\treturn apply_filters( 'kvell_edge_title_area_height', $title_height );\n\t}", "public function getAxisFontSize()\n\t{\n\t\treturn $this->axis_fontsize;\n\t}", "public function getFontResolution() { }", "public function getDefaultFontSize()\n {\n return $this->_defaultFontSize;\n }", "public function getDefaultFontSize() {\n\t\treturn $this->_defaultFontSize;\n\t}", "function mediadesk_edge_get_title_area_height() {\n\t\t$title_height_meta = mediadesk_edge_get_meta_field_intersect( 'title_area_height' );\n\t\t$title_height = ! empty( $title_height_meta ) ? intval( $title_height_meta ) : apply_filters( 'mediadesk_edge_filter_title_area_default_height_value', 240 );\n\t\t\n\t\treturn apply_filters( 'mediadesk_edge_filter_title_area_height', $title_height );\n\t}", "public static function fontSize()\r\n\t{\r\n\t\treturn self::CAPTCHA_IMAGE_HEIGHT * 0.65;\r\n\t}", "function width()\n {\n $this->_font->width($this->_text);\n }", "function twentig_get_editor_font_sizes() {\n\t$sizes = array();\n\n\tif ( 'valentine' === get_template() ) {\n\n\t\t$h1_font_size = get_theme_mod( 'twentig_h1_font_size' );\n\t\t$h1_size_px = 84;\n\n\t\tif ( 'small' === $h1_font_size ) {\n\t\t\t$h1_size_px = 56;\n\t\t} elseif ( 'medium' === $h1_font_size ) {\n\t\t\t$h1_size_px = 64;\n\t\t} elseif ( 'large' === $h1_font_size ) {\n\t\t\t$h1_size_px = 72;\n\t\t}\n\n\t\t$sizes = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'h1',\n\t\t\t\t'size' => $h1_size_px,\n\t\t\t\t'slug' => 'h1',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'h2',\n\t\t\t\t'size' => 48,\n\t\t\t\t'slug' => 'h2',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'h3',\n\t\t\t\t'size' => 40,\n\t\t\t\t'slug' => 'h3',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'h4',\n\t\t\t\t'size' => 32.01,\n\t\t\t\t'slug' => 'h4',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'h5',\n\t\t\t\t'size' => 24.01,\n\t\t\t\t'slug' => 'h5',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'h6',\n\t\t\t\t'size' => 18.01,\n\t\t\t\t'slug' => 'h6',\n\t\t\t),\n\t\t);\n\t}\n\treturn $sizes;\n}", "public function getFontMetrics()\n {\n return $this->fdt;\n }", "public function getFontWeight () {}", "public function getFont () {}", "public function getFont () {}", "public function getFont()\n {\n return $this->_sFont;\n }", "public function getNameSize()\n {\n return $this->nameSize;\n }", "public function fontSize($value) {\n return $this->setProperty('fontSize', $value);\n }", "public function fontSize($value) {\n return $this->setProperty('fontSize', $value);\n }", "public function fontSize($value) {\n return $this->setProperty('fontSize', $value);\n }", "protected function get_size_label()\n {\n $x_name = get_option(self::X_NAME_KEY, self::DEFAULT_X_NAME);\n $y_name = get_option(self::Y_NAME_KEY, self::DEFAULT_Y_NAME);\n $label = $x_name;\n if (get_option(self::USE_TWO_FIELDS_KEY, self::DEFAULT_USE_TWO_FIELDS) == 1) {\n $label .= \" x {$y_name}\";\n }\n return $label;\n }", "public function get_size() {\r\n if ($this->sizefixed == false) {\r\n $this->recompute_size();\r\n }\r\n return $this->labelsize;\r\n }", "private function drawTitle()\r\n {\r\n\t\t$_t_color = imagecolorallocate($this->image, $this->t_color[0], $this->t_color[1], $this->t_color[2]);\r\n\t\t$_font = $this->font_dir.self::$_FONT[$this->t_font];\r\n\t\timagettftext($this->image, $this->t_fsize, 0, $this->title_pos[0], $this->title_pos[1], $_t_color , $_font, $this->title);\r\n\t}", "public function get_size() {\n\t\tif(!isset($this->_results['size'])) {\n\t\t\t$this->_results['size'] = strlen($this->_css_string);\n\t\t}\n\t\treturn $this->_results['size'];\n\t}", "protected function draw_chart_title(){\n\n\t\tif($this->chart_title) {\n\n\t\t\t/* calculate the size of the title */\n\t\t\t$title_box = imageftbbox($this->title_font_size, 0, $this->title_font, $this->chart_title);\n\t\t\t$x = $title_box[0] + ($this->canvas_width / 2) - ($title_box[4] / 2);\n\t\t\t$y = 2*$this->title_font_size;\n\n\t\t\t/* draw the title */\n\t\t\timagefttext($this->img, $this->title_font_size,0 ,$x ,$y , $this->title_font_color, $this->title_font, $this->chart_title);\n\n\t\t}\n\t}", "public function get_response_font_scale() {\n return $this->response_font_scale;\n }", "public function textSize($faktor = null)\n {\n\n if ($faktor)\n return $this->textSize + (isset($this->sizeFactor[$faktor])?$this->sizeFactor[$faktor]:1);\n\n }", "public function fontName()\n {\n $font = (string) $this->data->textElement->font['fontName'];\n return $font != \"\" ? $font : 'times';\n }", "private function _getTitle()\n {\n return ($this->_showInfo ? sprintf('%.0f', $this->width) . 'x' . sprintf('%.0f', $this->height) : '') . ' ' . $this->_tableName;\n }", "function kvell_edge_get_title_content_padding() {\n\t\t$title_content_padding = apply_filters( 'kvell_edge_title_content_padding', 0 );\n\t\t\n\t\treturn intval( $title_content_padding );\n\t}", "public function getFontFamily () {}", "public function getFontWeight()\n {\n return $this->font_weight;\n }", "public function getTitleGlyph() {\n // use \"keyboard\" since it looks vaguely similar.\n return \"\\xE2\\x8C\\xA8\";\n }", "public function fontSize(int $size = null)\n {\n if ($size === null) {\n return $this->fontSize;\n }\n\n return $this->fontSize = $size;\n }", "public function updateFontSize($size);", "function getScientificTitle() {\n\t\treturn $this->getData('scientificTitle');\n\t}", "public function sizeForHumans() {\n $bytes = $this->size;\n\n $units = ['b', 'kb', 'gb', 'tb'];\n\n for ($i = 0; $bytes > 1024; $i++) {\n $bytes /= 1024;\n }\n\n return round($bytes, 2) . $units[$i];\n }", "function mediadesk_edge_get_title_content_padding() {\n\t\t$title_content_padding = apply_filters( 'mediadesk_edge_filter_title_content_padding', 0 );\n\t\t\n\t\treturn intval($title_content_padding);\n\t}", "function fl_query_font_render_size( $font, $size, $color, $text ) {\n $d=new ImagickDraw();\n $d->setFont($font);\n $d->setFontSize(intval($size));\n $d->setGravity(Imagick::GRAVITY_CENTER);\n $d->setFillColor($color);\n $c=new Imagick();\n $m=$c->queryFontMetrics($d,$text);\n $c->clear();\n $c->destroy();\n $d->clear();\n $d->destroy();\n $dim=array( 'w'=>$m['textWidth'], 'h'=>$m['textHeight'] );\n return $dim;\n}", "public function getFont()\n {\n return $this->helper->getWebsiteConfig(\n Config::XML_PATH_CONNECTOR_DYNAMIC_COUPON_FONT\n );\n }", "function random_font_size() {\n\t\n\t\t$this -> size = mt_rand($this -> font_size_min, $this -> font_size_max );\n\t}", "public function getFormatSize() {}", "public function getTitle()\n {\n return $this->strTitle;\n }", "function getTextHeight()\n\t{\n\t\treturn ($this->textheight) ? $this->textheight : NULL;\n\t}", "public function getFontStyle () {}", "public function getTitle() \n {\n return $this->getConfig( 'title' );\n }", "public function getHtmlSize($strApiName = \"\") {\n\t\t$arrSize = $this->getSize($strApiName);\n\n\t\treturn \"width=\\\"{$arrSize['width']}\\\" height=\\\"{$arrSize['height']}\\\"\";\n\t}", "public function getFontFamily() {\n\t\treturn $this->_arrInfo[1];\n\t}", "public function setFontSize ($pointsize) {}", "public function getPopupSize($sName)\n {\n return isset($this->hPopupSize[$sName]) ? $this->hPopupSize[$sName] : $this->hPopupSize['default'];\n }", "public function admin_title( array $title ) {\n\t\t$data = $this->collector->get_data();\n\n\t\t// Only show title info if size is risky\n\t\tif ( $data['total_size_comp'] > MB_IN_BYTES * .8 ) {\n\n\t\t\tlist( $num, $unit ) = explode( ' ', size_format( $data['total_size_comp'], 1 ) );\n\n\t\t\t$title[] = sprintf(\n\t\t\t\t_x( '%s<small> %s opts</small>', 'size of alloptions', 'query-monitor' ),\n\t\t\t\t$num,\n\t\t\t\t$unit\n\t\t\t);\n\t\t}\n\n\t\treturn $title;\n\t}", "protected function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitleFace()\n {\n return $this->titleFace;\n }", "public function getTitle() {\n return $this->m_title;\n }", "public function getTitle()\n\t{\n\t\treturn $this->data[self::KEY_TITLE];\n\t}", "public static function getTitle() {\n self::create();\n return self::$instance->title;\n }", "private static function calculateTextWidth(string $text, string $fontFile, float $size): float\n {\n // note for future: imagettfbbox is unable to calculate height properly.\n // width should be fine though.\n\n $box = imagettfbbox($size, 0, $fontFile, $text);\n\n $minX = min($box[0], $box[2], $box[4], $box[6]);\n $maxX = max($box[0], $box[2], $box[4], $box[6]);\n\n return abs($maxX - $minX);\n }", "public function getTitle()\r\n {\r\n return $this->getAttr('Title');\r\n }", "function getDisplayName() {\n\t\treturn __('plugins.block.fontSize.displayName');\n\t}", "protected function getTitle()\n {\n return $this->displayTitle;\n }", "public function getTitle()\n {\n return strlen($this->attributeTitleText) ? $this->attributeTitleText . \" \" : \"\";\n }", "function getTextWidth()\n\t{\n\t\treturn ($this->textwidth) ? $this->textwidth : NULL;\n\t}", "function kvell_edge_get_title_styles() {\n\t\t$page_id = kvell_edge_get_page_id();\n\t\t$color = get_post_meta( $page_id, 'edgtf_title_text_color_meta', true );\n\t\t\n\t\t$styles = array();\n\t\t\n\t\tif ( ! empty( $color ) ) {\n\t\t\t$styles[] = 'color: ' . esc_attr( $color );\n\t\t}\n\t\t\n\t\treturn implode( ';', $styles );\n\t}", "public function getTitle()\r\n {\r\n return $this->title;\r\n }", "public function getTitle()\r\n {\r\n return $this->title;\r\n }", "public function getTitle()\r\n {\r\n return $this->title;\r\n }", "public function getTitle()\r\n {\r\n return $this->title;\r\n }", "public function getTitle()\r\n {\r\n return $this->title;\r\n }", "public function getTitle()\r\n {\r\n return $this->title;\r\n }", "public function getTitle()\r\n {\r\n return $this->_title;\r\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }" ]
[ "0.82645667", "0.7490219", "0.7331274", "0.72979224", "0.72966194", "0.7246787", "0.7246787", "0.7060264", "0.69079536", "0.689497", "0.67273647", "0.66307366", "0.66050214", "0.65058285", "0.64882344", "0.6416852", "0.640133", "0.6316706", "0.6239772", "0.6186897", "0.61777455", "0.6160331", "0.6065466", "0.605979", "0.60167694", "0.600793", "0.600793", "0.59105057", "0.5882049", "0.5833744", "0.5833744", "0.5833744", "0.57987034", "0.57961947", "0.57689387", "0.5760733", "0.5754404", "0.57206297", "0.56916726", "0.5686797", "0.566228", "0.5656824", "0.56481016", "0.5640192", "0.5632862", "0.56166327", "0.5616379", "0.5600357", "0.55973434", "0.5594185", "0.5582005", "0.5573414", "0.5572639", "0.5570955", "0.55682176", "0.5554382", "0.5553957", "0.55485433", "0.55448943", "0.55158335", "0.55116343", "0.5506785", "0.549627", "0.54880106", "0.5480531", "0.54751915", "0.547456", "0.5461443", "0.54510534", "0.5441288", "0.5437729", "0.5436483", "0.5436416", "0.54323053", "0.5431712", "0.5427664", "0.5427664", "0.5427664", "0.5427664", "0.5427664", "0.5427664", "0.5424777", "0.5423958", "0.5423958", "0.5423958", "0.5423958", "0.5423958", "0.5423958", "0.5423958", "0.5423958", "0.5423958", "0.5423958", "0.5423958", "0.5423958", "0.5423958", "0.5423958", "0.5423958", "0.5423958", "0.5423958", "0.5423958" ]
0.888725
0
Gets the bottom offset of the x axis description
Получает нижнее смещение описания оси x
public function getXDescriptionOffsetBottom() { return $this->xdescr_offY; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getYDescriptionOffsetLeft()\n\t{\n\t\treturn $this->ydescr_offX;\n\t}", "public function getAxisXLabelOffsetY()\n\t{\n\t\treturn $this->axis_xlabel_offY;\n\t}", "public function getAxisYLabelOffsetX()\n\t{\n\t\treturn $this->axis_ylabel_offX;\n\t}", "public function getTitleOffsetTop()\n\t{\n\t\treturn $this->title_offY;\n\t}", "public function getAxisPaddingBottom()\n\t{\n\t\treturn $this->axis_padding_bottom;\n\t}", "public function getAxisXLabelOffsetX()\n\t{\n\t\treturn $this->axis_xlabel_offX;\n\t}", "public function getAxisPaddingTop()\n\t{\n\t\treturn $this->axis_padding_top;\n\t}", "public function getAxisYLabelOffsetY()\n\t{\n\t\treturn $this->axis_ylabel_offY;\n\t}", "public function getBottomLeft() {\n return $this->bottom_left;\n }", "function getBottomLeft() { return $this->_bottomleft; }", "public function getBottom() : int\n {\n return $this->bottom;\n }", "public function getBottom() {\r\n return $this->bottom;\r\n }", "public function getBottom()\n {\n return $this->bottom;\n }", "public function getBottom()\n {\n return $this->bottom;\n }", "public function setXDescriptionOffsetBottom($dy)\n\t{\n\t\t$this->xdescr_offY = $dy;\n\t}", "public function get_baseline_offset() {\r\n if ($this->sizefixed == false) {\r\n $this->recompute_size();\r\n }\r\n return $this->baselineoffset;\r\n }", "public function getAxisPaddingLeft()\n\t{\n\t\treturn $this->axis_padding_left;\n\t}", "function getBottomRight() { return $this->_bottomright; }", "function _fillBottom()\n {\n return (int) (($this->_top + $this->_bottom + $this->_plotHeight()) / 2);\n }", "public function getStartY() {\n return $this->cells[0]->y;\n }", "public function getOffset() {\n\t\tif($this->offset > 0) return \" OFFSET $this->offset \";\n\t}", "public function getPeri_bottom()\n {\n return $this->peri_bottom;\n }", "public function getOffset()\n\t{\n\t\treturn ($this->getCurrentPage() - 1)*$this->getCount();\n\t}", "public function getBottomOfImage()\n {\n return $this->bottomOfImage;\n }", "public function getStrokeDashOffset () {}", "function _fillBottom()\n {\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_BOTTOM) {\n return $this->_top;\n }\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_CENTER_Y) {\n return $this->_top + $this->_font->_centerHeight($this->_text);\n } else {\n return $this->_top + $this->_font->height($this->_text);\n }\n }", "public function getOffset()\r\n\t{\r\n\t\treturn $this->date->getOffset();\r\n\t}", "public function getOffset()\n {\n return abs($this->getCurrentPageNumber() - 1) * $this->getItemNumberPerPage();\n }", "public function getOffsetY(): int\n {\n return $this->offsetY;\n }", "public function getItemMarginBottom() {\n return $this->itemMarginBottom;\n }", "public function getOffset() {}", "public function getImageBottom()\n {\n return $this->imageBottom;\n }", "private function getOffset()\n {\n if(is_integer($this->offset)){\n return $this->offset;\n }\n\n return $this->guessOffset();\n }", "function _fillTop()\n {\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_BOTTOM) {\n return $this->_top - $this->_font->height($this->_text);\n }\n if ($this->_alignment & IMAGE_GRAPH_ALIGN_CENTER_Y) {\n return $this->_top - $this->_font->_centerHeight($this->_text);\n } else {\n return $this->_top;\n }\n }", "public function getOffset() {\r\n\t\treturn $this->offset;\r\n\t}", "function getOffset() ;", "public function getOffset()\n\t{\n\t\treturn $this->offset;\n\t}", "public function getDisplayPosition()\n {\n return Mage::getStoreConfig(self::XML_PATH_DISPLAY_POSITION);\n }", "public function getBottomDecoration()\n {\n if ($this->hasDijitParam('bottomDecoration')) {\n return $this->getDijitParam('bottomDecoration');\n }\n return [];\n }", "public function getMinY()\n {\n return $this->getY();\n }", "function yoasttobottom() {\n\treturn 'low';\n}", "function yoasttobottom() {\n\treturn 'low';\n}", "function yoasttobottom() {\n\treturn 'low';\n}", "function yoasttobottom() {\n\treturn 'low';\n}", "function yoasttobottom() {\n\treturn 'low';\n}", "function yoasttobottom() {\n\treturn 'low';\n}", "function yoasttobottom() {\n\treturn 'low';\n}", "function yoasttobottom() {\n\treturn 'low';\n}", "public function getMaxXValue()\r\n {\r\n if($this->iMultiBar == MultiBars::$SELFSTACK)\r\n {\r\n return $this->getMinXValue();\r\n }\r\n else\r\n {\r\n return($this->iMultiBar == MultiBars::$SIDEALL) ?\r\n $this->iPreviousCount + $this->getCount() - 1 :\r\n parent::getMaxXValue();\r\n }\r\n }", "public function getOffset()\n {\n return $this->offset;\n }", "public function getOffset()\n {\n return $this->offset;\n }", "public function getOffset()\n {\n return $this->offset;\n }", "public function getOffset()\n {\n return $this->offset;\n }", "public function getOffset()\n {\n return $this->offset;\n }", "public function getOffset()\n {\n return $this->offset;\n }", "public function getOffset()\n {\n return $this->offset;\n }", "public function getOffset()\n {\n return $this->offset;\n }", "public function getOffset()\n {\n return $this->offset;\n }", "public function getOffset()\n {\n return $this->offset;\n }", "function getOffset(): int {\n\t\treturn $this->offset;\n\t}", "public function getSizeOffset () {}", "function getSeriesPosition() {\n\t\treturn $this->getData('seriesPosition');\n\t}", "public function getMaxX()\n {\n return $this->getX() + $this->getWidth();\n }", "public function getTraceOffset()\n {\n return $this->offset;\n }", "public function getOffset() {\n return $this->offset;\n }", "public function getOffset() {\n return $this->offset;\n }", "public function getOffset()\n {\n return $this->offset;\n }", "public function getOffset() {\n return $this->offset;\n }", "public function getAxisPaddingRight()\n\t{\n\t\treturn $this->axis_padding_right;\n\t}", "private function getOffset()\n {\n return ($this->getPage() - 1) * $this->options['itemsPerPage'];\n }", "function yoasttobottom()\n{\n\treturn 'low';\n}", "public function GetOffset ()\n {\n return $this->mOffset;\n }", "function yoasttobottom() {\r\n\treturn 'low';\r\n}", "public function getOffset();", "public function getOffset();", "public function getOffset();", "public function getOffset();", "public function getOffset();", "public function getOffset();", "public function getOffset()\n {\n return $this->_offset;\n }", "public function getOffset()\n {\n return $this->_offset;\n }", "public function getOffset()\n {\n return $this->_offset;\n }", "public function getOffset()\r\n {\r\n return ($this->_current_page-1)*$this->_page_size;\r\n }", "public function centerBottom(): string\n {\n return $this->get(__FUNCTION__);\n }", "public function getOffset(){\n return $this->offset;\n }", "function _fillTop()\n {\n return (int) (($this->_top + $this->_bottom - $this->_plotHeight()) / 2);\n }", "public function getOffset(): int\n {\n return $this->pointer->offset;\n }", "public function getHeaderOffset()\n {\n return $this->header_offset;\n }", "protected function getExceptionLineOffset(): int\n {\n if (\n version_compare(app()->version(), '5.8.0', '>=')\n and\n version_compare(app()->version(), '5.8.9', '<=')\n ) {\n return 2;\n }\n\n return 1;\n }", "public function get_y_pos() {\n return $this->y_pos;\n }", "public function getHeaderborderbottom(){\n return $this->headerborderbottom;\n }", "function getHeight()\n\t{\n\t\treturn $this->YSize;\n\t}", "public function getPageOffset()\n {\n return (($this->current_page - 1) * $this->items_per_page);\n }", "function calYposition($widths, $yTop, $yBottom) {\n\t\t$totalWidth = array_sum($widths);\n\t\t$y = $yTop + ($yBottom-$yTop-$totalWidth)/2;\n\t\treturn $y;\n\t}", "public function getLabelposition()\n {\n return $this->LABELPOSITION;\n }", "function dysign_yoast_bottom() {\n return 'low';\n}", "public function getAxisDistanceX()\n\t{\n\t\treturn $this->axis_distance_x;\n\t}", "public function getOffsetX(): int\n {\n return $this->offsetX;\n }", "public function getOffset(): int\n {\n return $this->offset;\n }", "public function getOffset(): int\n {\n return $this->offset;\n }" ]
[ "0.7327848", "0.73252094", "0.7252263", "0.68946743", "0.67563707", "0.6592761", "0.63924336", "0.63748413", "0.63650024", "0.63028437", "0.6262055", "0.62000465", "0.6188343", "0.6188343", "0.61317503", "0.6005277", "0.5970461", "0.5964667", "0.58880275", "0.58590335", "0.5854203", "0.58538157", "0.5824172", "0.5795334", "0.5774218", "0.57678103", "0.5712164", "0.5700331", "0.56739825", "0.5661978", "0.5654089", "0.56430835", "0.5642566", "0.563651", "0.56364554", "0.5628501", "0.56200475", "0.5615885", "0.5605701", "0.5604913", "0.5595952", "0.5595952", "0.5595952", "0.5595952", "0.5595952", "0.5595952", "0.5595952", "0.5595952", "0.55887556", "0.5583852", "0.5583852", "0.5583852", "0.5583852", "0.5583852", "0.5583852", "0.5583852", "0.5583852", "0.5583852", "0.5583852", "0.5582792", "0.5573762", "0.55702436", "0.55651546", "0.55566734", "0.55558705", "0.55558705", "0.5554436", "0.55514264", "0.55513346", "0.55467814", "0.55368817", "0.5532296", "0.552815", "0.5517975", "0.5517975", "0.5517975", "0.5517975", "0.5517975", "0.5517975", "0.55136657", "0.55136657", "0.55136657", "0.55040556", "0.54856414", "0.5484323", "0.54842865", "0.54834545", "0.54816985", "0.54779124", "0.5476695", "0.5476513", "0.5475317", "0.54730546", "0.54719687", "0.54684067", "0.5455843", "0.5452923", "0.54515994", "0.54482377", "0.54482377" ]
0.8610763
0