1
0
mirror of https://github.com/flarum/core.git synced 2025-10-12 23:44:27 +02:00
Files
php-flarum/src/Core/Command/PostReply.php
Toby Zerner 73c44adb96 Merge pull request #615 from oldskool/ip-logging
Minor changes:
- Rename/restyle migration, fix namespace
- Make IP address optional on PostReply command
2015-10-31 10:04:06 +10:30

59 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\Core\Command;
use Flarum\Core\User;
class PostReply
{
/**
* The ID of the discussion to post the reply to.
*
* @var int
*/
public $discussionId;
/**
* The user who is performing the action.
*
* @var User
*/
public $actor;
/**
* The attributes to assign to the new post.
*
* @var array
*/
public $data;
/**
* The IP address of the actor.
*
* @var string
*/
public $ipAddress;
/**
* @param int $discussionId The ID of the discussion to post the reply to.
* @param User $actor The user who is performing the action.
* @param array $data The attributes to assign to the new post.
* @param string $ipAddress The IP address of the actor.
*/
public function __construct($discussionId, User $actor, array $data, $ipAddress = null)
{
$this->discussionId = $discussionId;
$this->actor = $actor;
$this->data = $data;
$this->ipAddress = $ipAddress;
}
}