tangra logo
   
[ class tree: tangra_lib ] [ index: tangra_lib ] [ all elements ]
 

Class: Web_Page

Source Location: /web_site/web_page/web_page.class.php

Class Web_Page

Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Web_Ctrl

Web_Ctrl::$_config
Web_Ctrl::$_context
Web_Ctrl::$_exports
Web_Ctrl::$_transit_vars

Inherited From Web_Ctrl

Web_Ctrl::__construct()
Constructor
Web_Ctrl::add_exports()
Adds exports. This is bulk version of export()
Web_Ctrl::add_transit_var()
Web_Ctrl::capture_transit_vars()
Web_Ctrl::create_redirect_composer()
Web_Ctrl::export()
Adds value key-value pair exports
Web_Ctrl::get_transit_var()
Web_Ctrl::get_transit_vars()
Web_Ctrl::get__config()
Returns current web site configuration object.
Web_Ctrl::get__context()
Returns reference to context
Web_Ctrl::get__exports()
Return exports object
Web_Ctrl::init()
Place for user code for initialization.
Web_Ctrl::init_transit_vars()
Here is the place to add your transit vars
Web_Ctrl::prepare_transit_vars()
Web_Ctrl::remove_transit_var()
Web_Ctrl::run()
Put your main page functionalty in run() (if not otherwise specified like for example for WED pages)
Web_Ctrl::set_config()
Sets $_config
Web_Ctrl::set_context()
Sets context
Web_Ctrl::set_transit_vars_as_output_rewrite_vars()
Web_Ctrl::set_transit_var_value()
Web_Ctrl::_init()
Initializing the page
Web_Ctrl::_run()
Runs the controller

Inherited From Tangra_Class

Tangra_Class::get_class_name()
Alias of get_class(). Exist because of historical reasons.
Tangra_Class::__set()
Overides PHP built-in method and just throws exception if called. Purpose - to "forbid" autosetting of nonexisting class properties.

Inherited From Web_Ctrl

Web_Ctrl::TRANSIT_VARS_PREFIX

[ Top ]
Property Summary
string   $page_name   Page name
string   $page_url_name   current URL of the page
array   $views   Views for this page. Array of Web_Page_View

[ Top ]
Method Summary
Web_Page   __construct()   Constructor
void   add_view()   Adds view
string   capture_page_url_name()   Captures current URL from context
void   create_redirect_view()   Creates and returns Just_Headers_View with redirect (Location: ) header
void   create_view()   End classes must implement this function and it must be used always for creating views (i.e. no new Some_View())
void   export_uni_back()   Detects referer (if local) and exports it as _uni_back
string   get_page_name()   Returns page name
unknown   get_page_url_name()   Returns page URL
Web_Page_View   get_view()   Returns view
void   set_page_name()   Sets page name
void   _init()   Initializing the page

[ Top ]
Properties
string   $page_name [line 51]

Page name

API Tags:
Internal:  
Access:  private


[ Top ]
string   $page_url_name [line 64]

current URL of the page

API Tags:
Access:  private


[ Top ]
array   $views = array() [line 58]

Views for this page. Array of Web_Page_View

API Tags:
Internal:  
Access:  private


[ Top ]
Methods
Constructor __construct  [line 71]

  Web_Page __construct( string $page_name  )

Constructor

Parameters:
string   $page_name: 


Redefinition of:
Web_Ctrl::__construct()
Constructor

[ Top ]
add_view  [line 133]

  void add_view( Web_Page_View $page_view  )

Adds view

Parameters:
Web_Page_View   $page_view: 

API Tags:
Access:  protected

Information Tags:
Throws:  TE_Web_Page_View_Already_Exists

[ Top ]
capture_page_url_name  [line 166]

  string capture_page_url_name( Web_Context $context, Web_Site_Config $config  )

Captures current URL from context

Parameters:
Web_Context   $context: 
Web_Site_Config   $config: 

API Tags:
Internal:  
Access:  private


[ Top ]
create_redirect_view  [line 191]

  void create_redirect_view( stirng $target_location, [array $param_pairs = array()]  )

Creates and returns Just_Headers_View with redirect (Location: ) header

If $target starts with "http" redirect will be with absolute URL, otherwise will be relative URL.

Please note that $params_pairs will be merged with existing (if any) transit variables.

Parameters:
stirng   $target_location:  target page to redirect to. Example: 'admin/index.php'
array   $param_pairs:  key => value pairs of parameters that will be added to redirect. Example: array('confirmed' => 1)

API Tags:
Access:  protected

Information Tags:
Throws:  Tangra_Exception

[ Top ]
create_view  [line 247]

  void create_view( [string $name = 'default']  )

End classes must implement this function and it must be used always for creating views (i.e. no new Some_View())

Parameters:
string   $name: 

API Tags:
Abstract:  
Access:  public


[ Top ]
export_uni_back  [line 213]

  void export_uni_back( )

Detects referer (if local) and exports it as _uni_back

Useful for creating back links that work the same way as browser window but with _tm variable set correctly (if available).


API Tags:
Internal:  
Access:  private


[ Top ]
get_page_name  [line 95]

  string get_page_name( )

Returns page name


API Tags:
Access:  public


[ Top ]
get_page_url_name  [line 105]

  unknown get_page_url_name( )

Returns page URL


API Tags:
Access:  public


[ Top ]
get_view  [line 149]

  Web_Page_View get_view( [string $name = 'default']  )

Returns view

Parameters:
string   $name:  Name of the view

API Tags:
Access:  protected

Information Tags:
Throws:  TE_Web_Page_View_Not_Exists

[ Top ]
set_page_name  [line 118]

  void set_page_name( string $page_name  )

Sets page name

Parameters:
string   $page_name: 

API Tags:
Internal:  
Access:  private

Information Tags:
Throws:  Tangra_Exception
Throws:  Tangra_Exception

[ Top ]
_init  [line 83]

  void _init( Web_Context $context, Web_Site_Config $config  )

Initializing the page

Parameters:
Web_Context   $context: 
Web_Site_Config   $config: 

API Tags:
Access:  public


Redefinition of:
Web_Ctrl::_init()
Initializing the page

[ Top ]