firefly-iii/app/Providers/FireflyServiceProvider.php

52 lines
1.2 KiB
PHP
Raw Normal View History

2015-02-06 13:43:19 -06:00
<?php
namespace FireflyIII\Providers;
use Illuminate\Support\ServiceProvider;
use Validator;
use FireflyIII\Validation\FireflyValidator;
2015-02-06 13:43:19 -06:00
/**
* Class FireflyServiceProvider
*
* @package FireflyIII\Providers
*/
2015-02-06 13:43:19 -06:00
class FireflyServiceProvider extends ServiceProvider
{
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;
}
);
$this->app->bind(
'steam', function () {
return new \FireflyIII\Support\Steam;
}
);
$this->app->bind(
'expandedform', function () {
return new \FireflyIII\Support\ExpandedForm;
}
);
2015-02-06 13:43:19 -06:00
}
}