Detailed Description
Class provides chronological records manupulation routine.
- Author
- Dodonov A.A.
Definition at line 26 of file chronological.php.
Constructor & Destructor Documentation
Constructor.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 55 of file chronological.php.
{
try
{
$this->Database =
get_package(
'database' ,
'last' , __FILE__ );
$this->Security =
get_package(
'security' ,
'last' , __FILE__ );
}
catch( Exception $e )
{
}
}
Member Function Documentation
| close_record |
( |
|
$MasterId, |
|
|
|
$DataAccess |
|
) |
| |
Function closes record, wich is equivalent to it's deletion.
- Parameters
-
| $MasterId | - Updating record's id. |
| $DataAccess | - Data access object. |
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 271 of file chronological.php.
{
try
{
$MasterId = $this->Security->get( $MasterId , 'integer_list' );
$this->Database->update(
$DataAccess->NativeTable , array( 'date_to' ) , array( time() ) ,
"id IN ( $MasterId ) AND ( ".$DataAccess->AddLimitations." )"
);
$this->Database->commit();
}
catch( Exception $e )
{
}
}
| create_record |
( |
|
$MasterId, |
|
|
|
$DataAccess |
|
) |
| |
Function updates data bounds and group_id.
- Parameters
-
| $MasterId | - Updating record's id. |
| $DataAccess | - Data access object. |
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 90 of file chronological.php.
{
try
{
$MasterId = $this->Security->get( $MasterId , 'integer' );
$Time = time();
$this->Database->update(
$DataAccess->NativeTable ,
array( 'date_from' , 'date_to' , 'group_id' ) ,
array( $Time , $Time + 100 * 365 * 24 * 60 * 60 , $MasterId ) ,
"id = $MasterId"
);
$this->Database->commit();
}
catch( Exception $e )
{
}
}
| update_record |
( |
|
$MasterId, |
|
|
|
$Changes, |
|
|
|
$DataAccess |
|
) |
| |
Function updates data bounds and group_id for the updating record.
- Parameters
-
| $MasterId | - Updating record's id. |
| $Changes | - Records changes. |
| $DataAccess | - Data access object. |
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 231 of file chronological.php.
{
try
{
$this->Database->lock( array( $DataAccess->NativeTable ) , array( 'WRITE' ) );
$this->close_old_version( $MasterId , $Changes , $DataAccess );
$this->create_new_version( $MasterId , $Changes , $DataAccess );
$this->Database->unlock();
}
catch( Exception $e )
{
}
}
Field Documentation
The documentation for this class was generated from the following file: