MMOframework
Pourquoi l'IA Playground Bibliothèques Documentation Rechercher Agence
FR EN
Index

PageRoute

MMO\admin\helpers · 1 symbole · générée le 27 Oct 2026

class

PageRoute

PageRoute.php:16

A page of the application, as the developer layer names it: its route, the url's path below the site (settings/utilisateurs), whatever site the url is of -- http://localhost/my.oviepro/settings/utilisateurs, https://dev.oviepro.com/settings/utilisateurs and settings/utilisateurs?uid=12 are the same page.

class MMO\admin\helpers\PageRoute
Espace de noms
MMO\admin\helpers
A ticket names its pages (`pages: [{route, target}]`), a checklist item its `url`: both are read as routes here, and a route of a ticket may be a pattern (`declaration`).
PageRoute::FromUrl('http://localhost/my.oviepro/settings/users?uid=3', ['/my.oviepro/']); // 'settings/users'PageRoute::Matches('declaration', 'declaration/AccidentTravail/declaration'); // true

Index

FromText($text, $basePaths) staticThe urls a text cites, as routes: a ticket's description, a ``` `check ``` block.
FromUrl($url, $basePaths) static
Matches($pattern, $route) static
MatchesAny($patterns, $routes) static

Méthodes4

FromText($text, $basePaths)

staticPageRoute.php:76

The urls a text cites, as routes: a ticket's description, a ``` `check ``` block.

static function FromText(string $text, array $basePaths = []): array
$textstring
$basePaths = []array
retournearray

FromUrl($url, $basePaths)

staticPageRoute.php:22
static function FromUrl(?string $url, array $basePaths = []): ?string
$urlnull | stringabsolute, or relative to the site
$basePaths = []arraythe paths a site is served below (/my.oviepro/): stripped when the url starts with one
retournenull | stringits route, without query nor fragment; null for what is not a page (an api's json, a file)

Matches($pattern, $route)

staticPageRoute.php:47
static function Matches(string $pattern, string $route): bool
$patternstringa route, * standing for a segment's part, ** for any number of segments
$routestring
retournebool

MatchesAny($patterns, $routes)

staticPageRoute.php:61
static function MatchesAny(array $patterns, array $routes): bool
$patternsarray
$routesarraythe page's names: its route as asked, and as its folder's default makes it
retourneboolwhether one of $patterns is one of $routes