urlParser - ThomasDC84/Proteus GitHub Wiki
Class urlParser
This class will analyze the URL called to run Proteus, it is able to return a specific part of it (breadcrumbs) including GET and POST parameters, those will be returned after being escaped with the escapeString() function.
Methods
These are the methods of the class, they are all static methods, perhaps the class is a fully static class:
__Init()
It is called by the core at the very beginning of the code, it load the current URL and it start to analyze it;
getPath($index)
This method has an optional parameter called index, if it is not given the method will return the url path stripped of any GET parameter. Instead, if an index is given, it returns the breadcrumb according to it (starting from 0);
getUrlParameter($parameterName)
This method needs a string parameter, it will return a GET or POST parameter with the given name filtered with the escapeString() function or false if the parameter is not set/exists.
Example
Here is an example of how to use this class in your code: $action = urlParser::getUrlParameter('action');