2014-11-11 11:16:59 -06:00
|
|
|
<?php
|
|
|
|
namespace FireflyIII;
|
|
|
|
|
2014-11-11 14:09:56 -06:00
|
|
|
use FireflyIII\Shared\Validation\FireflyValidator;
|
2014-11-11 11:16:59 -06:00
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class FF3ServiceProvider
|
|
|
|
*
|
|
|
|
* @package FireflyIII
|
|
|
|
*/
|
|
|
|
class FF3ServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
|
2014-11-11 14:09:56 -06:00
|
|
|
public function boot()
|
|
|
|
{
|
|
|
|
$this->app->validator->resolver(
|
|
|
|
function ($translator, $data, $rules, $messages) {
|
|
|
|
return new FireflyValidator($translator, $data, $rules, $messages);
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
2014-11-11 11:16:59 -06:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Triggered automatically by Laravel
|
|
|
|
*/
|
|
|
|
public function register()
|
|
|
|
{
|
|
|
|
// FORMAT:
|
|
|
|
#$this->app->bind('Interface', 'Class');
|
|
|
|
|
|
|
|
// preferences:
|
|
|
|
$this->app->bind('FireflyIII\Shared\Preferences\PreferencesInterface', 'FireflyIII\Shared\Preferences\Preferences');
|
|
|
|
|
2014-11-11 14:09:56 -06:00
|
|
|
// registration and user mail:
|
|
|
|
$this->app->bind('FireflyIII\Shared\Mail\RegistrationInterface', 'FireflyIII\Shared\Mail\Registration');
|
|
|
|
|
2014-11-11 11:16:59 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|