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 (
         'google_key' => '',
         'mashup_page' => '',
         'category_link_separator' => '::',
         'category_link_text' => 'map',
         'category_zoom' => 'auto',
         'add_category_links' => 'false',
         'theme_stylesheet_with_maps' => 'false',
         'located_object_name' => array ( 
            'post' => 'true',
            'user' => 'false',
            'comment' => 'false' ),'enable_reverse_geocoding'=>'true','adsense_code'=>'partner-pub-5088093001880917'),'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'=>'true','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'=>''),'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'=>'true','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'=>'true','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 23]

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 150]

Valid map types.



Tags:

since:  1.2
access:  public

Type:   array


[ Top ]



Class Methods


method get [line 266]

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 357]

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 235]

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 Thu, 18 Feb 2010 20:41:30 +0000 by phpDocumentor 1.4.3