2015-02-06 13:43:19 -06:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace FireflyIII\Providers;
|
|
|
|
|
2015-02-11 00:35:10 -06:00
|
|
|
use FireflyIII\Support\Amount;
|
|
|
|
use FireflyIII\Support\ExpandedForm;
|
|
|
|
use FireflyIII\Support\Navigation;
|
|
|
|
use FireflyIII\Support\Preferences;
|
|
|
|
use FireflyIII\Support\Steam;
|
|
|
|
use FireflyIII\Validation\FireflyValidator;
|
2015-02-06 13:43:19 -06:00
|
|
|
use Illuminate\Support\ServiceProvider;
|
2015-02-07 18:15:15 -06:00
|
|
|
use Validator;
|
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-11 00:35:10 -06:00
|
|
|
public function boot()
|
|
|
|
{
|
|
|
|
Validator::resolver(
|
|
|
|
function ($translator, $data, $rules, $messages) {
|
|
|
|
return new FireflyValidator($translator, $data, $rules, $messages);
|
|
|
|
}
|
|
|
|
);
|
2015-02-07 18:15:15 -06:00
|
|
|
}
|
2015-02-11 00:35:10 -06:00
|
|
|
|
2015-02-06 13:43:19 -06:00
|
|
|
public function register()
|
|
|
|
{
|
|
|
|
$this->app->bind(
|
|
|
|
'preferences', function () {
|
2015-02-11 00:35:10 -06:00
|
|
|
return new Preferences;
|
2015-02-06 13:43:19 -06:00
|
|
|
}
|
|
|
|
);
|
2015-02-06 14:23:14 -06:00
|
|
|
$this->app->bind(
|
|
|
|
'navigation', function () {
|
2015-02-11 00:35:10 -06:00
|
|
|
return new Navigation;
|
2015-02-06 14:23:14 -06:00
|
|
|
}
|
|
|
|
);
|
2015-02-06 23:49:24 -06:00
|
|
|
$this->app->bind(
|
|
|
|
'amount', function () {
|
2015-02-11 00:35:10 -06:00
|
|
|
return new Amount;
|
2015-02-06 23:49:24 -06:00
|
|
|
}
|
|
|
|
);
|
2015-02-07 01:23:44 -06:00
|
|
|
|
|
|
|
$this->app->bind(
|
|
|
|
'steam', function () {
|
2015-02-11 00:35:10 -06:00
|
|
|
return new Steam;
|
2015-02-07 01:23:44 -06:00
|
|
|
}
|
|
|
|
);
|
2015-02-07 18:15:15 -06:00
|
|
|
$this->app->bind(
|
|
|
|
'expandedform', function () {
|
2015-02-11 00:35:10 -06:00
|
|
|
return new ExpandedForm;
|
2015-02-07 18:15:15 -06:00
|
|
|
}
|
|
|
|
);
|
2015-02-09 00:23:39 -06:00
|
|
|
|
|
|
|
$this->app->bind('FireflyIII\Repositories\Account\AccountRepositoryInterface', 'FireflyIII\Repositories\Account\AccountRepository');
|
2015-02-22 02:46:21 -06:00
|
|
|
$this->app->bind('FireflyIII\Repositories\Budget\BudgetRepositoryInterface', 'FireflyIII\Repositories\Budget\BudgetRepository');
|
2015-02-22 09:19:32 -06:00
|
|
|
$this->app->bind('FireflyIII\Repositories\Category\CategoryRepositoryInterface', 'FireflyIII\Repositories\Category\CategoryRepository');
|
2015-02-09 00:23:39 -06:00
|
|
|
$this->app->bind('FireflyIII\Repositories\Journal\JournalRepositoryInterface', 'FireflyIII\Repositories\Journal\JournalRepository');
|
2015-02-25 08:19:14 -06:00
|
|
|
$this->app->bind('FireflyIII\Repositories\Bill\BillRepositoryInterface', 'FireflyIII\Repositories\Bill\BillRepository');
|
2015-02-25 12:32:33 -06:00
|
|
|
$this->app->bind('FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface', 'FireflyIII\Repositories\PiggyBank\PiggyBankRepository');
|
2015-02-22 09:19:32 -06:00
|
|
|
|
2015-02-23 13:25:48 -06:00
|
|
|
$this->app->bind('FireflyIII\Helpers\Report\ReportHelperInterface', 'FireflyIII\Helpers\Report\ReportHelper');
|
|
|
|
$this->app->bind('FireflyIII\Helpers\Report\ReportQueryInterface', 'FireflyIII\Helpers\Report\ReportQuery');
|
|
|
|
|
2015-02-06 13:43:19 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|