Skip to content
forked from zeelot/event

Event class for Kohana 3.x, written to be lightweight like the one in Kohana 2.x with a few fixes

Notifications You must be signed in to change notification settings

zeebinz/kohana-event

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

#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!

About

Event class for Kohana 3.x, written to be lightweight like the one in Kohana 2.x with a few fixes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%