1 | <?php |
||
26 | class AgentProfileApiClient extends DocumentApiClient implements AgentProfileApiClientInterface |
||
27 | { |
||
28 | /** |
||
29 | * @var ActorSerializerInterface |
||
30 | */ |
||
31 | private $actorSerializer; |
||
32 | |||
33 | /** |
||
34 | * @param HandlerInterface $requestHandler The HTTP request handler |
||
35 | * @param string $version The xAPI version |
||
36 | * @param DocumentDataSerializerInterface $documentDataSerializer The document data serializer |
||
37 | * @param ActorSerializerInterface $actorSerializer The actor serializer |
||
38 | */ |
||
39 | 5 | public function __construct( |
|
49 | |||
50 | /** |
||
51 | * {@inheritDoc} |
||
52 | */ |
||
53 | 1 | public function createOrUpdateDocument(AgentProfileDocument $document) |
|
61 | |||
62 | /** |
||
63 | * {@inheritDoc} |
||
64 | */ |
||
65 | 1 | public function createOrReplaceDocument(AgentProfileDocument $document) |
|
73 | |||
74 | /** |
||
75 | * {@inheritDoc} |
||
76 | */ |
||
77 | public function deleteDocument(AgentProfile $profile) |
||
78 | { |
||
79 | $this->doDeleteDocument('agents/profile', array( |
||
80 | 'agent' => $this->actorSerializer->serializeActor($profile->getAgent()), |
||
81 | 'profileId' => $profile->getProfileId(), |
||
82 | )); |
||
83 | } |
||
84 | |||
85 | /** |
||
86 | * {@inheritDoc} |
||
87 | */ |
||
88 | 1 | public function getDocument(AgentProfile $profile) |
|
98 | } |
||
99 |