friendica/src/Contact/Introduction/Entity/Introduction.php

90 lines
2.3 KiB
PHP
Raw Normal View History

<?php
/**
* @copyright Copyright (C) 2010-2021, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
namespace Friendica\Contact\Introduction\Entity;
use Friendica\BaseEntity;
/**
* @property-read int $uid
2021-10-19 23:11:47 +02:00
* @property-read int $cid
* @property-read int|null $sid
* @property-read bool $knowyou
* @property-read string $note
* @property-read string $hash
* @property-read \DateTime $datetime
* @property-read bool $ignore
* @property-read int|null $id
*/
class Introduction extends BaseEntity
{
/** @var int */
protected $uid;
/** @var int */
protected $cid;
2021-10-19 23:11:47 +02:00
/** @var int|null */
protected $sid;
/** @var bool */
protected $knowyou;
/** @var string */
protected $note;
/** @var string */
protected $hash;
/** @var \DateTime */
protected $datetime;
/** @var bool */
protected $ignore;
/** @var int|null */
protected $id;
/**
* @param int $uid
2021-10-19 23:11:47 +02:00
* @param int $cid
* @param int|null $sid
* @param bool $knowyou
* @param string $note
* @param string $hash
* @param \DateTime $datetime
* @param bool $ignore
* @param int|null $id
*/
public function __construct(int $uid, int $cid, ?int $sid, bool $knowyou, string $note, string $hash, \DateTime $datetime, bool $ignore, ?int $id)
{
2021-10-19 22:03:24 +02:00
$this->uid = $uid;
$this->cid = $cid;
2021-10-19 23:11:47 +02:00
$this->sid = $sid;
2021-10-19 22:03:24 +02:00
$this->knowyou = $knowyou;
$this->note = $note;
$this->hash = $hash;
$this->datetime = $datetime;
$this->ignore = $ignore;
$this->id = $id;
}
2021-10-19 21:04:24 +02:00
/**
* Ignore the current Introduction
*/
public function ignore()
{
$this->ignore = true;
}
}