Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Yaf_Response_HttpYaf_Route_Interface::assemble>
^YafLast updated: Mon, 26 Oct 2026

The Yaf_Route_Interface class

(Yaf >=1.0.0)

Introduction

Yaf_Route_Interface defines the contract every route must implement: Yaf_Route_Interface::route(), which inspects the request and claims it by setting the module, controller and action (and optionally request parameters), and Yaf_Route_Interface::assemble(), which builds a URL from route info.

Implement this interface to define a custom route, and register it on the router with Yaf_Router::addRoute(). The built-in route classes (Yaf_Route_Static, Yaf_Route_Simple, Yaf_Route_Supervar, Yaf_Route_Rewrite, Yaf_Route_Regex and Yaf_Route_Map) all implement it.

Class synopsis

class Yaf_Route_Interface {
/* Methods */
abstract public function assemble(array $info, array $query = ?): string
abstract public function route(Yaf_Request_Abstract $request): bool
}

Table of Contents


<Yaf_Response_HttpYaf_Route_Interface::assemble>
^YafLast updated: Mon, 26 Oct 2026