1
0
mirror of https://github.com/flarum/core.git synced 2025-10-13 07:54:25 +02:00

Add flood control

closes #271
This commit is contained in:
Toby Zerner
2015-10-22 16:57:48 +10:30
parent c0364cbc9d
commit 415b68f84f
5 changed files with 114 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
<?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\Exception;
use Exception;
use Tobscure\JsonApi\Exception\JsonApiSerializableInterface;
class FloodingException extends Exception implements JsonApiSerializableInterface
{
/**
* {@inheritdoc}
*/
public function getStatusCode()
{
return 429;
}
/**
* {@inheritdoc}
*/
public function getErrors()
{
return [];
}
}