SproutCMS

This is the code documentation for the SproutCMS project

class Event

Process queuing/execution class. Allows an unlimited number of callbacks
to be added to 'events'. Events can be run multiple times, and can also
process event-specific data. By default, Kohana has several system events.

$Id: Event.php 4390 2009-06-04 03:05:36Z zombor $

Extending this class

<?php
/**
* New class description goes here
* 
* @author Your Name, 2026-09-16
**/
class NewClassName extends Event {
    
    /**
    * Replaces an event with another event.
    **/
    public function replace (string $name, array $existing, array $callback) {
        // Method code goes here
    }
    
    /**
    * Get all callbacks for an event.
    **/
    public function get (string $name) {
        // Method code goes here
    }
    
    /**
    * Check if a given event has been run.
    **/
    public function hasRun (string $name) {
        // Method code goes here
    }
    
    /**
    * Clear some or all callbacks from an event.
    **/
    public function clear (string $name, array $callback) {
        // Method code goes here
    }
    
    /**
    * Execute all of the callbacks attached to an event.
    **/
    public function run (string $name, array $data) {
        // Method code goes here
    }
    
    /**
    * Add a callback to an event queue, after a given event.
    **/
    public function addAfter (string $name, array $existing, array $callback) {
        // Method code goes here
    }
    
    /**
    * Inserts a new event at a specfic key location.
    **/
    private function insertEvent (string $name, integer $key, array $callback) {
        // Method code goes here
    }
    
    /**
    * Add a callback to an event queue, before a given event.
    **/
    public function addBefore (string $name, array $existing, array $callback) {
        // Method code goes here
    }
    
    /**
    * Add a callback to an event queue.
    **/
    public function add (string $name, array $callback) {
        // Method code goes here
    }
    
}
?>