public function run( $tag, $value = null ) {
		if (!isset( $this->triggered[$tag]))
			$this->triggered[$tag] = 1;
		else
			++$this->triggered[$tag];
		if (!isset($this->hooks[$tag]))
			return $value;

		$this->current[] = $tag;

		// Sort by priority.
		if (!isset($this->merged[$tag])) {
			ksort($this->hooks[$tag]);
			$this->merged[$tag] = true;
		}

		reset($this->hooks[$tag]);

		// array( $tag, $value, [additional arguments] );
		$args = func_get_args();

		do {
			foreach ((array) current($this->hooks[$tag]) as $callback)
				if (!is_null($callback))
					$value = call_user_func_array($callback, array_merge(array($value), array_slice( $args, 2)));
		} while (next($this->hooks[$tag]) !== false);

		array_pop($this->current);

		return $value;
	}