IStringPropertyBuilder extends IBoundedPropertyBuilder
Property Builder used for string properties.
Make and use as many arguments as needed.
Table of Contents
setPattern() | Sets the validation pattern to use. | PropertyBuilder |
---|---|---|
getPattern() | Retrieve the pattern used to validate the value against. | string |
setMin() | Sets the minimum value/length | PropertyBuilder |
getMin() | Retrieve the minimum value or length. | float |
setMax() | Sets the maximum value/length | PropertyBuilder |
getMax() | Retrieve the maximum value or length | float |
getPrefix() | string | |
setPrefix() | void | |
getTag() | string | |
setTag() | void | |
getId() | Retrieve the optionally set unique identifier for this property. | int |
getCaption() | Get the property caption/label | string |
setCaption() | Sets the property caption/label | void |
getType() | Retrieve the property type | IPropertyType |
getFlags() | Retrieve the set of flags for this property | IPropertyFlags |
setFlags() | void | |
getName() | Retrieve the property name | string |
setName() | void | |
setDefaultValue() | Sets the default property value | PropertyBuilder |
getDefaultValue() | Retrieve the default value for some property | mixed |
addBehavior() | Sets callbacks to modify the property behavior | void |
getBehavior() | Retrieve callbacks for modifying property behavior | \buffalokiwi\magicgraph\property\IPropertyBehavior[] |
setConfig() | Sets some config array if needed. | PropertyBuilder |
getConfig() | Retrieve some arbitrary config array | array |
Methods
setPattern()
Sets the validation pattern to use.
public
setPattern(
$pattern :
string
)
: PropertyBuilder
Parameters
- $pattern : string
Regex
Return values
PropertyBuilder —this
getPattern()
Retrieve the pattern used to validate the value against.
public
getPattern(
)
: string
Return values
string —pattern
setMin()
Sets the minimum value/length
public
setMin(
$min :
float
)
: PropertyBuilder
Parameters
- $min : float
minimum
Tags
Return values
PropertyBuilder —$this
getMin()
Retrieve the minimum value or length.
public
getMin(
)
: float
Return values
float —minimum
setMax()
Sets the maximum value/length
public
setMax(
$max :
float
)
: PropertyBuilder
Parameters
- $max : float
maximum
Tags
Return values
PropertyBuilder —$this
getMax()
Retrieve the maximum value or length
public
getMax(
)
: float
Return values
float —maximum
getPrefix()
public
getPrefix(
)
: string
Return values
stringsetPrefix()
public
setPrefix(
$value :
string
)
: void
Parameters
- $value : string
getTag()
public
getTag(
)
: string
Return values
stringsetTag()
public
setTag(
$tag :
string
)
: void
Parameters
- $tag : string
getId()
Retrieve the optionally set unique identifier for this property.
public
getId(
)
: int
This may be zero if unassigned.
Return values
int —optional id
getCaption()
Get the property caption/label
public
getCaption(
)
: string
Return values
string —caption
setCaption()
Sets the property caption/label
public
setCaption(
$caption :
string
)
: void
Parameters
- $caption : string
caption
getType()
Retrieve the property type
public
getType(
)
: IPropertyType
Return values
IPropertyType —type
getFlags()
Retrieve the set of flags for this property
public
getFlags(
)
: IPropertyFlags
Return values
IPropertyFlags —flags
setFlags()
public
setFlags(
$flags :
IPropertyFlags
)
: void
Parameters
- $flags : IPropertyFlags
getName()
Retrieve the property name
public
getName(
)
: string
Return values
string —name
setName()
public
setName(
$name :
string
)
: void
Parameters
- $name : string
setDefaultValue()
Sets the default property value
public
setDefaultValue(
$value :
mixed
)
: PropertyBuilder
Parameters
- $value : mixed
Value
Return values
PropertyBuilder —This
getDefaultValue()
Retrieve the default value for some property
public
getDefaultValue(
)
: mixed
Return values
mixed —Default value
addBehavior()
Sets callbacks to modify the property behavior
public
addBehavior(
$behavior :
IPropertyBehavior
)
: void
Parameters
- $behavior : IPropertyBehavior
callbacks
getBehavior()
Retrieve callbacks for modifying property behavior
public
getBehavior(
)
: \buffalokiwi\magicgraph\property\IPropertyBehavior[]
Return values
\buffalokiwi\magicgraph\property\IPropertyBehavior[] —callbacks
setConfig()
Sets some config array if needed.
public
setConfig(
$config :
array
)
: PropertyBuilder
Parameters
- $config : array
Arbitrary config data
Return values
PropertyBuilder —this
getConfig()
Retrieve some arbitrary config array
public
getConfig(
)
: array
Return values
array —config