PHP Classes

File: src/Discretion/Struct/Contact.php

Recommend this page to a friend!
  Classes of Scott Arciszewski   Discretion   src/Discretion/Struct/Contact.php   Download  
File: src/Discretion/Struct/Contact.php
Role: Class source
Content type: text/plain
Description: Class source
Class: Discretion
Show contact forms and deliver encrypted mail
Author: By
Last change:
Date: 2 years ago
Size: 853 bytes
 

Contents

Class file image Download
<?php
declare(strict_types=1);
namespace
ParagonIE\Discretion\Struct;

use
ParagonIE\Discretion\Struct;

/**
 * Class Contact
 * @package ParagonIE\Discretion\Struct
 */
class Contact extends Struct
{
    const
TABLE_NAME = 'discretion_contacts';
    const
PRIMARY_KEY = 'contactid';
    const
DB_FIELD_NAMES = [
       
'contactid' => 'id',
       
'userid' => 'userId',
       
'name' => 'name',
       
'email' => 'email',
       
'gpgfingerprint' => 'gpgFingerprint'
   
];

   
/** @var int $userId */
   
protected $userId = 0;

   
/** @var string $name */
   
protected $name = '';

   
/** @var string $email */
   
protected $email = '';

   
/** @var string $gpgFingerprint */
   
protected $gpgFingerprint = '';

   
/**
     * @return User
     */
   
public function getUser(): User
   
{
        return
User::byId($this->userId);
    }
}