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

Class: Web_Site_Config

Source Location: /web_site/web_site_config.class.php

Class Web_Site_Config

Class Overview
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

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.

[ Top ]
Property Summary
string   $base_url   Base URL
string   $current_host   Current hostname
integer   $current_port   Current port
string   $current_protocol   Current protocol
string   $default_encoding   Default encoding for the site
string   $document_root_dir   Document root absolute path
string   $document_root_relative   Document root relative to $document_root_dir
integer   $error_reporting   Error reporting level Default is 4095
integer   $error_reporting_php4_libs   Error reporting for PHP4 libs Default is 2047
unknown_type   $expose_tangra   Shall tangra be exposed as http header like X-Powered-By: Tangra Framework for PHP/2.*
string   $ext_inc_dir   ext_inc dir absolute path
string   $hidden_dir   "Hidden" dir absolute path
mixed   $instance_name   Used to distigush installations on different servers.
string   $root_dir   Site's root absolute path. It is not docroot, see bellow!
string   $scratch_dir   "Scratch" dir absolute path
string   $server_error_page   Address of server error page
integer   $site_mode   Site mode
string   $site_name   Site system name

[ Top ]
Method Summary
string   get_base_url()   Returns base URL
string   get_boot_dir()   Returns boot dir
string   get_conf_dir()   Returns conf dir
string   get_cron_jobs_dir()   Returns cron_jobs dir
string   get_current_host()   Returns current hostname
integer   get_current_port()   Returns current port
unknown   get_current_protocol()   Returns current protocol
string   get_db_dir()   Returns DB directory
string   get_debug_dir()   Return debug dir
string   get_default_encoding()   Returns default encoding of the site
string   get_document_root_dir()   Returns document root absolute path
string   get_document_root_relative()   Gets document root relative directory
integer   get_error_reporting()   Returns error_reporting level
integer   get_error_reporting_php4_libs()   Returns error reporting for PHP4 libraries
boolean   get_expose_tangra()   Returns expose tangra flag
string   get_ext_inc_dir()   Returns ext_inc dir absolute path
string   get_hidden_dir()   Returns hidden dir absolute path
string   get_htdocs_dir()   Alias of get_document_root_dir();
string   get_inc_dir()   Alias of get_site_inc_dir()
string   get_instance_name()   Returns instance name
string   get_logs_dir()   Returns logs directory
string   get_rc_d_dir()   Returns rc.d directory
unknown   get_root_dir()   Returns site's root directory absolute path
string   get_scratch_dir()   Returns scratch dir absolute path
string   get_scratch_tpl_dir()   Returns templates scratch directory
string   get_server_error_page()   Returns server error page address
string   get_sid()   Alias of get_site_inc_dir
string   get_site_inc_dir()   Returns site include dir
integer   get_site_mode()   Returns site mode
unknown   get_site_name()   Gets site name
string   get_tpl_dir()   Returns templates directory
string   get_uploads_dir()   Return uplaods dir
void   set_base_url()   Sets base URL
void   set_current_host()   Sets current hostname
void   set_current_port()   Sets current port
void   set_current_protocol()   Sets current protocol
void   set_default_encoding()   Sets default encoding for the site Example: set_default_encoding('utf-8');
void   set_document_root_dir()   Sets document root absolute path
void   set_document_root_relative()   Sets document root relative directory (relative to document root (set with set_root_dir()))
void   set_error_reporting()   Sets error reporting level
void   set_error_reporting_php4_libs()   Sets error reporting for PHP4 libraries
void   set_expose_tangra()   Sets expose tangra flag. If true http header like X-Powered-By: Tangra Framework for PHP/2.* will be generated
void   set_ext_inc_dir()   Sets ext_inc dir absolute path
void   set_hidden_dir()   Sets hidden dir absolute path
void   set_htdocs_dir()   Alias of set_document_root_dir()
void   set_instance_name()   Sets instance name
void   set_root_dir()   Sets site's root directory absolute path. It is not docroot, see bellow!
void   set_scratch_dir()   Sets scratch dir absolute path
void   set_server_error_page()   Sets server error page address
void   set_site_mode()   Sets site mode
void   set_site_name()   Sets site name
void   _set_document_root_dir()   Sets document root absolute path
void   _set_ext_inc_dir()   Sets ext_inc dir absolute path
void   _set_hidden_dir()   Sets hidden dir absolute path
void   _set_scratch_dir()   Sets scratch dir absolute path

[ Top ]
Properties
string   $base_url [line 158]

Base URL

API Tags:
Internal:  
Access:  private


[ Top ]
string   $current_host [line 137]

Current hostname

API Tags:
Internal:  
Access:  private


[ Top ]
integer   $current_port [line 144]

Current port

API Tags:
Internal:  
Access:  private


[ Top ]
string   $current_protocol [line 151]

Current protocol

API Tags:
Internal:  
Access:  private


[ Top ]
string   $default_encoding [line 100]

Default encoding for the site

API Tags:
Internal:  
Access:  private


[ Top ]
string   $document_root_dir [line 65]

Document root absolute path

API Tags:
Internal:  
Access:  private


[ Top ]
string   $document_root_relative [line 72]

Document root relative to $document_root_dir

API Tags:
Internal:  
Access:  private


[ Top ]
integer   $error_reporting = 4095 [line 115]

Error reporting level Default is 4095

API Tags:
Internal:  
Access:  private


[ Top ]
integer   $error_reporting_php4_libs = 2047 [line 123]

Error reporting for PHP4 libs Default is 2047

API Tags:
Internal:  
Access:  private


[ Top ]
unknown_type   $expose_tangra [line 164]

Shall tangra be exposed as http header like X-Powered-By: Tangra Framework for PHP/2.*

API Tags:
Access:  private


[ Top ]
string   $ext_inc_dir [line 93]

ext_inc dir absolute path

API Tags:
Internal:  
Access:  private


[ Top ]
string   $hidden_dir [line 79]

"Hidden" dir absolute path

API Tags:
Internal:  
Access:  private


[ Top ]
mixed   $instance_name [line 170]

Used to distigush installations on different servers.

This is free form string

API Tags:
Access:  private


[ Top ]
string   $root_dir [line 58]

Site's root absolute path. It is not docroot, see bellow!

API Tags:
Internal:  
Access:  private


[ Top ]
string   $scratch_dir [line 86]

"Scratch" dir absolute path

API Tags:
Internal:  
Access:  private


[ Top ]
string   $server_error_page = 'server_error.php' [line 107]

Address of server error page

API Tags:
Internal:  
Access:  private


[ Top ]
integer   $site_mode = Web_Site_Config::SITE_MODE_DEVELOPMENT [line 130]

Site mode

API Tags:
Internal:  
Access:  private


[ Top ]
string   $site_name [line 51]

Site system name

API Tags:
Internal:  
Access:  private


[ Top ]
Methods
get_base_url  [line 745]

  string get_base_url( )

Returns base URL


API Tags:
Access:  public


[ Top ]
get_boot_dir  [line 423]

  string get_boot_dir( )

Returns boot dir


API Tags:
Access:  public


[ Top ]
get_conf_dir  [line 433]

  string get_conf_dir( )

Returns conf dir


API Tags:
Access:  public


[ Top ]
get_cron_jobs_dir  [line 443]

  string get_cron_jobs_dir( )

Returns cron_jobs dir


API Tags:
Access:  public


[ Top ]
get_current_host  [line 685]

  string get_current_host( )

Returns current hostname


API Tags:
Access:  public


[ Top ]
get_current_port  [line 705]

  integer get_current_port( )

Returns current port


API Tags:
Access:  public


[ Top ]
get_current_protocol  [line 725]

  unknown get_current_protocol( )

Returns current protocol


API Tags:
Access:  public


[ Top ]
get_db_dir  [line 504]

  string get_db_dir( )

Returns DB directory

(For sqlite, if used)


API Tags:
Access:  public


[ Top ]
get_debug_dir  [line 544]

  string get_debug_dir( )

Return debug dir


API Tags:
Access:  public


[ Top ]
get_default_encoding  [line 413]

  string get_default_encoding( )

Returns default encoding of the site


API Tags:
Access:  public


[ Top ]
get_document_root_dir  [line 253]

  string get_document_root_dir( )

Returns document root absolute path


API Tags:
Access:  public


[ Top ]
get_document_root_relative  [line 568]

  string get_document_root_relative( )

Gets document root relative directory


API Tags:
Access:  public


[ Top ]
get_error_reporting  [line 615]

  integer get_error_reporting( )

Returns error_reporting level


API Tags:
Access:  public


[ Top ]
get_error_reporting_php4_libs  [line 639]

  integer get_error_reporting_php4_libs( )

Returns error reporting for PHP4 libraries


API Tags:
Access:  public


[ Top ]
get_expose_tangra  [line 786]

  boolean get_expose_tangra( )

Returns expose tangra flag


API Tags:
Access:  public


[ Top ]
get_ext_inc_dir  [line 391]

  string get_ext_inc_dir( )

Returns ext_inc dir absolute path


API Tags:
Access:  public


[ Top ]
get_hidden_dir  [line 313]

  string get_hidden_dir( )

Returns hidden dir absolute path


API Tags:
Access:  public


[ Top ]
get_htdocs_dir  [line 273]

  string get_htdocs_dir( )

Alias of get_document_root_dir();


API Tags:
Access:  public


[ Top ]
get_inc_dir  [line 462]

  string get_inc_dir( )

Alias of get_site_inc_dir()


API Tags:
Access:  public


[ Top ]
get_instance_name  [line 765]

  string get_instance_name( )

Returns instance name


API Tags:
Access:  public


[ Top ]
get_logs_dir  [line 514]

  string get_logs_dir( )

Returns logs directory


API Tags:
Access:  public


[ Top ]
get_rc_d_dir  [line 482]

  string get_rc_d_dir( )

Returns rc.d directory


API Tags:
Access:  public


[ Top ]
get_root_dir  [line 213]

  unknown get_root_dir( )

Returns site's root directory absolute path


API Tags:
Access:  public


[ Top ]
get_scratch_dir  [line 352]

  string get_scratch_dir( )

Returns scratch dir absolute path


API Tags:
Access:  public


[ Top ]
get_scratch_tpl_dir  [line 524]

  string get_scratch_tpl_dir( )

Returns templates scratch directory


API Tags:
Access:  public


[ Top ]
get_server_error_page  [line 590]

  string get_server_error_page( )

Returns server error page address


API Tags:
Access:  public


[ Top ]
get_sid  [line 472]

  string get_sid( )

Alias of get_site_inc_dir


API Tags:
Access:  public


[ Top ]
get_site_inc_dir  [line 453]

  string get_site_inc_dir( )

Returns site include dir


API Tags:
Access:  public


[ Top ]
get_site_mode  [line 665]

  integer get_site_mode( )

Returns site mode


API Tags:
Access:  public


[ Top ]
get_site_name  [line 188]

  unknown get_site_name( )

Gets site name


API Tags:
Access:  public


[ Top ]
get_tpl_dir  [line 492]

  string get_tpl_dir( )

Returns templates directory


API Tags:
Access:  public


[ Top ]
get_uploads_dir  [line 534]

  string get_uploads_dir( )

Return uplaods dir


API Tags:
Access:  public


[ Top ]
set_base_url  [line 735]

  void set_base_url( string $base_url  )

Sets base URL

Parameters:
string   $base_url: 

API Tags:
Access:  public


[ Top ]
set_current_host  [line 675]

  void set_current_host( string $current_host  )

Sets current hostname

Parameters:
string   $current_host: 

API Tags:
Access:  public


[ Top ]
set_current_port  [line 695]

  void set_current_port( integer $current_port  )

Sets current port

Parameters:
integer   $current_port: 

API Tags:
Access:  public


[ Top ]
set_current_protocol  [line 715]

  void set_current_protocol( string $current_protocol  )

Sets current protocol

Parameters:
string   $current_protocol: 

API Tags:
Access:  public


[ Top ]
set_default_encoding  [line 402]

  void set_default_encoding( string $default_encoding  )

Sets default encoding for the site Example: set_default_encoding('utf-8');

Parameters:
string   $default_encoding: 

API Tags:
Access:  public


[ Top ]
set_document_root_dir  [line 223]

  void set_document_root_dir( [string $document_root_dir = NULL]  )

Sets document root absolute path

Parameters:
string   $document_root_dir: 

API Tags:
Access:  public


[ Top ]
set_document_root_relative  [line 554]

  void set_document_root_relative( string $document_root_relative  )

Sets document root relative directory (relative to document root (set with set_root_dir()))

Parameters:
string   $document_root_relative: 

API Tags:
Access:  public


[ Top ]
set_error_reporting  [line 601]

  void set_error_reporting( integer $error_reporting  )

Sets error reporting level

Parameters:
integer   $error_reporting: 

API Tags:
Access:  public

Information Tags:
Throws:  TE_Web_Site_Config_Error

[ Top ]
set_error_reporting_php4_libs  [line 625]

  void set_error_reporting_php4_libs( integer $error_reporting  )

Sets error reporting for PHP4 libraries

Parameters:
integer   $error_reporting: 

API Tags:
Access:  public


[ Top ]
set_expose_tangra  [line 776]

  void set_expose_tangra( boolean $expose_tangra  )

Sets expose tangra flag. If true http header like X-Powered-By: Tangra Framework for PHP/2.* will be generated

Parameters:
boolean   $expose_tangra: 

API Tags:
Access:  public


[ Top ]
set_ext_inc_dir  [line 362]

  void set_ext_inc_dir( [string $ext_inc_dir = NULL]  )

Sets ext_inc dir absolute path

Parameters:
string   $ext_inc_dir: 

API Tags:
Access:  public


[ Top ]
set_hidden_dir  [line 283]

  void set_hidden_dir( [string $hidden_dir = NULL]  )

Sets hidden dir absolute path

Parameters:
string   $hidden_dir: 

API Tags:
Access:  public


[ Top ]
set_htdocs_dir  [line 263]

  void set_htdocs_dir( [string $document_root_dir = NULL]  )

Alias of set_document_root_dir()

Parameters:
string   $document_root_dir: 

API Tags:
Access:  public


[ Top ]
set_instance_name  [line 755]

  void set_instance_name( string $instance_name  )

Sets instance name

Parameters:
string   $instance_name: 

API Tags:
Access:  public


[ Top ]
set_root_dir  [line 198]

  void set_root_dir( string $root_dir  )

Sets site's root directory absolute path. It is not docroot, see bellow!

Parameters:
string   $root_dir: 

API Tags:
Access:  public


[ Top ]
set_scratch_dir  [line 323]

  void set_scratch_dir( [string $scratch_dir = NULL]  )

Sets scratch dir absolute path

Parameters:
string   $scratch_dir: 

API Tags:
Access:  public


[ Top ]
set_server_error_page  [line 578]

  void set_server_error_page( string $server_error_page  )

Sets server error page address

Parameters:
string   $server_error_page: 

API Tags:
Access:  public


[ Top ]
set_site_mode  [line 651]

  void set_site_mode( integer $site_mode  )

Sets site mode

Web_Site_Config::SITE_MODE_DEVELOPMENT or Web_Site_Config::SITE_MODE_PRODUCTION

Parameters:
integer   $site_mode: 

API Tags:
Access:  public


[ Top ]
set_site_name  [line 177]

  void set_site_name( string $site_name  )

Sets site name

Parameters:
string   $site_name: 

API Tags:
Access:  public


[ Top ]
_set_document_root_dir  [line 239]

  void _set_document_root_dir( unknown_type $document_root_dir  )

Sets document root absolute path

Parameters:
unknown_type   $document_root_dir: 

API Tags:
Internal:  
Access:  private

Information Tags:
Throws:  TE_Web_Site_Config_Error

[ Top ]
_set_ext_inc_dir  [line 377]

  void _set_ext_inc_dir( string $ext_inc_dir  )

Sets ext_inc dir absolute path

Parameters:
string   $ext_inc_dir: 

API Tags:
Access:  private

Information Tags:
Throws:  TE_Web_Site_Config_Error

[ Top ]
_set_hidden_dir  [line 299]

  void _set_hidden_dir( string $hidden_dir  )

Sets hidden dir absolute path

Parameters:
string   $hidden_dir: 

API Tags:
Internal:  
Access:  private

Information Tags:
Throws:  TE_Web_Site_Config_Error

[ Top ]
_set_scratch_dir  [line 338]

  void _set_scratch_dir( string $scratch_dir  )

Sets scratch dir absolute path

Parameters:
string   $scratch_dir: 

API Tags:
Access:  private

Information Tags:
Throws:  TE_Web_Site_Config_Error

[ Top ]
Constants
SITE_MODE_DEVELOPMENT = 0 [line 38]

Development mode


[ Top ]
SITE_MODE_PRODUCTION = 1 [line 43]

Production mode


[ Top ]