File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed
Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ function getResolverOption($name, $default = null)
173173 $ options ['oembedParameters ' ] = $ options ['oembedParameters ' ] ? json_decode ($ options ['oembedParameters ' ], true ) : array ();
174174 }
175175
176- $ request = new Embed \Request (new Embed \Url ($ _GET ['url ' ], null , isset ($ _GET ['resolver ' ]) ? (array ) $ _GET ['resolver ' ] : null ) );
176+ $ request = new Embed \Request (new Embed \Url ($ _GET ['url ' ]) , null , isset ($ _GET ['resolver ' ]) ? (array ) $ _GET ['resolver ' ] : null );
177177 $ info = Embed \Embed::create ($ request , $ options );
178178 ?>
179179
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ protected function initProviders(Request $request)
3232 $ this ->api = new Provider ();
3333
3434 $ api = clone $ request ;
35- $ api ->setParameter ('output ' , 'json ' );
35+ $ api ->url -> setParameter ('output ' , 'json ' );
3636
3737 if (($ json = $ api ->getJsonContent ())) {
3838 $ this ->api ->set ($ json );
@@ -125,13 +125,13 @@ public function getImages()
125125 $ images = array ();
126126
127127 if (($ image = $ this ->api ->get ('misc ' , 'image ' ))) {
128- $ images [] = $ this ->request ->getAbsolute ($ image );
128+ $ images [] = $ this ->request ->url -> getAbsolute ($ image );
129129 }
130130
131131 if (is_array ($ files = $ this ->api ->get ('files ' ))) {
132132 foreach ($ files as $ url => $ info ) {
133133 if ($ info ['format ' ] === 'Thumbnail ' ) {
134- $ images [] = $ this ->request ->getAbsolute ($ url );
134+ $ images [] = $ this ->request ->url -> getAbsolute ($ url );
135135 }
136136 }
137137 }
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class Facebook extends Provider
1717 public function __construct (Request $ request )
1818 {
1919 $ graph = $ request ->createRequest ('https://graph.facebook.com/fql ' );
20- $ graph ->setParameter ('q ' , 'SELECT comments_fbid FROM link_stat WHERE url = " ' .$ this ->url .'" ' );
20+ $ graph ->url -> setParameter ('q ' , 'SELECT comments_fbid FROM link_stat WHERE url = " ' .$ request ->url -> getUrl () .'" ' );
2121
2222 if ($ graph ->isValid () && ($ info = $ graph ->getJsonContent ()) && isset ($ info ['data ' ][0 ]['comments_fbid ' ])) {
2323 $ graph = $ request ->createRequest ('https://graph.facebook.com/ ' .$ info ['data ' ][0 ]['comments_fbid ' ]);
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ public function getSourceUrl()
6161 */
6262 public function getProviderUrl ()
6363 {
64- return !empty ($ this ->data ['url ' ]) ? $ this ->data ['url ' ] : ($ this ->request ->getScheme ().':// ' .$ this ->request ->getHost ());
64+ return !empty ($ this ->data ['url ' ]) ? $ this ->data ['url ' ] : ($ this ->request ->url -> getScheme ().':// ' .$ this ->request -> url ->getHost ());
6565 }
6666
6767 /**
Original file line number Diff line number Diff line change @@ -223,7 +223,7 @@ public function getParameter($name)
223223 /**
224224 * Set a new GET parameter or modify an existing one
225225 *
226- * @param string $name The parameter name or an array of parameters
226+ * @param string|array $name The parameter name or an array of parameters
227227 * @param string $value The parameter value
228228 */
229229 public function setParameter ($ name , $ value = null )
You can’t perform that action at this time.
0 commit comments