Class: Parameters

system.ioc. Parameters


new Parameters(parameters)

This collector register a parameters object reference, this object can be use to configurate the application with externals values.

Parameters:
Name Type Description
parameters Object

The object to evaluates.

Members


parameters :Object

Defines the parameters object reference of the application.

Type:
  • Object

Methods


contains(name)

Indicates if the parameters object contains the specified variable.

Parameters:
Name Type Description
name string

The name of the parameter to find.

Returns:

true if the passed-in name is register.


get(name, rest)

Returns the value of the specified variable in the parameters reference.

Parameters:
Name Type Argument Description
name string

The name of the variable to resolve in the parameters reference.

rest system.Evaluable <repeatable>

All Evaluable objects used to evaluates and initializes the value of the specified application arguments.

Returns:

the value of the specified variable in the Parameters object.

Example
var PropertyEvaluator = system.evaluators.PropertyEvaluator ;
var RomanEvaluator    = system.evaluators.RomanEvaluator ;
var Parameters        = system.ioc.Parameters ;

var obj = { id  : "XII" , metas : { count : 100 } } ;

var params = new Parameters( { value : "metas.count" } ) ;
var value  = params.get( "value" , new PropertyEvaluator(obj), new RomanEvaluator()) ;
trace( "result : " + value ) ;

toString()

Returns the string representation of this instance.

Returns:

the string representation of this instance.