Skip to content

Instantly share code, notes, and snippets.

@estefanionsantos
Last active March 2, 2024 17:11
Show Gist options
  • Save estefanionsantos/c76107db2ca82a5a94cc91836637abc9 to your computer and use it in GitHub Desktop.
Save estefanionsantos/c76107db2ca82a5a94cc91836637abc9 to your computer and use it in GitHub Desktop.
CoreUri 01
<?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