use Friendica\Object\Search\ResultList;
use Friendica\Util\Network;
use Friendica\Util\Strings;
+use GuzzleHttp\Psr7\Uri;
/**
* Specific class to perform searches for different systems. Currently:
$user_data['name'] ?? '',
$user_data['addr'] ?? '',
($contactDetails['addr'] ?? '') ?: ($user_data['url'] ?? ''),
- $user_data['url'] ?? '',
+ new Uri($user_data['url'] ?? ''),
$user_data['photo'] ?? '',
$user_data['network'] ?? '',
$contactDetails['cid'] ?? 0,
$profile['name'] ?? '',
$profile['addr'] ?? '',
($contactDetails['addr'] ?? '') ?: $profile_url,
- $profile_url,
+ new Uri($profile_url),
$profile['photo'] ?? '',
Protocol::DFRN,
$contactDetails['cid'] ?? 0,
$contact['name'],
$contact['addr'],
$contact['addr'] ?: $contact['url'],
- $contact['url'],
+ new Uri($contact['url']),
$contact['photo'],
$contact['network'],
0,
namespace Friendica\Object\Search;
use Friendica\Model\Search;
+use Psr\Http\Message\UriInterface;
/**
* A search result for contact searching
*/
private $item;
/**
- * @var string
+ * @var UriInterface
*/
private $url;
/**
}
/**
- * @return string
+ * @return UriInterface
*/
- public function getUrl(): string
+ public function getUrl(): UriInterface
{
return $this->url;
}
* @param string $name
* @param string $addr
* @param string $item
- * @param string $url
+ * @param UriInterface $url
* @param string $photo
* @param string $network
* @param int $cid
* @param int $pCid
* @param string $tags
*/
- public function __construct($name, $addr, $item, $url, $photo, $network, $cid = 0, $pCid = 0, $tags = '')
+ public function __construct($name, $addr, $item, UriInterface $url, $photo, $network, $cid = 0, $pCid = 0, $tags = '')
{
$this->name = $name;
$this->addr = $addr;