[CORE][Controller] Make it possible for plugins to add different content-types to existing routes

This commit is contained in:
2021-08-24 05:30:54 +01:00
committed by Hugo Sales
parent 8e45637277
commit fd3b57dc24
2 changed files with 15 additions and 24 deletions

View File

@@ -30,7 +30,7 @@ use DateTime;
/**
* Base class to all entities, with some utilities
*/
abstract class Entity implements \JsonSerializable
abstract class Entity
{
public function __call(string $name , array $arguments): mixed
{
@@ -130,17 +130,4 @@ abstract class Entity implements \JsonSerializable
return null;
}
}
/**
* Called when json_encode encounters this object. Not all
* entities will need json encoding, so it doesn't make sense to
* make this abstract
*
* @throw ServerException
* @codeCoverageIgnore
*/
public function jsonSerialize()
{
throw new ServerException(_m('Unimplemented method'));
}
}