2 changed files with 39 additions and 0 deletions
			
			
		@ -0,0 +1,19 @@ | 
				
			|||
<?php | 
				
			|||
 | 
				
			|||
require_once __DIR__ . '/../vendor/autoload.php'; | 
				
			|||
 | 
				
			|||
use Darksparrow\DeegraphInteractions\Core\DeegraphServer; | 
				
			|||
 | 
				
			|||
class DeegraphConnection | 
				
			|||
{ | 
				
			|||
    public static function DB(): DeegraphServer | 
				
			|||
    { | 
				
			|||
        return new DeegraphServer( | 
				
			|||
            token: "", | 
				
			|||
            actor: "", | 
				
			|||
            server: "localhost", | 
				
			|||
            port: 8880, | 
				
			|||
            allowSelfSignedCerts: false, | 
				
			|||
        ); | 
				
			|||
    } | 
				
			|||
} | 
				
			|||
@ -0,0 +1,20 @@ | 
				
			|||
<?php | 
				
			|||
 | 
				
			|||
require_once __DIR__ . '/../vendor/autoload.php'; | 
				
			|||
require_once __DIR__ . '/../examples/DeegraphConnection.php'; | 
				
			|||
 | 
				
			|||
use Darksparrow\DeegraphInteractions\QueryBuilder\QueryBuilder; | 
				
			|||
 | 
				
			|||
 | 
				
			|||
$permissions = QueryBuilder::Permission() | 
				
			|||
    ->On("b222c121-0ed2-5819-bbf9-4db9aab85ea3") | 
				
			|||
    ->Build() | 
				
			|||
    ->RunQuery(DeegraphConnection::DB()) | 
				
			|||
; | 
				
			|||
 | 
				
			|||
echo "Permissions\n"; | 
				
			|||
echo "==========="; | 
				
			|||
echo "\nCan Act:      " . ($permissions->CanAct ? "YES" : "NO"); | 
				
			|||
echo "\nCan Delete:   " . ($permissions->CanDelete ? "YES" : "NO"); | 
				
			|||
echo "\nCan Read:     " . ($permissions->CanRead ? "YES" : "NO"); | 
				
			|||
echo "\nCan Write:    " . ($permissions->CanWrite ? "YES" : "NO"); | 
				
			|||
					Loading…
					
					
				
		Reference in new issue