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

Class: Tangra_Module_Uninstaller

Source Location: /modules_manager/tangra_module_uninstaller.class.php

Class Tangra_Module_Uninstaller

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
mixed   $dbc  
mixed   $module_conf_path  
mixed   $site_root_dir  

[ Top ]
Method Summary
Tangra_Module_Uninstaller   __construct()   Constructor
void   check_params()   Checks if all required parameters are present
string   generate_drop_columns_sql()   Generates SQL for drop column
DB_Connection   get_dbc()   Gets DBC
string   get_module_conf_path()   Gets module conf path
string   get_site_root_dir()   Gets site root dir
boolean   is_parameter_present()   Checks if parameter is present
array   load_files_list()   Loads files list
array   load_site_dirs()   Loads hidden, htdocs, scratch and ext_inc paths and returns them as array
array   prepare_remove_list()   Prepares list of files to be removed expanding paths to full paths
array   remove_db_objects()   Removes DB objects - tables and/or columns
array   remove_files()   Removes module's files
void   set_dbc()   Sets DBC
void   set_module_conf_path()   Sets module conf path
array   uninstall()   Performs uninstall of the module

[ Top ]
Properties
mixed   $dbc [line 29]
API Tags:
Access:  private


[ Top ]
mixed   $module_conf_path [line 28]
API Tags:
Access:  private


[ Top ]
mixed   $site_root_dir = '' [line 30]
API Tags:
Access:  private


[ Top ]
Methods
Constructor __construct  [line 42]

  Tangra_Module_Uninstaller __construct( array $params  )

Constructor

Parameter $params is a structured array that must have at least key 'module-conf-path'. Other parameters have to be fed as key-value pairs.

Example $params[''module-conf-path'] = '/some/path';

Parameters:
array   $params: 


[ Top ]
check_params  [line 144]

  void check_params( array $params  )

Checks if all required parameters are present

Parameters:
array   $params: 

API Tags:
Access:  protected

Information Tags:
Throws:  TE_TMM_Exception

[ Top ]
generate_drop_columns_sql  [line 335]

  string generate_drop_columns_sql( string $str  )

Generates SQL for drop column

Parameters:
string   $str: 

API Tags:
Return:  SQL Drop column statement
Internal:  
Access:  private


[ Top ]
get_dbc  [line 123]

  DB_Connection get_dbc( )

Gets DBC


API Tags:
Access:  public


[ Top ]
get_module_conf_path  [line 103]

  string get_module_conf_path( )

Gets module conf path


API Tags:
Access:  public


[ Top ]
get_site_root_dir  [line 133]

  string get_site_root_dir( )

Gets site root dir


API Tags:
Access:  public


[ Top ]
is_parameter_present  [line 79]

  boolean is_parameter_present( array $params, string $parameter  )

Checks if parameter is present

Parameters:
array   $params: 
string   $parameter:  Parameter to be checked

API Tags:
Access:  protected


[ Top ]
load_files_list  [line 161]

  array load_files_list( )

Loads files list


API Tags:
Internal:  
Access:  private


[ Top ]
load_site_dirs  [line 357]

  array load_site_dirs( string $root_dir  )

Loads hidden, htdocs, scratch and ext_inc paths and returns them as array

Parameters:
string   $root_dir:  Path to site's root dir

API Tags:
Access:  private


[ Top ]
prepare_remove_list  [line 182]

  array prepare_remove_list( array $files_list  )

Prepares list of files to be removed expanding paths to full paths

Can handle with files.list with releative paths

Parameters:
array   $files_list: 

API Tags:
Internal:  
Access:  private


[ Top ]
remove_db_objects  [line 276]

  array remove_db_objects( )

Removes DB objects - tables and/or columns


API Tags:
Access:  protected


[ Top ]
remove_files  [line 228]

  array remove_files( )

Removes module's files


API Tags:
Access:  protected


[ Top ]
set_dbc  [line 113]

  void set_dbc( DB_Connection $dbc  )

Sets DBC

Parameters:
DB_Connection   $dbc: 

API Tags:
Access:  public


[ Top ]
set_module_conf_path  [line 89]

  void set_module_conf_path( string $module_conf_path  )

Sets module conf path

Parameters:
string   $module_conf_path: 

API Tags:
Access:  protected


[ Top ]
uninstall  [line 60]

  array uninstall( )

Performs uninstall of the module


API Tags:
Access:  public


[ Top ]