\FieldsContainer

Fields Container

Check for required fields and parameters

Summary

Methods
Properties
Constants
__construct()
set()
get()
getType()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$data
$type
N/A

Properties

$data

$data : 

Type

$type

$type : 

Type

Methods

__construct()

__construct(mixed  $a) : void

New FieldsContainer

Set rules

Parameters

mixed $a

Rules

Examples

Examples of rules
[
        "CheckerAbout" => [
            ['name', 'about', 'id', 'dev'], 
            [
                "id" => new FieldChecker(['symbols' => 'a-zA-Z0-9'])
            ]
        ],
        "CheckerResult" => [
            ['main', 'details', 'info'], 
            [
                'main' => new FieldChecker(['numeric' => true, 'range' => [0, 3]]),
                'details' => new FieldsContainer(["array", "CheckerInstance"])
            ]
        ],
        "CheckerInstance" => [
            ['status', 'name', 'index'], 
            [
                'status' => new FieldChecker(['numeric' => true, 'range' => [0, 3]])
            ]
        ],
        "CheckerGeneral" => [
            ['main', 'all_instances', 'passed'],
            [
                'main' => new FieldChecker(['numeric' => true, 'range' => [0, 3]]),
                'all_instances' => new FieldChecker(['numeric' => true]),
                'passed' => new FieldChecker(['numeric' => true])
            ]
        ],
        "GeneralCheckers" => [
            ['status', 'info', 'checkers', 'all_instances', 'passed'],
            [
                'status' => new FieldChecker(['numeric' => true, 'range' => [0, 3]]),
                'all_instances' => new FieldChecker(['numeric' => true]),
                'passed' => new FieldChecker(['numeric' => true])
            ]
        ]

set()

set(  $a) 

Apply data

Apply fields to the object and check it

Parameters

$a

get()

get() 

getType()

getType()