src/Laravel/ConverterServiceProvider.php
protected function registerExchangers()
    {
        $this->app->singleton('converter.native.exchanger', function ($app) {
            return new NativeExchanger;
        });

        $this->app->singleton('converter.openexchangerates.exchanger', function ($app) {
            $config = $app['config']->get('cartalyst.converter');

            $appId = array_get($config, 'exchangers.openexchangerates.app_id');

            $expires = array_get($config, 'expires');

            $exchanger = new OpenExchangeRatesExchanger($app['cache']);
            $exchanger->setAppId($appId);
            $exchanger->setExpires($expires);

            return $exchanger;
        });

        $this->app->singleton('converter.exchanger', function ($app) {
            $default = $app['config']->get('cartalyst.converter.exchangers.default');

            return $app["converter.{$default}.exchanger"];
        });
    }
protected function registerExchangers()
    {
        $this->app->singleton('converter.native.exchanger', function ($app) {
            return new NativeExchanger;
        });

        $this->app->singleton('converter.openexchangerates.exchanger', function ($app) {
            $config = $app['config']->get('cartalyst.converter');

            $appId = array_get($config, 'exchangers.openexchangerates.app_id');

            $expires = array_get($config, 'expires');

            $exchanger = new OpenExchangeRatesExchanger($app['cache']);
            $exchanger->setAppId($appId);
            $exchanger->setExpires($expires);

            return $exchanger;
        });

        $this->app->singleton('converter.exchanger', function ($app) {
            $default = $app['config']->get('cartalyst.converter.exchangers.default');

            return $app["converter.{$default}.exchanger"];
        });
    }
protected function registerExchangers ( ) { $ this -> app -> singleton ( 'converter.native.exchanger' , function ( $ app ) { return new NativeExchanger ; } ) ; $ this -> app -> singleton ( 'converter.openexchangerates.exchanger' , function ( $ app ) { $ config = $ app [ 'config' ] -> get ( 'cartalyst.converter' ) ; $ appId = array_get ( $ config , 'exchangers.openexchangerates.app_id' ) ; $ expires = array_get ( $ config , 'expires' ) ; $ exchanger = new OpenExchangeRatesExchanger ( $ app [ 'cache' ] ) ; $ exchanger -> setAppId ( $ appId ) ; $ exchanger -> setExpires ( $ expires ) ; return $ exchanger ; } ) ; $ this -> app -> singleton ( 'converter.exchanger' , function ( $ app ) { $ default = $ app [ 'config' ] -> get ( 'cartalyst.converter.exchangers.default' ) ; return $ app [ "converter.{$default}.exchanger" ] ; } ) ; }
Register all the available exchangers.

@return void
Register all the available exchangers .