(Yaf >=1.0.0)
Yaf_Request_Abstract::getBaseUri — Retrieve the base URI
У цієї функції немає параметрів.
The base URI, or an empty string if not set.
Приклад #1 Yaf_Request_Abstract::getBaseUri() example
<?php
class IndexController extends Yaf_Controller_Abstract
{
public function indexAction()
{
$request = $this->getRequest();
// Assuming the application is served under /myapp,
// and the request is /myapp/product/view
var_dump($request->getBaseUri());
var_dump($request->getRequestUri());
}
}
?>Поданий вище приклад виведе щось схоже на:
string(6) "/myapp" string(19) "/myapp/product/view"