Difference between #4 and #5 of
Understanding Virtual Attributes and get/set methods

Revision #5 has been created by abajja on Mar 31, 2011, 9:54:43 AM with the memo:

minor typo
« previous (#4) next (#6) »

Changes

Title unchanged

Understanding Virtual Attributes and get/set methods

Category unchanged

Tutorials

Yii version unchanged

Tags unchanged

Virtual Attributes; __get; __set

Content changed

[...]
$model->active = 1;
$model->setActive(1); // same thing
```

Note that Yii uses get/set functions **very** heavily internally, so when reviewing the class refer
nences, any function beginning with "set" or "get" can generally be used as an attribute.>

Resolving Conflicts
-------------------
When using an attribute name -- `$model->foo` -- it's important to know the order in which they are processed, because **duplicates are not generally detected**, and this can cause all kinds of hard-to-find bugs.
[...]
65 0
45 followers
Viewed: 155 229 times
Version: 1.1
Category: Tutorials
Written by: Steve Friedl
Last updated by: GOsha
Created on: Mar 31, 2011
Last updated: 6 years ago
Update Article

Revisions

View all history