Skip to content

Commit fe4f5b0

Browse files
committed
internal_function
1 parent 14b8b3a commit fe4f5b0

7 files changed

Lines changed: 12 additions & 21 deletions

File tree

src/Parser.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<?php
22

3-
43
namespace Ezweb\Workflow;
54

6-
75
class Parser
86
{
97
public static function createFromJson(string $json)

src/Types/Condition.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
class Condition extends Type
66
{
7-
87
protected Condition\Operators\Operator $operator;
98

109
public static function getType(): string

src/Types/InternalFunction.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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+
}

src/Types/Operator.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,8 @@
44

55
class 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
}

src/Types/Value.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

src/Types/Vars.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

src/Workflow.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)