| 1 |
<?php |
| 2 |
|
| 3 |
namespace Bookit\Gateways\StripeConnect; |
| 4 |
|
| 5 |
use Bookit\Contracts\Service_Provider; |
| 6 |
|
| 7 |
/** |
| 8 |
* Class Provider |
| 9 |
* |
| 10 |
* @since 2.5.0 |
| 11 |
* |
| 12 |
* @package Bookit\Gateways\StripeConnect |
| 13 |
*/ |
| 14 |
class Provider extends Service_Provider { |
| 15 |
|
| 16 |
/** |
| 17 |
* @inheritDoc |
| 18 |
*/ |
| 19 |
public function register() { |
| 20 |
$this->container->singleton( REST::class ); |
| 21 |
|
| 22 |
$this->register_hooks(); |
| 23 |
} |
| 24 |
|
| 25 |
/** |
| 26 |
* Registers the provider handling all the 1st level filters and actions for this Service Provider. |
| 27 |
* |
| 28 |
* @since 2.5.0 |
| 29 |
*/ |
| 30 |
protected function register_hooks() { |
| 31 |
$hooks = new Hooks( $this->container ); |
| 32 |
$hooks->register(); |
| 33 |
|
| 34 |
// Allow Hooks to be removed, by having the them registered to the container |
| 35 |
$this->container->singleton( Hooks::class, $hooks ); |
| 36 |
} |
| 37 |
} |
| 38 |
|