Overview

Packages

  • Auth
    • Ads
    • Ldap
    • Xoops
  • Autotasks
  • Config
    • Category
    • Item
    • Option
  • Core
    • Filesystem
    • Filters
    • Logger
    • Mail
    • Message
    • Password
    • Security
    • StopSpammer
    • Template
    • Textsanitizer
    • VersionChecker
  • Data
    • Avatar
    • Comment
  • Database
    • Connection
    • Criteria
    • Legacy
    • MySQL
    • PDO
    • Updater
  • Feeds
    • RSS
  • File
  • Form
    • Base
    • Elements
  • ICMS
    • IPF
      • View
  • Image
    • Category
  • Ipf
    • Category
    • Controller
    • Export
    • form
    • Keyhighlighter
    • Member
    • Object
    • Permission
    • richfile
    • Tree
    • urllink
    • View
  • kernel
    • Set
  • Member
    • Group
    • GroupMembership
    • GroupPermission
    • User
  • Messaging
  • Module
  • None
  • Notification
  • Page
  • Plugins
    • Editor
  • Preload
    • Libraries
  • Privmessage
  • Session
  • SmartObject
  • View
    • Block
    • Breadcrumb
    • PageNav
    • PrinterFriendly
    • Template
    • Templates
    • Theme
    • Tree

Classes

  • icms_preload_Handler
  • icms_preload_Item
  • Overview
  • Package
  • Class

Class icms_preload_Handler

icms_preload_Handler

Class handling preload events automatically detect from the files in ICMS_PRELOAD_PATH

Package: Preload
Category: ICMS
Copyright: The ImpressCMS Project http://www.impresscms.org/
License: GNU General Public License (GPL)
Author: marcan marcan@impresscms.org
Since: 1.1
Located at preload/Handler.php
Methods summary
public
# __construct( )

Constructor

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

public
# addPreloadEvents( string $filename, $module = false )

Add the events defined in filename

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'

Parameters

$filename
$module
public static object &
# getInstance( )

Access the only instance of this class

Access the only instance of this class

Returns

object
public true
# triggerEvent( $event, $array = array() )

Triggers a specific event on all the libraries

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)

Parameters

$event
name of the event to trigger
$array
container to pass any arguments to be used by the library

Returns

true
if successful, FALSE if not
public string
# getClassName( $filename )

Construct the name of the class based on the 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

Parameters

$filename
filename where the class is located

Returns

string
name of the class
API documentation generated by ApiGen