Skip to content

Commit bd520a1

Browse files
committed
Fixed case and optimized the Service binding and Facade resolution
1 parent db880fa commit bd520a1

13 files changed

+546
-20
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"autoload": {
99
"psr-4": {
10-
"Slakbal\\Citrix\\": "src/"
10+
"Citrix\\": "src/"
1111
},
1212
"files": [
1313
]

src/CitrixServiceProvider.php

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,31 @@ class CitrixServiceProvider extends ServiceProvider
1212
*
1313
* @var bool
1414
*/
15-
protected $defer = false;
15+
protected $defer = true;
1616

1717

1818
public function register()
1919
{
2020
//runtime merge config
2121
$this->mergeConfigFrom(__DIR__ . '/../config/citrix.php', 'citrix');
2222
$this->registerGotoWebinar(config('citrix.auth_type'));
23-
$this->registerGotoMeeting(config('citrix.auth_type'));
24-
23+
//$this->registerGotoMeeting(config('citrix.auth_type'));
2524
}
2625

2726

28-
public function registerGotoWebinar($authType)
27+
public function registerGotoWebinar($authType = 'direct')
2928
{
30-
$this->app->singleton('g2webinar', function ($app) use ($authType) {
29+
$this->app->singleton(Webinar::class, function ($app) use ($authType) {
3130
return new Webinar($authType);
3231
});
33-
34-
$this->app->alias('g2webinar', Webinar::class);
3532
}
3633

3734

38-
public function registerGotoMeeting($authType)
35+
public function registerGotoMeeting($authType = 'direct')
3936
{
40-
$this->app->singleton('g2meeting', function ($app) use ($authType) {
37+
$this->app->singleton(Meeting::class, function ($app) use ($authType) {
4138
return new Meeting($authType);
4239
});
43-
44-
$this->app->alias('g2meeting', Meeting::class);
4540
}
4641

4742

@@ -61,8 +56,8 @@ public function boot()
6156
public function provides()
6257
{
6358
return [
64-
'g2webinar',
65-
'g2meeting',
59+
Webinar::class,
60+
//Meeting::class,
6661
];
6762
}
6863
}

src/Meeting.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
class Meeting extends CitrixAbstract implements MeetingInterface
88
{
99

10-
public function __construct($authType)
10+
public function __construct($authType = 'direct')
1111
{
12-
parent::__construct($authType);
12+
parent::__construct($authType = 'direct');
1313
}
1414

1515
}

src/Webinar.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
class Webinar extends CitrixAbstract implements WebinarInterface
1010
{
1111

12-
public function __construct($authType)
12+
public function __construct($authType = 'direct')
1313
{
14-
parent::__construct($authType);
14+
parent::__construct($authType = 'direct');
1515
}
1616

1717

src/facade/GotoMeeting.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
namespace Slakbal\Citrix\Facade;
44

5+
use Slakbal\Citrix\Meeting;
56
use Illuminate\Support\Facades\Facade;
67

78
class GotoMeeting extends Facade
89
{
910

1011
protected static function getFacadeAccessor()
1112
{
12-
return 'g2meeting';
13+
return Meeting::class;
1314
}
1415
}

src/facade/GotoWebinar.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
namespace Slakbal\Citrix\Facade;
44

5+
use Slakbal\Citrix\Webinar;
56
use Illuminate\Support\Facades\Facade;
67

78
class GotoWebinar extends Facade
89
{
910

1011
protected static function getFacadeAccessor()
1112
{
12-
return 'g2webinar';
13+
return Webinar::class;
1314
}
1415
}

vendor/autoload.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
// autoload.php @generated by Composer
4+
5+
require_once __DIR__ . '/composer' . '/autoload_real.php';
6+
7+
return ComposerAutoloaderInit91582d37898a564f45818ec00c84e663::getLoader();

0 commit comments

Comments
 (0)