AsgardCms/Blog

View on GitHub
Events/PostIsUpdating.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace Modules\Blog\Events;

use Modules\Blog\Entities\Post;
use Modules\Core\Contracts\EntityIsChanging;
use Modules\Core\Events\AbstractEntityHook;

class PostIsUpdating extends AbstractEntityHook implements EntityIsChanging
{
    /**
     * @var Post
     */
    private $post;

    public function __construct(Post $post, array $data)
    {
        parent::__construct($data);

        $this->post = $post;
    }

    /**
     * @return Post
     */
    public function getPost()
    {
        return $this->post;
    }
}