theking2 / kingsoft-persist-db

implementation of ipersist for database
MIT License
0 stars 0 forks source link

Add a bootstrap classe #75

Closed theking2 closed 2 weeks ago

theking2 commented 2 weeks ago

And add readme to use this class to create docs and discover

discover.php:

<?php declare(strict_types=1);

require_once 'config.php';
require 'vendor/autoload.php';

use \Kingsoft\Persist\Db\Bootstrap;
$bootstrap = new Bootstrap(SETTINGS['api']['namespace']);
$bootstrap->discover();

and doc.php

<?php declare(strict_types=1);

require_once 'config.php';
require 'vendor/autoload.php';

use \Kingsoft\Persist\Db\Bootstrap;
$bootstrap = new Bootstrap(SETTINGS['api']['namespace']);
echo $bootstrap->doc();