MOON
Server: Apache
System: Linux res.emeff.ca 3.10.0-962.3.2.lve1.5.24.10.el7.x86_64 #1 SMP Wed Mar 20 07:36:02 EDT 2019 x86_64
User: accemeff (1004)
PHP: 7.0.33
Disabled: NONE
Upload Files
File: /home/accemeff/vendor/craftcms/cms/src/models/CraftSupport.php
<?php
/**
 * @link https://craftcms.com/
 * @copyright Copyright (c) Pixel & Tonic, Inc.
 * @license https://craftcms.github.io/license/
 */

namespace craft\models;

use Craft;
use craft\base\Model;
use craft\web\UploadedFile;

/**
 * Class CraftSupport model.
 *
 * @author Pixel & Tonic, Inc. <support@pixelandtonic.com>
 * @since 3.0
 */
class CraftSupport extends Model
{
    // Properties
    // =========================================================================

    /**
     * @var string|null From email
     */
    public $fromEmail;

    /**
     * @var string|null Message
     */
    public $message;

    /**
     * @var bool Attach logs
     */
    public $attachLogs = false;

    /**
     * @var bool Attach db backup
     */
    public $attachDbBackup = false;

    /**
     * @var bool Attach templates
     */
    public $attachTemplates = false;

    /**
     * @var UploadedFile|null Attachment
     */
    public $attachment;

    // Public Methods
    // =========================================================================

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'attachment' => Craft::t('app', 'Attachment'),
            'fromEmail' => Craft::t('app', 'Your Email'),
        ];
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        $rules = parent::rules();
        $rules[] = [['fromEmail', 'message'], 'required'];
        $rules[] = [['fromEmail'], 'email'];
        $rules[] = [['fromEmail'], 'string', 'min' => 5, 'max' => 255];
        $rules[] = [['attachment'], 'file', 'maxSize' => 3145728];
        return $rules;
    }
}