rfc:functional-elements

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
rfc:functional-elements [2008/03/06 02:12] – Adding usage examples lstrojnyrfc:functional-elements [2008/03/06 02:28] – Adding work in progress notice lstrojny
Line 1: Line 1:
 +This RFC is still work in progress
 +----
 ====== Functional elements for object lists ====== ====== Functional elements for object lists ======
 ==== Abstract ==== ==== Abstract ====
Line 7: Line 9:
 <code php> <code php>
 foreach ($list as $element) { foreach ($list as $element) {
-    $element->method();    array $params = array(),+    $element->method(); 
 +    array $params = array(),
     array $condition_params = array(),     array $condition_params = array(),
     bool $collect = true,     bool $collect = true,
Line 57: Line 60:
 </code> </code>
  
-Iteratoring over a list of objects, call methods "testMethod" (with param "test") and "otherTestMethod" (with param "other") and get the list of results:+Iterating over a list of objects, call methods "testMethod" (with param "test") and "otherTestMethod" (with param "other") and get the list of results:
 <code php> <code php>
 $result = spl_iterator_element_call($list, array('testMethod', 'otherTestMethod'), array('test', 'other')); $result = spl_iterator_element_call($list, array('testMethod', 'otherTestMethod'), array('test', 'other'));
 +</code>
 +
 +Iterating over a list of objects, call method 'testMethod' (with param "test1" and "test2") and "otherTestMethod" (with param "other1" and "other2") and get the list of results:
 +<code php>
 +$result = spl_iterator_element_call($list, array('testMethod', 'otherTestMethod'), array(array('test1', 'test2'), array('other1', 'other2')));
 </code> </code>
  
rfc/functional-elements.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1