Main Page   File List   File Members   Related Pages  

modfuncs.inc.php File Reference

This file contains helper functions used by modules. More...

Go to the source code of this file.

Functions

 ListAdd ($needle,&$haystack)
 Adds an item to a list.

 ListDel ($needle,&$haystack)
 Removes an item from a list.

 CallHooks ()
 Calls all modules which have added themselves to a given hook.

 get_option ($haystack,$needle)
 Get a given entry from a list.

 set_option (&$haystack,$needle,$value)
 Sets an entry in a list.

 is_standard_page ()
 Checks if the requested page is a "normal" page.

 module_installed ()
 To be called whenever a module is (un)installed.


Detailed Description

This file contains helper functions used by modules.

This includes several functions which modules and the module subsystem should use, such as the hook system, and the list manipulation system.

Currently a list is stored as a serialize'd array, suitable for storing in a database directly, however this may change, so these functions should be used.

Definition in file modfuncs.inc.php.


Function Documentation

CallHooks  
 

Calls all modules which have added themselves to a given hook.

This function takes a variable length argument list - only the first argument is required, which is the name of the hook to call. The others are used if a certain hook needs additional parameters to be passed onto the called modules.

Parameters:
hookname  The name of the hook to call.
...  Parameters to pass on to the called modules.
Returns:
Nothing.

Definition at line 65 of file modfuncs.inc.php.

References get_entry().

Referenced by basic_page_content(), basic_page_DoSummary(), get_page(), and stats_tr_cell().

get_option   haystack,
  needle
 

Get a given entry from a list.

Parameters:
haystack  The list to search in.
needle  The value to search for.
Returns:
The value of the entry in the list, if it exists, otherwise an empty string ("").

Definition at line 93 of file modfuncs.inc.php.

Referenced by Istats_getCount(), and stats_text_DoStats().

is_standard_page  
 

Checks if the requested page is a "normal" page.

Returns:
true or false

Definition at line 127 of file modfuncs.inc.php.

References get_entry().

ListAdd   needle,
&$    haystack
 

Adds an item to a list.

Parameters:
needle  The item to be added to the list.
&  $haystack The list.
Returns:
Nothing.

Definition at line 23 of file modfuncs.inc.php.

Referenced by base_page_install(), basic_page_install(), copyright_install(), dbcleanup_install(), logo_install(), meta_generator_install(), MODULE_NAME_install(), stats_install(), and stats_text_install().

ListDel   needle,
&$    haystack
 

Removes an item from a list.

Parameters:
needle  The item to be removed from the list.
&  $haystack The list.
Returns:
Nothing.

Definition at line 41 of file modfuncs.inc.php.

Referenced by base_page_uninstall(), basic_page_uninstall(), copyright_uninstall(), dbcleanup_uninstall(), Istats_UIRH(), logo_uninstall(), meta_generator_uninstall(), MODULE_NAME_uninstall(), stats_text_uninstall(), and stats_uninstall().

module_installed  
 

To be called whenever a module is (un)installed.

This contains functions which should be called whenever anything serious changes in the user's configuration of modphpcms. It will:

  • Re-activate the user's currently selected style.
Returns:
Nothing.

Definition at line 151 of file modfuncs.inc.php.

References get_entry().

Referenced by base_page_install(), basic_page_install(), copyright_install(), dbcleanup_install(), logo_install(), meta_generator_install(), MODULE_NAME_install(), stats_install(), and stats_text_install().

set_option &$    haystack,
  needle,
  value
 

Sets an entry in a list.

This will set an entry in a list, creating the list and entry if neccessary.

Parameters:
&  $haystack The list to set the entry in.
needle  The identifier in the list.
value  The value to set the entry to.
Returns:
Nothing.

Definition at line 113 of file modfuncs.inc.php.


Generated on Wed Jun 9 03:38:16 2004 for modphpcms by doxygen1.2.18