ultimix

- Main Page
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Data Fields

Public Member Functions | Data Fields
stat_access_1_0_0 Class Reference

## Public Member Functions
| __construct ()
| add_stat ($Key, $Value)
| get_stat ($Fields, $Condition)

## Data Fields
| $NativeTable = '`umx_stat`'
| $Database = false
| $Security = false

## Detailed Description

Counter.

Author
  Dodonov A.A.

Definition at line 26 of file stat_access.php.

## Constructor & Destructor Documentation

__construct | ( |  | ) |

Constructor.

Author
  Dodonov A.A.

Definition at line 63 of file stat_access.php.

{
try
{
$this->Database = get_package( 'database' , 'last' , __FILE__ );
$this->Security = get_package( 'security' , 'last' , __FILE__ );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Member Function Documentation

add_stat | ( |  | $Key,
|  |  | $Value
| ) |  |

Function adds stat info in the database.

Parameters

  $Key | - Key.
  $Value | - Value.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 98 of file stat_access.php.

{
try
{
if( is_array( $Key ) )
{
$Key = implode( '#' , $Key );
}
$Key = $this->Security->get( $Key , 'string' );
$Key = str_replace( '[sharp]' , '#' , $Key );
$Value = $this->Security->get( $Value , 'string' );
$this->Database->insert(
$this->NativeTable , '`key` , `value` , creation_date' , "\"$Key\" , \"$Value\" , NOW()"
);
$this->Database->commit();
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

get_stat | ( |  | $Fields,
|  |  | $Condition
| ) |  |

Function returns stat info from the database.

Parameters

  $Fields | - Fields.
  $Condition | - Select condition.

Returns
  Stat.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 149 of file stat_access.php.

{
try
{
return(
$this->Database->select( $Fields , $this->NativeTable , $Condition )
);
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Field Documentation

$Database = false

Cached objects.

Author
  Dodonov A.A.

Definition at line 50 of file stat_access.php.

$NativeTable = '`umx_stat`'

Table name in wich objects of this entity are stored.

Author
  Dodonov A.A.

Definition at line 38 of file stat_access.php.

$Security = false

Definition at line 51 of file stat_access.php.

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

- packages/stat/packages/stat_access/stat_access.php