ultimix

- Main Page
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Data Fields

Public Member Functions | Data Fields
security_validator_1_0_0 Class Reference

## Public Member Functions
| __construct ()
| validate_custom_fields ($Data, $ParsingScript)
| validate_fields ($ParsingScript)
| get_error_message ()

## Data Fields
| $Pred = false
| $Settings = false
| $String = false
| $SupportedDataTypes = false

## Detailed Description

Class with additional algorithms.

Author
  Dodonov A.A.

Definition at line 26 of file security_validator.php.

## Constructor & Destructor Documentation

__construct | ( |  | ) |

Constructor.

Author
  Dodonov A.A.

Definition at line 53 of file security_validator.php.

{
try
{
$this->Pred = get_package( 'security::security_validator::predicates' , 'last' , __FILE__ );
$this->SecurityParser = get_package( 'security::security_parser' , 'last' , __FILE__ );
$this->String = get_package( 'string' , 'last' , __FILE__ );
$this->SupportedDataTypes = get_package( 'security::supported_data_types' , 'last' , __FILE__ );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Member Function Documentation

get_error_message | ( |  | ) |

Function returns error message.

Returns
  Error message.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 418 of file security_validator.php.

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

validate_custom_fields | ( |  | $Data,
|  |  | $ParsingScript
| ) |  |

Function validates array with data.

Parameters

  $Data | - Array with validating data.
  $ParsingScript | - Validation script.

Returns
  true if the validation was passed, false otherwise.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 339 of file security_validator.php.

{
try
{
$this->Pred->ErrorMessage = false;
$ParsingScript = str_replace( '#' , ';' , $ParsingScript );
$Script = explode( ';' , $ParsingScript );
foreach( $Script as $s )
{
$s = explode( ':' , $s );
$Name = $s[ 0 ];
$Predicates = explode( ',' , $s[ 1 ] );
if( $this->handle_predicates( $Data , $Name , $Predicates ) === false )
{
return( false );
}
}
return( true );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

validate_fields | ( |  | $ParsingScript | ) |

Function validates form fields.

Parameters

  $ParsingScript | - Validation script.

Returns
  true if the validation was passed, false otherwise.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 388 of file security_validator.php.

{
try
{
return( $this->validate_custom_fields( array_merge( $_GET , $_POST ) , $ParsingScript ) );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Field Documentation

$Pred = false

Cached objects.

Author
  Dodonov A.A.

Definition at line 38 of file security_validator.php.

$Settings = false

Definition at line 39 of file security_validator.php.

$String = false

Definition at line 40 of file security_validator.php.

$SupportedDataTypes = false

Definition at line 41 of file security_validator.php.

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

- packages/security/packages/security_validator/security_validator.php