$value) { if (in_array($key, $this->valid_options)) { // Set all valid options $this->options[$key] = (bool) $value; } } } public function render($tabs = 0) { // Create the tabs $tabs = empty($tabs) ? '' : str_repeat("\t", $tabs); // Render each option $output = array(); foreach ($this->options as $option => $value) { if ($value === TRUE) { // Add an enable $output[] = 'map.enable'.$option.'();'; } else { // Add a disable $output[] = 'map.disable'.$option.'();'; } } return implode("\n".$tabs, $output); } } // End Gmap Options