Strata\Model\Validator\Validator
A base class for Validator objects.
Synopsis
class Validator
{
- // members
- protected string $errorMessage = "There has been an error with this field.";
- // methods
- public static void getNamespaceStringInStrata()
- public static void getClassNameSuffix()
- public static void getFactoryScopes()
- public void init()
- public boolean test()
- public [type] getMessage()
- public string setMessage()
- protected void getTextdomain()
- // Inherited methods from StrataObjectTrait
- public static mixed factory()
- public static array getFactoryScopes()
- public static mixed staticFactory()
- public static string generateClassPath()
- public static string getClassNameSuffix()
- public static string getNamespaceStringInStrata()
- public static string generateClassName()
- public string getShortName()
- // Inherited methods from StrataConfigurableTrait
- public mixed getConfig()
- public mixed extractConfig()
- public mixed setConfig()
- public void configure()
- public mixed hasConfig()
- public boolean containsConfigurations()
- public array getConfiguration()
- protected null normalizeConfiguration()
Hierarchy
Members
protected
-
$configuration
—
array
The configuration cache. - $errorMessage — string
Methods
protected
public
- getClassNameSuffix()
- getFactoryScopes()
- getMessage() — Fetches the global error message for this validation.
- getNamespaceStringInStrata()
- init() — Initiates the validator object. Useful for inheritance and translating error labels.
- setMessage() — Sets the global error message for this validation.
- test() — The actual test function.
Inherited from Strata\Core\StrataObjectTrait
public
- factory() — Instantiates an object that uses the StrataObjectTrait which class name matches the $name value.
- generateClassName() — Generates a valid class name from the $name value.
- generateClassPath() — Generates a possible namespace and classname combination of a Strata objecy. Mainly used to avoid hardcoding the '\\View\\Helper\\' string everywhere (or whatever else would the namespace have been).
- getClassNameSuffix() — Returns the default class name suffix for this object.
- getFactoryScopes() — Returns scopes in which Strata will look in to load objects.
- getNamespaceStringInStrata() — Returns the default namespace path.
- getShortName() — Returns this object's class name without the full namespace.
- staticFactory() — Instantiates an object of the current class.
Inherited from Strata\Core\StrataConfigurableTrait
protected
- normalizeConfiguration() — Normalizes the configuration cache. This will only run once on the object. It is mainly a safegard against a badly configured value cache.
public
- configure() — Instantiate the configuration cache to the state supplied by $config.
- containsConfigurations() — Returns whether the configuration cache contains something.
- extractConfig() — Intelligently extract data from the configuration array.
- getConfig() — Fetches a value in the configuration array
- getConfiguration() — Returns the object's complete configuration cache.
- hasConfig() — Confirms the presence of a value in the custom post type's configuration array
- setConfig() — Saves a value in the object's configuration array for the duration of the runtime.