Files
framework/src/Discussion/Command/DeleteDiscussion.php
Franz Liedke 5b0d0d9f0f Move command classes to domain namespaces
They will probably be refactored away at a later stage (when we get
rid of the command bus). Until then, this lets us remove the
Flarum\Core namespace and actually feels quite clean.
2017-10-03 18:52:50 +02:00

53 lines
1.2 KiB
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\Discussion\Command;
use Flarum\User\User;
class DeleteDiscussion
{
/**
* The ID of the discussion to delete.
*
* @var int
*/
public $discussionId;
/**
* The user performing the action.
*
* @var User
*/
public $actor;
/**
* Any other user input associated with the action. This is unused by
* default, but may be used by extensions.
*
* @var array
*/
public $data;
/**
* @param int $discussionId The ID of the discussion to delete.
* @param User $actor The user performing the action.
* @param array $data Any other user input associated with the action. This
* is unused by default, but may be used by extensions.
*/
public function __construct($discussionId, User $actor, array $data = [])
{
$this->discussionId = $discussionId;
$this->actor = $actor;
$this->data = $data;
}
}