當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FullyQualifiedMethodName::getName方法代碼示例

本文整理匯總了PHP中Phan\Language\FQSEN\FullyQualifiedMethodName::getName方法的典型用法代碼示例。如果您正苦於以下問題:PHP FullyQualifiedMethodName::getName方法的具體用法?PHP FullyQualifiedMethodName::getName怎麽用?PHP FullyQualifiedMethodName::getName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Phan\Language\FQSEN\FullyQualifiedMethodName的用法示例。


在下文中一共展示了FullyQualifiedMethodName::getName方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: internalFunctionSignatureMapForFQSEN

 /**
  * A list of types for parameters associated with the
  * given builtin function with the given name
  *
  * @param FullyQualifiedMethodName|FullyQualifiedFunctionName $function_fqsen
  *
  * @see internal_varargs_check
  * Formerly `function internal_varargs_check`
  */
 public static function internalFunctionSignatureMapForFQSEN($function_fqsen) : array
 {
     $context = new Context();
     $map = self::internalFunctionSignatureMap();
     if ($function_fqsen instanceof FullyQualifiedMethodName) {
         $class_fqsen = $function_fqsen->getFullyQualifiedClassName();
         $class_name = $class_fqsen->getName();
         $function_name = $class_name . '::' . $function_fqsen->getName();
     } else {
         $function_name = $function_fqsen->getName();
     }
     $function_name_original = $function_name;
     $alternate_id = 0;
     $configurations = [];
     while (isset($map[$function_name])) {
         // Get some static data about the function
         $type_name_struct = $map[$function_name];
         if (empty($type_name_struct)) {
             continue;
         }
         // Figure out the return type
         $return_type_name = array_shift($type_name_struct);
         $return_type = $return_type_name ? UnionType::fromStringInContext($return_type_name, $context) : null;
         $name_type_name_map = $type_name_struct;
         $property_name_type_map = [];
         foreach ($name_type_name_map as $name => $type_name) {
             $property_name_type_map[$name] = empty($type_name) ? new UnionType() : UnionType::fromStringInContext($type_name, $context);
         }
         $configurations[] = ['return_type' => $return_type, 'property_name_type_map' => $property_name_type_map];
         $function_name = $function_name_original . '\'' . ++$alternate_id;
     }
     return $configurations;
 }
開發者ID:zhangf911,項目名稱:phan,代碼行數:42,代碼來源:UnionType.php


注:本文中的Phan\Language\FQSEN\FullyQualifiedMethodName::getName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。