This commit is contained in:
Qiang Xue
2011-10-04 09:22:26 -04:00
parent e6a9e64515
commit be87e1780c
7 changed files with 477 additions and 59 deletions

View File

@ -102,11 +102,11 @@ class Model extends Component implements Initable, \IteratorAggregate, \ArrayAcc
return self::$_attributes[$className];
}
$class = new ReflectionClass($this);
$class = new \ReflectionClass($this);
$names = array();
foreach ($class->getProperties() as $property) {
foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) {
$name = $property->getName();
if ($property->isPublic() && !$property->isStatic()) {
if (!$property->isStatic()) {
$names[] = $name;
}
}