<?php 
class VstMenuHorizontal{
	
	protected $_elementos = array();
	protected $_elementos_derecha = array();
	protected $_fija = true;
	
	
	public function render() {
		$abreContenedor = '<div class="collapse navbar-collapse navbar-inverse color-azul">
				 ';
		$cierraContenedor = '</div>';
		
		$abreMenu = '
      <ul class="nav navbar-nav">';
		
		
		
		$cierraMenu = '</ul>';
		
		$html = $abreContenedor;
		$html .= $abreMenu;
		foreach ($this->_elementos as $elemento){
			$html .= $elemento->render();
		}
		$html .= $cierraMenu;
		$html .= $cierraContenedor;
		return $html;	
	}

	function addOpcion (VstMenuOpcionHorizontal $opcion){
		$this->_elementos[] = $opcion;
	}
	
	
	public function  setFija($value){
		$this->_fija = $value;
	}
	
	public function __toString(){
		return $this->render();
	}
}