Skip to content
This repository was archived by the owner on Dec 20, 2021. It is now read-only.
This repository was archived by the owner on Dec 20, 2021. It is now read-only.

Customize controller for a route #9

Description

@RETFU

The controller is determine by convention:

/item/{itemId}/ -> Item
/item/{itemId}/comment -> Item\Comment

But sometime you need to choose the controller manually

API proposal

<?php
$rrest = new RREST\RREST($apiSpec, $router, 'XXX\Controllers');
$rest->addControllerAlias('/item/{itemId}/comment', YYY\ZZZ\Comment);
$rest->addControllerAlias('/item/{itemId}/ping', YYY\ZZZ\Ping);
$rest->removeControllerAlias('/item/{itemId}/ping');

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions