ScopeEntity is JsonSerializable

This commit is contained in:
Alex Bilbie 2016-01-12 22:59:33 +00:00
parent 9958e1bf80
commit 5f9feda80c
2 changed files with 9 additions and 1 deletions

View File

@ -1,7 +1,7 @@
<?php <?php
namespace League\OAuth2\Server\Entities\Interfaces; namespace League\OAuth2\Server\Entities\Interfaces;
interface ScopeEntityInterface interface ScopeEntityInterface extends \JsonSerializable
{ {
/** /**
* Get the scope's identifier * Get the scope's identifier

View File

@ -11,4 +11,12 @@ use League\OAuth2\Server\Entities\Traits\EntityTrait;
class ScopeEntity implements ScopeEntityInterface class ScopeEntity implements ScopeEntityInterface
{ {
use EntityTrait; use EntityTrait;
/**
* @inheritdoc
*/
function jsonSerialize()
{
return $this->getIdentifier();
}
} }