2019-05-19 02:50:14 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Friendica\Object\Search;
|
|
|
|
|
|
|
|
use Friendica\Model\Search;
|
|
|
|
|
|
|
|
/**
|
2019-05-19 05:13:06 +02:00
|
|
|
* A search result for contact searching
|
2019-05-19 02:50:14 +02:00
|
|
|
*
|
2019-05-19 05:13:06 +02:00
|
|
|
* @see Search for details
|
2019-05-19 02:50:14 +02:00
|
|
|
*/
|
2019-05-20 18:42:27 +02:00
|
|
|
class ContactResult implements IResult
|
2019-05-19 02:50:14 +02:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var int
|
|
|
|
*/
|
|
|
|
private $cid;
|
|
|
|
/**
|
|
|
|
* @var int
|
|
|
|
*/
|
2019-05-19 05:13:06 +02:00
|
|
|
private $pCid;
|
2019-05-19 02:50:14 +02:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
private $name;
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
private $addr;
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
private $item;
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
private $url;
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
private $photo;
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
private $tags;
|
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
private $network;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getCid()
|
|
|
|
{
|
|
|
|
return $this->cid;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return int
|
|
|
|
*/
|
2019-05-19 05:13:06 +02:00
|
|
|
public function getPCid()
|
2019-05-19 02:50:14 +02:00
|
|
|
{
|
2019-05-19 05:13:06 +02:00
|
|
|
return $this->pCid;
|
2019-05-19 02:50:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getName()
|
|
|
|
{
|
|
|
|
return $this->name;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getAddr()
|
|
|
|
{
|
|
|
|
return $this->addr;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getItem()
|
|
|
|
{
|
|
|
|
return $this->item;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getUrl()
|
|
|
|
{
|
|
|
|
return $this->url;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getPhoto()
|
|
|
|
{
|
|
|
|
return $this->photo;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getTags()
|
|
|
|
{
|
|
|
|
return $this->tags;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getNetwork()
|
|
|
|
{
|
|
|
|
return $this->network;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param string $name
|
|
|
|
* @param string $addr
|
2019-05-20 18:42:27 +02:00
|
|
|
* @param string $item
|
2019-05-19 02:50:14 +02:00
|
|
|
* @param string $url
|
|
|
|
* @param string $photo
|
|
|
|
* @param string $network
|
|
|
|
* @param int $cid
|
2019-05-20 18:42:27 +02:00
|
|
|
* @param int $pCid
|
2019-05-19 02:50:14 +02:00
|
|
|
* @param string $tags
|
|
|
|
*/
|
2019-05-20 18:42:27 +02:00
|
|
|
public function __construct($name, $addr, $item, $url, $photo, $network, $cid = 0, $pCid = 0, $tags = '')
|
2019-05-19 02:50:14 +02:00
|
|
|
{
|
|
|
|
$this->name = $name;
|
|
|
|
$this->addr = $addr;
|
|
|
|
$this->item = $item;
|
|
|
|
$this->url = $url;
|
|
|
|
$this->photo = $photo;
|
|
|
|
$this->network = $network;
|
|
|
|
|
|
|
|
$this->cid = $cid;
|
2019-05-20 18:42:27 +02:00
|
|
|
$this->pCid = $pCid;
|
2019-05-19 02:50:14 +02:00
|
|
|
$this->tags = $tags;
|
|
|
|
}
|
|
|
|
}
|