Skip to content

Commit be8db5e

Browse files
committed
fixes
1 parent e84a0d6 commit be8db5e

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

demo/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

src/Adapters/Archive.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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
}

src/Providers/Facebook.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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']);

src/Sources/Feed.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
/**

src/Url.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)