0 follower

Final Class Yiisoft\Proxy\Config\MethodConfig

InheritanceYiisoft\Proxy\Config\MethodConfig

Public Properties

Hide inherited 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

Hide inherited methods

Method Description Defined By
__construct() Yiisoft\Proxy\Config\MethodConfig
hasReturnType() Whether a method has return type. Yiisoft\Proxy\Config\MethodConfig

Property Details

Hide inherited properties

$modifiers public property

A list of modifiers, for example: ['abstract', 'public'].

public string[] $modifiers null
$name public property

A name without parentheses. For example: getInstance.

public string $name null
$parameters public property

A map where key is a {@see \Yiisoft\Proxy\Config\ParameterConfig::$name} and value is {@see \Yiisoft\Proxy\Config\ParameterConfig} instance.

$returnType public property

Return type config. null means no return type specified.

Method Details

Hide inherited methods

__construct() public method

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,
) {
}

            
hasReturnType() public method

Whether a method has return type.

public boolean hasReturnType ( )
return boolean

true if return type specified and false otherwise.

                public function hasReturnType(): bool
{
    return $this->returnType !== null;
}