ultimix

- Main Page
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Data Fields

Public Member Functions
math_markup_1_0_0 Class Reference

## Public Member Functions
| __construct ()
| compile_eq (&$Settings)
| compile_neq (&$Settings)
| compile_not (&$Settings)
| compile_gt (&$Settings)
| compile_lt (&$Settings)
| compile_gte (&$Settings)
| compile_lte (&$Settings)
| compile_odd (&$Settings)
| compile_even (&$Settings)
| compile_if (&$Settings)
| compile_map (&$Settings)

## Detailed Description

Class processes math macro.

Author
  Dodonov A.A.

Definition at line 26 of file math_markup.php.

## Constructor & Destructor Documentation

__construct | ( |  | ) |

Constructor.

Author
  Dodonov A.A.

Definition at line 38 of file math_markup.php.

{
try
{
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Member Function Documentation

compile_eq | ( | & | $Settings | ) |

Function processes macro 'eq'.

Parameters

  $Settings | - Settings.

Returns
  Result.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 71 of file math_markup.php.

{
try
{
list( $Val1 , $Val2 ) = $Settings->get_settings( 'value1,value2' );
return( $Val1 == $Val2 ? 1 : 0 );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

compile_even | ( | & | $Settings | ) |

Function processes macro 'even'.

Parameters

  $Settings | - Settings.

Returns
  Result.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 359 of file math_markup.php.

{
try
{
$Settings->load_settings( $Parameters );
return( intval( $Settings->get_setting( 'value' ) ) % 2 == 0 );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

compile_gt | ( | & | $Settings | ) |

Function processes macro 'gt'.

Parameters

  $Settings | - Settings.

Returns
  Result.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 179 of file math_markup.php.

{
try
{
list( $Val1 , $Val2 ) = $Settings->get_settings( 'value1,value2' );
return( $Val1 > $Val2 ? 1 : 0 );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

compile_gte | ( | & | $Settings | ) |

Function processes macro 'gte'.

Parameters

  $Settings | - Settings.

Returns
  Result.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 251 of file math_markup.php.

{
try
{
list( $Val1 , $Val2 ) = $Settings->get_settings( 'value1,value2' );
return( $Val1 >= $Val2 ? 1 : 0 );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

compile_if | ( | & | $Settings | ) |

Function processes macro 'if'.

Parameters

  $Settings | - Settings.

Returns
  Result.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 395 of file math_markup.php.

{
try
{
$Cond = $Settings->get_setting( 'condition' , false );
$Then = $Settings->get_setting( 'then' , '' );
$Else = $Settings->get_setting( 'else' , '' );
return( $Cond == 0 ? $Else : $Then );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

compile_lt | ( | & | $Settings | ) |

Function processes macro 'lt'.

Parameters

  $Settings | - Settings.

Returns
  Result.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 215 of file math_markup.php.

{
try
{
list( $Val1 , $Val2 ) = $Settings->get_settings( 'value1,value2' );
return( $Val1 < $Val2 ? 1 : 0 );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

compile_lte | ( | & | $Settings | ) |

Function processes macro 'lte'.

Parameters

  $Settings | - Settings.

Returns
  Result.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 287 of file math_markup.php.

{
try
{
list( $Val1 , $Val2 ) = $Settings->get_settings( 'value1,value2' );
return( $Val1 <= $Val2 ? 1 : 0 );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

compile_map | ( | & | $Settings | ) |

Function compiles macro 'map'.

Parameters

  $Settings | - Parameters.

Returns
  HTML code.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 433 of file math_markup.php.

{
try
{
$Value = $Settings->get_setting( 'value' , false );
$First = explode( '|' , $Settings->get_setting( 'first' , '' ) );
$Second = explode( '|' , $Settings->get_setting( 'second' , '' ) );
$Code = '';
foreach( $First as $k => $v )
{
if( $v == $Value )
{
$Code = $Second[ $k ];
break;
}
}
return( $Code );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

compile_neq | ( | & | $Settings | ) |

Function processes macro 'neq'.

Parameters

  $Settings | - Settings.

Returns
  Result.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 107 of file math_markup.php.

{
try
{
list( $Val1 , $Val2 ) = $Settings->get_settings( 'value1,value2' );
return( $Val1 != $Val2 ? 1 : 0 );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

compile_not | ( | & | $Settings | ) |

Function processes macro 'not'.

Parameters

  $Settings | - Settings.

Returns
  Result.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 143 of file math_markup.php.

{
try
{
$Value = $Settings->get_setting( 'value' );
return( !$Value ? 1 : 0 );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

compile_odd | ( | & | $Settings | ) |

Function processes macro 'odd'.

Parameters

  $Settings | - Settings.

Returns
  Result.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 323 of file math_markup.php.

{
try
{
$Settings->load_settings( $Parameters );
return( intval( $Settings->get_setting( 'value' ) ) % 2 == 1 );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

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

- packages/gui/packages/math_markup/math_markup.php