OpenSencillo
2016.106
Long live the simplicity of PHP
Main Page
Related Pages
Namespaces
Data Structures
Files
Examples
File List
All
Data Structures
Namespaces
Files
Functions
Pages
url.management.urlman.php
1
<?php
12
class
url
13
{
14
protected
$data;
15
16
public
function
__construct()
17
{
18
$this->data[
'hash'
]=md5($data.date(
"YmdHis"
));
19
}
20
26
public
function
url
($array=
false
)
27
{
28
return
($array===
true
?$this->data[
'content'
]:
"//"
.$_SERVER[
'HTTP_HOST'
].$_SERVER[
'REQUEST_URI'
]);
29
}
30
36
public
function
addUrl
($url,$template)
37
{
38
$this->data[
'content'
][$url]=$template;
39
}
40
45
public
function
removeUrl
($url)
46
{
47
unset($this->data[
'content'
][$url]);
48
return
$url;
49
}
50
55
public
function
getPage($page)
56
{
57
return
$this->data[
'content'
][$page];
58
}
59
69
public
function
breadcrumb
($page,$pageNames)
70
{
71
$page = explode(
'/'
,$page);
72
foreach
($page as $key=>$val)
73
{
74
$bcrumb.=
'/'
.$val;
75
$arr[]=$pageNames[$bcrumb];
76
}
77
return
$arr[$page];
78
}
79
}
80
?>
fw_libraries
url.management.urlman.php
Generated on Thu May 19 2016 21:35:27 for OpenSencillo by
1.8.3