mirror of
https://github.com/jonathan-martz/pocketbase-php-sdk.git
synced 2026-04-03 07:27:42 +00:00
31 lines
508 B
PHP
31 lines
508 B
PHP
<?php
|
|
|
|
namespace Pb;
|
|
|
|
use UsersCollection;
|
|
|
|
class Client
|
|
{
|
|
private string $response;
|
|
private string $url;
|
|
private string $route;
|
|
|
|
public function __construct(string $url)
|
|
{
|
|
$this->response = '{}';
|
|
$this->url = $url;
|
|
$this->users = [];
|
|
|
|
}
|
|
|
|
public function users()
|
|
{
|
|
return new UsersCollection($this->url, 'records');
|
|
}
|
|
|
|
public function collection(string $collection)
|
|
{
|
|
return new Collection($this->url ,$collection);
|
|
}
|
|
}
|