src/PHPDish/Bundle/CoreBundle/EventListener/PostListener.php
public function postPersist(PostInterface $post, LifecycleEventArgs $event)
    {
        $user = $post->getUser();
        $this->handleUserPostCount($user);
    }
public function postPersist(PostInterface $post, LifecycleEventArgs $event)
    {
        $user = $post->getUser();
        $this->handleUserPostCount($user);
    }
生成新数据之前
@param PostInterface $post
@param LifecycleEventArgs $event