File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?php
22
3-
43namespace Ezweb \Workflow ;
54
6-
75class Parser
86{
97 public static function createFromJson (string $ json )
Original file line number Diff line number Diff line change 44
55class Condition extends Type
66{
7-
87 protected Condition \Operators \Operator $ operator ;
98
109 public static function getType (): string
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Ezweb \Workflow \Types ;
4+
5+ class InternalFunction extends Type
6+ {
7+ public static function getType (): string
8+ {
9+ return 'internalFunction ' ;
10+ }
11+ }
Original file line number Diff line number Diff line change 44
55class Operator extends Type
66{
7- public $ operands ;
8-
97 public static function getType (): string
108 {
119 return 'operator ' ;
1210 }
13-
14- public static function loadFromConfig (\stdClass $ config ): Type
15- {
16- $ object = new static ();
17-
18- foreach ($ config ->operands as $ operand ) {
19- $ op = \Ezweb \Workflow \Types \Providers \TypeProvider::getInstance ()->getClassFromType ($ operand ->type );
20- $ op = new $ op ();
21- $ op ->value = $ operand ->value ;
22- $ object ->operands [] = $ op ;
23- }
24-
25- return $ object ;
26- }
2711}
Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ public static function loadFromConfig(\stdClass $config): Type
1515 {
1616 $ object = new static ();
1717 $ object ->value = $ config ->value ;
18- dump ($ config );
1918 return $ object ;
2019 }
2120}
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ public static function loadFromConfig(\stdClass $config): Type
1313 {
1414 $ object = new static ();
1515 $ object ->value = $ config ->value ;
16- dump ($ config );
1716 return $ object ;
1817 }
1918}
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ public function init()
1717 $ this ->typeProvider ->register (Types \Condition::class);
1818 $ this ->typeProvider ->register (Types \Vars::class);
1919 $ this ->typeProvider ->register (Types \Value::class);
20+ $ this ->typeProvider ->register (Types \InternalFunction::class);
2021
2122 $ this ->typeProvider ->register (Types \Condition \Operators \All::class);
2223 $ this ->typeProvider ->register (Types \Condition \Operators \Any::class);
You can’t perform that action at this time.
0 commit comments