mirror of
https://github.com/flarum/core.git
synced 2025-08-05 07:57:46 +02:00
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.
This commit is contained in:
50
src/Discussion/Command/EditDiscussion.php
Normal file
50
src/Discussion/Command/EditDiscussion.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?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 EditDiscussion
|
||||
{
|
||||
/**
|
||||
* The ID of the discussion to edit.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
public $discussionId;
|
||||
|
||||
/**
|
||||
* The user performing the action.
|
||||
*
|
||||
* @var \Flarum\User\User
|
||||
*/
|
||||
public $actor;
|
||||
|
||||
/**
|
||||
* The attributes to update on the discussion.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $data;
|
||||
|
||||
/**
|
||||
* @param int $discussionId The ID of the discussion to edit.
|
||||
* @param \Flarum\User\User $actor The user performing the action.
|
||||
* @param array $data The attributes to update on the discussion.
|
||||
*/
|
||||
public function __construct($discussionId, User $actor, array $data)
|
||||
{
|
||||
$this->discussionId = $discussionId;
|
||||
$this->actor = $actor;
|
||||
$this->data = $data;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user