Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Controller Guides
#1
Information 
For developers who want to do a costume code or manually create a module, there are some things to know. if you do extend the controller class of CodeIgniter framework, then you can not take advantage of some of the functions contained in the core controller class of Appcore, but if you do extend use of a core controller class Appcore, many of the functions that you can use to speed writing your code without having to re-create existing functionality. Core controller class of Appcore life in the folder application/core/, following several functions on Appcore controller that you can use.

Example extend Appcore model class:
PHP Code:
class Example extends MY_Controller {
 
   protected $moduleTitle 'your_module_title';




Useful Function
PHP Code:
/**
 * get user who currently logged in
 * @return stdObject user information
 */
protected function _getUserInfo() 

PHP Code:
/**
 * get the name of the class that is being used
 * @return string classname
 */
protected function _getClass() 

PHP Code:
/**
 * get directory + class location is being used
 * @return string class name with class directory
 */
protected function _getClassRoute() 

PHP Code:
/**
 * get directory of class location is being used
 * @return string folder location
 */
protected function _getDirectoryRoute() 

PHP Code:
/**
 * check if current logged in is superuser(GM)
 * @return boolean
 */
protected function _isSuperUser() 

PHP Code:
/**
 * get superuser account info
 * @return array
 */
protected function _infoSuperUser() 

If you have any questions , please put forward in this thread, thanks  Angel
Reply


Forum Jump:


Users browsing this thread:
1 Guest(s)