File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -46,14 +46,18 @@ public function __get($name)
46
46
}
47
47
}
48
48
49
- public function getFromProviders ($ name )
49
+ public function getFromProviders ($ name, $ returnFirst = true )
50
50
{
51
51
$ method = 'get ' .$ name ;
52
52
$ values = array ();
53
53
$ current = null ;
54
54
55
55
foreach ($ this ->providers as $ Provider ) {
56
56
if (($ value = $ Provider ->$ method ())) {
57
+ if ($ returnFirst === true ) {
58
+ return $ value ;
59
+ }
60
+
57
61
if (isset ($ values [$ value ])) {
58
62
++$ values [$ value ];
59
63
} else {
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ public function getType()
108
108
return 'video ' ;
109
109
}
110
110
111
- if (($ type = $ this ->getFromProviders ('type ' ))) {
111
+ if (($ type = $ this ->getFromProviders ('type ' , false ))) {
112
112
return $ type ;
113
113
}
114
114
You can’t perform that action at this time.
0 commit comments