getReflectionProperties() публичный Метод

Gets the ReflectionPropertys of the mapped class.
public getReflectionProperties ( ) : ReflectionProperty[]
Результат ReflectionProperty[] An array of ReflectionProperty instances.
Пример #1
0
 /**
  * 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;
 }