Table of Contents
sf_root_dir # myproject/ # apps/ sf_app_dir # myapp/ sf_app_config_dir # config/ sf_app_i18n_dir # i18n/ sf_app_lib_dir # lib/ sf_app_module_dir # modules/ sf_app_template_dir # templates/ sf_bin_dir # batch/ # cache/ sf_base_cache_dir # myapp/ sf_cache_dir # prod/ sf_template_cache_dir # templates/ sf_i18n_cache_dir # i18n/ sf_config_cache_dir # config/ sf_test_cache_dir # test/ sf_module_cache_dir # modules/ sf_config_dir # config/ sf_data_dir # data/ sf_doc_dir # doc/ sf_lib_dir # lib/ sf_model_lib_dir # model/ sf_log_dir # log/ sf_test_dir # test/ sf_plugins_dir # plugins/ sf_web_dir # web/ sf_upload_dir # uploads/
http://www.symfony-project.org/book/trunk/06-Inside-the-Controller-Layer#Accessing%20the%20Request http://www.symfony-project.org/api/1_0/sfWebRequest
getUri() | Full URI | http://localhost/myapp_dev.php/mymodule/myaction |
getUriPrefix | Uri prefix | protocol, hostname and server port |
getPathInfo() | Path info of web request | /mymodule/myaction |
getReferer() | Referrer | http://localhost/myapp_dev.php/ |
getHost() | Host name | localhost |
getScriptName() | Front controller path and name | [path/]myapp_dev.php |
// If you require a URL like http://myapp.example.com/article/21
// Use the following in article/read action $uri = sfRouting::getInstance()->getCurrentInternalUri(); => article/read?id=21
$uri = sfRouting::getInstance()->getCurrentInternalUri(true); => @article_by_id?id=21
$rule = sfRouting::getInstance()->getCurrentRouteName(); => article_by_id
// If you just need the current module/action names, // remember that they are actual request parameters $module = $this->getRequestParameter('module'); $action = $this->getRequestParameter('action');