Skip to content

icms_preload_Handler

Raimondas Rimkevičius edited this page Mar 9, 2020 · 1 revision
Notice: Wiki was automatic generated from project sources as project API documentation. Do not edit manually!

icms_preload_Handler

icms_preload_Handler

Class handling preload events automatically detect from the files in ICMS_PRELOAD_PATH

  • Class name: icms_preload_Handler
  • Namespace:

Properties

$_preloadFilesArray

private array $_preloadFilesArray = array()
  • Visibility: private

$_preloadEventsArray

private array $_preloadEventsArray = array()
  • Visibility: private

Methods

__construct

void icms_preload_Handler::__construct()

Constructor

Determine the preloads by scanning the preloads directory and the preloads directory for each module specified Preloads in the system preloads directory will execute for all requests. Preloads in a module's preload directory will only load for that module's requests

  • Visibility: public

addPreloadEvents

mixed icms_preload_Handler::addPreloadEvents(string filename, mixed module)

Add the events defined in filename

To be attached to the preload events, methods in each preload class must be prefixed with 'event' and have a defined event (like 'beforeFilterHTMLinput'). A fully qualified method would look like 'eventBeforeFilterHTMLinput'

  • Visibility: public

Arguments

  • filename string
  • module mixed

getInstance

object icms_preload_Handler::getInstance()

Access the only instance of this class

  • Visibility: public
  • This method is static.

triggerEvent

bool icms_preload_Handler::triggerEvent(event, array)

Triggers a specific event on all the libraries

Here are the currently supported events:

  • startCoreBoot triggered at the start of the core booting process (start of include/common.php)
  • finishCoreBoot triggered at the end of the core booting process (end of include/common.php)
  • adminHeader triggered when calling icms_cp_header() and is used to output content in the head section of the admin side
  • beforeFooter triggered when include/footer.php is called, at the beginning of the file
  • startOutputInit triggered when starting to output the content, in include/header.php after instantiation of $xoopsTpl
  • adminBeforeFooter triggered before the footer is loaded in the admin control panel
  • beforeFilterTextareaInput triggered before text from a textarea is processed to save to the database (@see icms_core_DataFilter)
  • afterFilterTextareaInput triggered after text from a textarea is processed to save to the database (@see icms_core_DataFilter)
  • beforeFilterTextareaDisplay triggered before text from a textarea is processed to display (@see icms_core_DataFilter)
  • afterFilterTextareaDisplay triggered after text from a textarea is processed to display (@see icms_core_DataFilter)
  • beforeFilterHTMLinput triggered before text from a textarea is processed as HTML to save to the database (@see icms_core_DataFilter)
  • afterFilterHTMLinput triggered after text from a textarea is processed as HTML to save to the database (@see icms_core_DataFilter)
  • beforeFilterHTMLdisplay triggered before text from a textarea is processed as HTML to display (@see icms_core_DataFilter)
  • afterFilterHTMLdisplay triggered after text from a textarea is processed as HTML to display (@see icms_core_DataFilter)
  • beforeDisplayTarea triggered before before text from a textarea is processed to display (@see icms_core_Textsanitizer)
  • afterDisplayTarea triggered after text from a textarea is processed to display (@see icms_core_Textsanitizer)
  • beforePreviewTarea triggered before text from a textarea is processed for preview (@see icms_core_Textsanitizer)
  • afterPreviewTarea triggered after text from a textarea is processed for preview (@see icms_core_Textsanitizer)
  • savingSystemAdminPreferencesItem triggered before saving preferences in the admin control panel (modules/system/preferences/main.php)
  • afterSaveSystemAdminPreferencesItems triggered after saving preferences in the admin control panel (modules/system/preferences/main.php)
  • Visibility: public

Arguments

  • event mixed - <p>string name of the event to trigger</p>
  • array mixed - <p>mixed container to pass any arguments to be used by the library</p>

getClassName

string icms_preload_Handler::getClassName(filename)

Construct the name of the class based on the filename

All preloads will be discovered if the class name is the file name without the extension (uppercase the first letter) prefixed with 'IcmsPreload' For example, file name = protectEmail.php -> class name = IcmsPreloadProtectEmail

  • Visibility: public

Arguments

  • filename mixed - <p>string filename where the class is located</p>
Clone this wiki locally