Exemplo n.º 1
0
 /**
  * Define the action attribute
  *
  * @param string $action The action attribute value.
  * @param bool $ssl Tell to set the URL to https or not.
  * @return string The converted action attribute value.
  */
 protected function action($action, $ssl)
 {
     $action = trim($action);
     $ssl = (bool) $ssl;
     // Check the given path.
     // If none given, set to the current page url.
     $uri = $action === null || empty($action) ? $this->request->getPathInfo() : '/' . trim($action, '/');
     // Build the action url.
     // The uri could be absolute or relative path.
     $action = $this->parseAction($uri, $ssl);
     return $action;
 }