PHP 8.6.0 Beta 3 is available for testing

Yaf_Route_Static::match

(Yaf >=1.0.0)

Yaf_Route_Static::matchWhether the route matches a URI

Descrizione

public function Yaf_Route_Static::match(string $uri): bool

Determine whether the static route matches a URI. Since the static route matches any URI, this method always returns true.

Elenco dei parametri

uri

The URI to check.

Valori restituiti

Always returns true.

Esempi

Example #1 Yaf_Route_Static::match() example

<?php
$route = new Yaf_Route_Static();

/* the static route matches any URI */
var_dump($route->match("/product/detail/id/10"));
var_dump($route->match("/"));
?>

Il precedente esempio visualizzerà qualcosa simile a:

bool(true)
bool(true)

Vedere anche:

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top