示例#1
0
 /**
  * @return PropertyGenerator
  */
 protected function getIdProperty()
 {
     $id = new PropertyGenerator('id', null, PropertyGenerator::FLAG_PROTECTED);
     $id->setDocBlock(new DocBlockGenerator());
     $id->getDocBlock()->setTag(new Tag\GenericTag('var', 'int'));
     $id->getDocBlock()->setTag(new Tag\GenericTag('ORM\\Id'));
     $id->getDocBlock()->setTag(new Tag\GenericTag('ORM\\GeneratedValue'));
     $id->getDocBlock()->setTag(new Tag\GenericTag('ORM\\Column(type="integer")'));
     return $id;
 }
 /**
  * @param  string            $name
  * @param  string            $type
  * @return PropertyGenerator
  */
 protected function getProperty($name, $type)
 {
     $property = new PropertyGenerator($name, null, PropertyGenerator::FLAG_PROTECTED);
     $property->setDocBlock(new DocBlockGenerator());
     $property->getDocBlock()->setTag(new Tag\GenericTag('var', $type));
     return $property;
 }