Gets the ReflectionPropertys of the mapped class.
public getReflectionProperties ( ) : ReflectionProperty[] | ||
return | ReflectionProperty[] | An array of ReflectionProperty instances. |
/** * Generates the code for the __sleep method for a proxy class. * * @param $class * @return string */ private function generateSleep(ClassMetadata $class) { $sleepImpl = ''; if ($class->reflClass->hasMethod('__sleep')) { $sleepImpl .= 'return parent::__sleep();'; } else { $sleepImpl .= 'return array('; $first = true; foreach ($class->getReflectionProperties() as $name => $prop) { if ($first) { $first = false; } else { $sleepImpl .= ', '; } $sleepImpl .= "'" . $name . "'"; } $sleepImpl .= ');'; } return $sleepImpl; }