ultimix

- Main Page
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Data Fields

Public Member Functions | Data Fields
forms_1_0_0 Class Reference

## Public Member Functions
| __construct ()
| send_form (&$Options)
| draw_form (&$Options)
| compile_form (&$Settings)
| controller ($Options)
| view (&$Options)

## Data Fields
| $Output = false
| $CachedMultyFS = false
| $Mail = false
| $PackageSettings = false
| $String = false
| $SecurityUtilities = false

## Detailed Description

Class processes forms.

Author
  Dodonov A.A.

Definition at line 26 of file forms.php.

## Constructor & Destructor Documentation

__construct | ( |  | ) |

Constructor.

Author
  Dodonov A.A.

Definition at line 66 of file forms.php.

{
try
{
$this->CachedMultyFS = get_package( 'cached_multy_fs' , 'last' , __FILE__ );
$this->Mail = get_package( 'mail' , 'last' , __FILE__ );
$this->PackageSettings = get_package_object( 'settings::package_settings' , 'last' , __FILE__ );
$this->String = get_package( 'string' , 'last' , __FILE__ );
$this->SecurityUtilities = get_package( 'security::security_utilities' , 'last' , __FILE__ );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Member Function Documentation

compile_form | ( | & | $Settings | ) |

Function processes macro 'form'.

Parameters

  $Settings | - String to process.

Returns
  Code.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 216 of file forms.php.

{
try
{
$this->draw_form( $Settings );
return( $this->Output );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

controller | ( |  | $Options | ) |

Function controls component.

Parameters

  $Options | - Settings.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 248 of file forms.php.

{
try
{
$ContextSet = get_package( 'gui::context_set' , 'last' , __FILE__ );
$ContextSet->add_context( dirname( __FILE__ ).'/conf/cfcx_send_form' );
$ContextSet->execute( $Options , $this , __FILE__ );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

draw_form | ( | & | $Options | ) |

Function draws component.

Parameters

  $Options | - Settings.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 180 of file forms.php.

{
try
{
$FormFile = $Options->get_setting( 'form_template' );
$this->Output = $this->CachedMultyFS->get_template( __FILE__ , "$FormFile.tpl" );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

send_form | ( | & | $Options | ) |

Function processes form.

Parameters

  $Options | - Settings.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 142 of file forms.php.

{
try
{
$EmailFile = $Options->get_setting( 'email_template' );
$Email = $this->CachedMultyFS->get_template( __FILE__ , "$EmailFile.tpl" );
$Data = $this->SecurityUtilities->get_all_posted_data();
$Email = $this->String->print_record( $Email , $Data );
$this->send_email( $Email );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

view | ( | & | $Options | ) |

Function draws component.

Parameters

  $Options | - Settings.

Returns
  HTML code of the компонента.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 286 of file forms.php.

{
try
{
$ContextSet = get_package( 'gui::context_set' , 'last' , __FILE__ );
$ContextSet->add_context( dirname( __FILE__ ).'/conf/cfcx_draw_form' );
$ContextSet->execute( $Options , $this , __FILE__ );
return( $this->Output );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Field Documentation

$CachedMultyFS = false

Cached objects.

Author
  Dodonov A.A.

Definition at line 50 of file forms.php.

$Mail = false

Definition at line 51 of file forms.php.

$Output = false

Display method's result.

Author
  Dodonov A.A.

Definition at line 38 of file forms.php.

$PackageSettings = false

Definition at line 52 of file forms.php.

$SecurityUtilities = false

Definition at line 54 of file forms.php.

$String = false

Definition at line 53 of file forms.php.

The documentation for this class was generated from the following file:

- packages/gui/packages/forms/forms.php