PHP library for Patricia Technologies for management of client and client key
composer require stacey/patricia-client-package
require_once 'vendor/autoload.php';
use PatriciaClient\Patricia;
$patricia = new Patricia();
Run Patricia::migrate();
to migrate your tables and default seeders
Run migration
Patricia::migrate();
or
$patricia->migrate();
Patricia::rollback_migrate();
or
$patricia->rollback_migrate();
Patricia::rollback_seeders();
or
$patricia->ollback_seeders();
Patricia::create_client(String $clientName, String $clientRole)
or
$patricia->create_client(String $clientName, String $clientRole)
clientRole is either `admin` or `user`
Patricia::create_client_key(int $clientId, String $clientKeyName);
$patricia->create_client_key(int $clientId, String $clientKeyName);
Patricia::update_client(string $ClientUuid, array $array);
$patricia->update_client(string $ClientUuid, array $array);
$array should contain the columns and respective values;
example $array = [
'name' => 'Patricia King',
'is_blocked' => 1
];
Patricia::update_client_keys(Int $clientKeyId, array $array);
$patricia->update_client_keys(Int $clientKeyId, array $array);
$array should contain the columns and respective values;
example $array = [
'name' => 'Patricia King Key',
'is_blocked' => 1
];
get a client details based on column attribute
Patricia::get_client(string $columnName, string $columnValue);
$patricia->get_client(string $columnName, string $columnValue);
$array should contain the columns and respective values;
example $array = [
'name' => 'Patricia King Key',
'is_blocked' => 1
];
returns all instances of a client key
Patricia::get_client_keys(Int $clientKeyId);
$patricia->get_client_keys(Int $clientKeyId);
returns the first instance of a client key
Patricia::get_client_key(Int $clientKeyId);
$patricia->get_client_key(Int $clientKeyId);
Patricia::delete_client(String $clientUuid);
$patricia->delete_client(String $clientUuid);
Patricia::delete_client_key(Int $clientKeyId);
$patricia->delete_client_key(Int $clientKeyId);
is_admin(String $apiKey)
is_authenticated(String $apiKey)
get_client(String $prop, String $value)
`prop represents a column`
`value represents the value for query`
Released under the MIT License. See the bundled LICENSE file for details.
Open to contributions from anyone, PR's can be made and would be accepted. Thanks and good luck