1: <?php
2: /**
3: * CUnsafeValidator class file.
4: *
5: * @author Qiang Xue <qiang.xue@gmail.com>
6: * @link http://www.yiiframework.com/
7: * @copyright 2008-2013 Yii Software LLC
8: * @license http://www.yiiframework.com/license/
9: */
10:
11: /**
12: * CUnsafeValidator marks the associated attributes to be unsafe so that they cannot be massively assigned.
13: *
14: * @author Qiang Xue <qiang.xue@gmail.com>
15: * @package system.validators
16: * @since 1.0
17: */
18: class CUnsafeValidator extends CValidator
19: {
20: /**
21: * @var boolean whether attributes listed with this validator should be considered safe for massive assignment.
22: * Defaults to false.
23: * @since 1.1.4
24: */
25: public $safe=false;
26: /**
27: * Validates the attribute of the object.
28: * This validator does not do any validation as it is meant
29: * to only mark attributes as unsafe.
30: * @param CModel $object the object being validated
31: * @param string $attribute the attribute being validated
32: */
33: protected function validateAttribute($object,$attribute)
34: {
35: }
36: }
37:
38: