Bristol SU Support Package
src
Authorization
Exception
ActivityRequiresParticipant.php
Go to the documentation of this file.
1
<?php
2
3
namespace
BristolSU\Support\Authorization\Exception
;
4
5
use
BristolSU\Support\Activity\Activity
;
6
use
Exception
;
7
use
Throwable
;
8
12
class
ActivityRequiresParticipant
extends
Exception
13
{
19
private
$activity
;
20
29
public
function
__construct
($message =
""
, $code = 0,
Throwable
$previous = null,
$activity
= null)
30
{
31
parent::__construct($message, $code, $previous);
32
$this->activity =
$activity
;
33
}
34
44
public
static
function
createWithActivity
(
Activity
$activity
,
string
$message =
''
,
int
$code = 0)
45
{
46
return
new
self
($message, $code, null,
$activity
);
47
}
48
54
public
function
getActivity
()
55
{
56
return
$this->activity
;
57
}
58
}
Activity
BristolSU\Support\Authorization\Exception\ActivityRequiresParticipant\getActivity
getActivity()
Definition:
ActivityRequiresParticipant.php:54
BristolSU\Support\Authorization\Exception\ActivityRequiresParticipant\__construct
__construct($message="", $code=0, Throwable $previous=null, $activity=null)
Definition:
ActivityRequiresParticipant.php:29
BristolSU\Support\Authorization\Exception\ActivityRequiresParticipant
Definition:
ActivityRequiresParticipant.php:12
BristolSU\Support\Authorization\Exception
Definition:
ActivityDisabled.php:3
BristolSU\Support\Activity\Activity
Definition:
Activity.php:20
BristolSU\Support\Authorization\Exception\ActivityRequiresParticipant\$activity
$activity
Definition:
ActivityRequiresParticipant.php:19
BristolSU\Support\Authorization\Exception\ActivityRequiresParticipant\createWithActivity
static createWithActivity(Activity $activity, string $message='', int $code=0)
Definition:
ActivityRequiresParticipant.php:44
Exception
Throwable
Generated by
1.8.13