mirror of
https://github.com/flarum/framework.git
synced 2024-11-28 11:34:36 +08: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:
parent
95dc7e71f4
commit
5b0d0d9f0f
|
@ -11,8 +11,8 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Command\ReadDiscussion;
|
||||
use Flarum\Core\Command\StartDiscussion;
|
||||
use Flarum\Discussion\Command\ReadDiscussion;
|
||||
use Flarum\Discussion\Command\StartDiscussion;
|
||||
use Flarum\Post\Floodgate;
|
||||
use Illuminate\Contracts\Bus\Dispatcher;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Command\CreateGroup;
|
||||
use Flarum\Group\Command\CreateGroup;
|
||||
use Illuminate\Contracts\Bus\Dispatcher;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Tobscure\JsonApi\Document;
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Command\PostReply;
|
||||
use Flarum\Core\Command\ReadDiscussion;
|
||||
use Flarum\Discussion\Command\ReadDiscussion;
|
||||
use Flarum\Post\Command\PostReply;
|
||||
use Flarum\Post\Floodgate;
|
||||
use Illuminate\Contracts\Bus\Dispatcher;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Command\RegisterUser;
|
||||
use Flarum\User\Command\RegisterUser;
|
||||
use Illuminate\Contracts\Bus\Dispatcher;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Tobscure\JsonApi\Document;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Command\DeleteAvatar;
|
||||
use Flarum\User\Command\DeleteAvatar;
|
||||
use Illuminate\Contracts\Bus\Dispatcher;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Tobscure\JsonApi\Document;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Command\DeleteDiscussion;
|
||||
use Flarum\Discussion\Command\DeleteDiscussion;
|
||||
use Illuminate\Contracts\Bus\Dispatcher;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Command\DeleteGroup;
|
||||
use Flarum\Group\Command\DeleteGroup;
|
||||
use Illuminate\Contracts\Bus\Dispatcher;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Command\DeletePost;
|
||||
use Flarum\Post\Command\DeletePost;
|
||||
use Illuminate\Contracts\Bus\Dispatcher;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Command\DeleteUser;
|
||||
use Flarum\User\Command\DeleteUser;
|
||||
use Illuminate\Contracts\Bus\Dispatcher;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Command\RequestPasswordReset;
|
||||
use Flarum\User\Command\RequestPasswordReset;
|
||||
use Flarum\User\UserRepository;
|
||||
use Flarum\Http\Controller\ControllerInterface;
|
||||
use Illuminate\Contracts\Bus\Dispatcher;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Command\ReadAllNotifications;
|
||||
use Flarum\Notification\Command\ReadAllNotifications;
|
||||
use Illuminate\Contracts\Bus\Dispatcher;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Command\EditDiscussion;
|
||||
use Flarum\Core\Command\ReadDiscussion;
|
||||
use Flarum\Discussion\Command\EditDiscussion;
|
||||
use Flarum\Discussion\Command\ReadDiscussion;
|
||||
use Illuminate\Contracts\Bus\Dispatcher;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Command\EditGroup;
|
||||
use Flarum\Group\Command\EditGroup;
|
||||
use Illuminate\Contracts\Bus\Dispatcher;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Tobscure\JsonApi\Document;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Command\ReadNotification;
|
||||
use Flarum\Notification\Command\ReadNotification;
|
||||
use Illuminate\Contracts\Bus\Dispatcher;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Tobscure\JsonApi\Document;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Command\EditPost;
|
||||
use Flarum\Post\Command\EditPost;
|
||||
use Illuminate\Contracts\Bus\Dispatcher;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Tobscure\JsonApi\Document;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Command\EditUser;
|
||||
use Flarum\User\Command\EditUser;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Illuminate\Contracts\Bus\Dispatcher;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
namespace Flarum\Api\Controller;
|
||||
|
||||
use Flarum\Core\Command\UploadAvatar;
|
||||
use Flarum\User\Command\UploadAvatar;
|
||||
use Illuminate\Contracts\Bus\Dispatcher;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Tobscure\JsonApi\Document;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Discussion\Command;
|
||||
|
||||
use Flarum\User\User;
|
||||
|
|
@ -9,13 +9,13 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Discussion\Command;
|
||||
|
||||
use Flarum\Discussion\DiscussionRepository;
|
||||
use Flarum\Discussion\Event\Deleting;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Flarum\Discussion\DiscussionRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\Discussion\Event\Deleting;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
|
||||
class DeleteDiscussionHandler
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Discussion\Command;
|
||||
|
||||
use Flarum\User\User;
|
||||
|
|
@ -9,14 +9,13 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Discussion\Command;
|
||||
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Flarum\Discussion\DiscussionRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\Discussion\DiscussionValidator;
|
||||
use Flarum\Discussion\Event\Saving;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
|
||||
class EditDiscussionHandler
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Discussion\Command;
|
||||
|
||||
use Flarum\User\User;
|
||||
|
|
@ -9,12 +9,12 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Discussion\Command;
|
||||
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\Discussion\DiscussionRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\Discussion\Event\UserDataSaving;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
|
||||
class ReadDiscussionHandler
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Discussion\Command;
|
||||
|
||||
use Flarum\User\User;
|
||||
|
|
@ -9,14 +9,14 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Discussion\Command;
|
||||
|
||||
use Exception;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\Discussion\Discussion;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\Discussion\DiscussionValidator;
|
||||
use Flarum\Discussion\Event\Saving;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Illuminate\Contracts\Bus\Dispatcher as BusDispatcher;
|
||||
use Illuminate\Contracts\Events\Dispatcher as EventDispatcher;
|
||||
|
|
@ -11,11 +11,11 @@
|
|||
|
||||
namespace Flarum\Forum\Controller;
|
||||
|
||||
use Flarum\Core\Command\ConfirmEmail;
|
||||
use Flarum\User\Exception\InvalidConfirmationTokenException;
|
||||
use Flarum\Foundation\Application;
|
||||
use Flarum\Http\Controller\ControllerInterface;
|
||||
use Flarum\Http\SessionAuthenticator;
|
||||
use Flarum\User\Command\ConfirmEmail;
|
||||
use Flarum\User\Exception\InvalidConfirmationTokenException;
|
||||
use Illuminate\Contracts\Bus\Dispatcher;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Zend\Diactoros\Response\HtmlResponse;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Group\Command;
|
||||
|
||||
use Flarum\User\User;
|
||||
|
|
@ -9,13 +9,13 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Group\Command;
|
||||
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\Group\Group;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\Group\GroupValidator;
|
||||
use Flarum\Group\Event\Saving;
|
||||
use Flarum\Group\Group;
|
||||
use Flarum\Group\GroupValidator;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
|
||||
class CreateGroupHandler
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Group\Command;
|
||||
|
||||
use Flarum\User\User;
|
||||
|
|
@ -9,13 +9,13 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Group\Command;
|
||||
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Flarum\Group\GroupRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\Group\Event\Deleting;
|
||||
use Flarum\Group\GroupRepository;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
|
||||
class DeleteGroupHandler
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Group\Command;
|
||||
|
||||
use Flarum\User\User;
|
||||
|
|
@ -9,15 +9,15 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Group\Command;
|
||||
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\Group\Event\Saving;
|
||||
use Flarum\Group\Group;
|
||||
use Flarum\Group\GroupRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\Group\GroupValidator;
|
||||
use Flarum\Group\Event\Saving;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
|
||||
class EditGroupHandler
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Notification\Command;
|
||||
|
||||
use Flarum\User\User;
|
||||
|
|
@ -9,10 +9,10 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Notification\Command;
|
||||
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\Notification\NotificationRepository;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
|
||||
class ReadAllNotificationsHandler
|
||||
{
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Notification\Command;
|
||||
|
||||
use Flarum\User\User;
|
||||
|
|
@ -9,10 +9,10 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Notification\Command;
|
||||
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\Notification\Notification;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
|
||||
class ReadNotificationHandler
|
||||
{
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Post\Command;
|
||||
|
||||
use Flarum\User\User;
|
||||
|
|
@ -9,13 +9,12 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Post\Command;
|
||||
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Flarum\Post\PostRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\Post\Event\Deleting;
|
||||
use Flarum\Post\PostRepository;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
|
||||
class DeletePostHandler
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Post\Command;
|
||||
|
||||
use Flarum\User\User;
|
||||
|
|
@ -9,14 +9,14 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Post\Command;
|
||||
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\Post\CommentPost;
|
||||
use Flarum\Post\PostRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\Post\PostValidator;
|
||||
use Flarum\Post\CommentPost;
|
||||
use Flarum\Post\Event\Saving;
|
||||
use Flarum\Post\PostRepository;
|
||||
use Flarum\Post\PostValidator;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
|
||||
class EditPostHandler
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Post\Command;
|
||||
|
||||
use Flarum\User\User;
|
||||
|
|
@ -9,16 +9,16 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\Post\Command;
|
||||
|
||||
use DateTime;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\Notification\NotificationSyncer;
|
||||
use Flarum\Post\CommentPost;
|
||||
use Flarum\Discussion\DiscussionRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\Post\PostValidator;
|
||||
use Flarum\Notification\NotificationSyncer;
|
||||
use Flarum\Post\CommentPost;
|
||||
use Flarum\Post\Event\Saving;
|
||||
use Flarum\Post\PostValidator;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
|
||||
class PostReplyHandler
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\User\Command;
|
||||
|
||||
class ConfirmEmail
|
||||
{
|
|
@ -9,16 +9,16 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\User\Command;
|
||||
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\User\EmailToken;
|
||||
use Flarum\User\UserRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
|
||||
class ConfirmEmailHandler
|
||||
{
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use DispatchEventsTrait;
|
||||
|
||||
/**
|
||||
* @var \Flarum\User\UserRepository
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\User\Command;
|
||||
|
||||
use Flarum\User\User;
|
||||
|
|
@ -9,13 +9,12 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\User\Command;
|
||||
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Flarum\User\UserRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\Event\AvatarWillBeDeleted;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\UserRepository;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
use League\Flysystem\FilesystemInterface;
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\User\Command;
|
||||
|
||||
use Flarum\User\User;
|
||||
|
|
@ -9,13 +9,13 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\User\Command;
|
||||
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\Event\Deleting;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Flarum\User\UserRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\User\Event\Deleting;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
|
||||
class DeleteUserHandler
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\User\Command;
|
||||
|
||||
use Flarum\User\User;
|
||||
|
|
@ -9,15 +9,15 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\User\Command;
|
||||
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\UserRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\User\User;
|
||||
use Flarum\User\UserValidator;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\Event\GroupsChanged;
|
||||
use Flarum\User\Event\Saving;
|
||||
use Flarum\User\User;
|
||||
use Flarum\User\UserRepository;
|
||||
use Flarum\User\UserValidator;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
|
||||
class EditUserHandler
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\User\Command;
|
||||
|
||||
use Flarum\User\User;
|
||||
|
|
@ -9,18 +9,18 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\User\Command;
|
||||
|
||||
use Exception;
|
||||
use Flarum\Foundation\Application;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\Settings\SettingsRepositoryInterface;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\AuthToken;
|
||||
use Flarum\User\Event\Saving;
|
||||
use Flarum\User\Exception\PermissionDeniedException;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\User\User;
|
||||
use Flarum\User\UserValidator;
|
||||
use Flarum\User\Event\Saving;
|
||||
use Flarum\Foundation\Application;
|
||||
use Flarum\Settings\SettingsRepositoryInterface;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
use Illuminate\Contracts\Validation\Factory;
|
||||
use Illuminate\Contracts\Validation\ValidationException;
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\User\Command;
|
||||
|
||||
class RequestPasswordReset
|
||||
{
|
|
@ -9,13 +9,12 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\User\Command;
|
||||
|
||||
use Flarum\Core;
|
||||
use Flarum\User\PasswordToken;
|
||||
use Flarum\User\UserRepository;
|
||||
use Flarum\Forum\UrlGenerator;
|
||||
use Flarum\Settings\SettingsRepositoryInterface;
|
||||
use Flarum\User\PasswordToken;
|
||||
use Flarum\User\UserRepository;
|
||||
use Illuminate\Contracts\Mail\Mailer;
|
||||
use Illuminate\Contracts\Validation\Factory;
|
||||
use Illuminate\Contracts\Validation\ValidationException;
|
|
@ -9,7 +9,7 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\User\Command;
|
||||
|
||||
use Flarum\User\User;
|
||||
use Psr\Http\Message\UploadedFileInterface;
|
|
@ -9,15 +9,15 @@
|
|||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Flarum\Core\Command;
|
||||
namespace Flarum\User\Command;
|
||||
|
||||
use Exception;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\UserRepository;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\User\AvatarValidator;
|
||||
use Flarum\Event\AvatarWillBeSaved;
|
||||
use Flarum\Foundation\Application;
|
||||
use Flarum\Foundation\DispatchEventsTrait;
|
||||
use Flarum\User\AssertPermissionTrait;
|
||||
use Flarum\User\UserRepository;
|
||||
use Flarum\User\AvatarValidator;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
use Illuminate\Support\Str;
|
||||
use Intervention\Image\ImageManager;
|
|
@ -41,15 +41,15 @@ class UserServiceProvider extends AbstractServiceProvider
|
|||
return $app->make('Illuminate\Contracts\Filesystem\Factory')->disk('flarum-avatars')->getDriver();
|
||||
};
|
||||
|
||||
$this->app->when('Flarum\Core\Command\UploadAvatarHandler')
|
||||
$this->app->when('Flarum\User\Command\UploadAvatarHandler')
|
||||
->needs('League\Flysystem\FilesystemInterface')
|
||||
->give($avatarsFilesystem);
|
||||
|
||||
$this->app->when('Flarum\Core\Command\DeleteAvatarHandler')
|
||||
$this->app->when('Flarum\User\Command\DeleteAvatarHandler')
|
||||
->needs('League\Flysystem\FilesystemInterface')
|
||||
->give($avatarsFilesystem);
|
||||
|
||||
$this->app->when('Flarum\Core\Command\RegisterUserHandler')
|
||||
$this->app->when('Flarum\User\Command\RegisterUserHandler')
|
||||
->needs('League\Flysystem\FilesystemInterface')
|
||||
->give($avatarsFilesystem);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user