They waited. With some delay (before this release came out immediately at the beginning of the month), but release 1.0.5 saw the world.
So, what amenities await us this time?
New:
- Improvements in ActiveRecord:
* Ability to write similar constructions: Post :: model () -> published () -> recently () -> findAll () (idea taken in Ruby on Rails)
* Support for "lazy" (deferred) loading with the indication of the parameters "on the fly"
* Oracle support
- An option in CHtml that will allow you to generate tags without recoding attribute values
- Ability to check the date and time (in CTypeValidator)
- An additional way to describe the rules for converting urls in the controller / action path using parameters (described below)
- Additional features when checking email addresses (CEmailValidator)
- Improving the performance of CWebUser :: checkAccess () by caching the results of access check requests
- Added CHtml :: value ()
- The default 'yiic shell model' command now generates labels for attributes
Separately, I would like to note that now when defining the rules for forming URLs, you can use constructions of the following form:
')
array (
'<_c: (post | comment)> // <_ a: (create | update | delete)>' => '<_c> ​​/ <_ a>',
'<_c: (post | comment)> /' => '<_a> / view',
'<_c: (post | comment)> s / *' => '<_a> / list',
)
Here we use two parameters with the names '<_c>' and '<_a>' in the right part, where the path of the “controller / action” type is described. The parameter '<_c>' may correspond to the lines 'post' or 'comment', and '<_a>' - the name of the action.
Like regular rules, these rules can also be used to convert and create URLs. For example, using the above rules, the address '/index.php/post/123/create' will be converted to the 'post / create' path with the GET variable 'id' equal to 123. And if you specify the path 'post / list' and GET- the variable 'page' is assigned 2, then we get the address '/index.php/posts/page/2'.
ChangelogDownload