Refactor and extend configuration classes.
This commit is contained in:
parent
01253d5115
commit
395e6b95ff
24 changed files with 1158 additions and 682 deletions
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace Socialbox\Classes\StandardMethods;
|
||||
|
||||
use Socialbox\Abstracts\Method;
|
||||
use Socialbox\Classes\Configuration;
|
||||
use Socialbox\Classes\Resources;
|
||||
use Socialbox\Enums\StandardError;
|
||||
use Socialbox\Interfaces\SerializableInterface;
|
||||
use Socialbox\Objects\ClientRequest;
|
||||
use Socialbox\Objects\RpcRequest;
|
||||
use Socialbox\Objects\Standard\ServerDocument;
|
||||
|
||||
class GetCommunityGuidelines extends Method
|
||||
{
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function execute(ClientRequest $request, RpcRequest $rpcRequest): ?SerializableInterface
|
||||
{
|
||||
return $rpcRequest->produceResponse(new ServerDocument([
|
||||
'last_updated' => Configuration::getRegistrationConfiguration()->getCommunityGuidelinesDate(),
|
||||
'title' => 'Community Guidelines',
|
||||
'content' => Resources::getCommunityGuidelines()
|
||||
]));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue