コード例 #1
0
 /**
  * @param string $types
  * @return ComplexTypeParser[]
  */
 public static function create($types)
 {
     preg_match_all('#@(\\((?:.+)\\)|(?:.+?))(?: |$)#', $types, $matches);
     $typesArray = $matches[1];
     $obj = array_map(function ($type) {
         if (ComplexTypeParser::isReflectionType($type)) {
             $type = str_replace(array('(', ')'), '', $type);
         } else {
             $type = str_replace('=', ' ', $type);
         }
         $parser = new ParameterParser($type, '');
         return $parser->parse();
     }, $typesArray);
     return $obj;
 }