Mercurial > pub > Impl
comparison Lib/IMPL/Web/Application/CustomResource.pm @ 230:6d8092d8ce1b
*reworked IMPL::Security
*reworked IMPL::Web::Security
*refactoring
| author | sergey |
|---|---|
| date | Mon, 08 Oct 2012 03:37:37 +0400 |
| parents | 47f77e6409f7 |
| children | abc7c26bf615 |
comparison
equal
deleted
inserted
replaced
| 229:47f77e6409f7 | 230:6d8092d8ce1b |
|---|---|
| 1 package IMPL::Web::Application::CustomResource; | 1 package IMPL::Web::Application::CustomResource; |
| 2 use strict; | 2 use strict; |
| 3 | 3 |
| 4 use IMPL::lang qw(:constants); | 4 use IMPL::Const qw(:prop); |
| 5 | 5 |
| 6 use IMPL::declare { | 6 use IMPL::declare { |
| 7 require => { | 7 require => { |
| 8 CustomResourceContract => 'IMPL::Web::Application::CustomResourceContract' | 8 CustomResourceContract => 'IMPL::Web::Application::CustomResourceContract' |
| 9 }, | 9 }, |
| 23 } | 23 } |
| 24 | 24 |
| 25 sub InitContract { | 25 sub InitContract { |
| 26 my ($self) = @_; | 26 my ($self) = @_; |
| 27 | 27 |
| 28 $self->_contractInstance( $self->contractFactory->new(resourceFactory => $self ) ); | 28 $self->_contractInstance( |
| 29 $self->contractFactory->new( | |
| 30 resourceFactory => $self, | |
| 31 resources => [ $self->GetChildResources() ] | |
| 32 ) | |
| 33 ); | |
| 29 } | 34 } |
| 30 | 35 |
| 31 sub GetChildResources { | 36 sub GetChildResources { |
| 32 | 37 |
| 33 } | 38 } |
| 98 sub GetChildResources { | 103 sub GetChildResources { |
| 99 my $self = shift; | 104 my $self = shift; |
| 100 return | 105 return |
| 101 $self->SUPER::GetChildResources(), | 106 $self->SUPER::GetChildResources(), |
| 102 { | 107 { |
| 103 | 108 name => 'info', |
| 104 } | 109 contract => $contractInfo |
| 105 { | |
| 106 | |
| 107 }; | 110 }; |
| 108 } | 111 } |
| 109 | 112 |
| 110 =end code | 113 =end code |
| 111 | 114 |
| 115 Метод возвращает список из хешей, которые будут переданы в качестве параметра | |
| 116 C<resources> контракту данного ресурса. | |
| 112 | 117 |
| 113 =cut | 118 =cut |
