public function init( array $config = [ ] )
    {
        foreach ( $config as $key => $value )
        {
            switch ( $key )
            {
                case 'default_controller':
                    $this->defaultController = $value;
                    break;

                case 'default_action':
                    $this->defaultAction = $value;
                    break;

                case 'namespaces':
                    $this->namespaces = $value;
                    break;

                default:
                    // do nothing
                    break;
            }
        }
    }
public function init( array $config = [ ] )
    {
        foreach ( $config as $key => $value )
        {
            switch ( $key )
            {
                case 'default_controller':
                    $this->defaultController = $value;
                    break;

                case 'default_action':
                    $this->defaultAction = $value;
                    break;

                case 'namespaces':
                    $this->namespaces = $value;
                    break;

                default:
                    // do nothing
                    break;
            }
        }
    }
public function init ( array $ config = [ ] ) { foreach ( $ config as $ key => $ value ) { switch ( $ key ) { case 'default_controller' : $ this -> defaultController = $ value ; break ; case 'default_action' : $ this -> defaultAction = $ value ; break ; case 'namespaces' : $ this -> namespaces = $ value ; break ; default : // do nothing break ; } } }
Initialises the router.

@param array $config configuration array
Initialises the router .