Add poll system for Patrons Circle

This commit is contained in:
Alex Cabal 2022-06-29 16:51:45 -05:00
parent 3555d53615
commit 2ef5ce6551
44 changed files with 717 additions and 98 deletions

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class InvalidPatronException extends SeException{
protected $message = 'We couldnt locate you in the Patrons Circle.';
}

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class InvalidPollException extends SeException{
protected $message = 'We couldnt locate that poll.';
}

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class InvalidPollItemException extends SeException{
protected $message = 'We couldnt locate that poll item.';
}

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class InvalidUserException extends SeException{
protected $message = 'We couldnt locate you in our system.';
}

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class PollClosedException extends SeException{
protected $message = 'This poll is not open to voting right now.';
}

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class PollItemRequiredException extends SeException{
protected $message = 'You must select an item to vote on.';
}

View file

@ -8,6 +8,12 @@ class ValidationException extends SeException{
public $HasExceptions = false;
public $IsFatal = false;
public function __construct(?\Exception $exception = null){
if($exception !== null){
$this->Add($exception);
}
}
public function __toString(): string{
$output = '';
foreach($this->Exceptions as $exception){

View file

@ -0,0 +1,6 @@
<?
namespace Exceptions;
class VoteExistsException extends SeException{
protected $message = 'Youve already voted in this poll.';
}