PHP Classes

File: src/Discretion/Struct/Form.php

Recommend this page to a friend!
  Classes of Scott Arciszewski   Discretion   src/Discretion/Struct/Form.php   Download  
File: src/Discretion/Struct/Form.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: 3 years ago
Size: 956 bytes
 

Contents

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

use
ParagonIE\Discretion\Struct;

/**
 * Class Form
 * @package ParagonIE\Discretion\Struct
 */
class Form extends Struct
{
    const
TABLE_NAME = 'discretion_forms';
    const
PRIMARY_KEY = 'formid';
    const
DB_FIELD_NAMES = [
       
'formid' => 'id',
       
'userid' => 'userId',
       
'themeid' => 'themeId',
       
'publicid' => 'publicId',
       
'config' => 'config'
   
];

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

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

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

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

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

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