Test Schema

Configuration Documentation

Table of Contents

Directive

Other custom options with directives.

Directive.Allowed

TypeString
Allowed values "apple", "orange", "pear", "peach", "mango"
Default
'apple'
This directive has a constrained set of allowed values.

Directive.Deprecated

TypeInteger
Default
0
Warning: This directive was deprecated in version 1.0.0. %Directive.Allowed should be used instead.
This is a deprecated directive that shouldn't show up on the form.

Type

Directives demonstration the variable types ConfigSchema supports.

Type.bool

TypeBoolean
Default
false
The boolean type is true or false.

Type.float

TypeFloat
Default
3.1415
The float type is a floating point number.

Type.hash

TypeAssociative array
Default
array (
  'key1' => 'val1',
  'key2' => 'val2',
)
The hash type is an associative array of string keys and string values.

Type.int

TypeInteger
Default
23
The int type is an signed integer.

Type.istring

TypeCase-insensitive string
Default
'case insensitive'
The istring type is short (no newlines), must be ASCII and is case-insensitive.

Type.itext

TypeCase-insensitive text
Default
'case
insensitive
and
possibly
quite
long'
The text type has newlines, must be ASCII and is case-insensitive.

Type.list

TypeArray list
Default
array (
  0 => 'item1',
  1 => 'item2',
)
The list type is a numerically indexed array of strings.

Type.lookup

TypeLookup array
Default
array (
  'key1' => true,
  'key2' => true,
)
The lookup type acts just like list, except its elements are unique and are checked with isset($var[$key]).

Type.mixed

TypeMixed
Default
stdClass::__set_state(array(
))
The mixed type allows any type, and is not form-editable.

Type.nullbool

TypeBoolean (or null)
Default
NULL
Null booleans need to be treated a little specially. See %Type.nullstring for information on what the null flag does.

Type.nullstring

TypeString (or null)
Default
NULL
The null type is not a type, but a flag that can be added to any type making null a valid value for that entry. It's useful for saying, "Let the software pick the value for me," or "Don't use this element" when false has a special meaning.

Type.string

TypeString
Default
'Case sensitive'
The string type is short (no newlines) and case-sensitive.

Type.text

TypeText
Default
'Case sensitive
and
possibly
quite long...'
The text type has newlines and is case-sensitive.