Browse Source

thought doing it like this would make more sense

dev
Cerys 4 weeks ago
parent
commit
6e371adf69
  1. 9
      src/QueryBuilder/PermissionsQuery/PermissionQueryResponse.php

9
src/QueryBuilder/PermissionsQuery/PermissionQueryResponse.php

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