PHP Class AppserverIo\Appserver\Core\Api\Node\ParamNode

Inheritance: extends AppserverIo\Description\Api\Node\AbstractValueNode
Show file Open project: appserver-io/appserver Class Usage Examples

Protected Properties

Property Type Description
$constant string TRUE if the value is a constant.
$env string TRUE if the value is an environment variable.
$name string The paramss name.
$type string The params data type.

Public Methods

Method Description
__construct ( string $name = '', string $type = '', AppserverIo\Configuration\Interfaces\ValueInterface $nodeValue = null, boolean $constant = false, boolean $env = false ) Initializes the param node with the necessary data.
castToType ( ) : mixed Casts the params value to the defined type and returns it.
getName ( ) : string Returns the param name.
getPrimaryKey ( ) : string Returns the nodes primary key, the name by default.
getType ( ) : string Returns the param type.
isConstant ( ) : boolean Returns the TRUE if the value is a constant, else FALSE.
isEnv ( ) : boolean Returns the TRUE if the value is an environment variable, else FALSE.

Method Details

__construct() public method

Initializes the param node with the necessary data.
public __construct ( string $name = '', string $type = '', AppserverIo\Configuration\Interfaces\ValueInterface $nodeValue = null, boolean $constant = false, boolean $env = false )
$name string The params name
$type string The params data type
$nodeValue AppserverIo\Configuration\Interfaces\ValueInterface The params initial value
$constant boolean TRUE if the value is a constant, else FALSE
$env boolean TRUE if the value is an environment variable, else FALSE

castToType() public method

Casts the params value to the defined type and returns it.
public castToType ( ) : mixed
return mixed The casted value

getName() public method

Returns the param name.
public getName ( ) : string
return string The param name

getPrimaryKey() public method

Returns the nodes primary key, the name by default.
See also: AppserverIo\Appserver\Core\Api\Node\AbstractNode::getPrimaryKey()
public getPrimaryKey ( ) : string
return string The nodes primary key

getType() public method

Returns the param type.
public getType ( ) : string
return string The param type

isConstant() public method

Returns the TRUE if the value is a constant, else FALSE.
public isConstant ( ) : boolean
return boolean TRUE if the value is a constant, else FALSE

isEnv() public method

Returns the TRUE if the value is an environment variable, else FALSE.
public isEnv ( ) : boolean
return boolean TRUE if the value is an environment variable, else FALSE

Property Details

$constant protected property

TRUE if the value is a constant.
protected string $constant
return string

$env protected property

TRUE if the value is an environment variable.
protected string $env
return string

$name protected property

The paramss name.
protected string $name
return string

$type protected property

The params data type.
protected string $type
return string