22 foreach ( $elements as $element ) {
24 $this->value[] = $element;
25 } elseif ( is_scalar( $element ) || $element instanceof
MessageValue ) {
28 throw new \InvalidArgumentException(
29 'ListParam elements must be MessageParam or scalar' );
45 foreach ( $this->value as $element ) {
46 $contents .= $element->dump();
48 return "<{$this->type} listType=\"{$this->listType}\">$contents</{$this->type}>";