|
@ -4,7 +4,7 @@ namespace Darksparrow\DeegraphInteractions\QueryBuilder\PermissionsQuery; |
|
|
|
|
|
|
|
|
final class PermissionQueryResponse |
|
|
final class PermissionQueryResponse |
|
|
{ |
|
|
{ |
|
|
public array $Permissions = []; |
|
|
private array $AsArray = []; |
|
|
|
|
|
|
|
|
public bool $CanAct = false; |
|
|
public bool $CanAct = false; |
|
|
public bool $CanDelete = false; |
|
|
public bool $CanDelete = false; |
|
@ -15,7 +15,7 @@ final class PermissionQueryResponse |
|
|
{ |
|
|
{ |
|
|
foreach ($deegraphResponse["@permissions"] as $permission) |
|
|
foreach ($deegraphResponse["@permissions"] as $permission) |
|
|
{ |
|
|
{ |
|
|
$this->Permissions[] = $permission; |
|
|
$this->AsArray[] = $permission; |
|
|
|
|
|
|
|
|
switch($permission) |
|
|
switch($permission) |
|
|
{ |
|
|
{ |
|
@ -34,4 +34,9 @@ final class PermissionQueryResponse |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function AsArray(): array |
|
|
|
|
|
{ |
|
|
|
|
|
return $this->AsArray; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|