<?xml version="1.0"?>
<?xml-stylesheet 
 href="http://www.w3.org/2000/08/w3c-synd/style.css" type="text/css"
?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel rdf:about="http://pear.php.net/bugs/6635/bug">
    <title>PEAR Bug #6635</title>
    <link>http://pear.php.net/bugs/6635</link>
    <description>[Closed] Add a 'concatenation' method to HTML_AJAX_Action</description>
    <dc:language>en-us</dc:language>
    <dc:creator>pear-webmaster@lists.php.net</dc:creator>
    <dc:publisher>pear-webmaster@lists.php.net</dc:publisher>
    <admin:generatorAgent rdf:resource="http://pear.php.net/bugs"/>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
    <items>
     <rdf:Seq>
      <rdf:li rdf:resource="http://pear.php.net/bugs/6635"/>
      <rdf:li rdf:resource="http://pear.php.net/bugs/6635/2006-08-14+19%3A14%3A03#2006-08-14+19%3A14%3A03"/>
      <rdf:li rdf:resource="http://pear.php.net/bugs/6635/2006-01-31+12%3A25%3A42#2006-01-31+12%3A25%3A42"/>
      <rdf:li rdf:resource="http://pear.php.net/bugs/6635/2006-01-31+00%3A29%3A48#2006-01-31+00%3A29%3A48"/>
     </rdf:Seq>
    </items>
  </channel>
    <item rdf:about="http://pear.php.net/bugs/6635">
      <title>atex</title>
      <link>http://pear.php.net/bugs/6635</link>
      <description><![CDATA[<pre>HTML_AJAX Feature/Change Request
Reported by atex
2006-01-31T01:00:05-00:00
PHP: 5.1.1 OS: Linux Package Version: 0.3.3

Description:
------------
Basically, I have a situation where I can call one method from a second method.  The problem is I return an HTML_AJAX_Action object from the first method and need to return that, but I also need to return the HTML_AJAX_Action object that I had already been creating as I was going through the second method.  The problem is, I can't call the first method from the second method without first doing a few other assignAttr() calls, so it's not as simple as calling method1 first and then calling assignAttr() on the object that the first method created.  In short, a concatenation method in HTML_AJAX_Action would be very helpful.

Test script:
---------------
method1() {
  $r = HTML_AJAX_Action();
  $r-&gt;assignAttr('id', 'innerHTML', 'text');

  return $r;
}

method2() {
  $r = HTML_AJAX_Action();
  $r-&gt;assignAttr('id2', 'innerHTML', 'text2');
  ...
  $r2 = $this-&gt;method1();

  $r-&gt;concat($r2);

  return $r;
}


Expected result:
----------------
This would return an HTML_AJAX_Action object that contains the data from both the call from method1() inside method2() as well as the data that is being collected during method2().

Actual result:
--------------
Currently, the concat method does not exist in HTML_AJAX_Action, so this would not function.</pre>]]></description>
      <content:encoded><![CDATA[<pre>HTML_AJAX Feature/Change Request
Reported by atex
2006-01-31T01:00:05-00:00
PHP: 5.1.1 OS: Linux Package Version: 0.3.3

Description:
------------
Basically, I have a situation where I can call one method from a second method.  The problem is I return an HTML_AJAX_Action object from the first method and need to return that, but I also need to return the HTML_AJAX_Action object that I had already been creating as I was going through the second method.  The problem is, I can't call the first method from the second method without first doing a few other assignAttr() calls, so it's not as simple as calling method1 first and then calling assignAttr() on the object that the first method created.  In short, a concatenation method in HTML_AJAX_Action would be very helpful.

Test script:
---------------
method1() {
  $r = HTML_AJAX_Action();
  $r-&gt;assignAttr('id', 'innerHTML', 'text');

  return $r;
}

method2() {
  $r = HTML_AJAX_Action();
  $r-&gt;assignAttr('id2', 'innerHTML', 'text2');
  ...
  $r2 = $this-&gt;method1();

  $r-&gt;concat($r2);

  return $r;
}


Expected result:
----------------
This would return an HTML_AJAX_Action object that contains the data from both the call from method1() inside method2() as well as the data that is being collected during method2().

Actual result:
--------------
Currently, the concat method does not exist in HTML_AJAX_Action, so this would not function.</pre>]]></content:encoded>
      <dc:date>2006-01-31T01:00:05-00:00</dc:date>
    </item>
    <item rdf:about="http://pear.php.net/bugs/6635/2006-08-14+19%3A14%3A03#2006-08-14+19%3A14%3A03">
      <title>auroraeosrose [2006-08-14 23:14]</title>
      <link>http://pear.php.net/bugs/6635#1155597243</link>
      <description><![CDATA[<pre>A method to do this has been added in svn

$r1 = HTML_AJAX_Action();
$r-&gt;assignAttr('id', 'innerHTML', 'text');
$r2 = HTML_AJAX_Action();
$r2-&gt;assignAttr('id', 'innerHTML', 'text');

$r1-&gt;combineActions($r2);

Someone want to close this?</pre>]]></description>
      <content:encoded><![CDATA[<pre>A method to do this has been added in svn

$r1 = HTML_AJAX_Action();
$r-&gt;assignAttr('id', 'innerHTML', 'text');
$r2 = HTML_AJAX_Action();
$r2-&gt;assignAttr('id', 'innerHTML', 'text');

$r1-&gt;combineActions($r2);

Someone want to close this?</pre>]]></content:encoded>
      <dc:date>2006-08-14T23:14:03-00:00</dc:date>
    </item>
    <item rdf:about="http://pear.php.net/bugs/6635/2006-01-31+12%3A25%3A42#2006-01-31+12%3A25%3A42">
      <title>atex [2006-01-31 17:25]</title>
      <link>http://pear.php.net/bugs/6635#1138728342</link>
      <description><![CDATA[<pre>I agree that &quot;combine&quot; is probably a better name for the method.  Your description of the combine function also seems to sync with what I was thinking about.  I thought something as simple as the following would work, but since I'm not sure how everything else meshes together, it may be too vague (i.e. dealing with $contentType and $payload):

function combine($act_obj) {
  if (is_a($act_obj, 'HTML_AJAX_Action')) {
    foreach ($act_obj-&gt;_actions as $action) {
      $this-&gt;_actions[] = $action;
    }
    return true;
  }
  else {
    return false;
  }
}</pre>]]></description>
      <content:encoded><![CDATA[<pre>I agree that &quot;combine&quot; is probably a better name for the method.  Your description of the combine function also seems to sync with what I was thinking about.  I thought something as simple as the following would work, but since I'm not sure how everything else meshes together, it may be too vague (i.e. dealing with $contentType and $payload):

function combine($act_obj) {
  if (is_a($act_obj, 'HTML_AJAX_Action')) {
    foreach ($act_obj-&gt;_actions as $action) {
      $this-&gt;_actions[] = $action;
    }
    return true;
  }
  else {
    return false;
  }
}</pre>]]></content:encoded>
      <dc:date>2006-01-31T17:25:42-00:00</dc:date>
    </item>
    <item rdf:about="http://pear.php.net/bugs/6635/2006-01-31+00%3A29%3A48#2006-01-31+00%3A29%3A48">
      <title>jeichorn@... [2006-01-31 05:29]</title>
      <link>http://pear.php.net/bugs/6635#1138685388</link>
      <description><![CDATA[<pre>I don't think concat is a very good name for this method, maybe combine.

The basic docs for the combine function would be:
HAA::combine($haaInstance)
Take all actions in the HAA instance passed in and append them to the end of the current HAA instance.


If this approach suits your needs let me know, i'll see if i  can get it implemented.</pre>]]></description>
      <content:encoded><![CDATA[<pre>I don't think concat is a very good name for this method, maybe combine.

The basic docs for the combine function would be:
HAA::combine($haaInstance)
Take all actions in the HAA instance passed in and append them to the end of the current HAA instance.


If this approach suits your needs let me know, i'll see if i  can get it implemented.</pre>]]></content:encoded>
      <dc:date>2006-01-31T05:29:48-00:00</dc:date>
    </item>
</rdf:RDF>