A property is a basic class that has a value and a default value.
It provides functionality to handle the value :
- Set current value to a new value
- Reset current value (make empty)
- Set current value to default
- Get value (read out)
- Check if value is empty
Methods
Constructor, initialises an instance of Formaid_Property class
__construct(string $property_name, string $current_value, string $default_value) : void
Defines current value and default value.
Parameters
$property_name
stringProperty name
$current_value
stringCurrent value
$default_value
stringDefault value
Disables trimming whitespace of object name
disableTrimName() : void
Inherited
| inherited_from |
\Formaid_Object::disableTrimName() |
Display object
display() : void
Inherited
The name of the object is printed to stdout.
| inherited_from |
\Formaid_Object::display() |
Enables trimming whitespace of object name
enableTrimName() : void
Inherited
| inherited_from |
\Formaid_Object::enableTrimName() |
Get display seperator
getDisplaySeparator() : string
Returns
stringString separating columns
return Display string
getDisplayString(bool $withValue, bool $discardEmptyValue) : string
Parameters
$withValue
boolappend value to column
(optional, default : true)
$discardEmptyValue
booldiscard columns with empty values
(optional, default : false)
Returns
stringformatted object string
Returns name of the object
getName() : string
Inherited
| inherited_from |
\Formaid_Object::getName() |
Returns
stringobject name
Returns current value
getValue() : string
Returns
stringcurrent value
Checks if current value is empty
isEmpty() : bool
Returns
booltrue if empty
Checks if object name is empty
isNameEmpty() : bool
Inherited
| inherited_from |
\Formaid_Object::isNameEmpty() |
Returns
booltrue if empty
Resets current value
resetValue() : void
Sets current value to default
setDefault(string $value) : void
When the parameter is set,
the default value is changed to the new default value.
Then the current value is set to the (new) default value.
Parameters
$value
stringNew default value
Sets new name for the object
setName(string $new_name) : void
Inherited
| inherited_from |
\Formaid_Object::setName() |
Parameters
Sets current value to new value
setValue(string $new_value) : void
Parameters
$new_value
stringNew value
Show object
show() : void
Inherited
The name of the object is printed to stdout.
| inherited_from |
\Formaid_Object::show() |
Returns name formatted for displaying
getDisplayName() : string
Inherited
| inherited_from |
\Formaid_Object::getDisplayName() |
Returns
stringformatted object name
Returns value formatted for displaying
getDisplayValue() : string
Returns
stringformatted object value
Properties
$displaySeparator : string
$encoding : string
Inherited
| access |
protected |
| inherited_from |
\Formaid_Object::$$encoding |
$name : string
Inherited
| access |
protected |
| inherited_from |
\Formaid_Object::$$name |
$_trimName : bool
Inherited
| access |
private |
| inherited_from |
\Formaid_Object::$$_trimName |