PHP Class TbEditableSaver

Inheritance: extends CComponent
Afficher le fichier Open project: yinhe/yincart Class Usage Examples

Méthodes publiques

Свойство Type Description
$attribute mixed name of attribute to be updated
$errorHttpCode http status code returned in case of error
$model CActiveRecord model instance
$modelClass mixed name of model
$primaryKey mixed primaryKey value
$scenario mixed scenarion used in model for update
$value new value of attribute

Protected Properties

Свойство Type Description
$changedAttributes mixed name of changed attributes. Used when saving model

Méthodes publiques

Méthode Description
__construct ( $modelClass ) : TbEditableSaver ### ._construct()
checkErrors ( ) ### .checkErros()
error ( $msg ) ### .error()
onAfterUpdate ( CEvent $event ) ### .onAfterUpdate()
onBeforeUpdate ( CModelEvent $event ) ### .onBeforeUpdate()
setAttribute ( mixed $name, mixed $value ) ### .setAttribute()
update ( ) ### .update()

Méthodes protégées

Méthode Description
afterUpdate ( ) ### .afterUpdate()
beforeUpdate ( ) ### .beforeUpdate()

Method Details

__construct() public méthode

Constructor
public __construct ( $modelClass ) : TbEditableSaver
$modelClass
Résultat TbEditableSaver

afterUpdate() protected méthode

afterUpdate
protected afterUpdate ( )

beforeUpdate() protected méthode

beforeUpdate
protected beforeUpdate ( )

checkErrors() public méthode

errors as CHttpException
public checkErrors ( )

error() public méthode

errors as CHttpException
public error ( $msg )
$msg

onAfterUpdate() public méthode

This event is raised after the update is performed.
public onAfterUpdate ( CEvent $event )
$event CEvent the event parameter

onBeforeUpdate() public méthode

This event is raised before the update is performed.
public onBeforeUpdate ( CModelEvent $event )
$event CModelEvent the event parameter

setAttribute() public méthode

setting new value of attribute. Attrubute name also stored in array to save only changed attributes
public setAttribute ( mixed $name, mixed $value )
$name mixed
$value mixed

update() public méthode

main function called to update column in database
public update ( )

Property Details

$attribute public_oe property

name of attribute to be updated
public mixed $attribute
Résultat mixed

$changedAttributes protected_oe property

name of changed attributes. Used when saving model
protected mixed $changedAttributes
Résultat mixed

$errorHttpCode public_oe property

http status code returned in case of error
public $errorHttpCode

$model public_oe property

model instance
public CActiveRecord $model
Résultat CActiveRecord

$modelClass public_oe property

name of model
public mixed $modelClass
Résultat mixed

$primaryKey public_oe property

primaryKey value
public mixed $primaryKey
Résultat mixed

$scenario public_oe property

scenarion used in model for update
public mixed $scenario
Résultat mixed

$value public_oe property

new value of attribute
public $value