src/Neuron/Models/Observable.php
protected function trigger ($event)
	{
		$arguments = func_get_args ();
		array_shift ($arguments);

		// Check for events
		if (isset ($this->events[$event]))
		{
			foreach ($this->events[$event] as $call)
			{
				call_user_func_array ($call, $arguments);
			}
		}

		// Notify everyone
		foreach ($this->observing as $observer)
		{
			$observer->update ();
		}
	}
protected function trigger ($event)
	{
		$arguments = func_get_args ();
		array_shift ($arguments);

		// Check for events
		if (isset ($this->events[$event]))
		{
			foreach ($this->events[$event] as $call)
			{
				call_user_func_array ($call, $arguments);
			}
		}

		// Notify everyone
		foreach ($this->observing as $observer)
		{
			$observer->update ();
		}
	}
protected function trigger ( $ event ) { $ arguments = func_get_args ( ) ; array_shift ( $ arguments ) ; // Check for events if ( isset ( $ this -> events [ $ event ] ) ) { foreach ( $ this -> events [ $ event ] as $ call ) { call_user_func_array ( $ call , $ arguments ) ; } } // Notify everyone foreach ( $ this -> observing as $ observer ) { $ observer -> update ( ) ; } }
Trigger an event, possibly with parameters.
@param $event
Trigger an event possibly with parameters .