I\'m trying to make a PHP (5) object that can iterate through its properties, building an SQL query based only on its public properties, not its private ones.
As this pa
Check this code from http://php.net/manual/reflectionclass.getproperties.php#93984
public function listProperties() {
$reflect = new ReflectionObject($this);
foreach ($reflect->getProperties(ReflectionProperty::IS_PUBLIC /* + ReflectionProperty::IS_PROTECTED*/) as $prop) {
print $prop->getName() . "\n";
}
}