示例#1
0
 /**
  * Gets field type
  *
  * @return  string
  */
 public function getTypeName()
 {
     $raw = $this->_reflect->getDocComment();
     if (false === $raw) {
         if ($details = \lang\XPClass::detailsForField($this->_reflect->getDeclaringClass()->getName(), $this->_reflect->getName())) {
             if (isset($details[DETAIL_ANNOTATIONS]['type'])) {
                 return $details[DETAIL_ANNOTATIONS]['type'];
             }
         }
     } else {
         if (preg_match('/@(var|type)\\s*([^\\r\\n]+)/', $raw, $matches)) {
             return ClassParser::typeIn($matches[2]);
         }
     }
     return 'var';
 }