PHP code example of fei / filer-package

1. Go to this page and download the library: Download fei/filer-package 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/ */

    

fei / filer-package example snippets




use ObjectivePHP\Application\AbstractApplication;
use Fei\Service\Filer\Package\FilerPackage;

class Application extends AbstractApplication
{
    public function init()
    {
        // Define some application steps
        $this->addSteps('bootstrap', 'init', 'auth', 'route', 'rendering');
        
        // Initializations...

        // Plugging the Filer Package in the bootstrap step
        $this->getStep('bootstrap')
        ->plug(FilerPackage::class);

        // Another initializations...
    }
}


use Fei\Service\Filer\Package\Config\FilerEndpoint;
use Fei\Service\Filer\Package\Config\FilerTransportOptions;
use Fei\Service\Filer\Package\Config\FilerAsyncTransport;
return [
    new FilerEndpoint('http://filer.dev'),
    new FilerTransportOptions([]),
    new FilerAsyncTransport('127.0.0.1')
];

			// Plugging the Filer Package in the bootstrap step
			$this->getStep('bootstrap')
			->plug(new FilerPackage('my_service'));