ultimix
security_parser_1_0_0 Class Reference

Public Member Functions

 __construct ()
 allow_not_set ($Predicates)
 parse_parameters ($Params, $ParsingScript, $GlobalPredicates= '')
 parse_http_parameters ($ParsingScript)

Data Fields

 $Security = false
 $SupportedDataTypes = false

Detailed Description

Class with additional algorithms.

Author
Dodonov A.A.

Definition at line 26 of file security_parser.php.

Constructor & Destructor Documentation

__construct ( )

Constructor.

Author
Dodonov A.A.

Definition at line 51 of file security_parser.php.

{
try
{
$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

allow_not_set (   $Predicates)

Function validates can field be unset.

Parameters
$Predicates- Type of the parsing element.
Returns
- True if the field can be not set.
Exceptions
ExceptionAn exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 180 of file security_parser.php.

{
try
{
foreach( $Predicates as $p )
{
if( $p === 'allow_not_set' )
{
return( true );
}
}
return( false );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}
parse_http_parameters (   $ParsingScript)

Function parses input parameters.

Parameters
$ParsingScript- Parsing script.
Returns
Object or array.
Exceptions
ExceptionAn exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 457 of file security_parser.php.

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

Function parses input parameters.

Parameters
$Params- Array of values to parse.
$ParsingScript- Parsing script.
$GlobalPredicates- Global predicates.
Returns
Object or array.
Exceptions
ExceptionAn exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 404 of file security_parser.php.

{
try
{
if( $this->Security === false )
{
$this->Security = get_package( 'security' , 'last' , __FILE__ );
}
$GlobalPredicates = explode( ',' , $GlobalPredicates );
$Result = new stdClass();
$ParsingScript = str_replace( '#' , ';' , $ParsingScript );
$Script = explode( ';' , $ParsingScript );
foreach( $Script as $ScriptLine )
{
$Result = $this->parse_script_line( $Params , $ScriptLine , $Result , $GlobalPredicates );
}
return( $Result );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

Field Documentation

$Security = false

Cached objects.

Author
Dodonov A.A.

Definition at line 38 of file security_parser.php.

$SupportedDataTypes = false

Definition at line 39 of file security_parser.php.


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