PHP code example of cinling / ext-lib

1. Go to this page and download the library: Download cinling/ext-lib 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/ */

    

cinling / ext-lib example snippets


use cin\extLib\services\FileCacheService;

FileCacheService::getIns()->set("CacheKeyCin", "cin");

use cin\extLib\services\FileCacheService;

$srv = FileCacheService::getIns();
$srv->set("CacheKeyCin", "cin");
$value = FileCacheService::getIns()->get("CacheKeyCin");
echo $value; // output: cin

use cin\extLib\services\FileCacheService;

$srv = FileCacheService::getIns();
$srv->set("CacheKeyCin", "cin");
$srv->del("CacheKeyCin");
$value = $srv->get("CacheKeyCin");
echo $value; // output: null

use cin\extLib\services\FileCacheService;

FileCacheService::getIns()->set("CacheKeyCin", "cin", 3600); // expire after 3600s

use cin\extLib\services\LogService;

LogService::getIns()->info("Content...", "Title");