public function prepare()
    {
        if ($this->ready) {
            return null;
        }

        $this->ready = true;

        $format     = $this->format;
        $controller = $this->controller;

        foreach ($this->classMethods as $value) {
            if ($format === self::BOTH || $format === self::SLASH) {
                $route = '/' . (empty($value[1]) ? '' : ($value[1] . '/'));

                Route::set($value[0], $route, $controller . ':' . $value[2]);
            }

            if ($format === self::BOTH || $format === self::NOSLASH) {
                $route = empty($value[1]) ? '' : ('/' . $value[1]);

                Route::set($value[0], $route, $controller . ':' . $value[2]);
            }
        }

        $controller = $classMethods = null;
    }
public function prepare()
    {
        if ($this->ready) {
            return null;
        }

        $this->ready = true;

        $format     = $this->format;
        $controller = $this->controller;

        foreach ($this->classMethods as $value) {
            if ($format === self::BOTH || $format === self::SLASH) {
                $route = '/' . (empty($value[1]) ? '' : ($value[1] . '/'));

                Route::set($value[0], $route, $controller . ':' . $value[2]);
            }

            if ($format === self::BOTH || $format === self::NOSLASH) {
                $route = empty($value[1]) ? '' : ('/' . $value[1]);

                Route::set($value[0], $route, $controller . ':' . $value[2]);
            }
        }

        $controller = $classMethods = null;
    }
public function prepare ( ) { if ( $ this -> ready ) { return null ; } $ this -> ready = true ; $ format = $ this -> format ; $ controller = $ this -> controller ; foreach ( $ this -> classMethods as $ value ) { if ( $ format === self :: BOTH || $ format === self :: SLASH ) { $ route = '/' . ( empty ( $ value [ 1 ] ) ? '' : ( $ value [ 1 ] . '/' ) ) ; Route :: set ( $ value [ 0 ] , $ route , $ controller . ':' . $ value [ 2 ] ) ; } if ( $ format === self :: BOTH || $ format === self :: NOSLASH ) { $ route = empty ( $ value [ 1 ] ) ? '' : ( '/' . $ value [ 1 ] ) ; Route :: set ( $ value [ 0 ] , $ route , $ controller . ':' . $ value [ 2 ] ) ; } } $ controller = $ classMethods = null ; }
Create routes by configurations

@throws \Inphinit\Experimental\Exception
@return void
Create routes by configurations