• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can I have more management on my controller by separate functions into classes?

#1
Question 
 created a simple "CMS" with "codeigniter".
I want to know can it separates public functions into a new class?
This is my controller code:



PHP Code:
class Admin extends MY_Controller {
 
   public function __construct(){}
 
   
    
// ---- POST ----
 
   public function addPost(){}
 
   public function editPost(){}
 
   public function deletePost(){}
 
   public function managePosts(){}
 
   
    
// ---- CATEGORY ----
 
   public function addCategory(){}
 
   public function editCategory(){}
 
   ...
    
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.