Skip to content

Commit 4508301

Browse files
author
Mathew
committed
creating client in plugin bootstrap
1 parent 4b43673 commit 4508301

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/Controller/Component/ConfigReaderComponent.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ public function initialize(Array $config)
1717

1818
// App::import('Vendor', 'FloodgateCake.FloodgateSDK/filename');
1919

20-
$user = new \FloodgateSDK\User('id');
21-
$client = new FloodgateClient($sdkkey);
22-
// $client = new \FloodgateCake\FloodgateSDK\FloodgateClient\FloodgateClient($sdkkey);
20+
// $user = new \FloodgateSDK\User('id');
21+
// $client = new FloodgateClient($sdkkey);
22+
// // $client = new \FloodgateCake\FloodgateSDK\FloodgateClient\FloodgateClient($sdkkey);
2323

2424

2525

26-
debug($client);
26+
// debug($client);
2727
}
2828

2929
public function doComplexOperation($amount1, $amount2)

src/Plugin.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Cake\Core\PluginApplicationInterface;
77
use Cake\Core\Configure;
88
use Cake\Utility\Hash;
9+
use FloodgateSDK\FloodgateClient;
910

1011
/**
1112
* Plugin for FloodgateCake
@@ -26,6 +27,7 @@ public function bootstrap(PluginApplicationInterface $app)
2627
throw new \InvalidArgumentException('Floodgate SDK Key not provided.');
2728
}
2829

29-
30+
$client = new FloodgateClient($sdkkey);
31+
debug($client);
3032
}
3133
}

0 commit comments

Comments
 (0)