Browse Source

LuMultipleDbo map function

tags/0.1.0
Robin Thoni 9 years ago
parent
commit
c148b1eb9a
1 changed files with 9 additions and 0 deletions
  1. 9
    0
      src/Utils/LuMultipleDbo.php

+ 9
- 0
src/Utils/LuMultipleDbo.php View File

43
         $this->_count = $count;
43
         $this->_count = $count;
44
         $this->_data = $data;
44
         $this->_data = $data;
45
     }
45
     }
46
+
47
+    function map(callable $callback)
48
+    {
49
+        $values = [];
50
+        foreach ($this->_data as $data) {
51
+            $values = $callback($data);
52
+        }
53
+        return new LuMultipleDbo($this->_count, $values);
54
+    }
46
 }
55
 }

Loading…
Cancel
Save