18
18
use PHPCR \NodeInterface ;
19
19
use PHPCR \Util \PathHelper ;
20
20
use Puli \Repository \Api \Resource \BodyResource ;
21
- use Puli \Repository \Api \Resource \Resource ;
22
21
use Symfony \Cmf \Component \Resource \RepositoryRegistryInterface ;
23
22
use Symfony \Cmf \Bundle \ResourceRestBundle \Registry \PayloadAliasRegistry ;
24
23
use Symfony \Cmf \Bundle \ResourceRestBundle \Registry \EnhancerRegistry ;
25
24
use Symfony \Cmf \Component \Resource \Repository \Resource \CmfResource ;
25
+ use Puli \Repository \Api \Resource \PuliResource ;
26
26
27
27
/**
28
28
* Handle PHPCR resource serialization.
@@ -51,7 +51,7 @@ public static function getSubscribingMethods()
51
51
array (
52
52
'event ' => GraphNavigator::DIRECTION_SERIALIZATION ,
53
53
'format ' => 'json ' ,
54
- 'type ' => 'Puli\Repository\Api\Resource\Resource ' ,
54
+ 'type ' => 'Puli\Repository\Api\Resource\PuliResource ' ,
55
55
'method ' => 'serializeResource ' ,
56
56
),
57
57
);
@@ -65,15 +65,15 @@ public static function getSubscribingMethods()
65
65
*/
66
66
public function serializeResource (
67
67
JsonSerializationVisitor $ visitor ,
68
- Resource $ resource ,
68
+ PuliResource $ resource ,
69
69
array $ type ,
70
70
Context $ context
71
71
) {
72
72
$ data = $ this ->doSerializeResource ($ resource );
73
73
$ context ->accept ($ data );
74
74
}
75
75
76
- private function doSerializeResource (Resource $ resource , $ depth = 0 )
76
+ private function doSerializeResource (PuliResource $ resource , $ depth = 0 )
77
77
{
78
78
$ data = array ();
79
79
$ repositoryAlias = $ this ->registry ->getRepositoryAlias ($ resource ->getRepository ());
0 commit comments