Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Event class for Kohana 3.x, written to be lightweight like the one in Kohana 2.x with a few fixes
PHP
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
classes
README.markdown

README.markdown

Sample Usage

class Controller_Welcome extends Controller {

    public function action_index()
    {
        $this->request->response = 'hello, world!';

        $foo = 'foo';

        Event::add('test_one', array($this, 'one'));
        Event::add('test_two', array($this, 'two'));

        Event::run('test_one', $foo);

        echo $foo.'
'; } public function one() { echo Event::$data.'
'; Event::$data = 'bar'; $blah = 'inner_foo'; Event::run('test_two', $blah); echo $blah.'
'; echo Event::$data.'
'; } public function two() { echo Event::$data.'
'; Event::$data = 'inner_foo_modified!'; } } // End Welcome

Output

foo
inner_foo
inner_foo_modified!
bar
bar
hello, world!
Something went wrong with that request. Please try again.