17
17
use Neos \ContentRepository \Core \CommandHandler \CommandHandlerInterface ;
18
18
use Neos \ContentRepository \Core \CommandHandler \CommandInterface ;
19
19
use Neos \ContentRepository \Core \ContentRepository ;
20
+ use Neos \ContentRepository \Core \DimensionSpace ;
20
21
use Neos \ContentRepository \Core \DimensionSpace \DimensionSpacePointSet ;
21
22
use Neos \ContentRepository \Core \EventStore \EventsToPublish ;
22
- use Neos \ContentRepository \Core \SharedModel \Exception \NodeConstraintException ;
23
+ use Neos \ContentRepository \Core \Feature \Common \ConstraintChecks ;
24
+ use Neos \ContentRepository \Core \Feature \Common \TetheredNodeInternals ;
23
25
use Neos \ContentRepository \Core \Feature \NodeCreation \Command \CreateNodeAggregateWithNode ;
24
26
use Neos \ContentRepository \Core \Feature \NodeCreation \Command \CreateNodeAggregateWithNodeAndSerializedProperties ;
27
+ use Neos \ContentRepository \Core \Feature \NodeCreation \NodeCreation ;
25
28
use Neos \ContentRepository \Core \Feature \NodeDisabling \Command \DisableNodeAggregate ;
26
29
use Neos \ContentRepository \Core \Feature \NodeDisabling \Command \EnableNodeAggregate ;
30
+ use Neos \ContentRepository \Core \Feature \NodeDisabling \NodeDisabling ;
27
31
use Neos \ContentRepository \Core \Feature \NodeModification \Command \SetNodeProperties ;
28
32
use Neos \ContentRepository \Core \Feature \NodeModification \Command \SetSerializedNodeProperties ;
33
+ use Neos \ContentRepository \Core \Feature \NodeModification \NodeModification ;
29
34
use Neos \ContentRepository \Core \Feature \NodeMove \Command \MoveNodeAggregate ;
35
+ use Neos \ContentRepository \Core \Feature \NodeMove \NodeMove ;
30
36
use Neos \ContentRepository \Core \Feature \NodeReferencing \Command \SetNodeReferences ;
31
37
use Neos \ContentRepository \Core \Feature \NodeReferencing \Command \SetSerializedNodeReferences ;
32
- use Neos \ContentRepository \Core \Feature \NodeRemoval \Command \RemoveNodeAggregate ;
33
- use Neos \ContentRepository \Core \Feature \NodeRenaming \Command \ChangeNodeAggregateName ;
34
- use Neos \ContentRepository \Core \Feature \NodeVariation \Command \CreateNodeVariant ;
35
- use Neos \ContentRepository \Core \Feature \RootNodeCreation \Command \CreateRootNodeAggregateWithNode ;
36
- use Neos \ContentRepository \Core \Feature \RootNodeCreation \RootNodeCreation ;
37
- use Neos \ContentRepository \Core \DimensionSpace ;
38
- use Neos \ContentRepository \Core \Feature \NodeTypeChange \Command \ChangeNodeAggregateType ;
39
- use Neos \ContentRepository \Core \Feature \Common \ConstraintChecks ;
40
- use Neos \ContentRepository \Core \Feature \NodeCreation \NodeCreation ;
41
- use Neos \ContentRepository \Core \Feature \NodeDisabling \NodeDisabling ;
42
- use Neos \ContentRepository \Core \Feature \NodeModification \NodeModification ;
43
- use Neos \ContentRepository \Core \Feature \NodeMove \NodeMove ;
44
38
use Neos \ContentRepository \Core \Feature \NodeReferencing \NodeReferencing ;
39
+ use Neos \ContentRepository \Core \Feature \NodeRemoval \Command \RemoveNodeAggregate ;
45
40
use Neos \ContentRepository \Core \Feature \NodeRemoval \NodeRemoval ;
41
+ use Neos \ContentRepository \Core \Feature \NodeRenaming \Command \ChangeNodeAggregateName ;
46
42
use Neos \ContentRepository \Core \Feature \NodeRenaming \NodeRenaming ;
43
+ use Neos \ContentRepository \Core \Feature \NodeTypeChange \Command \ChangeNodeAggregateType ;
47
44
use Neos \ContentRepository \Core \Feature \NodeTypeChange \NodeTypeChange ;
45
+ use Neos \ContentRepository \Core \Feature \NodeVariation \Command \CreateNodeVariant ;
48
46
use Neos \ContentRepository \Core \Feature \NodeVariation \NodeVariation ;
49
- use Neos \ContentRepository \Core \Feature \Common \TetheredNodeInternals ;
50
- use Neos \ContentRepository \Core \Projection \ContentGraph \NodeAggregate ;
51
- use Neos \ContentRepository \Core \NodeType \NodeTypeManager ;
47
+ use Neos \ContentRepository \Core \Feature \RootNodeCreation \Command \CreateRootNodeAggregateWithNode ;
48
+ use Neos \ContentRepository \Core \Feature \RootNodeCreation \RootNodeCreation ;
52
49
use Neos \ContentRepository \Core \Infrastructure \Property \PropertyConverter ;
50
+ use Neos \ContentRepository \Core \NodeType \NodeTypeManager ;
51
+ use Neos \ContentRepository \Core \Projection \ContentGraph \NodeAggregate ;
52
+ use Neos \ContentRepository \Core \SharedModel \Exception \NodeConstraintException ;
53
53
54
54
/**
55
55
* @internal from userland, you'll use ContentRepository::handle to dispatch commands
@@ -106,23 +106,9 @@ public function __construct(
106
106
107
107
public function canHandle (CommandInterface $ command ): bool
108
108
{
109
- return $ command instanceof SetNodeProperties
110
- || $ command instanceof SetSerializedNodeProperties
111
- || $ command instanceof SetNodeReferences
112
- || $ command instanceof SetSerializedNodeReferences
113
- || $ command instanceof ChangeNodeAggregateType
114
- || $ command instanceof RemoveNodeAggregate
115
- || $ command instanceof CreateNodeAggregateWithNode
116
- || $ command instanceof CreateNodeAggregateWithNodeAndSerializedProperties
117
- || $ command instanceof MoveNodeAggregate
118
- || $ command instanceof CreateNodeVariant
119
- || $ command instanceof CreateRootNodeAggregateWithNode
120
- || $ command instanceof DisableNodeAggregate
121
- || $ command instanceof EnableNodeAggregate
122
- || $ command instanceof ChangeNodeAggregateName;
109
+ return method_exists ($ this , 'handle ' . (new \ReflectionClass ($ command ))->getShortName ());
123
110
}
124
111
125
- /** @codingStandardsIgnoreStart */
126
112
public function handle (CommandInterface $ command , ContentRepository $ contentRepository ): EventsToPublish
127
113
{
128
114
// @phpstan-ignore-next-line
@@ -143,7 +129,6 @@ public function handle(CommandInterface $command, ContentRepository $contentRepo
143
129
ChangeNodeAggregateName::class => $ this ->handleChangeNodeAggregateName ($ command ),
144
130
};
145
131
}
146
- /** @codingStandardsIgnoreStop */
147
132
148
133
protected function getNodeTypeManager (): NodeTypeManager
149
134
{
@@ -253,4 +238,5 @@ protected function checkConstraintsImposedByAncestors(ChangeNodeAggregateType $c
253
238
}
254
239
}
255
240
}
241
+
256
242
}
0 commit comments