Register route command.

        Add route plugin command to context menu.
516822
def register_route_command(self, command, title=None, group=None):
        '''
        
        '''
        commands = self.route_commands.setdefault(group, OrderedDict())
        if title is None:
            title = (command[:1].upper() + command[1:]).replace('_', ' ')
        commands[command] = title
1251531
public function register_routes() {
		register_rest_route( $this->namespace, '/' . $this->rest_base, array(
			array(
				'methods'             => WP_REST_Server::READABLE,
				'callback'            => array( $this, 'get_item' ),
				'args'                => array(),
				'permission_callback' => array( $this, 'get_item_permissions_check' ),
			),
			array(
				'methods'             => WP_REST_Server::EDITABLE,
				'callback'            => array( $this, 'update_item' ),
				'args'                => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),
				'permission_callback' => array( $this, 'get_item_permissions_check' ),
			),
			'schema' => array( $this, 'get_public_item_schema' ),
		) );
	}
129270
private function registerRoute(string $className, array $routes, string $prefix, bool $coroutine, $server)
    {
        foreach ($routes as $route) {
            $mappedName = $route['mappedName'];
            $methodName = $route['methodName'];
            if (empty($mappedName)) {
                $mappedName = $methodName;
            }

            $commandKey = $this->getCommandString($prefix, $mappedName);
            $this->routes[$commandKey] = [$className, $methodName, $coroutine, $server];
        }

        $commandKey = $this->getCommandString($prefix, $this->defaultCommand);
        $this->routes[$commandKey] = [$className, $this->defaultCommand];
    }
692019
protected function registerMakeAddonCommand($command)
    {
        $this->app->singleton($command, function ($app) {
            return new Addons\Commands\AddonMakeCommand($app);
        });
    }
553005
protected function registerCommands()
    {
        ensure_trait_used_in_subclass_of_or_fail(self::class, $this, ServiceProvider::class);

        foreach (array_keys($this->commands) as $command) {
            $method = "register{$command}Command";
            call_user_func_array([$this, $method], []);
        }
        $this->commands(array_values($this->commands));
    }
207827
public function registerRoutes()
    {
        if ($this->app->routesAreCached()) {
            return;
        }

        Route::domain((string) config('platform.domain'))
            ->prefix(Dashboard::prefix('/press'))
            ->as('platform.')
            ->middleware(config('platform.middleware.private'))
            ->group(realpath(PLATFORM_PATH.'/routes/press.php'));
    }
596353
def register(command, aggregate_class = nil, &block)
      raise ArgumentError, 'Pass either aggregate class or block' if aggregate_class && block
      handler = aggregate_class || block
      @routes[command] = handler
    end
960012
public function register_routes() {

		register_rest_route( $this->namespace, '/' . $this->rest_base, array(
			array(
				'methods'         => WP_REST_Server::READABLE,
				'callback'        => array( $this, 'get_items' ),
				'permission_callback' => array( $this, 'get_items_permissions_check' ),
				'args'            => $this->get_collection_params(),
			),
			array(
				'methods'         => WP_REST_Server::CREATABLE,
				'callback'        => array( $this, 'create_item' ),
				'permission_callback' => array( $this, 'create_item_permissions_check' ),
				'args'            => $this->get_endpoint_args_for_item_schema( WP_REST_Server::CREATABLE ),
			),
			'schema' => array( $this, 'get_public_item_schema' ),
		) );
		register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>[\d]+)', array(
			array(
				'methods'         => WP_REST_Server::READABLE,
				'callback'        => array( $this, 'get_item' ),
				'permission_callback' => array( $this, 'get_item_permissions_check' ),
				'args'            => array(
					'context'          => $this->get_context_param( array( 'default' => 'view' ) ),
				),
			),
			array(
				'methods'         => WP_REST_Server::EDITABLE,
				'callback'        => array( $this, 'update_item' ),
				'permission_callback' => array( $this, 'update_item_permissions_check' ),
				'args'            => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),
			),
			array(
				'methods' => WP_REST_Server::DELETABLE,
				'callback' => array( $this, 'delete_item' ),
				'permission_callback' => array( $this, 'delete_item_permissions_check' ),
				'args' => array(
					'force'    => array(
						'default'     => false,
						'description' => __( 'Required to be true, as resource does not support trashing.' ),
					),
					'reassign' => array(),
				),
			),
			'schema' => array( $this, 'get_public_item_schema' ),
		) );

		register_rest_route( $this->namespace, '/' . $this->rest_base . '/me', array(
			'methods'         => WP_REST_Server::READABLE,
			'callback'        => array( $this, 'get_current_item' ),
			'args'            => array(
				'context'          => array(),
			),
			'schema' => array( $this, 'get_public_item_schema' ),
		));
	}
906073
protected function registerDocsCommand()
    {
        $this->app->singleton(\Dingo\Api\Console\Command\Docs::class, function ($app) {
            return new Command\Docs(
                $app[\Dingo\Api\Routing\Router::class],
                $app[\Dingo\Blueprint\Blueprint::class],
                $app[\Dingo\Blueprint\Writer::class],
                $this->config('name'),
                $this->config('version')
            );
        });

        $this->commands([\Dingo\Api\Console\Command\Docs::class]);
    }
1249151
public function register()
    {
        $route = new RouteCollector(new Std(), new DataGenerator());
        for ($i = 0; $i < count($this->uri); $i++) {
            $route->addRoute($this->method[$i], $this->uri[$i], $this->pattern[$i]);
        }

        $this->dispatcher = new Dispatcher($route->getData());
    }
949400
private function registerMapping()
    {
        /* @var \Swoft\Console\Router\HandlerMapping $route */
        $route = App::getBean('commandRoute');

        $commandMapping = CommandCollector::getCollector();
        $route->register($commandMapping);
    }
269203
private function registerRoutes()
    {
        collect(($routes = $this->getRoutes()))->each(function ($route) {
            $this->registerRoute($route);
        });

        $this->registerResourcesRoutes();
    }
461952
public function register_cli() {
		if ( ! defined( 'WP_CLI' ) || ! WP_CLI ) {
			return;
		}
		self::$list[$this->table] = get_called_class();
		if ( self::$initialized ) {
			return;
		}
		\WP_CLI::add_command( "schema", \Hametuha\Pattern\Command::class );
		self::$initialized = false;
	}
449093
protected function registerDocsCommand()
    {
        $this->app->singleton(NodesConsoleCommandDocs::class, function ($app) {
            return new NodesConsoleCommandDocs(
                $app['api.router'],
                $app['Dingo\Blueprint\Blueprint'],
                $app['Dingo\Blueprint\Writer'],
                config('nodes.api.settings.name'),
                config('nodes.api.settings.version')
            );
        });

        $this->commands([NodesConsoleCommandDocs::class]);
    }
1083224
protected function registerMakeCommand()
    {
        $this->app->bindShared('migration.creator', function($app)
        {
            return new MigrationCreator($app['files']);
        });

        $this->app->bindShared('command.migrate.make', function($app)
        {
            $creator = $app['migration.creator'];

            $packagePath = $app['path.base'] .DS .'vendor';

            return new MakeMigrationCommand($creator, $packagePath);
        });
    }
182550
private function registerCommands()
    {
        $commands = [
            'arbory.seed' => SeedCommand::class,
            'arbory.install' => InstallCommand::class,
            'arbory.generator' => GeneratorCommand::class,
            'arbory.generate' => GenerateCommand::class
        ];

        foreach( $commands as $containerKey => $commandClass )
        {
            $this->registerCommand( $containerKey, $commandClass );
        }
    }
1165205
private function registerCommands()
    {
        $this->app['commands.drawbridge.migrations'] = $this->app->share(function($app)
        {
            return new MigrationsCommand($app);
        });

        $this->commands(
            array(
                 'commands.drawbridge.migrations'
            )
        );
    }