With more and more people installing and using Solar all the time, theres some questions that get asked quite a bit. I wanted to help with some of those questions by providing some simple answers here. Here we go…
- Tip #1 – Be sure that you have your App directory correctly set in the configuration file. If you don’t add it to your front controller Classes setting, Solar has no idea where to find it.
- Tip #2 – Class names on the controllers are important! Be sure it follows the directory tree like Project_App_Controller. Also be sure you’re extending the right thing. I usually use a Base controller/setup to provide an overarching “global” place to put things (like a layout) and extend that, so it’s usually “extends Project_App_Base”
- Tip #3 – You can change the values that the Solar_Form login functionality uses to trigger the automagic login process by setting it in the adapter for your authentication object (like a Solar_Auth_Adapter_Sql) via the process_login and process_logout values.
- Tip #4 – Be sure to include everything you need to get to “magically” through Solar in the set_include_path in the front controller. For example, you can add in another directory with external libraries so that in your application, you can just call it and let the __autoload handle it.
- Tip #5 – You might get some complaints from Solar about not having a “sql” object it can work with. I good way to handle this is to check in your _setup function of your controllers to see if there’s one registered. If not, make one with a factory call and register it for the framework’s use: Solar_Registry::set(‘sql’, Solar::factory(‘Solar_Sql’));