2015-02-06 13:43:19 -06:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace FireflyIII\Providers;
|
|
|
|
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
2015-02-07 18:15:15 -06:00
|
|
|
use Validator;
|
|
|
|
use FireflyIII\Validation\FireflyValidator;
|
2015-02-06 13:43:19 -06:00
|
|
|
|
2015-02-07 18:15:15 -06:00
|
|
|
/**
|
|
|
|
* Class FireflyServiceProvider
|
|
|
|
*
|
|
|
|
* @package FireflyIII\Providers
|
|
|
|
*/
|
2015-02-06 13:43:19 -06:00
|
|
|
class FireflyServiceProvider extends ServiceProvider
|
|
|
|
{
|
2015-02-07 18:15:15 -06:00
|
|
|
public function boot() {
|
|
|
|
Validator::resolver(function($translator, $data, $rules, $messages)
|
|
|
|
{
|
|
|
|
return new FireflyValidator($translator, $data, $rules, $messages);
|
|
|
|
});
|
|
|
|
}
|
2015-02-06 13:43:19 -06:00
|
|
|
public function register()
|
|
|
|
{
|
|
|
|
$this->app->bind(
|
|
|
|
'preferences', function () {
|
|
|
|
return new \FireflyIII\Support\Preferences;
|
|
|
|
}
|
|
|
|
);
|
2015-02-06 14:23:14 -06:00
|
|
|
$this->app->bind(
|
|
|
|
'navigation', function () {
|
|
|
|
return new \FireflyIII\Support\Navigation;
|
|
|
|
}
|
|
|
|
);
|
2015-02-06 23:49:24 -06:00
|
|
|
$this->app->bind(
|
|
|
|
'amount', function () {
|
|
|
|
return new \FireflyIII\Support\Amount;
|
|
|
|
}
|
|
|
|
);
|
2015-02-07 01:23:44 -06:00
|
|
|
|
|
|
|
$this->app->bind(
|
|
|
|
'steam', function () {
|
|
|
|
return new \FireflyIII\Support\Steam;
|
|
|
|
}
|
|
|
|
);
|
2015-02-07 18:15:15 -06:00
|
|
|
$this->app->bind(
|
|
|
|
'expandedform', function () {
|
|
|
|
return new \FireflyIII\Support\ExpandedForm;
|
|
|
|
}
|
|
|
|
);
|
2015-02-06 13:43:19 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|