Detailed Description
Class provides data access routine.
- Author
- Dodonov A.A.
Definition at line 26 of file rating_access.php.
Constructor & Destructor Documentation
Constructor.
- Author
- Dodonov A.A.
Definition at line 66 of file rating_access.php.
{
try
{
$this->Database =
get_package(
'database' ,
'last' , __FILE__ );
$this->DatabaseAlgorithms =
get_package(
'database::database_algorithms' ,
'last' , __FILE__ );
$this->Link =
get_package(
'link' ,
'last' , __FILE__ );
$this->Security =
get_package(
'security' ,
'last' , __FILE__ );
$this->SecurityParser =
get_package(
'security::security_parser' ,
'last' , __FILE__ );
}
catch( Exception $e )
{
}
}
Member Function Documentation
Creating record.
- Parameters
-
| $Record | - Example for creation. |
- Returns
- id of the created record.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 207 of file rating_access.php.
{
try
{
$MasterLink = $this->SecurityParser->parse_parameters(
$Record , 'master_type:command;master_id:integer'
);
$Record = array( 'value' => 0 );
list( $Fields , $Values ) = $this->DatabaseAlgorithms->compile_fields_values( $Record );
$id = $this->DatabaseAlgorithms->create( $this->NativeTable , $Fields , $Values );
get_field( $MasterLink ,
'master_id' ) , $id ,
get_field( $MasterLink ,
'master_type' ) ,
'rating'
);
$this->rise_create_event( $id );
return( $id );
}
catch( Exception $e )
{
}
}
Function selects list of objects.
- Parameters
-
| $id | - Comma separated list of record's id. |
- Returns
- Array of records.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 140 of file rating_access.php.
{
try
{
$id = $this->Security->get( $id , 'integer_list' );
return( $this->
unsafe_select( $this->NativeTable.
".id IN ( $id ) ORDER BY id DESC" ) );
}
catch( Exception $e )
{
}
}
| unsafe_select |
( |
|
$Condition | ) |
|
Selecting reviews.
- Parameters
-
| $Condition | - Records selection condition. |
- Returns
- Array of objects.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 104 of file rating_access.php.
{
try
{
return( $this->Database->select( '*' , $this->NativeTable , $Condition ) );
}
catch( Exception $e )
{
}
}
Updating record.
- Parameters
-
| $id | - Comma separated list of record's id. |
| $Record | - Example for update. |
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 259 of file rating_access.php.
{
try
{
$id = $this->Security->get( $id , 'integer_list' );
$Record = $this->SecurityParser->parse_parameters( $Record , 'value:float' , 'allow_not_set' );
list( $Fields , $Values ) = $this->DatabaseAlgorithms->compile_fields_values( $Record );
if( isset( $Fields[ 0 ] ) )
{
$this->Database->update(
$this->NativeTable , $Fields , $Values , "( $this->AddLimitations ) AND id IN ( $id )"
);
$this->Database->commit();
}
}
catch( Exception $e )
{
}
}
Field Documentation
| $DatabaseAlgorithms = false |
| $NativeTable = '`umx_rating`' |
Table name in wich objects of this entity are stored.
- Author
- Dodonov A.A.
Definition at line 38 of file rating_access.php.
The documentation for this class was generated from the following file: