<?php
 
class ANM_CI_Example extends Controller
 
{
 
    /*
 
     * Class constructor
 
     */
 
    function __construct()
 
    {
 
        parent :: Controller();
 
        $this->load->library( 'anm_class/anm_ci' );
 
    }
 
 
 
    /*
 
     * URI remap
 
     */
 
    function _remap( $method )
 
    {
 
        $rules = array(
 
            'index'     => 'index',
 
            'login'     => 'user_login',
 
            'not-found' => 'page_not_found'
 
        );
 
 
        $this->anm_ci->remap( $method, $rules, 'not-found' );
 
    }
 
 
 
    /*
 
     * Controller's default page
 
     *
 
     * URI: {base_url}/anm_ci_example
 
     */
 
    function index()
 
    {
 
        $this->anm_ci->redirect( 'anm_ci_example/login' );
 
    }
 
 
 
    /*
 
     * User's login page
 
     *
 
     * URI: {base_url}/anm_ci_example/login
 
     */
 
    function user_login()
 
    {
 
        echo 'Example Login';
 
    }
 
 
 
    /*
 
     * If requested page is not available
 
     *
 
     * URI: {base_url}/anm_ci_example/not-found
 
     */
 
    function page_not_found()
 
    {
 
        echo 'Page Not Found';
 
    }
 
}
 
 |