private function getApp()
	{
		$stack = $this->resolve('requeststack');

		if ($request = $stack->top())
		{
			$app = $request->getApplication();
		}
		else
		{
			$app = $this->resolve('application::__main');
		}

		return $app;
	}