BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
ParamProcessor\IParamDefinition Interface Reference
Inheritance diagram for ParamProcessor\IParamDefinition:

Public Member Functions

 addAliases ($aliases)
 
 addDependencies ($dependencies)
 
 format (IParam $param, array &$definitions, array $params)
 
 getAliases ()
 
 getDefault ()
 
 getDelimiter ()
 
 getDependencies ()
 
 getMessage ()
 
 getName ()
 
 getType ()
 
 hasAlias ($alias)
 
 hasDependency ($dependency)
 
 isList ()
 
 isRequired ()
 
 setDefault ($default, $manipulate=true)
 
 setDelimiter ($delimiter)
 
 setDoManipulationOfDefault ($manipulateDefault)
 
 setMessage ($message)
 
 shouldManipulateDefault ()
 
 getTypeMessage ()
 
 trimDuringClean ()
 
 getValueParser ()
 
 setValueParser (ValueParser $parser)
 
 getValueValidator ()
 
 setValueValidator (ValueValidator $validator)
 
 setValidationCallback ($validationFunction)
 
 setArrayValues (array $options)
 
 getValidationCallback ()
 

Detailed Description

Interface for parameter definition classes.

Since
1.0
Deprecated:
since 1.0, use ParamDefinition

GNU GPL v2+

Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >

Member Function Documentation

ParamProcessor\IParamDefinition::addAliases (   $aliases)

Adds one or more aliases for the parameter name.

Since
1.0
Parameters
string|string[]$aliases

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::addDependencies (   $dependencies)

Adds one or more dependencies. There are the names of parameters that need to be validated and formatted before this one.

Since
1.0
Parameters
string|string[]$dependencies

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::format ( IParam  $param,
array &  $definitions,
array  $params 
)

Formats the parameter value to it's final result.

Since
1.0
Parameters
$paramIParam
$definitionsarray of IParamDefinition
$paramsarray of IParam

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::getAliases ( )

Returns the parameter name aliases.

Since
1.0
Returns
string[]

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::getDefault ( )

Returns the default value.

Since
1.0
Returns
mixed

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::getDelimiter ( )

Returns the delimiter to use to split the raw value in case the parameter is a list.

Since
1.0
Returns
string

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::getDependencies ( )

Returns a list of dependencies the parameter has, in the form of other parameter names.

Since
1.0
Returns
string[]

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::getMessage ( )

Returns a message that will act as a description message for the parameter.

Since
1.0
Returns
string

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::getName ( )

Returns the parameters main name.

Since
1.0
Returns
string

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::getType ( )

Returns an identifier for the type of the parameter.

Since
1.0
Returns
string

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::getTypeMessage ( )

Returns a message key for a message describing the parameter type.

Since
1.0
Returns
string

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::getValidationCallback ( )

Returns a validation function that should be run before the ValueValidator.

Since
1.0
Returns
callable|null

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::getValueParser ( )

Returns a ValueParser object to parse the parameters value.

Since
1.0
Returns
ValueParser

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::getValueValidator ( )

Returns a ValueValidator that can be used to validate the parameters value.

Since
1.0
Returns
ValueValidator

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::hasAlias (   $alias)

Returns if the parameter has a certain alias.

Since
1.0
Parameters
string$alias
Returns
boolean

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::hasDependency (   $dependency)

Returns if the parameter has a certain dependency.

Since
1.0
Parameters
string$dependency
Returns
boolean

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::isList ( )

Returns if the parameter is a list or not.

Since
1.0
Returns
boolean

Implemented in ParamProcessor\ParamDefinition, BSNamespaceListParam, and BSTitleListParam.

ParamProcessor\IParamDefinition::isRequired ( )

Returns if the parameter is a required one or not.

Since
1.0
Returns
boolean

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::setArrayValues ( array  $options)

Sets the parameter definition values contained in the provided array.

Since
1.0
Parameters
array$options

Implemented in ParamProcessor\ParamDefinition, Maps\ServiceParam, and ParamProcessor\Definition\StringParam.

ParamProcessor\IParamDefinition::setDefault (   $default,
  $manipulate = true 
)

Sets the default parameter value. Null indicates no default, and therefore makes the parameter required.

Since
1.0
Parameters
mixed$default
boolean$manipulateShould the default be manipulated or not? Since 0.4.6.

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::setDelimiter (   $delimiter)

Sets the delimiter to use to split the raw value in case the parameter is a list.

Since
1.0
Parameters
$delimiterstring

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::setDoManipulationOfDefault (   $manipulateDefault)

Set if the parameter manipulations should be applied to the default value.

Since
1.0
Parameters
boolean$manipulateDefault

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::setMessage (   $message)

Sets a message for the parameter that will act as description. This should be a message key, ie something that can be passed to wfMsg. Not an actual text. If you do not have a message key, but only a text, use setDescription instead.

Since
1.0
Parameters
string$message

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::setValidationCallback (   $validationFunction)

Sets a validation function that will be run before the ValueValidator.

This can be used instead of a ValueValidator where validation is very trivial, ie checking if something is a boolean can be done with is_bool.

Since
1.0
Parameters
callable$validationFunction

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::setValueParser ( ValueParser  $parser)

Returns the ValueParser object to parse the parameters value.

Since
1.0
Parameters
ValueParser$parser

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::setValueValidator ( ValueValidator  $validator)

Sets the ValueValidator that can be used to validate the parameters value.

Since
1.0
Parameters
ValueValidator$validator

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::shouldManipulateDefault ( )

Returns if the parameter manipulations should be applied to the default value.

Since
1.0
Returns
boolean

Implemented in ParamProcessor\ParamDefinition.

ParamProcessor\IParamDefinition::trimDuringClean ( )

Returns if the value should be trimmed before validation and any further processing.

See Also
IParamDefinition::trimDuringClean
Since
1.0
boolean|null

Implemented in ParamProcessor\ParamDefinition.


The documentation for this interface was generated from the following file: