I don’t understand accessors and mutators in CakePHP.
- For me, accessor with _get is for get a properties with a changement of this value. For exemple ucfirst on the name. And for me, the accessor isn’t use when i create an entity. It’s just use when I get this value of this entity.
- And for me, mutators with _set is when I set the value on the entity. But for me, the mutator isn’t call when i use $user->name.
But I think I haven’t understand this point. Because when I create a accessor _getName and I create a newEntity with the name value, the name value change with this accessor.
So can you explain me accessors and mutators please ?
Thanks, and sorry for my bad english.