ultimix
browser_markup_1_0_0 Class Reference

Public Member Functions

 __construct ()
 compile_browser (&$Settings)
 compile_browsers (&$Settings, $Data)

Data Fields

 $Utilities = false

Detailed Description

Class processes page's macro.

Author
Dodonov A.A.

Definition at line 26 of file browser_markup.php.

Constructor & Destructor Documentation

__construct ( )

Constructor.

Author
Dodonov A.A.

Definition at line 51 of file browser_markup.php.

{
try
{
$this->Utilities = get_package( 'utilities' , 'last' , __FILE__ );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

Member Function Documentation

compile_browser ( $Settings)

Function compiles macro 'browser'.

Parameters
$Settings- Parameters.
Returns
HTML code.
Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 85 of file browser_markup.php.

{
try
{
return( $this->Utilities->detect_browser() );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}
compile_browsers ( $Settings,
  $Data 
)

Function compiles macro 'textarea'.

Parameters
$Settings- Parameters.
$Data- Block content.
Returns
HTML code.
Exceptions
Exception- An exception of this type is thrown.
Author
Dodonov A.A.

Definition at line 123 of file browser_markup.php.

{
try
{
$Browsers = explode( ',' , $Settings->get_setting( 'browsers' ) );
$BrowserName = $this->Utilities->detect_browser();
$Flag = $Name == 'for_browsers' ?
in_array( $BrowserName , $Browsers ) : !in_array( $BrowserName , $Browsers );
return( $Flag ? $Data : '' );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

Field Documentation

$Utilities = false

Cached objects.

Author
Dodonov A.A.

Definition at line 39 of file browser_markup.php.


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