The CActiveRecord :: resetScope () method has been added . It allows you to reset all the named condition groups (scopes) used in the chain, including the default condition group.
A third parameter has been added to the CBaseController :: widget () method, which allows you not to display the results of the widget immediately on the screen, but to return, for example, to save to a variable. Similarly, as does CController :: render () and other render methods.
CCaptchaAction now supports an unlimited number of input attempts by setting the testLimit property to zero.
A fourth parameter has been added to CAssetManager :: publish () , which includes forced copying of resource files and directories from the source to the published directory, even if they were published before. This option should be used mainly only during development, when source files of resources are constantly being corrected.
Created another class for caching. You can now use WinCache using the CWinCache class. Naturally, for this, the corresponding extension must be included in PHP.
Now you can combine regular PHP-native templates and special templates customizable through additional classes (for example, CPradoViewRenderer )
CTypeValidator now supports checking not only single variables, but also the contents of arrays.
The function CHttpSession :: get () was created , which returns the value of the session variable by its name. This function is very similar to CHttpSession :: itemAt () , except that it can return a default value if the session variable with the specified name is not defined.
Gii module
Separately, it is necessary to note the new module called Gii , which is included in the distribution.
What used to be done with the yiic utility can now be easily done right in the browser. This module provides the ability to generate code not from the command line, but in the browser, which of course is much more convenient.
Gii initially included several generators (and their number can be expanded), each of which is responsible for generating the code of its type. For example, the controller generator generates the controller class code together with several view files, and the model generator creates the ActiveRecord class for a specific table in the database.
Typical actions when using the generator:
Enter the generator page.
Fill out the form with parameters for generation. For example, when using the module generator, to create a new module, you need to enter the name (identifier) of the module.
Click the “Preview” button to see which files will be created and click on any of them to view their contents.
Click the Generate button to create the files directly.
Optionally, view the log file with a description of all actions performed during the generation of a new code.
Since the module creates new files with php-code, it should be used only on the developer's server.
For more information, as well as instructions for connecting the module, see the documentation .