0 follower

Final Class Yiisoft\Proxy\Config\ParameterConfig

InheritanceYiisoft\Proxy\Config\ParameterConfig

Public Properties

Hide inherited properties

Property Type Description Defined By
$defaultValue mixed The actual value specified as default with corresponding type. Yiisoft\Proxy\Config\ParameterConfig
$defaultValueConstantName string|null A constant name for default value (when it's specified, {@see $isDefaultValueAvailable} and {@see $isDefaultValueConstant} must be true at the same time). Yiisoft\Proxy\Config\ParameterConfig
$isDefaultValueAvailable boolean Whether the default value available. Yiisoft\Proxy\Config\ParameterConfig
$isDefaultValueConstant boolean|null Whether the default value refers to a constant (when {@see $isDefaultValueAvailable} is true}). Yiisoft\Proxy\Config\ParameterConfig
$name string A name without dollar sign ($). Yiisoft\Proxy\Config\ParameterConfig
$type Yiisoft\Proxy\Config\TypeConfig|null Type config. Yiisoft\Proxy\Config\ParameterConfig

Public Methods

Hide inherited methods

Method Description Defined By
__construct() Yiisoft\Proxy\Config\ParameterConfig
hasType() Whether a parameter has type. Yiisoft\Proxy\Config\ParameterConfig

Property Details

Hide inherited properties

$defaultValue public property

The actual value specified as default with corresponding type. null means no default value (only when {@see $isDefaultValueAvailable} is false).

public mixed $defaultValue null
$defaultValueConstantName public property

A constant name for default value (when it's specified, {@see $isDefaultValueAvailable} and {@see $isDefaultValueConstant} must be true at the same time). null means no default value specified or it's not a constant (either {@see $isDefaultValueAvailable} or {@see $isDefaultValueConstant} is false).

$isDefaultValueAvailable public property

Whether the default value available.

$isDefaultValueConstant public property

Whether the default value refers to a constant (when {@see $isDefaultValueAvailable} is true}). null means no default value specified ({@see $isDefaultValueAvailable} is false).

$name public property

A name without dollar sign ($). For example: previousNodesCount.

public string $name null
$type public property

Type config. null means no type specified.

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( Yiisoft\Proxy\Config\TypeConfig|null $type, string $name, boolean $isDefaultValueAvailable, boolean|null $isDefaultValueConstant, string|null $defaultValueConstantName, mixed $defaultValue )
$type Yiisoft\Proxy\Config\TypeConfig|null
$name string
$isDefaultValueAvailable boolean
$isDefaultValueConstant boolean|null
$defaultValueConstantName string|null
$defaultValue mixed

                public function __construct(
    /**
     * @var TypeConfig|null Type config. `null` means no type specified.
     */
    public ?TypeConfig $type,
    /**
     * @var string A name without dollar sign (`$`). For example: `previousNodesCount`.
     */
    public string $name,
    /**
     * @var bool Whether the default value available.
     *
     * @link https://www.php.net/manual/en/functions.arguments.php#functions.arguments.default
     */
    public bool $isDefaultValueAvailable,
    /**
     * @var bool|null Whether the default value refers to a constant (when {@see $isDefaultValueAvailable} is
     * `true`}). `null` means no default value specified ({@see $isDefaultValueAvailable} is `false`).
     *
     * @link https://www.php.net/manual/en/language.constants.syntax.php
     */
    public ?bool $isDefaultValueConstant,
    /**
     * @var string|null A constant name for default value (when it's specified, {@see $isDefaultValueAvailable} and
     * {@see $isDefaultValueConstant} must be `true` at the same time). `null` means no default value specified or
     * it's not a constant (either {@see $isDefaultValueAvailable} or {@see $isDefaultValueConstant} is `false`).
     *
     * @link https://www.php.net/manual/en/language.constants.syntax.php
     */
    public ?string $defaultValueConstantName,
    /**
     * @var mixed The actual value specified as default with corresponding type. `null` means no default value (only
     * when {@see $isDefaultValueAvailable} is `false`).
     */
    public mixed $defaultValue,
) {
}

            
hasType() public method

Whether a parameter has type.

public boolean hasType ( )
return boolean

true if type specified and false otherwise.

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