You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
545 B
41 lines
545 B
12 years ago
|
<?php
|
||
|
namespace yiiunit\data\base;
|
||
|
|
||
|
/**
|
||
|
* Speaker
|
||
|
*/
|
||
|
use yii\base\Model;
|
||
|
|
||
|
class Speaker extends Model
|
||
|
{
|
||
|
public $firstName;
|
||
|
public $lastName;
|
||
|
|
||
|
public $customLabel;
|
||
|
public $underscore_style;
|
||
|
|
||
|
protected $protectedProperty;
|
||
|
private $_privateProperty;
|
||
|
|
||
|
public function attributeLabels()
|
||
|
{
|
||
|
return array(
|
||
|
'customLabel' => 'This is the custom label',
|
||
|
);
|
||
|
}
|
||
|
|
||
|
public function rules()
|
||
|
{
|
||
|
return array(
|
||
|
|
||
|
);
|
||
|
}
|
||
|
|
||
|
public function scenarios()
|
||
|
{
|
||
|
return array(
|
||
|
'test' => array('firstName', 'lastName', '!underscore_style'),
|
||
|
);
|
||
|
}
|
||
|
}
|