11 public static $frequencies = [
'always',
'hourly',
'daily',
'weekly',
'monthly',
'yearly',
'never' ];
30 foreach ( $routes as $path => $route ) {
31 $url = $this->
parseUrl ( $path, $route );
33 if (! isset ( $this->urls [$path] ))
34 $this->urls [$path] = $url;
40 foreach ( $array as $url ) {
41 $this->urls [$url [
'location']] =
Url::fromArray ( $url, $existing );
46 if (isset ( $route [
"controller"] )) {
47 $controller = $route [
"controller"];
48 $action = $route [
"action"];
49 } elseif (isset ( $route [
"get"] )) {
50 return $this->
parseUrl ( $path, $route [
"get"] );
54 $lastModified = self::getLastModified ( $controller, $action );
55 if ($lastModified !==
false) {
56 $url =
new Url ( $path, $lastModified );
63 if (\class_exists ( $controller )) {
66 if (\is_array ( $classCode )) {
67 $reflexAction = new \ReflectionMethod ( $controller .
'::' . $action );
69 foreach ( $views as $view ) {
70 $file = ROOT . DS .
"views" . DS . $view;
72 if ($viewDate > $lastModified)
73 $lastModified = $viewDate;
static getClassCode($classname)
static fromArray($array, $existing=true)
parseArray($array, $existing=true)
static lastModified($filename)
static getFileName($classname)
Url for Seo module, use for sitemap generation.
static getLastModified($controller, $action)
static getLoadedViews(\ReflectionMethod $r, $lines)