Skip to content

CI_Hooks

Mathieu Nayrolles edited this page Jan 20, 2016 · 1 revision

CI_Hooks

Hooks Class

Provides a mechanism to extend the base system without hacking.

  • Class name: CI_Hooks
  • Namespace:

Properties

$enabled

public boolean $enabled = FALSE

Determines whether hooks are enabled

  • Visibility: public

$hooks

public array $hooks = array()

List of all hooks set in config/hooks.php

  • Visibility: public

$_objects

protected array $_objects = array()

Array with class objects to use hooks methods

  • Visibility: protected

$_in_progress

protected boolean $_in_progress = FALSE

In progress flag

Determines whether hook is in progress, used to prevent infinte loops

  • Visibility: protected

Methods

__construct

void CI_Hooks::__construct()

Class constructor

  • Visibility: public

call_hook

boolean CI_Hooks::call_hook(string $which)

Call Hook

Calls a particular hook. Called by CodeIgniter.php.

  • Visibility: public

Arguments

  • $which string - <p>Hook name</p>

_run_hook

boolean CI_Hooks::_run_hook(array $data)

Run Hook

Runs a particular hook

  • Visibility: protected

Arguments

  • $data array - <p>Hook details</p>
Clone this wiki locally