We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Hostname in annotations router.

Please tell me how to and where to describe the parameter "hostName" in the annotations of the controller, and is it possible?

/**
 * Class Auth
 *
 * User authorization in the system.
 *
 * @RoutePrefix("/")
 *
 * @package Account\Controllers
 * @version 1.0.0
 */
class Auth extends Frontend {

  /**
   * Initial configuration.
   */
  public function initialize() {
    parent::initialize();
  }

  /**
   * Authorization form.
   *
   * @Get("account/auth.html", name="Account:Auth:Form:View",
   *   paths={module="Account"})
   *
   * @return mixed
   */
  public function formView() {

  }

  /**
   * The authorization procedure.
   *
   * @Post("account/auth.json", name="Account:Auth:Form:Processing",
   *   paths={module="Account"})
   *
   * @return mixed
   */
  public function formProcessing() {

  }

  /**
   * The user logs off.
   *
   * @Get("account/auth/logout.html", name="Account:Auth:logOut",
   *   paths={module="Account"})
   *
   * @return mixed
   */
  public function logOut() {

  }

}


145.0k
Accepted
answer

It's not possible right now. Well, i guess i will do PR with it if you need such a functionallity.



2.4k

Yes, such a possibility is needed. Without it, annotation router is not a complete.