Inheritance diagram for URL:
Collaboration diagram for URL:Static Public Member Functions | |
| static | get_matched_rule () |
| static | get_active_rules () |
| static | set_404 () |
| static | parse ($from_url) |
| static | get ($rule_names= '', $args=array(), $useall=true, $noamp=false, $prepend_site=true) |
| static | out ($rule_name=null, $args=array(), $useall=true, $noamp=true, $prepend_site=true) |
| static | get_from_filesystem ($path, $trail=false, $preserve_file=false) |
| static | extract_args ($args, $prefix= '') |
Static Protected Member Functions | |
| static | instance () |
URL class which handles creation of URLs based on the rewrite rules in the database. Uses rules to construct pretty URLs for use by the system and especially the theme's template engine
Definition at line 13 of file url.php.
| static URL::extract_args | ( | $ | args, | |
| $ | prefix = '' | |||
| ) | [static] |
Extract the possible arguments to use in the URL from the passed variable
| mixed | $args An array of values or a URLProperties object with properties to use in the construction of a URL |
Definition at line 260 of file url.php.
Referenced by get(), Post::get_url_args(), and User::get_url_args().
| static URL::get | ( | $ | rule_names = '', |
|
| $ | args = array(), |
|||
| $ | useall = true, |
|||
| $ | noamp = false, |
|||
| $ | prepend_site = true | |||
| ) | [static] |
Builds the required pretty URL given a supplied rule name and a set of placeholder replacement values and returns the built URL.
URL::get( 'display_entries_by_date', array( 'year' => '2000', 'month' => '05', 'day' => '01', ) );
| mixed | $rule_names string name of the rule or array of rules which would build the URL | |
| mixed | $args (optional) array or object of placeholder replacement values | |
| boolean | $useall If true (default), then all passed parameters that are not part of the built URL are tacked onto the URL as querystring | |
| boolean | $prepend_site If true (default), a full URL is returned, if false, only the path part of the URL is returned |
Definition at line 144 of file url.php.
Referenced by AdminHandler::__construct(), AtomHandler::act_introspection(), UserHandler::act_login(), ActionHandler::act_redirect(), AtomHandler::act_rsd(), Pingback::action_add_template_vars(), CoreBlocks::action_block_content_monthly_archives(), CoreBlocks::action_block_content_search_form(), CoreBlocks::action_block_content_tag_archives(), CoreBlocks::action_init(), ViddlerSilo::action_plugin_ui(), FlickrSilo::action_plugin_ui_authorize(), FlickrSilo::action_plugin_ui_confirm(), FlickrSilo::action_plugin_ui_deauthorize(), AtomHandler::add_pagination_links(), AtomHandler::add_posts(), AdminGroupsHandler::ajax_groups(), Post::comment_form(), AdminUsersHandler::form_user_success(), AdminThemesHandler::get_activate_theme(), AtomHandler::get_collection(), AdminCommentsHandler::get_comment(), AtomHandler::get_comments(), AtomHandler::get_entry(), AdminGroupsHandler::get_group(), AdminHandler::get_main_menu(), AdminPluginsHandler::get_plugin_toggle(), AdminPluginsHandler::get_plugins(), AdminThemesHandler::get_preview_theme(), AdminUsersHandler::get_user(), out(), AtomHandler::post_collection(), AdminPostsHandler::post_delete_post(), AdminGroupsHandler::post_group(), AdminImportHandler::post_import(), CronTab::run_cron(), AdminHandler::setup_admin_theme(), Theme::theme_comment_form_action(), Theme::theme_feed_alternate(), Theme::theme_header(), Theme::theme_next_page_link(), Theme::theme_page_selector(), Theme::theme_prev_page_link(), Charcoal::theme_show_tags(), and AdminGroupsHandler::update_groups().
| static URL::get_active_rules | ( | ) | [static] |
Get the active RewriteRules that are cached in self::load_rules().
Definition at line 56 of file url.php.
Referenced by PluginHandler::act(), UserHandler::login_form(), and ActionHandler::setup_theme().
| static URL::get_from_filesystem | ( | $ | path, | |
| $ | trail = false, |
|||
| $ | preserve_file = false | |||
| ) | [static] |
Get a fully-qualified URL from a filesystem path
| string | $path The filesystem path | |
| bool | whether to include a trailing slash. Default: No | |
| bool | whether to leave a filename on the URL. Default: No |
Definition at line 243 of file url.php.
Referenced by Pluggable::get_url(), ViddlerSilo::silo_info(), HabariSilo::silo_info(), and FlickrSilo::silo_info().
| static URL::get_matched_rule | ( | ) | [static] |
Get the matched RewriteRule that was matched in parse().
Definition at line 46 of file url.php.
Referenced by AdminHandler::__construct(), PluginHandler::act(), Theme::act_display(), AtomHandler::add_pagination_links(), Theme::check_scope_criteria(), AtomHandler::create_atom_wrapper(), AtomHandler::get_collection(), UserHandler::login_form(), ActionHandler::setup_theme(), and Theme::theme_feed_alternate().
| static URL::instance | ( | ) | [static, protected] |
Enables singleton working properly
Reimplemented from Singleton.
Definition at line 25 of file url.php.
Referenced by get(), get_active_rules(), get_matched_rule(), parse(), and set_404().
| static URL::out | ( | $ | rule_name = null, |
|
| $ | args = array(), |
|||
| $ | useall = true, |
|||
| $ | noamp = true, |
|||
| $ | prepend_site = true | |||
| ) | [static] |
Helper wrapper function. Outputs the URL via echo.
| string | $rule_name name of the rule which would build the URL | |
| array | $args (optional) array of placeholder replacement values | |
| boolean | $useall If true (default), then all passed parameters that are not part of the built URL are tacked onto the URL as querystring | |
| boolean | $prepend_site If true (default), a full URL is returned, if false, only the path part of the URL is returned |
Definition at line 230 of file url.php.
Referenced by HiEngineParser::hi_command().
| static URL::parse | ( | $ | from_url | ) | [static] |
Match a URL/URI against the rewrite rules stored in the DB. This method is used by the Controller class for parsing requests, and by other classes, such as Pingback, which uses it to determine the post slug for a given URL.
Returns the matched RewriteRule object, or false.
| string | $from_url URL string to parse |
Definition at line 87 of file url.php.
Referenced by Controller::parse_request(), and Pingback::xmlrpc_pingback__ping().
| static URL::set_404 | ( | ) | [static] |
Cause the matched rule to be unset in the case of a 404
Definition at line 66 of file url.php.
Referenced by Theme::act_display(), and Controller::parse_request().
1.7.1