Ejemplo n.º 1
0
<?php

PathManager::loadPaths(array("/search", "index"));
Ejemplo n.º 2
0
<?php

PathManager::setAppPrefix("/admin");
PathManager::loadPaths(array("", "index"), array("/login", "login"), array("/logout", "logout"), array("/posts/edit/(?P<id>\\d+)", "edit_post"), array("/posts/add", "add_post"), array("/posts/edit/(?P<id>\\d+)/generate-burn-link", "generate_burn_link"), array("/posts/(?P<id>\\d+)/comments", "view_comments"), array("pattern" => "/posts/(?P<id>\\d+)/comments/edit/(?P<comment_id>\\d+)", "action" => "edit_comment", "method" => "POST"), array("pattern" => "/posts/(?P<id>\\d+)/related", "action" => "related_posts"), array("pattern" => "/posts/(?P<id>\\d+)/related/add", "action" => "add_related_post", "method" => "POST"), array("pattern" => "/posts/(?P<id>\\d+)/related/edit/(?P<related_post_id>\\d+)", "action" => "edit_related_post", "method" => "POST"), array("pattern" => "/posts/(?P<id>\\d+)/related/delete/(?P<related_post_id>\\d+)", "action" => "delete_related_post"));
Ejemplo n.º 3
0
<?php

PathManager::setAppCacheTtl(300);
PathManager::loadPaths(array("/(?P<path>[A-z0-9_-]+)", "view_static"));
Ejemplo n.º 4
0
<?php

PathManager::setAppCacheTtl(300);
PathManager::loadPaths(array("/running/(?P<year>2013)", "archive"), array("/running", "index"));
Ejemplo n.º 5
0
<?php

PathManager::loadPaths(array("(?P<url>/[a-z]{0,16})", "do_redirect"));
Ejemplo n.º 6
0
<?php

PathManager::setAppCacheTtl(120);
PathManager::loadPaths(array("/articles/(?P<month>\\d{4}/\\d{2})", "view_month"), array("/articles/(?P<month>\\d{4}/\\d{2})/(?P<url>[A-z0-9-]+)", "view_post"), array("/articles/tag/(?P<tag>[a-z0-9\\s\\.]+)", "search_tags"), array("/articles", "index"), array("pattern" => "/articles/(?P<month>\\d{4}/\\d{2})/(?P<url>[A-z0-9-]+)/comment", "action" => "add_comment", "cacheTtl" => false, "method" => "POST"), array("pattern" => "/articles/(?P<month>\\d{4}/\\d{2})/(?P<url>[A-z0-9-]+)/comment/thanks", "action" => "comment_thanks", "cacheTtl" => false), array("pattern" => "/burn-after-reading/(?P<identifier>[A-z0-9]+)", "action" => "burn_after_reading", "cacheTtl" => false), array("pattern" => "/comment-unsubscribe/(?P<hash>[A-z0-9]+)", "action" => "comment_unsubscribe", "cacheTtl" => false));
Ejemplo n.º 7
0
<?php

PathManager::setAppCacheTtl(300);
PathManager::loadPaths(array("/contact", "index"), array("/contact/thanks", "thanks"));
Ejemplo n.º 8
0
<?php

// helper function to set the default cache TTL for a group of paths
PathManager::setAppCacheTtl(300);
PathManager::loadPaths(array("/", "index"));
Ejemplo n.º 9
0
<?php

PathManager::setAppCacheTtl(1200);
PathManager::loadPaths(array("/feed\\.(xml|rss)", "index"));