コード例 #1
0
 /**
  * @param ClassGenProperty $property
  */
 public function add_property(ClassGenProperty $property)
 {
     // add property to the right array
     if ($property->isStatic) {
         $this->staticPropertiesArray[] = $property;
     } else {
         if ($property->is_const()) {
             $this->constantPropertiesArray[] = $property;
         } else {
             switch ($property->get_visibility()) {
                 case 'public':
                     $this->publicPropertiesArray[] = $property;
                     break;
                 case 'private':
                     $this->privatePropertiesArray[] = $property;
                     break;
                 case 'protected':
                     $this->protectedPropertiesArray[] = $property;
                     break;
                 default:
                     break;
             }
         }
     }
 }