
yii
Since version 5.4 PHP can work as a simple webserver so you can develop Yii applications without installing Apache. That's how to use it: Open command line and cd to webroot (where your index.php is). Run PHP as webserver:
Using Yii with PHP 5.4 built-in webserver instead of Apache
Yii PHP Framework 1.1.8 is released | News | Yii Framework
Behaviors & events
These features provide endless possibilities and unbelievable flexibility, but as current documentation does not give more than a few examples, it might be difficult to fully understand their internals and requirements. It should be noted that they do mostly the same thing. You can attach behaviors and event handlers to components to modify the components' behavior. Events ¶ It is useful when you want to interrupt the normal application flow without extending base classes.The Problem ¶ Most applications will have one or two sidebars and often you want to control the content that should appear in the sidebar based on the action. For example you will want to show something different on the homepage as opposed to some view page. While achieving this you generally also want to avoid putting the layout into each view, as that would mean if you wanted to change the layout (e.g. put the sidebar on the left instead of the right or do some funky layout which requires an additional div tag to be added) you'd have to go through every view, which does not achieve good code re-use. It is also bad practice to have lots of if statements in column2 layout just so that you can generate the sidebar correctly. The Solution ¶
Dynamic Sidebar using CClipWidget
Portlets: Creating User Menu Portlet | Building a Blog System Using Yii | Yii Framework
Based on the requirements analysis, we need three different portlets: the "user menu" portlet, the "tag cloud" portlet and the "recent comments" portlet. We will develop these portlets by extending the CPortlet widget provided by Yii. In this section, we will develop our first concrete portlet - the user menu portlet which displays a list of menu items that are only available to authenticated users. The menu contains four items: Approve Comments: a hyperlink that leads to a list of comments pending approval; Create New Post: a hyperlink that leads to the post creation page; Manage Posts: a hyperlink that leads to the post management page; Logout: a link button that would log out the current user.URL component access functions
Setting and maintaining the language in Application (i18n)
How to use an application behavior to maintain runtime configuration
In this tutorial will be explained a method to manage some configuration runtime. This excellent tutorial follows a similar approach, but requires to write a masterclass which all controllers are supposed to extend, following this wiki you can achieve the same by only editing the configuration. This is often needed to manage internationalization, themes and other configuration that depends from the user. The most comfortable way is to user an application behavior. In this example we save the language in the session, but it can also be saved in the database. Create a file in components named ApplicationConfigBehavior and copy this code:I have developed some apps based on Yii but I still found that I haven't used all the strong feature from Yii. I re-worked with Yii Blog Tutorial and just want to make a quick summary with Yii features. What I learned from the Yii Blog Tutorial so far 1/ http://www.yiiframew...totype.scaffold We can scaffold the Model, Controller , not only to main controller , model folders but also to Modules folder 2/ http://www.yiiframew...
What I learned from Yii Blog Tutorial so far - Yii Framework Forum
yii-cms
urlManager rules for route aliases - Yii Framework Forum
Y!!, on 13 April 2010 - 01:26 PM, said: Are you not using path format in urlmanager config? You can do: 'rules' => array ( 'this/is/an-example' => 'module/controller/action' , ),In this article, we describe the directory structure used by yiiframework.com - the official Yii framework website. While this structure may look overly complicated for small projects or may not be optimal in some sense, we believe it is appropriate for medium or large projects in a team development environment. In fact, we have successfully used the similar structure in some other big projects. Overall Structure ¶ Below is the directory structure we are using: / backend/ common/ components/ config/ params.php params-local.php * lib/ Pear/ yii/ Zend/ migrations/ models/ Comment.php Extension.php ... console/ commands/ SitemapCommand.php ... config/ main.php main-local.php * params.php params-local.php * runtime/ yiic.php * frontend/ components/ config/ main.php main-local.php * params.php params-local.php * controllers/ SiteController.php ... lib/ models/ ContactForm.php SearchForm.php runtime/ views/ layouts/ site/ www/ assets/ css/ js/ index.php * yiic yiic.bat

