public function add($key, $value) {
		$this->validateValue($value);
		if (!isset($this->variables[$key])) {
			$this->variables[$key] = [];
		}

		if (!is_array($this->variables[$key])) {
			$this->variables[$key] = [$this->variables[$key]];
		}

		$this->variables[$key][] = $value;
	}
public function add($key, $value) {
		$this->validateValue($value);
		if (!isset($this->variables[$key])) {
			$this->variables[$key] = [];
		}

		if (!is_array($this->variables[$key])) {
			$this->variables[$key] = [$this->variables[$key]];
		}

		$this->variables[$key][] = $value;
	}
public function add ( $ key , $ value ) { $ this -> validateValue ( $ value ) ; if ( ! isset ( $ this -> variables [ $ key ] ) ) { $ this -> variables [ $ key ] = [ ] ; } if ( ! is_array ( $ this -> variables [ $ key ] ) ) { $ this -> variables [ $ key ] = [ $ this -> variables [ $ key ] ] ; } $ this -> variables [ $ key ] [ ] = $ value ; }
Adds a value to a collection, collection will be created if it does not already exist
@param string $key The collection key
@param $value
Adds a value to a collection collection will be created if it does not already exist