|
@ -35,7 +35,7 @@ class Mf2 { |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private static function parseHEntry($mf2, \p3k\HTTP $http) { |
|
|
|
|
|
|
|
|
private static function parseHEntry($mf2, $http) { |
|
|
$data = [ |
|
|
$data = [ |
|
|
'type' => 'entry', |
|
|
'type' => 'entry', |
|
|
'author' => [ |
|
|
'author' => [ |
|
@ -117,7 +117,7 @@ class Mf2 { |
|
|
return $data; |
|
|
return $data; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private static function parseHFeed($mf2, \p3k\HTTP $http) { |
|
|
|
|
|
|
|
|
private static function parseHFeed($mf2, $http) { |
|
|
$data = [ |
|
|
$data = [ |
|
|
'type' => 'feed', |
|
|
'type' => 'feed', |
|
|
'author' => [ |
|
|
'author' => [ |
|
@ -133,7 +133,7 @@ class Mf2 { |
|
|
return $data; |
|
|
return $data; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private static function parseHCard($item, \p3k\HTTP $http, $authorURL=false) { |
|
|
|
|
|
|
|
|
private static function parseHCard($item, $http, $authorURL=false) { |
|
|
$data = [ |
|
|
$data = [ |
|
|
'type' => 'card', |
|
|
'type' => 'card', |
|
|
'name' => null, |
|
|
'name' => null, |
|
@ -162,7 +162,7 @@ class Mf2 { |
|
|
return $data; |
|
|
return $data; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private static function findAuthor($mf2, $item, \p3k\HTTP $http) { |
|
|
|
|
|
|
|
|
private static function findAuthor($mf2, $item, $http) { |
|
|
$author = [ |
|
|
$author = [ |
|
|
'type' => 'card', |
|
|
'type' => 'card', |
|
|
'name' => null, |
|
|
'name' => null, |
|
@ -324,7 +324,7 @@ class Mf2 { |
|
|
return $fallback; |
|
|
return $fallback; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private static function getURL($url, \p3k\HTTP $http) { |
|
|
|
|
|
|
|
|
private static function getURL($url, $http) { |
|
|
if(!$url) return null; |
|
|
if(!$url) return null; |
|
|
// TODO: consider adding caching here
|
|
|
// TODO: consider adding caching here
|
|
|
$result = $http->get($url); |
|
|
$result = $http->get($url); |
|
|