mirror of
https://github.com/openvk/openvk
synced 2024-12-22 16:42:32 +03:00
25 lines
564 B
PHP
25 lines
564 B
PHP
|
<?php declare(strict_types=1);
|
||
|
namespace openvk\ServiceAPI;
|
||
|
use openvk\Web\Models\Entities\User;
|
||
|
use openvk\Web\Util\DateTime;
|
||
|
|
||
|
class Service implements Handler
|
||
|
{
|
||
|
protected $user;
|
||
|
|
||
|
function __construct(?User $user)
|
||
|
{
|
||
|
$this->user = $user;
|
||
|
}
|
||
|
|
||
|
function getTime(callable $resolve, callable $reject): void
|
||
|
{
|
||
|
$resolve((new DateTime)->format("%e %B %G" . tr("time_at_sp") . "%X"));
|
||
|
}
|
||
|
|
||
|
function getServerVersion(callable $resolve, callable $reject): void
|
||
|
{
|
||
|
$resolve("OVK " . OPENVK_VERSION);
|
||
|
}
|
||
|
}
|