diff Lib/IMPL/Web/QueryHandler.pm @ 62:c64bd1bf727d

Web application Page query handler
author wizard
date Fri, 12 Mar 2010 16:23:46 +0300 (2010-03-12)
parents
children 2840c4c85db8
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Lib/IMPL/Web/QueryHandler.pm	Fri Mar 12 16:23:46 2010 +0300
@@ -0,0 +1,53 @@
+package IMPL::Web::QueryHandler;
+
+use base qw(IMPL::Object IMPL::Object::Autofill);
+use IMPL::Class::Property;
+
+__PACKAGE__->PassThroughArgs;
+
+use IMPL::Exception;
+
+sub Invoke {
+	my ($self,$action,$nextHandler) = @_;
+	
+	if (not ref $self or UNIVERSAL::isa($self,'IMPL::Object::Factory')) {
+		return $self->new( action => $action )->Invoke($action,$nextHandler);
+	} else {
+		return $self->Process($action,$nextHandler);
+	}
+}
+
+sub Process {
+	die new NotImplementedException("The method isn't implemented", __PACKAGE__, 'Process');
+}
+
+1;
+
+__END__
+
+=pod
+
+=head1 DESCRIPTION
+
+������� ����� ��� ������������ ��������.
+
+=head1 MEMBERS
+
+=over 4
+
+=item C< Invoke($action,$nextHandler) >
+
+���������� ���������� ��������� �������, ��� �������� ���������� �����������. ������ ����������
+��������� ��� ���� �������, ���� ��� ����������� �����, �� ������� ��������� ������ � ��������
+� ���������� ������� ����� C< Invoke > � ����������� C< $action >, C< $nextHandler >.
+
+���� ����� ��� ������ � �������, �� ���������� ���������� ������ C< Process >
+
+C< $action > ��������� �������
+
+C< $nextHandler > ������� ��� ������ ���������� �����������. ���������� ��� ����������, �� ���������� �����������
+������������ ����� �������� ����������� ���������.
+
+=back
+
+=cut
\ No newline at end of file