Alright, so I’ve been using Yii for a fair amount of time now and have finally hopped into the community :] Prior to my stint in PHP I was programming in Scala - it’s rather difficult to be a member of many different active communities at once. So, hi Yii
Anyway, Given the following URL: /admin/users Yii first looks for a folder in the controllers folder called ‘admin’ and if it exists, looks for a controller within admin called ‘UsersController’. Great!
What I want to do is create a folder called ‘/admin’ and have, say, a default controller that would be called if that directory exists - but no controller is matched. For example => ‘/admin’ => ‘/admin/main’ … now I already understand that this can be done in URL rules and that given this particular logic it wouldn’t be too expensive to run - but the simple matter is that redefining the search logic would be yield better performance.
I figure this will mean extending an object - anyone have any thoughts on the matter? I want to do this a dozen times, ( so the URL rules become even more expensive )
/admin => /admin/MainController.php ( multiple admin controllers )
/admin/logs => /admin/logs/MainController.php ( multiple log controllers )
/admin/stats/ => /admin/stats/MainController.php ( multiple stat controllers )
Basically - if anyone has worked with Drupal, I am kind of building that stereotypical admin splash page where I’m going to run checkAccess on a few sections like checkAccess(‘statAdmin’), checkAccess(‘logAdmin’) - these are very broad examples, but there’d be a few levels of adminship in my project that would build a different admin screen each time.
Thank you for your time!! ( Hint: perhaps making this a high level setting would be awesome too. I’m willing to contribute if anyone finds value )
to summarize. Instead of calling /admin/main or admin/logs/main I would like to create this implicitly. It just brings my level of programming service to the client up a notch by hiding some magic and making urls just work.