| 1 |
<?php |
| 2 |
namespace Depicter\Integration; |
| 3 |
|
| 4 |
use Depicter\Integration\MailChimp\MailChimp; |
| 5 |
use Depicter\Integration\Manager; |
| 6 |
use WPEmerge\ServiceProviders\ServiceProviderInterface; |
| 7 |
|
| 8 |
/** |
| 9 |
* Load document data manager. |
| 10 |
*/ |
| 11 |
class ServiceProvider implements ServiceProviderInterface { |
| 12 |
|
| 13 |
/** |
| 14 |
* {@inheritDoc} |
| 15 |
*/ |
| 16 |
public function register( $container ) { |
| 17 |
$app = $container[ WPEMERGE_APPLICATION_KEY ]; |
| 18 |
|
| 19 |
$container[ 'depicter.integration.manager' ] = function () { |
| 20 |
return new Manager(); |
| 21 |
}; |
| 22 |
|
| 23 |
$app->alias( 'integration', 'depicter.integration.manager' ); |
| 24 |
|
| 25 |
$container[ 'depicter.integration.mailchimp' ] = function () { |
| 26 |
return new MailChimp(); |
| 27 |
}; |
| 28 |
|
| 29 |
} |
| 30 |
|
| 31 |
/** |
| 32 |
* {@inheritDoc} |
| 33 |
*/ |
| 34 |
public function bootstrap( $container ) { |
| 35 |
\Depicter::integration()->init(); |
| 36 |
} |
| 37 |
|
| 38 |
} |
| 39 |
|