-
-
Notifications
You must be signed in to change notification settings - Fork 0
Documentation
Emre Sokullu edited this page Jan 16, 2018
·
5 revisions
https://github.com/phonetworks/pho-compiler/blob/master/src/Pho/Compiler/V1/FieldAnalyzer.php
$dirs = [
"md5" => false,
"now" => false,
"default" => Compiler::NO_VALUE_SET
];
$constraints = [
"minLength" => null, // string
"maxLength" => null, // string
"uuid" => null, // string
"regex" => null, // string
"greaterThan" => null, // int
"lessThan" => null, // int
"format" => null, // string
];
see https://github.com/phonetworks/pho-framework/blob/master/src/Pho/Framework/FieldHelper.php for processing of these constraints.
https://github.com/webmozart/assert is used to assert constraints.
https://github.com/vlucas/valitron is used to assert format constraints. Possible formats are:
"numeric",
"ip",
"email",
"url",
"creditCard"
protected static $prototype_functions = [
"expires"=>"setExpires",
"volatile"=>"setVolatile",
"revisionable"=>"setRevisionable",
"editable"=>"setEditable"
];
protected static $prototype_functions = [
"binding"=>"setBinding",
"multiplicable"=>"setMultiplicable",
"persistent"=>"setPersistent",
"consumer"=>"setConsumer",
"notifier"=>"setNotifier",
"subscriber"=>"setSubscriber",
"formative"=>"setFormative"
];
protected static $prototype_functions = [
"head"=>"setHeadNodes",
"head_exclusive"=>"setHeadNodesOnly",
"tail"=>"setTailNode"
];
File -> Entity -> {Node, Edge} ..... -> Directive (with Arguments, see below) -> Field (see below)
Directive has Arguments Node => Edges, Permissions, Properties Edge => Labels, Nodes, Properties
Fields have Directives, and Constraints (see above)