Detailed Description
Class of the default controllers.
- Author
- Dodonov A.A.
Definition at line 26 of file default_controllers.php.
Constructor & Destructor Documentation
Constructor.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 80 of file default_controllers.php.
{
try
{
'gui::context_set::context_set_utilities' , 'last' , __FILE__
);
$this->SecurityParser =
get_package(
'security::security_parser' ,
'last' , __FILE__ );
}
catch( Exception $e )
{
}
}
Member Function Documentation
Function copies record.
- Parameters
-
| $Options | - Execution parameters. |
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 508 of file default_controllers.php.
{
try
{
$Options->set_setting( 'create_func' , $Options->get_setting( 'copy_func' ) );
}
catch( Exception $e )
{
}
}
Function creates record.
- Parameters
-
| $Options | - Execution parameters. |
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 276 of file default_controllers.php.
{
try
{
list( $Record , $FunctionName ,
$Provider ) = $this->get_creation_data( $Options );
if( method_exists(
$Provider , $FunctionName ) ===
true )
{
$id = call_user_func( array(
$Provider , $FunctionName ) , $Record , $Options );
$this->GUI->set_var( 'record_id' , $id );
}
else
{
throw( new Exception( "Method \"$FunctionName\" was not found in the class \"$ClassName.\"" ) );
}
}
catch( Exception $e )
{
}
}
Function deletes record.
- Parameters
-
| $Options | - Execution parameters. |
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 149 of file default_controllers.php.
{
try
{
$Provider = $this->ContextSetUtilities->get_data_provider( $Options , $this->Provider );
$FunctionName = $Options->get_setting( 'delete_func' , 'delete' );
$Ids = $this->ContextSetUtilities->get_posted_ids( $this->Prefix );
if( method_exists(
$Provider , $FunctionName ) ===
true )
{
call_user_func( array(
$Provider , $FunctionName ) , implode(
',' , $Ids ) , $Options );
}
else
{
throw( new Exception( "Method \"$FunctionName\" was not found in the class \"$ClassName.\"" ) );
}
}
catch( Exception $e )
{
}
}
| get_update_record |
( |
& |
$Options, |
|
|
|
$Ids, |
|
|
|
$RecordOriginal |
|
) |
| |
Function returns records to update.
- Parameters
-
| $Options | - Execution parameters. |
| $Ids | - Ids of the updating records. |
| $RecordOriginal | - Original record. |
- Returns
- Updating records.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 379 of file default_controllers.php.
{
try
{
$GetPostValidation = $Options->get_setting( 'get_post_validation' , false );
$ValidationScript = $Options->get_setting( 'custom_get_post_validation' , $GetPostValidation );
if( $ValidationScript === false )
{
throw( new Exception( 'There is no script to extract data from http headers' ) );
}
$RecordNew = $this->SecurityParser->parse_http_parameters( $ValidationScript );
return( $this->compile_update_record( $RecordNew , $RecordOriginal ) );
}
catch( Exception $e )
{
}
}
Function for massive processing.
- Parameters
-
| $Options | - Execution parameters. |
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 191 of file default_controllers.php.
{
try
{
$Ids = $this->ContextSetUtilities->get_posted_ids( $this->Prefix );
$Provider = $this->ContextSetUtilities->get_data_provider( $Options , $this->Provider );
if( $Options->get_setting( 'id_list_accept' , 1 ) == '1' )
{
call_user_func(
array(
$Provider , $Options->get_setting(
'func_name' ) ) , implode( $Ids ) , $Options
);
}
else
{
foreach( $Ids as $id )
{
call_user_func( array(
$Provider , $Options->get_setting(
'func_name' ) ) , $id , $Options );
}
}
}
catch( Exception $e )
{
}
}
| set_constants |
( |
& |
$ContextSet, |
|
|
& |
$Options |
|
) |
| |
Function sets all necessary parameters.
- Parameters
-
| $ContextSet | - Set of contexts. |
| $Options | - Execution parameters. |
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 118 of file default_controllers.php.
{
try
{
$this->Prefix = $ContextSet->Prefix;
$this->Provider = $ContextSet->Provider;
}
catch( Exception $e )
{
}
}
Function updates records.
- Parameters
-
| $Options | - Execution parameters. |
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 461 of file default_controllers.php.
{
try
{
list( $Ids , $UpdateRecord ) = $this->get_update_data( $Options );
$Provider = $this->ContextSetUtilities->get_data_provider( $Options , $this->Provider );
$FunctionName = $Options->get_setting( 'update_func' , 'update' );
if( method_exists(
$Provider , $FunctionName ) ===
true )
{
call_user_func( $Func , implode( ',' , $Ids ) , $UpdateRecord , $Options );
}
else
{
throw( new Exception( "Method \"$FunctionName\" was not found in the class \"$ClassName.\"" ) );
}
}
catch( Exception $e )
{
}
}
Field Documentation
| $ContextSetUtilities = false |
The documentation for this class was generated from the following file: