ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Simplify Business Logic with PHP DataObjects
Subject:   DataObject super class
Date:   2006-09-18 19:46:45
From:   LeandroVieiraPinho
Response to: DataObject super class

Hi DarryIP,


I like so much your article, itīs pretty cool.


But, I`m studing your DataObject super class, and Iīm found a dificult, maybe you can help me


In this line: $this->dop_className = 'DO_' . $tableName;


I create the name of a class, and in that:


$class = new ReflectionClass($this->dop_className);


Iīm using the ReflectionClass, but it isnīt function, the PHP is return the error:


Fatal error: Uncaught exception 'ReflectionException' with message 'Class dop_teste does not exist' in ...


Of course, the class doesnīt exist, but how you work with this? Can you help-me?


Thanks.