File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 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)
4646 }
4747 }
4848
49- public function getFromProviders ($ name )
49+ public function getFromProviders ($ name, $ returnFirst = true )
5050 {
5151 $ method = 'get ' .$ name ;
5252 $ values = array ();
5353 $ current = null ;
5454
5555 foreach ($ this ->providers as $ Provider ) {
5656 if (($ value = $ Provider ->$ method ())) {
57+ if ($ returnFirst === true ) {
58+ return $ value ;
59+ }
60+
5761 if (isset ($ values [$ value ])) {
5862 ++$ values [$ value ];
5963 } else {
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ public function getType()
108108 return 'video ' ;
109109 }
110110
111- if (($ type = $ this ->getFromProviders ('type ' ))) {
111+ if (($ type = $ this ->getFromProviders ('type ' , false ))) {
112112 return $ type ;
113113 }
114114
You can’t perform that action at this time.
0 commit comments