Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
pull/40/head
Maxence Lange 2018-11-20 11:52:33 -01:00
rodzic c52e214614
commit b217d0b0a6
3 zmienionych plików z 30 dodań i 6 usunięć

Wyświetl plik

@ -179,7 +179,7 @@ class FollowService implements ICoreService {
*
* @throws Exception
*/
public function save(ACore $follow) {
public function parse(ACore $follow) {
/** @var Follow $follow */
if ($follow->isRoot()) {
$follow->verify($follow->getActorId());
@ -214,5 +214,11 @@ class FollowService implements ICoreService {
}
/**
* @param ACore $item
*/
public function delete(ACore $item) {
}
}

Wyświetl plik

@ -93,7 +93,7 @@ class PersonService implements ICoreService {
try {
$actor->setSource(json_encode($actor, JSON_UNESCAPED_SLASHES));
$this->save($actor, true);
$this->parse($actor, true);
} catch (Exception $e) {
}
}
@ -138,7 +138,7 @@ class PersonService implements ICoreService {
}
try {
$this->save($actor);
$this->parse($actor);
} catch (Exception $e) {
throw new InvalidResourceException($e->getMessage());
}
@ -174,7 +174,7 @@ class PersonService implements ICoreService {
}
try {
$this->save($actor);
$this->parse($actor);
} catch (Exception $e) {
throw new InvalidResourceException($e->getMessage());
}
@ -202,10 +202,21 @@ class PersonService implements ICoreService {
*
* @throws Exception
*/
public function save(ACore $person, bool $local = false) {
public function parse(ACore $person, bool $local = false) {
/** @var Person $person */
if ($person->isRoot() === false) {
return;
}
$this->cacheActorsRequest->save($person, $local);
}
/**
* @param ACore $item
*/
public function delete(ACore $item) {
}
}

Wyświetl plik

@ -59,7 +59,14 @@ class UndoService implements ICoreService {
*
* @throws Exception
*/
public function save(ACore $undo) {
public function parse(ACore $undo) {
}
/**
* @param ACore $item
*/
public function delete(ACore $item) {
}
}