-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex-testing.php
More file actions
39 lines (32 loc) · 1.23 KB
/
index-testing.php
File metadata and controls
39 lines (32 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/**
* Index
* Simply for testing environment and example.
* @author Valentin Ruskevych
*/
/**
* Autoloader initialization
*/
require_once(dirname(__FILE__).'/Environment/SplClassLoader.php');
$autoloader = new SplClassLoader(null, dirname(__FILE__));
$autoloader->register();
/**
* Validation Subject Initialization
*/
$validator = new Library\Validator\ValidatorSubject();
var_dump($validator);
// new workflow as of 29.06.2014
// Validator is a PROXY to access others methods and encapsulate objects(commander)
// Validator create FieldSet object (storage for field objects).
// createField using proxy calls FieldSet createField, fields set creates field and stores within and returns field.
// this will be the configuration support by calling methods.
// error object needs to be used within validatorSubject. implements arrayAccess and countable !
// The rest of methods sets the properties on a building object
// Then get result from builder, that is the field object.
// Attach object to Validator through Proxy.
// Attach Data to Validator through Proxy
// Run the validation process through Proxy !
// validator instantiation
// validator -> set config
// validator -> set data
// validator -> run process