Cheetah
All Classes Namespaces Files Functions Variables Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ChWsbExport Class Reference
Inheritance diagram for ChWsbExport:
ChAdsExport ChArlExport ChAvaExport ChBlogsExport ChCRSSExport ChDolphConExport ChEventsExport ChFaceBookConnectExport ChFdbExport ChFilesExport ChForumExport ChGroupsExport ChNewsExport ChPhotosExport ChPmtExport ChPollExport ChProfileCustomizeExport ChShoutBoxExport ChSimpleMessengerExport ChSitesExport ChSoundsExport ChSpyExport ChStoreExport ChVideosExport ChWallExport ChWmapExport ChWsbExportFlash ChWsbExportProfile

Public Member Functions

 export ($iProfileId)
 
 exportFiles ($iProfileId)
 
 exportSQL ($iProfileId)
 

Static Public Member Functions

static getObjectInstance ($sObject)
 
static & getSystems ()
 
static generateAllExports ($iProfileId)
 
static sendEmailNotification ($aProfile, $sFilename)
 
static createZip ($iProfileId, $aExports)
 

Protected Member Functions

 __construct ($aSystem)
 
 _getFiles ($sTableName, $aFields, $iProfileId)
 
 _getRows ($sTableName, $mixedCond, $iProfileId)
 
 _getQuery ($sTableName, $mixedCond, $iProfileId)
 
 _getFilePath ($sTableName, $sField, $sFileName, $sPrefix, $sExt)
 
 _getFilesFromStmt ($sTableName, $oStmt, $aFields)
 
 _getRowsFromStmt ($sTableName, $oStmt)
 

Protected Attributes

 $_aSystem = array ()
 current export system array More...
 
 $_oQuery = null
 
 $_aTables = array()
 array of tables for export, where key is table name and value can be string with condition (example: a = 'b') or array with full query (example: SELECT * FROM a WHERE b = 'c'). '{profile_id}' replacement marker can be used in condition or query More...
 
 $_sFilesBaseDir = ''
 base dir for files More...
 
 $_aTablesWithFiles = array()
 array of tables with files, where key is table name and value is array of fields, where key is field name and values are files prefixes More...
 

Detailed Description

Base class for export user data

To add export to your module you need to add a record to 'sys_objects_exports' table and custom class:

id - autoincremented id for internal usage object - your unique module name, with vendor prefix, lowercase and spaces are underscored title - title of the export, or short description class_name - your custom class name class_file - file where your class_name is stored order - order in which this sitemap is generated active - is object active, allowed values 0 or 1

You can refer to Cheetah modules for sample records in this table and sample classes.

When writing export queries, make sure that data which isn't belonging to the exported user is anomyzed.

Definition at line 28 of file ChWsbExport.php.

Constructor & Destructor Documentation

◆ __construct()

ChWsbExport::__construct (   $aSystem)
protected

Member Function Documentation

◆ _getFilePath()

ChWsbExport::_getFilePath (   $sTableName,
  $sField,
  $sFileName,
  $sPrefix,
  $sExt 
)
protected

◆ _getFiles()

ChWsbExport::_getFiles (   $sTableName,
  $aFields,
  $iProfileId 
)
protected

Definition at line 200 of file ChWsbExport.php.

◆ _getFilesFromStmt()

ChWsbExport::_getFilesFromStmt (   $sTableName,
  $oStmt,
  $aFields 
)
protected

Definition at line 232 of file ChWsbExport.php.

◆ _getQuery()

ChWsbExport::_getQuery (   $sTableName,
  $mixedCond,
  $iProfileId 
)
protected

Definition at line 215 of file ChWsbExport.php.

◆ _getRows()

ChWsbExport::_getRows (   $sTableName,
  $mixedCond,
  $iProfileId 
)
protected

Definition at line 208 of file ChWsbExport.php.

◆ _getRowsFromStmt()

ChWsbExport::_getRowsFromStmt (   $sTableName,
  $oStmt 
)
protected

Definition at line 254 of file ChWsbExport.php.

◆ createZip()

static ChWsbExport::createZip (   $iProfileId,
  $aExports 
)
static

Definition at line 121 of file ChWsbExport.php.

◆ export()

ChWsbExport::export (   $iProfileId)

Generate export for current object and profile

Parameters
$iProfileId- profile ID to export data for
Returns
array with 2 elements: 'files' and 'sql'
  • files - array of files belonging to the user
  • sql - SQL queries string

Definition at line 166 of file ChWsbExport.php.

◆ exportFiles()

ChWsbExport::exportFiles (   $iProfileId)

Generate files export for current object and profile

Parameters
$iProfileId- profile ID to export data for
Returns
array of files with full paths

Definition at line 179 of file ChWsbExport.php.

◆ exportSQL()

ChWsbExport::exportSQL (   $iProfileId)

Generate SQL export for current object and profile

Parameters
$iProfileId- profile ID to export data for
Returns
string with SQL queries

Definition at line 192 of file ChWsbExport.php.

◆ generateAllExports()

static ChWsbExport::generateAllExports (   $iProfileId)
static

get all modules exports

Definition at line 83 of file ChWsbExport.php.

◆ getObjectInstance()

static ChWsbExport::getObjectInstance (   $sObject)
static

Get export object instance by object name

Parameters
$sObjectobject name
Returns
object instance or false on error

Definition at line 47 of file ChWsbExport.php.

◆ getSystems()

static& ChWsbExport::getSystems ( )
static

get all systems

Definition at line 74 of file ChWsbExport.php.

◆ sendEmailNotification()

static ChWsbExport::sendEmailNotification (   $aProfile,
  $sFilename 
)
static

Definition at line 111 of file ChWsbExport.php.

Member Data Documentation

◆ $_aSystem

ChWsbExport::$_aSystem = array ()
protected

current export system array

Definition at line 30 of file ChWsbExport.php.

◆ $_aTables

ChWsbExport::$_aTables = array()
protected

array of tables for export, where key is table name and value can be string with condition (example: a = 'b') or array with full query (example: SELECT * FROM a WHERE b = 'c'). '{profile_id}' replacement marker can be used in condition or query

Definition at line 32 of file ChWsbExport.php.

◆ $_aTablesWithFiles

ChWsbExport::$_aTablesWithFiles = array()
protected

array of tables with files, where key is table name and value is array of fields, where key is field name and values are files prefixes

Definition at line 34 of file ChWsbExport.php.

◆ $_oQuery

ChWsbExport::$_oQuery = null
protected

Definition at line 31 of file ChWsbExport.php.

◆ $_sFilesBaseDir

ChWsbExport::$_sFilesBaseDir = ''
protected

base dir for files

Definition at line 33 of file ChWsbExport.php.


The documentation for this class was generated from the following file: