Browse Source

work on examples

dev
Cerys 4 weeks ago
parent
commit
358e29b656
  1. 21
      examples/QueryExample_Directory.php
  2. 3
      examples/QueryExample_Permission.php

21
examples/QueryExample_Directory.php

@ -0,0 +1,21 @@
<?php
require_once __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/../examples/DeegraphConnection.php';
use Darksparrow\DeegraphInteractions\QueryBuilder\QueryBuilder;
$result = QueryBuilder::Directory()
->RelativePath("{0b368d41-7c15-42c8-899c-2b178ae9d983}")
->Build()
->RunQuery(DeegraphConnection::DB())
;
echo "Directory\n";
echo "=========\n";
foreach($result->Map as $key=>$value)
{
echo str_pad($key, 20) . ": " . $value . "\n";
}

3
examples/QueryExample_Permission.php

@ -7,7 +7,8 @@ use Darksparrow\DeegraphInteractions\QueryBuilder\QueryBuilder;
$permissions = QueryBuilder::Permission()
->On("b222c121-0ed2-5819-bbf9-4db9aab85ea3")
->On("{b222c121-0ed2-5819-bbf9-4db9aab85ea3}")
->As("{b222c121-0ed2-5819-bbf9-4db9aab85ea3}")
->Build()
->RunQuery(DeegraphConnection::DB())
;

Loading…
Cancel
Save