www.gusucode.com > Flarum PHP论坛 中文版 v0.1 beta7源码程序 > FlarumChina-master/vendor/flarum/flarum-ext-likes/src/Notification/PostLikedBlueprint.php
<?php /* * This file is part of Flarum. * * (c) Toby Zerner <toby.zerner@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Flarum\Likes\Notification; use Flarum\Core\Notification\BlueprintInterface; use Flarum\Core\Post; use Flarum\Core\User; class PostLikedBlueprint implements BlueprintInterface { /** * @var Post */ public $post; /** * @var User */ public $user; /** * @param Post $post * @param User $user */ public function __construct(Post $post, User $user) { $this->post = $post; $this->user = $user; } /** * {@inheritdoc} */ public function getSubject() { return $this->post; } /** * {@inheritdoc} */ public function getSender() { return $this->user; } /** * {@inheritdoc} */ public function getData() { } /** * {@inheritdoc} */ public static function getType() { return 'postLiked'; } /** * {@inheritdoc} */ public static function getSubjectModel() { return Post::class; } }