Just wanted to create a selfish thread where I can ask questions as I go through the definitive guide for what I hope will be the last time (from start to finish anyway). I also hope this thread might help others as a quick reference.
Am I correct that Yii pulls all $_GET params and creates named variables from them, which can then be passed directly into the controller? For example…
Yii will parse this URL and create a global variable called $app with a value of ‘forums’, negating the requirement to manual extract the variable from $_GET by additional coding. Is that correct?
It doesn’t make it global as such, but if your action has a matching parameter, it will be populated with the value from the $_GET array. If your action has a parameter that doesn’t have a default value and doesn’t appear in the $_GET array, you’ll get an exception regarding an invalid request.
In terms of avoiding problems with incremented autonumbers in the DB as a result of developing/testing an application, am I correct in thinking there is nothing at all stopping me taking a dump of the DB schema once it is known to be working, deleting the old DB and re-creating from the DB schema dump to reset everything. Is that a common practice?
With regard to URL case sensitivity, for consistency I always keep URL’s completely in lower case using underscore separators if necessary (although I’d prefer to use hyphen). There’s no consensus on best practise as far as the Yii framework is concerned, I suppose the most important thing is that you’re consistent within your own applications.