#99

MY_Controller, Admin and Public Controllers

    • Status: Fixed
    • Priority: Normal (3)
    • Component: General Code
    • Estimate: None/Small/Medium/Large None
    • Resolution: -
    What about "One File per Class" for Admin and Public Controller?...
    I was thinking about this and find only one way...

    MY_Controller.php_' is for '_Site_Controller class

    Admin_Controller.php_' is for '_Admin_Controller class

    Public_Controller.php_' is for '_Public_Controller class


    and at the end of MY_Controller.php include other Controller classes:

    class Site_Controller extends Controller
    {
    [...Site_Controller class code...]
    }
    
    include('Admin_Controller.php');
    include('Public_Controller.php');
    
    /*  End of file MY_Controller.php */
    /*  Location: ./system/application/libraries/MY_Controller.php */


    ...but the best way will be to include Admin_Controller when we are using backend of the site... and Public_Controller - frontend... I think for doing this we need to do some CodeIgniter Core Classes code changes...
  • Followers
     
    Ico-users Sergey Dyagovchenko 
     
    Attachments
    No attachments
    Associations
     
    No associations
    Activity
     
    User picture

          on Aug 07, 2009 @ 09:45pm UTC * By Adam Price

    Status changed from New to Fixed
    (In revision:252) Moved Admin_Controller and Public_Controller to there own seperate files. Keeping to 1 class per file. Closes #99
    User picture

          on Aug 08, 2009 @ 08:42am UTC * By Adam Price

    Severity changed from normal to -none-
    Milestone changed from Version 0.7 to Version 0.6.#
    Time Expenditure
    Loading