mirror of
https://github.com/flarum/core.git
synced 2025-10-19 10:46:06 +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:
42
src/Discussion/Command/StartDiscussion.php
Normal file
42
src/Discussion/Command/StartDiscussion.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?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 StartDiscussion
|
||||
{
|
||||
/**
|
||||
* The user authoring the discussion.
|
||||
*
|
||||
* @var User
|
||||
*/
|
||||
public $actor;
|
||||
|
||||
/**
|
||||
* The discussion attributes.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
public $data;
|
||||
|
||||
/**
|
||||
* @param User $actor The user authoring the discussion.
|
||||
* @param array $data The discussion attributes.
|
||||
*/
|
||||
public function __construct(User $actor, array $data, $ipAddress)
|
||||
{
|
||||
$this->actor = $actor;
|
||||
$this->data = $data;
|
||||
$this->ipAddress = $ipAddress;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user