SilverStripeAustralia\Constraints\Constraint
Base class for all defined constraints defined
- Author: <marcus@silverstripe.com.au>
- License: BSD License http://www.silverstripe.org/bsd-license
Synopsis
class Constraint
{
- // methods
- public void __construct()
- protected void opt()
- public void setOption()
- public boolean holds()
- public string message()
- public string fieldLabel()
- public mixed getValue()
- public Constraint setValue()
Members
protected
- $field
—
string
The field / key this constraint is applied to - $object
—
mixed
The object or array this should be applied to. - $options
—
array
Options for the constraints - $value
—
mixed
In some cases, the constraint may be applied directly to a value
Methods
protected
public
- __construct()
- fieldLabel() — Get the label for the field this constraint is bound to
- getValue() — Gets the value this constraint is testing
- holds() — Does this constraint hold up for the current state of $this->object ?
- message() — Get the message for when this constraint doesn't hold up
- setOption() — Set an option
- setValue() — Set the value being tested