diff 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
line wrap: on
line diff
--- a/Lib/IMPL/Web/Application/CustomResource.pm	Sat Sep 29 02:34:47 2012 +0400
+++ b/Lib/IMPL/Web/Application/CustomResource.pm	Mon Oct 08 03:37:37 2012 +0400
@@ -1,7 +1,7 @@
 package IMPL::Web::Application::CustomResource;
 use strict;
 
-use IMPL::lang qw(:constants);
+use IMPL::Const qw(:prop);
 
 use IMPL::declare {
     require => {
@@ -25,7 +25,12 @@
 sub InitContract {
     my ($self) = @_;
     
-    $self->_contractInstance( $self->contractFactory->new(resourceFactory => $self ) ); 
+    $self->_contractInstance(
+        $self->contractFactory->new(
+            resourceFactory => $self,
+            resources => [ $self->GetChildResources() ]
+        )
+    ); 
 }
 
 sub GetChildResources {
@@ -100,14 +105,14 @@
     return
         $self->SUPER::GetChildResources(),
         {
-            
-        }
-        {
-            
+            name => 'info',
+            contract => $contractInfo
         };
 }
 
 =end code
 
+Метод возвращает список из хешей, которые будут переданы в качестве параметра
+C<resources> контракту данного ресурса.
 
 =cut
\ No newline at end of file