GeoMashup
[ class tree: GeoMashup ] [ index: GeoMashup ] [ all elements ]

Class: GeoMashupOptions

Source Location: /geo-mashup-options.php

Class Overview


A singleton to manage Geo Mashup saved options.


Author(s):

Variables

Methods



Class Details

[line 15]
A singleton to manage Geo Mashup saved options.



Tags:

since:  1.2
access:  public


[ Top ]


Class Variables

$default_options = array (
      'overall' => array (
         'version' => '',
         'google_key' => '',
         'mashup_page' => '',
         'category_link_separator' => '::',
         'category_link_text' => 'map',
         'category_zoom' => 'auto',
         'add_category_links' => 'false',
         'copy_geodata' => 'false',
         'theme_stylesheet_with_maps' => 'false',
         'located_post_types' => array( 'post', 'page' ),'located_object_name'=>array('post'=>'deprecated','user'=>'false','comment'=>'false'),'enable_reverse_geocoding'=>'true','adsense_code'=>'partner-pub-5088093001880917','geonames_username'=>'geomashup','map_api'=>'googlev3','import_custom_field'=>''),'global_map'=>array('width'=>'400','height'=>'400','map_type'=>'G_NORMAL_MAP','zoom'=>'auto','background_color'=>'c0c0c0','category_color'=>array(),'category_line_zoom'=>array(),'map_control'=>'GSmallZoomControl3D','add_map_type_control'=>array(),'add_overview_control'=>'false','add_google_bar'=>'false','enable_scroll_wheel_zoom'=>'false','show_post'=>'false','show_future'=>'false','marker_select_info_window'=>'true','marker_select_highlight'=>'false','marker_select_center'=>'false','marker_select_attachments'=>'false','max_posts'=>'','auto_info_open'=>'true','click_to_load'=>'false','click_to_load_text'=>'','cluster_max_zoom'=>'','cluster_lib'=>'clustermarker'),'single_map'=>array('width'=>'400','height'=>'400','map_control'=>'GSmallZoomControl3D','map_type'=>'G_NORMAL_MAP','zoom'=>'11','background_color'=>'c0c0c0','add_overview_control'=>'false','add_map_type_control'=>array(),'add_google_bar'=>'false','enable_scroll_wheel_zoom'=>'false','click_to_load'=>'false','click_to_load_text'=>''),'context_map'=>array('width'=>'200','height'=>'200','map_control'=>'GSmallZoomControl3D','map_type'=>'G_NORMAL_MAP','zoom'=>'auto','background_color'=>'c0c0c0','add_overview_control'=>'false','add_map_type_control'=>array(),'add_google_bar'=>'false','enable_scroll_wheel_zoom'=>'false','marker_select_info_window'=>'true','marker_select_highlight'=>'false','marker_select_center'=>'false','marker_select_attachments'=>'false','click_to_load'=>'false','click_to_load_text'=>''))

[line 22]

Valid options with default values.



Tags:

since:  1.2
access:  public

Type:   array


[ Top ]

$valid_map_types = array ( 'G_NORMAL_MAP', 'G_SATELLITE_MAP', 'G_HYBRID_MAP', 'G_PHYSICAL_MAP', 'G_SATELLITE_3D_MAP' )

[line 153]

Valid map types.



Tags:

since:  1.2
access:  public

Type:   array


[ Top ]



Class Methods


constructor __construct [line 189]

void __construct( )

PHP5 constructor

Should be used only in this file.




Tags:

since:  1.2


[ Top ]

method get [line 267]

string|array get( string $key1, [string $key2 = null], [string $key3 = null])

Get a saved option value.

  1.  $single_map_options_array $geo_mashup_options->get'single_map' );
  2.  $google_key $geo_mashup_options->get'overall''google_key' );
  3.  $add_global_satellite_map $geo_mashup_options->get'global_map''add_map_type_control''G_SATELLITE_MAP' );




Tags:

return:  The option value or values.
since:  1.2
access:  public


Parameters:

string   $key1   Highest level key.
string   $key2   Second level key.
string   $key3   Third level key.

[ Top ]

method is_valid [line 356]

bool is_valid( string $key, &$value, mixed $value)

Check an option key and value for validity.



Tags:

return:  True if valid.
since:  1.2
access:  public


Parameters:

string   $key   Option key.
mixed   $value   Option value, modified in some cases.
   &$value  

[ Top ]

method save [line 237]

bool save( )

Write current values to the database.



Tags:

return:  Success or failure.
since:  1.2
access:  public


[ Top ]

method set_valid_options [line 303]

void set_valid_options( array $option_array)

Import valid options from an array.



Tags:

since:  1.2
access:  public


Parameters:

array   $option_array   Associative array of option names and values.

[ Top ]


Documentation generated on Sat, 09 Jul 2011 21:54:44 -0700 by phpDocumentor 1.4.3