本文整理汇总了PHP中Phan\Language\FQSEN\FullyQualifiedFunctionName::getName方法的典型用法代码示例。如果您正苦于以下问题:PHP FullyQualifiedFunctionName::getName方法的具体用法?PHP FullyQualifiedFunctionName::getName怎么用?PHP FullyQualifiedFunctionName::getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phan\Language\FQSEN\FullyQualifiedFunctionName
的用法示例。
在下文中一共展示了FullyQualifiedFunctionName::getName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: functionListFromSignature
/**
* @return Func[]
* One or more (alternate) methods begotten from
* reflection info and internal method data
*/
public static function functionListFromSignature(CodeBase $code_base, FullyQualifiedFunctionName $fqsen, array $signature) : array
{
$context = new Context();
$return_type = UnionType::fromStringInContext(array_shift($signature), $context);
$func = new Func($context, $fqsen->getName(), $return_type, 0, $fqsen);
return self::functionListFromFunction($func, $code_base);
}
示例2: 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;
}
示例3: methodListFromSignature
/**
* @return Method[]
* One or more (alternate) methods begotten from
* reflection info and internal method data
*/
public static function methodListFromSignature(CodeBase $code_base, FullyQualifiedFunctionName $fqsen, array $signature) : array
{
$context = new Context();
$return_type = UnionType::fromStringInContext(array_shift($signature), $context);
$method = new Method($context, $fqsen->getName(), $return_type, 0);
$method->setFQSEN($fqsen);
return self::methodListFromMethod($method, $code_base);
}