1
0
mirror of https://github.com/flarum/core.git synced 2025-10-20 19:27:14 +02:00
Files
php-flarum/src/User/Command/UploadAvatar.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

52 lines
1.0 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\User\Command;
use Flarum\User\User;
use Psr\Http\Message\UploadedFileInterface;
class UploadAvatar
{
/**
* The ID of the user to upload the avatar for.
*
* @var int
*/
public $userId;
/**
* The avatar file to upload.
*
* @var UploadedFileInterface
*/
public $file;
/**
* The user performing the action.
*
* @var User
*/
public $actor;
/**
* @param int $userId The ID of the user to upload the avatar for.
* @param UploadedFileInterface $file The avatar file to upload.
* @param User $actor The user performing the action.
*/
public function __construct($userId, UploadedFileInterface $file, User $actor)
{
$this->userId = $userId;
$this->file = $file;
$this->actor = $actor;
}
}