public function setValue($value = null)
    {

		if(isset($value)) {

			//ENT_QUOTES not set

			$this->value = array_map('htmlspecialchars', (array) $value);
		}

		foreach($this->options as $o) {

			$v = $this->getValue();

			if(is_array($v) && in_array($o->getValue(), $v)) {
				$o->select();
			}
			else {
				$o->unselect();
			}
		}
		
		return $this;

	}
public function setValue($value = null)
    {

		if(isset($value)) {

			//ENT_QUOTES not set

			$this->value = array_map('htmlspecialchars', (array) $value);
		}

		foreach($this->options as $o) {

			$v = $this->getValue();

			if(is_array($v) && in_array($o->getValue(), $v)) {
				$o->select();
			}
			else {
				$o->unselect();
			}
		}
		
		return $this;

	}
public function setValue ( $ value = null ) { if ( isset ( $ value ) ) { //ENT_QUOTES not set $ this -> value = array_map ( 'htmlspecialchars' , ( array ) $ value ) ; } foreach ( $ this -> options as $ o ) { $ v = $ this -> getValue ( ) ; if ( is_array ( $ v ) && in_array ( $ o -> getValue ( ) , $ v ) ) { $ o -> select ( ) ; } else { $ o -> unselect ( ) ; } } return $ this ; }
set value of select element
value can be either a primitive or an array

@param mixed $value
@return MultipleSelectElement
set value of select element value can be either a primitive or an array