src/Router.php
public function add($methods, $route, $settings, $callback = null)
    {
        if($this->cacheLoaded) {
            return true;
        }

        if (is_null($callback)) {
            $callback = $settings;
            $settings = null;
        }

        if (strstr($methods, '|')) {
            foreach (array_unique(explode('|', $methods)) as $method) {
                if ($method != '') {
                    call_user_func_array([$this, strtolower($method)], [$route, $settings, $callback]);
                }
            }
        } else {
            call_user_func_array([$this, strtolower($methods)], [$route, $settings, $callback]);
        }

        return true;
    }
public function add($methods, $route, $settings, $callback = null)
    {
        if($this->cacheLoaded) {
            return true;
        }

        if (is_null($callback)) {
            $callback = $settings;
            $settings = null;
        }

        if (strstr($methods, '|')) {
            foreach (array_unique(explode('|', $methods)) as $method) {
                if ($method != '') {
                    call_user_func_array([$this, strtolower($method)], [$route, $settings, $callback]);
                }
            }
        } else {
            call_user_func_array([$this, strtolower($methods)], [$route, $settings, $callback]);
        }

        return true;
    }
public function add ( $ methods , $ route , $ settings , $ callback = null ) { if ( $ this -> cacheLoaded ) { return true ; } if ( is_null ( $ callback ) ) { $ callback = $ settings ; $ settings = null ; } if ( strstr ( $ methods , '|' ) ) { foreach ( array_unique ( explode ( '|' , $ methods ) ) as $ method ) { if ( $ method != '' ) { call_user_func_array ( [ $ this , strtolower ( $ method ) ] , [ $ route , $ settings , $ callback ] ) ; } } } else { call_user_func_array ( [ $ this , strtolower ( $ methods ) ] , [ $ route , $ settings , $ callback ] ) ; } return true ; }
Add new route method one or more http methods.

@param string $methods
@param string $route
@param array|string|closure $settings
@param string|closure $callback

@return bool
Add new route method one or more http methods .