1 | <?php |
||
22 | class EntityStoreEntityHandler implements EntityPageHandler { |
||
23 | |||
24 | private $entityStore; |
||
25 | |||
26 | 1 | public function __construct( EntityStore $entityStore ) { |
|
29 | |||
30 | 1 | public function getHandlingMessage( EntityDocument $entity ): string { |
|
33 | |||
34 | 1 | public function handleEntityPage( EntityDocument $entity, EntityPage $entityPage ) { |
|
44 | |||
45 | 1 | private function itemRowFromEntityPage( Item $item, EntityPage $entityPage ) { |
|
46 | 1 | $rowFactory = new ItemRowFactory( |
|
47 | 1 | new FakingEntitySerializer( json_decode( $entityPage->getEntityJson(), true ) ), |
|
48 | 1 | new InstanceOfTypeExtractor() |
|
49 | ); |
||
50 | |||
51 | 1 | return $rowFactory->newFromItemAndPageInfo( |
|
52 | 1 | $item, |
|
53 | 1 | ( new EntityPageInfo() ) |
|
54 | 1 | ->setPageTitle( $entityPage->getTitle() ) |
|
55 | 1 | ->setRevisionId( $entityPage->getRevisionId() ) |
|
56 | 1 | ->setRevisionTime( $entityPage->getRevisionTime() ) |
|
57 | ); |
||
58 | } |
||
59 | |||
60 | private function propertyRowFromEntityPage( Property $property, EntityPage $entityPage ) { |
||
72 | |||
73 | } |