Last active
March 2, 2024 17:11
-
-
Save estefanionsantos/c76107db2ca82a5a94cc91836637abc9 to your computer and use it in GitHub Desktop.
CoreUri 01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$u = new Rubricate\Uri\CoreUri(); | |
# localhost:8080 | |
$u->getController(); # Index | |
$u->getAction(); # index | |
# uri: /sports/basketball/lorem/ipsum/dolor | |
$u->getController(); # Sports | |
$u->getAction(); # basketball | |
$u->getParam(0); # lorem | |
$u->getParam(1); # ipsum | |
$u->getParam(2); # dolor | |
$u->getStr(); # sports/basketball/lorem/ipsum/dolor | |
$u->getParamArr(); | |
/* | |
Array | |
( | |
[0] => lorem | |
[1] => ipsum | |
[2] => dolor | |
) | |
*/ | |
# EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment