PHP code example of mikespub / epub-loader

1. Go to this page and download the library: Download mikespub/epub-loader 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/ */

    

mikespub / epub-loader example snippets


use Marsender\EPubLoader\RequestHandler;

// get the global config for epub-loader from somewhere
// get the current action and dbNum if any

// you can define extra actions for your app - see example.php
$handler = new RequestHandler($gConfig, ExtraActions::class);
$result = $handler->request($action, $dbNum);

// handle the result yourself or let epub-loader generate the output
$result['endpoint'] = 'loader.php';
$result['app_name'] = 'My Application';
echo $handler->output($result, $templateDir, $template);

public function more()
{
    // do some more...
    return [
        'result' => 'This is more...',
        'extra' => 'easy',
    ];
}