Read Detail

URI CLASS

URI CLASS dapat dilihat pada file kick/uri/Uri.php. Class ini berfungsi untuk MEMBACA URL BERDASARKAN REAL URL. Penjelasan lebih lengkap tentang URI dapat dilihat DISINI.

Contoh REAL URL = http://localhost/kickframework/index/test/var/2

Format REAL URL KICKFRAME : http://localhost/kickframework/nama_controller/nama_fungsi_pada_controller/nama_variable_1/nilai_variable_1/nama_variable_2/nilai_variable_2/..../nama_variable_n/nilai_variable_n/.

Fungsi DEBUG CLASS adalah sebagai berikut :

1. getHost

public function getHost(){
    return $this->_host;
}

2. getController

public function getController(){            
    if(isset($this->_segment['controller'])){
        return $this->_segment['controller'];
    }else{
        if (defined('DEFAULTCONTROLLER')) {
            return DEFAULTCONTROLLER;
        }else{
            return "index";
        }               
    }
}

3. getAction

public function getAction(){            
    if(isset($this->_segment['action'])){
        return $this->_segment['action'];
    }else{
        return "index";
    }
}

4. getParams

public function getParams(){
    if(isset($this->_segment['params'])){
        return $this->_segment['params'];
    }else{
        return array();
    }
}