62 $this->Cache =
get_package(
'cache' ,
'last' , __FILE__ );
63 $this->DefaultControllers =
get_package(
'gui::context_set::default_controllers' ,
'last' , __FILE__ );
64 $this->DefaultViews =
get_package(
'gui::context_set::default_views' ,
'last' , __FILE__ );
65 $this->Security =
get_package(
'security' ,
'last' , __FILE__ );
66 $this->Utilities =
get_package(
'utilities' ,
'last' , __FILE__ );
108 private function run_multy_call( &$ContextSet , $Config , &$CustomSettings , &$Options )
112 $ContextSet->Context->load_raw_config( $Config );
114 $this->DefaultControllers->set_constants( $ContextSet , $Options );
115 if( $ContextSet->run_execution( $CustomSettings , $this->DefaultControllers , 1 ) )
117 $ContextSet->clear();
123 catch( Exception $e )
163 private function run_simple_form( &$ContextSet , $Config , &$CustomSettings , &$Options )
167 $FileName = $CustomSettings->get_setting(
'form_template' );
168 if( $this->Cache->data_exists( $FileName ) )
170 $this->DefaultViews->Provider->Output = $this->Cache->get_data( $FileName );
174 $ContextSet->Context->load_raw_config( $Config );
176 $this->DefaultViews->set_constants( $ContextSet , $Options );
177 if( $ContextSet->run_execution( $CustomSettings , $this->DefaultViews , 0 ) )
179 $this->Cache->add_data( $FileName , $this->DefaultViews->Provider->Output );
180 $ContextSet->clear();
186 catch( Exception $e )
222 private function run_list_view( &$ContextSet , $Config , &$CustomSettings )
226 global $SkipCallParamsValidation;
227 if( $SkipCallParamsValidation )
229 $CustomSettings->remove_setting(
'call_params_filter' );
232 $ContextSet->Context->load_config_from_object( $CustomSettings );
234 $this->DefaultViews->set_constants( $ContextSet , $Options );
235 if( $ContextSet->Context->execute( $CustomSettings , $this->DefaultViews ) )
237 $ContextSet->clear();
243 catch( Exception $e )
279 private function run_custom_config( &$ContextSet , $Config , &$CustomSettings )
283 $OldProvider = $ContextSet->Provider;
285 if( $CustomSettings->get_setting(
'provider_package_name' ,
false ) !== false )
287 $ContextSet->Provider = $this->Utilities->get_package( $CustomSettings , __FILE__ ,
'provider_' );
290 $ContextSet->Context->load_raw_config( $Config );
292 if( $ContextSet->run_execution( $CustomSettings , $ContextSet->Provider ) )
294 $OldProvider->Output = $ContextSet->Provider->Output;
295 $ContextSet->clear();
301 catch( Exception $e )
345 switch( $Settings->get_setting(
'success_func' ,
false ) )
347 case(
'multy_call' ):
348 $Res = $this->run_multy_call( $ContextSet , $Config , $Settings , $Options );
350 case(
'simple_form' ):
351 $Res = $this->run_simple_form( $ContextSet , $Config , $Settings , $Options );
354 $Res = $this->run_list_view( $ContextSet , $Config , $Settings );
357 $Res = $this->run_custom_config( $ContextSet , $Config , $Settings );
362 catch( Exception $e )