SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class DbToolsController

Provides tools for dealing with the database
Tools include a sync tool and a structure viewer

Variables

NameVisibilityDescription
$module_builder_type_guess (static)
For a given field name, a type to use which is better than VARCHAR(200)
$template_enabled 
$tools (static)
List of tools to show in the sidebar and index view

Functions

NameVisibilityDescription
__constructpublicConstructor
ajaxPageIdspublicRender page drop-down for given sub-site
ajaxTableDefnpublic 
apipublicRender API test form within DB tools
bcryptSpeedpublicBenchmark the server to find appropriate cost parameter
emailpublicRenders form to send emails
emailSendpublicProcess form submission
exceptionDetailpublicBrowse recent exceptions - details
exceptionLogpublicBrowse and search exceptions
exportActionpublicDoes the actual export
exportFilespublicUI to export all files
exportFilesActionpublicAction to export all files
exportTablespublicExport tables to an SQL file
fileTypesIndexingSupportpublicReturns a list of file types which can be indexed for fulltext search
generatePasswordHashpublicGenerate a password hash to store in a config file
gettempfilepublicAllows files to be downloaded from the temporary directory
importActionpublicAction for importing tables
importFileActionpublicAction for importing files
importFilespublicImports a files into the cms
importOptionspublic 
importSavepublic 
importTablespublicImport database tables from a .sql file
importXMLpublicRenders form to imoprt Sprout2 Export XML
importXmlActionpublicProcess Sprout2 Export XML into this CMS
indexpublicShows a list of database tools
infopublicOutput some sprout and platform info
launchCheckspublicRun a series of self-tests to ensure everything is configured correctly
listRoutespublic 
moduleBuilderpublicGenerates blank modules
moduleBuilderActionpublic 
moduleBuilderDbpublicGenerates db_struct.xml content for a module
moduleBuilderExistingpublicGenerates modules from an existing db_struct.xml file
moduleBuilderExistingActionpublicGenerates modules from an existing db_struct.xml file
moduleBuilderExistingFormpublicGenerates modules from an existing db_struct.xml file
moduleBuilderExistingUploadActionpublicGenerates modules from an existing db_struct.xml file
mtTransformpublic (static)Used by the module_template_action method
multimakepublicGenerate multiedit code
outputSqlResultsetprivateRenders SQL result set into a table
qrCodeFormpublicRender form to set QR Code string
qrCodeImagepublicRenders QR code image
sessionEditorpublicEdit the $_SESSION
sessionEditorActionpublicSession Editor Action
sessionLoopprivateList items in an array, along with the tools buttons
sizeToHumanprivateRender table data size in human readable form
splitSqlprivateSplits a set of SQL queries into individual queries
sqlpublicAllows the user to execute SQL queries
sqlcsvpublic 
structpublicShows table and column definitions
syncpublicSyncs the db structure to match db_struct.xml
templateprivateRender dbtools template
testSkinTemplatespublicSimple tool for testing skin templates
testSkinTemplatesActionpublicActual viewing UI for templates
varDumppublicRender view to see session and cookie data
xmlGetColumnsprivate (static) 
xmlGetTablesprivate (static) 
xmlLoadprivate (static) 

public __construct

void $DbToolsController->__construct ( );

Constructor

public ajaxPageIds

void $DbToolsController->ajaxPageIds ( int $subsite_id );

Render page drop-down for given sub-site

public ajaxTableDefn

void $DbToolsController->ajaxTableDefn ( mixed $table );

This function does not have a description

public api

void $DbToolsController->api ( string $class , string $method );

Render API test form within DB tools

public bcryptSpeed

void $DbToolsController->bcryptSpeed ( );

Benchmark the server to find appropriate cost parameter

public email

void $DbToolsController->email ( );

Renders form to send emails

public emailSend

void $DbToolsController->emailSend ( );

Process form submission

public exceptionDetail

void $DbToolsController->exceptionDetail ( );

Browse recent exceptions - details

public exceptionLog

void $DbToolsController->exceptionLog ( );

Browse and search exceptions

public exportAction

void $DbToolsController->exportAction ( );

Does the actual export

public exportFiles

void $DbToolsController->exportFiles ( );

UI to export all files

public exportFilesAction

void $DbToolsController->exportFilesAction ( );

Action to export all files

public exportTables

void $DbToolsController->exportTables ( );

Export tables to an SQL file

public fileTypesIndexingSupport

void $DbToolsController->fileTypesIndexingSupport ( );

Returns a list of file types which can be indexed for fulltext search

public generatePasswordHash

void $DbToolsController->generatePasswordHash ( );

Generate a password hash to store in a config file
The username and hash are used by AdminAuth::processLocal

public gettempfile

void $DbToolsController->gettempfile ( string $source , string $tempfile [, string $orig ] );

Allows files to be downloaded from the temporary directory

Only certain files from the temp directory can be downloaded.
Each 'source' has a regex which is used to restrict downloads to only that particular type of file

public importAction

void $DbToolsController->importAction ( );

Action for importing tables

public importFileAction

void $DbToolsController->importFileAction ( );

Action for importing files

public importFiles

void $DbToolsController->importFiles ( );

Imports a files into the cms

public importOptions

void $DbToolsController->importOptions ( );

This function does not have a description

public importSave

void $DbToolsController->importSave ( );

This function does not have a description

public importTables

void $DbToolsController->importTables ( );

Import database tables from a .sql file

public importXML

void $DbToolsController->importXML ( );

Renders form to imoprt Sprout2 Export XML

public importXmlAction

void $DbToolsController->importXmlAction ( );

Process Sprout2 Export XML into this CMS

public index

void $DbToolsController->index ( );

Shows a list of database tools

public info

void $DbToolsController->info ( );

Output some sprout and platform info

public launchChecks

unknown $DbToolsController->launchChecks ( );

Run a series of self-tests to ensure everything is configured correctly

public listRoutes

void $DbToolsController->listRoutes ( );

This function does not have a description

public moduleBuilder

void $DbToolsController->moduleBuilder ( );

Generates blank modules

public moduleBuilderAction

void $DbToolsController->moduleBuilderAction ( );

This function does not have a description

public moduleBuilderDb

void $DbToolsController->moduleBuilderDb ( );

Generates db_struct.xml content for a module

public moduleBuilderExisting

void $DbToolsController->moduleBuilderExisting ( );

Generates modules from an existing db_struct.xml file

public moduleBuilderExistingAction

void $DbToolsController->moduleBuilderExistingAction ( mixed $input_xml );

Generates modules from an existing db_struct.xml file

public moduleBuilderExistingForm

void $DbToolsController->moduleBuilderExistingForm ( mixed $input_xml );

Generates modules from an existing db_struct.xml file

public moduleBuilderExistingUploadAction

void $DbToolsController->moduleBuilderExistingUploadAction ( );

Generates modules from an existing db_struct.xml file

public mtTransform

unknown DbToolsController::mtTransform ( mixed $text );

Used by the module_template_action method

public multimake

void $DbToolsController->multimake ( );

Generate multiedit code

private outputSqlResultset

int $DbToolsController->outputSqlResultset ( PDOStatement $results [, mixed $headings ] );

Renders SQL result set into a table

public qrCodeForm

void $DbToolsController->qrCodeForm ( );

Render form to set QR Code string

public qrCodeImage

void $DbToolsController->qrCodeImage ( );

Renders QR code image

public sessionEditor

void $DbToolsController->sessionEditor ( );

Edit the $_SESSION

public sessionEditorAction

void $DbToolsController->sessionEditorAction ( );

Session Editor Action

private sessionLoop

void $DbToolsController->sessionLoop ( mixed &$a , mixed $depth , mixed $keys );

List items in an array, along with the tools buttons

private sizeToHuman

string $DbToolsController->sizeToHuman ( int $size );

Render table data size in human readable form

private splitSql

unknown $DbToolsController->splitSql ( mixed $all );

Splits a set of SQL queries into individual queries

public sql

void $DbToolsController->sql ( );

Allows the user to execute SQL queries

public sqlcsv

void $DbToolsController->sqlcsv ( );

This function does not have a description

public struct

void $DbToolsController->struct ( [ mixed $arg ] );

Shows table and column definitions

public sync

void $DbToolsController->sync ( );

Syncs the db structure to match db_struct.xml

private template

void $DbToolsController->template ( string $main_title [, mixed $html ] );

Render dbtools template

public testSkinTemplates

void $DbToolsController->testSkinTemplates ( );

Simple tool for testing skin templates

public testSkinTemplatesAction

void $DbToolsController->testSkinTemplatesAction ( string $skin , string $tmpl );

Actual viewing UI for templates

public varDump

void $DbToolsController->varDump ( );

Render view to see session and cookie data

private xmlGetColumns

array DbToolsController::xmlGetColumns ( DOMDocument $doc , mixed $table_name );

This function does not have a description

private xmlGetTables

array DbToolsController::xmlGetTables ( DOMDocument $doc );

This function does not have a description

private xmlLoad

unknown DbToolsController::xmlLoad ( mixed $module );

This function does not have a description