protected function invoke_callback($function_name, array $parameters, $optional = false)
	{
		// call child function
		if (is_callable($function_name))
		{
			if (!is_array($parameters))
			{
				$parameters = array($parameters);
			}

			return call_user_func_array($function_name, $parameters);
		}
		elseif (is_array($function_name) && method_exists($function_name[0], $function_name[1]))
		{
			if (!is_array($parameters))
			{
				$parameters = array($parameters);
			}

			return call_user_func_array($function_name, $parameters);
		}
		elseif (method_exists($this, $function_name) )
		{
			if (!is_array($parameters))
			{
				$parameters = array($parameters);
			}

			return call_user_func_array($this->$function_name, $parameters);
		}
		else if (function_exists($function_name))
		{
			if (!is_array($parameters))
			{
				$parameters = array($parameters);
			}

			return call_user_func_array($function_name, $parameters);
		}
		else
		{
			if ($optional === false)
			{
				$this->log("Error there are no functions declared in scope to handle callback for function '" . $function_name . "'", self::LOG_LEVEL_CRIT);
			}
		}
	}