HTML_QuickForm2
[ class tree: HTML_QuickForm2 ] [ index: HTML_QuickForm2 ] [ all elements ]

Class: HTML_QuickForm2_Controller_Action_Jump

Source Location: /HTML_QuickForm2-2.1.0/HTML/QuickForm2/Controller/Action/Jump.php

Class Overview


This handler performs an HTTP redirect to a specific page


Author(s):

Version:

  • Release: 2.1.0

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 36]
This handler performs an HTTP redirect to a specific page


[ Top ]


Class Variables

$trustProxy =  false

[line 43]

Whether to trust $_SERVER entries coming from proxies
  • Access: protected

Type:   bool


[ Top ]



Method Detail

__construct (Constructor)   [line 111]

HTML_QuickForm2_Controller_Action_Jump __construct( [bool $trustProxy = false])

Constructor, sets $trustProxy flag
  • Access: public

Parameters:

bool   $trustProxy   —  Whether to trust $_SERVER entries (specifically HTTP_X_FORWARDED_HOST) coming from proxies. Should be set to true if application is hosted behind a reverse proxy that you manage.

[ Top ]

doRedirect   [line 216]

void doRedirect( string $url)

Redirects to a given URL via Location: header and exits the script

A separate method is mostly needed for creating mocks of this class during testing.

  • Access: protected

Parameters:

string   $url   —  URL to redirect to

[ Top ]

normalizePath   [line 68]

string normalizePath( string $path)

Removes the '..' and '.' segments from the path component
  • Return: Path component of the URL with '.' and '..' segments removed
  • Access: protected

Parameters:

string   $path   —  Path component of the URL, possibly with '.' and '..' segments

[ Top ]

perform   [line 171]

void perform( HTML_QuickForm2_Controller_Page $page, $name)

  • Access: public

Parameters:

HTML_QuickForm2_Controller_Page   $page   — 
   $name   — 

[ Top ]

resolveRelativeURL   [line 127]

string resolveRelativeURL( string $url)

Resolves relative URL using current page's URL as base

The method follows procedure described in section 4 of RFC 1808 and passes the examples provided in section 5 of said RFC. Values from $_SERVER array are used for calculation of "current URL"

  • Return: Absolute URL
  • Access: protected

Parameters:

string   $url   —  Relative URL, probably from form's action attribute

[ Top ]

splitUri   [line 52]

array splitUri( string $uri)

Splits (part of) the URI into path and query components
  • Return: Array of the form array('foo', '?bar)
  • Access: protected

Parameters:

string   $uri   —  String of the form 'foo?bar'

[ Top ]


Documentation generated on Wed, 10 Apr 2019 08:56:10 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.