You are here

class RepeatedElementsArray in Salesforce Suite 5

Same name and namespace in other branches
  1. 5.2 includes/salesforce.php \RepeatedElementsArray

helps SOAP-ENC arrays to be encoded as repeated elements.

@access private

Hierarchy

Expanded class hierarchy of RepeatedElementsArray

File

includes/salesforce.php, line 524

View source
class RepeatedElementsArray {
  var $elementName;
  var $values;

  /**
   * @param string
   *            name of element
   * @param array
   *            values to be encoded. Currently, only strings are supported.
   * @access public
   */
  function RepeatedElementsArray($elementName, $values) {
    $this->elementName = $elementName;
    $this->values = $values;
  }
  function serialize($use = 'encoded') {
    $xml = "";
    foreach ($this->values as $value) {
      $xml .= "<{$this->elementName}>{$value}</{$this->elementName}>";
    }
    return $xml;
  }

}

Members