<?php
    namespace common\models;
    
    use yii\base\Model;
    
    /**
     * Class Newsletter for subscribing to the news letters.
     */
    class Newsletter extends Model
    {
        /**
         * @var string $email
         */
        public $email;
        
        /**
         * @inheritdoc
         */
        public function rules()
        {
            return [
                [
                    [ 'email' ],
                    'email',
                ],
            ];
        }
        
        /**
         * @inheritdoc
         */
        public function attributeLabels()
        {
            return [
                'email' => \Yii::t('app', 'Email'),
            ];
        }
    }