Final Class Yiisoft\Proxy\Config\MethodConfig
| Inheritance | Yiisoft\Proxy\Config\MethodConfig |
|---|
Public Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $modifiers | string[] | A list of modifiers, for example: ['abstract', 'public']. |
Yiisoft\Proxy\Config\MethodConfig |
| $name | string | A name without parentheses. | Yiisoft\Proxy\Config\MethodConfig |
| $parameters | Yiisoft\Proxy\Config\ParameterConfig[] | A map where key is a {@see \Yiisoft\Proxy\Config\ParameterConfig::$name} and value is {@see \Yiisoft\Proxy\Config\ParameterConfig} instance. | Yiisoft\Proxy\Config\MethodConfig |
| $returnType | Yiisoft\Proxy\Config\TypeConfig|null | Return type config. | Yiisoft\Proxy\Config\MethodConfig |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Proxy\Config\MethodConfig | |
| hasReturnType() | Whether a method has return type. | Yiisoft\Proxy\Config\MethodConfig |
Property Details
A list of modifiers, for example: ['abstract', 'public'].
A name without parentheses. For example: getInstance.
A map where key is a {@see \Yiisoft\Proxy\Config\ParameterConfig::$name} and value is {@see \Yiisoft\Proxy\Config\ParameterConfig} instance.
Return type config. null means no return type specified.
Method Details
| public mixed __construct ( array $modifiers, string $name, array $parameters, Yiisoft\Proxy\Config\TypeConfig|null $returnType ) | ||
| $modifiers | array | |
| $name | string | |
| $parameters | array | |
| $returnType | Yiisoft\Proxy\Config\TypeConfig|null | |
public function __construct(
/**
* @var string[] A list of modifiers, for example: `['abstract', 'public']`.
*/
public array $modifiers,
/**
* @var string A name without parentheses. For example: `getInstance`.
*/
public string $name,
/**
* @var ParameterConfig[] A map where key is a {@see ParameterConfig::$name} and value is {@see ParameterConfig}
* instance.
* @psalm-var array<string, ParameterConfig>
*/
public array $parameters,
/**
* @var TypeConfig|null Return type config. `null` means no return type specified.
*/
public ?TypeConfig $returnType,
) {
}
Whether a method has return type.
| public boolean hasReturnType ( ) | ||
| return | boolean |
|
|---|---|---|
public function hasReturnType(): bool
{
return $this->returnType !== null;
}
Signup or Login in order to comment.