改名
This commit is contained in:
@@ -1,40 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace HttpServer;
|
||||
|
||||
|
||||
use Exception;
|
||||
use Snowflake\Abstracts\Component;
|
||||
use Snowflake\Snowflake;
|
||||
|
||||
|
||||
/**
|
||||
* Class Emit
|
||||
* @package HttpServer
|
||||
*/
|
||||
class Emit extends Component
|
||||
{
|
||||
|
||||
private array $_array = [];
|
||||
|
||||
|
||||
/**
|
||||
* @param int[] $users
|
||||
* @param string $message
|
||||
* @throws Exception
|
||||
*/
|
||||
public function emit(array $users, string $message)
|
||||
{
|
||||
$table = Snowflake::app()->getTable('SYSTEM:ONLINE:PEOPLES');
|
||||
|
||||
foreach ($users as $user) {
|
||||
$fd = $table->get((string)$user, ['clientId']);
|
||||
|
||||
Snowflake::push($fd, $message);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user