PHP code example of theorx / mapper
1. Go to this page and download the library: Download theorx/mapper 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/ */
theorx / mapper example snippets
Mapper\Mapper::setCacheSaveFunction(function($className, $data, $ttl){
//Save data to disk or interface to any other caching backend
});
Mapper\Mapper::setCacheReadFunction(function($className, $ttl){
//Read from disk / database or any other caching backend
});
$metaData = Mapper\Mapper::getMethodMeta('\Path\To\My\Class', 'MyMethodName');
//Returns method's metadata