1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<?php require_once("DataFeeder.php"); class ArrayFeeder extends DataFeeder { var $db = NULL; function ArrayFeeder($name_, $specific_) { parent::DataFeeder($name_, $specific_); } function Exploit() { $className = "Data" . $this->name; $clsDef = "class $className {"; $rows = array_keys($this->specific); foreach($rows as $row) { $clsDef.="var $$row;"; $retuned[]=$row; } $clsDef.= "}"; eval($clsDef); $fd = new $className; foreach($rows as $row) { $fd->$row = $this->specific[$row]; } $this->resultArr[] = $fd; return $this->resultArr; } } ?>
|