Speaker.php 623 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 11 12 13 14 15 16 17 18 19

/**
 * Speaker
 */
class Speaker extends Model
{
	public $firstName;
	public $lastName;

	public $customLabel;
	public $underscore_style;

	protected $protectedProperty;
	private $_privateProperty;

20 21 22 23 24 25 26
	public static $formName = 'Speaker';

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

Alexander Makarov committed
27 28
	public function attributeLabels()
	{
Alexander Makarov committed
29
		return [
Alexander Makarov committed
30
			'customLabel' => 'This is the custom label',
Alexander Makarov committed
31
		];
Alexander Makarov committed
32 33 34 35
	}

	public function rules()
	{
Alexander Makarov committed
36
		return [];
Alexander Makarov committed
37 38 39 40
	}

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