Public Method Details |
Redirect |
|
public void Redirect( )
|
| |
Class constructor
|
| Returns |
void |
|
view |
|
public mixed view( string $url )
|
| |
return the number of hits of an url
return 0 if $config->countredirect!=0
return -1 if DB error
else a sentence like "n hit(s)"
|
| Parameter |
|
|
| Returns |
mixed n hit(s) or an error code |
|
add |
|
public integer add( string $url )
|
| |
Add hits+1 or create it on DB
Return nothing if request is succesful
return 0 if $config->countredirect!=0
return -1 if DB error
|
| Parameter |
|
|
| Returns |
integer an error code or void |
|
make |
|
public string make( string $name, [ string $url, string $arg, string $html_args ] )
|
| |
Returns a <a href="url">name</a> link with appropriate redirect
more arguments can be added with the 3rd and 4th parameters.
|
| Parameter |
|
| string |
$name |
|
|
name that'll be displayed |
|
|
|
|
| string |
$arg |
= >>""<< |
|
the args of the url |
|
|
| string |
$html_args |
= >>""<< |
|
html arguments. Basically, it can be used for CSS |
|
| Returns |
string <a href="url"></a> |
|
header |
|
public void header( string $url )
|
| |
Redirect to URI and add one hit
Call header() to redirect to the URI and call exit.
|
| Parameter |
|
|
| Returns |
void |
|