1. Go to this page and download the library: Download fg/essence-interfaces 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/ */
fg / essence-interfaces example snippets
$Essence = Essence\Essence::instance([
'Cache' => Essence\Di\Container::unique( function( ) {
return new Essence\Cache\Engine\Doctrine(
new Doctrine\Common\Cache\FilesystemCache( 'path/to/cache/directory' )
);
})
]);
$Cache = new Essence\Cache\Engine\Cake( 'configuration' );
$Cache = new Essence\Cache\Engine\Doctrine(
new Doctrine\Common\Cache\FilesystemCache( 'path/to/cache/directory' ),
$ttl
);
$Cache = new Essence\Cache\Engine\Zend(
Zend\Cache\StorageFactory::adapterFactory( 'apc' )
);
$Http = new Essence\Http\Client\Cake( new HttpSocket( ));
$Log = new Essence\Log\Logger\Cake( 'scope' );
$Log = new Essence\Log\Logger\Psr( new CustomPsrLogger( ));
$Monolog = new Monolog\Logger( 'essence' );
$Monolog->pushHandler(
new Monolog\Handler\StreamHandler( 'path/to/log/file' )
);
$Log = new Essence\Log\Logger\Psr( $Monolog );
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.