Speaker.php 734 Bytes
Newer Older
Alexander Makarov committed
1 2
<?php
namespace yiiunit\data\base;
Alexander Makarov committed
3

Alexander Makarov committed
4
use yii\base\Model;
Alexander Makarov committed
5 6 7 8 9 10

/**
 * Speaker
 */
class Speaker extends Model
{
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
    public $firstName;
    public $lastName;

    public $customLabel;
    public $underscore_style;

    protected $protectedProperty;
    private $_privateProperty;

    public static $formName = 'Speaker';

    public function formName()
    {
        return static::$formName;
    }

    public function attributeLabels()
    {
        return [
            'customLabel' => 'This is the custom label',
        ];
    }

    public function rules()
    {
        return [];
    }

    public function scenarios()
    {
        return [
            'test' => ['firstName', 'lastName', '!underscore_style'],
        ];
    }
Alexander Makarov committed
45
}