コード例 #1
0
 /**
  * Creates a new Descriptor from the given Reflector.
  *
  * @param VarTag $data
  *
  * @return VarDescriptor
  */
 public function create($data)
 {
     $descriptor = new VarDescriptor($data->getName());
     $descriptor->setDescription($data->getDescription());
     $descriptor->setTypes($data->getTypes());
     $descriptor->setVariableName($data->getVariableName());
     return $descriptor;
 }
コード例 #2
0
 /**
  * Creates a new Descriptor from the given Reflector.
  *
  * @param VarTag $data
  *
  * @return VarDescriptor
  */
 public function create($data)
 {
     $descriptor = new VarDescriptor($data->getName());
     $descriptor->setDescription($data->getDescription());
     $descriptor->setVariableName($data->getVariableName());
     $types = $this->builder->buildDescriptor(new Collection($data->getVariableName() == '$this' ? array('$this') : $data->getTypes()));
     $descriptor->setTypes($types);
     return $descriptor;
 }