This Version is in a early Stage and only supports get, post, patch for Items. Authentification is only possible with token. It uses [https://docs.guzzlephp.org/en/stable/](Guzzle, PHP HTTP client) and is inspired by the [https://docs.directus.io/reference/sdk/](Directus JavaScript SDK)
Pirectus is used in [https://github.com/tentakelfabrik/super-gear-directus](Super Gear Directus), a small CMS.
composer require tentakelfabrik/pirectus
require('vendor/autoload.php');
use Pirectus\Pirectus;
use Pirectus\Auth\TokenAuth;
$pirectus = new Pirectus('<directus-url>', [
'auth' => new TokenAuth('<directus-authtoken>')
]);
$results = $pirectus
->items('pages')
->fields(['id', 'title', 'content'])
->filter([
'status' => ['_eq' => 'published']
])
->find();