Parameter
class Parameter
This class allows the storage and retrieval of the attributes of a parameter.
A parameter is the way to pass on values of data or constants either to parameterized queries upon a data source or as the parameter of the web service url of a data source. Therefore, a parameter is always associated with a source.
Properties
private Source | $source | ||
private string | $type | ||
private string | $origin | ||
private string | $name | ||
private string | $format | ||
private int | $data | ||
private string | $constant | ||
private bool | $optional |
Methods
Returns the type of this parameter.
Sets the type of this parameter.
Returns the origin of this parameter
Sets the origin of this parameter
Returns the name of this parameter
Sets the name of this parameter
Returns the format in which the parameter must be provided. Useful only for a parameter of type date.
Sets the format in which the parameter must be provided. Useful only for a parameter of type date.
Returns the id of the data item associated with this parameter. Useful only if origin is equal to 'data'.
Sets the id of the data item associated with this parameter. Useful only if origin is equal to 'data'.
Returns the constant value of this parameter. Useful only if origin is equal to 'constant'.
Sets the constant value of this parameter. Useful only if origin is equal to 'constant'.
Returns the optional attribute of this parameter.
Returns the optional attribute of this parameter.
Determines whether this parameter is optional or not.
Details
at line 113
void
__construct(Source $source, string $type)
Constructor of class Parameter
at line 125
Source
getSource()
Returns the Source object that uses this parameter.
at line 144
string
getType()
Returns the type of this parameter.
The possible values are:
- queryString: The parameter is part of the queryString of the url (if the source is a web service with method "GET")
- path: the parameter is part of the path of the url (if the source is a web service)
- data: the parameter is a POST data (if the source is a web service with method "POST")
- columnValue: the parameter is in the where clause of an SQL query (if the source is an internal or external database).
- header: the parameter is a HTTP header (if the source is a web service).
at line 164
void
setType(string $type)
Sets the type of this parameter.
The possible values are:
- queryString: The parameter is part of the queryString of the url (if the source is a web service with method "GET")
- path: the parameter is part of the path of the url (if the source is a web service)
- data: the parameter is a POST data (if the source is a web service with method "POST")
- columnValue: the parameter is in the where clause of a SQL request (if the source is an internal or external database).
- header: the parameter is a HTTP header (if the source is a web service).
at line 180
string
getOrigin()
Returns the origin of this parameter
The possible values are:
- data: the content of this parameter is the value of the data item associated with it.
- constant: the content of this parameter is a constant value.
at line 197
void
setOrigin(string $origin)
Sets the origin of this parameter
The possible values are:
- data: the content of this parameter is the value of the data item associated with it.
- constant: the content of this parameter is a constant value.
at line 210
string
getName()
Returns the name of this parameter
at line 222
void
setName(string $name)
Sets the name of this parameter
at line 235
string
getFormat()
Returns the format in which the parameter must be provided. Useful only for a parameter of type date.
at line 249
void
setFormat(string $format)
Sets the format in which the parameter must be provided. Useful only for a parameter of type date.
at line 260
int
getData()
Returns the id of the data item associated with this parameter. Useful only if origin is equal to 'data'.
at line 272
void
setData(int $data)
Sets the id of the data item associated with this parameter. Useful only if origin is equal to 'data'.
at line 283
string
getConstant()
Returns the constant value of this parameter. Useful only if origin is equal to 'constant'.
at line 295
void
setConstant(string $constant)
Sets the constant value of this parameter. Useful only if origin is equal to 'constant'.
at line 308
bool
isOptional()
Returns the optional attribute of this parameter.
An optional parameter with no value is not passed to the parameterized query or not inserted in the url.
at line 321
bool
getOptional()
Returns the optional attribute of this parameter.
An optional parameter with no value is not passed to the parameterized query or not inserted in the url.
at line 335
void
setOptional(bool $optional)
Determines whether this parameter is optional or not.
An optional parameter with no value is not passed to the parameterized query or not inserted in the url.