1. Go to this page and download the library: Download yangweijie/es-think-orm library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use EasyOrm\EasyDb;
// Create custom cache handler
class MyCacheHandler
{
public function get($key)
{
// Return cached value or null
}
public function set($key, $value, $ttl = null)
{
// Store value, return bool
}
public function rm($key)
{
// Remove cached value, return bool
}
}
// Set cache handler manually
EasyDb::setCacheHandler(new MyCacheHandler());
use EasyOrm\EasyDb;
public static function initialize()
{
$config =