src/Biz/Thread/Event/ThreadEventSubscriber.php
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace Biz\Thread\Event;
use Codeages\Biz\Framework\Event\Event;
use Codeages\PluginBundle\Event\EventSubscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class ThreadEventSubscriber extends EventSubscriber implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{
return array(
'thread.delete' => 'onThreadDelete',
'thread.create' => 'onThreadCreate',
'thread.nice' => 'onThreadNice',
'thread.sticky' => 'onThreadSticky',
'thread.post.create' => 'onPostCreate',
'thread.post.delete' => 'onPostDelete',
'thread.post.vote' => 'onPostVote',
);
}
public function onThreadDelete(Event $event)
{
$this->callTargetEventProcessor('onThreadDelete', $event);
}
public function onThreadCreate(Event $event)
{
$this->callTargetEventProcessor('onThreadCreate', $event);
}
public function onThreadNice(Event $event)
{
$this->callTargetEventProcessor('onThreadNice', $event);
}
public function onThreadSticky(Event $event)
{
$this->callTargetEventProcessor('onThreadSticky', $event);
}
public function onPostCreate(Event $event)
{
$this->callTargetEventProcessor('onPostCreate', $event);
}
public function onPostDelete(Event $event)
{
$this->callTargetEventProcessor('onPostDelete', $event);
}
public function onPostVote(Event $event)
{
$this->callTargetEventProcessor('onPostVote', $event);
}
protected function callTargetEventProcessor($method, Event $event)
{
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。