On Thu, Jun 11, 2015 at 1:53 AM, Octopus Puras wrote:
> I have a MySQL table, whose name is Items:
> ItemID ItemName ItemDescription
>
> I also have a PHP class:
> class Item {
> public $id;
> public $name;
> public $description;
> }
>
> If I execute $stmt->fetchObject(), I will get an obje
Something like this should get you started
stmt = $stmt;
$this->metadata = $metadata;
}
public function map()
{
$databaseData = $this->stmt->fetchObject();
$r = new \ReflectionClass($this->metadata['class']);
$obj = $r->newInstanceWithoutConstructor();