Detailed Description
Class processes data access macro.
- Author
- Dodonov A.A.
Definition at line 26 of file db_markup.php.
Constructor & Destructor Documentation
Constructor.
- Author
- Dodonov A.A.
Definition at line 53 of file db_markup.php.
{
try
{
$this->Database =
get_package(
'database' ,
'last' , __FILE__ );
$this->String =
get_package(
'string' ,
'last' , __FILE__ );
$this->Utilities =
get_package(
'utilities' ,
'last' , __FILE__ );
}
catch( Exception $e )
{
}
}
Member Function Documentation
| compile_query_field |
( |
& |
$Settings | ) |
|
Function returns field value.
- Parameters
-
| $Settings | - Extraction parameters. |
- Returns
- Field value.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 89 of file db_markup.php.
{
try
{
$Result = $this->Database->query( $Settings->get_setting( 'query' ) );
$Result = $this->Database->fetch_results( $Result );
if( isset( $Result[ 0 ] ) )
{
$Result = $Result[ 0 ];
}
else
{
throw( new Exception( "No data found for the query \"$Query\"" ) );
}
return(
get_field( $Result , $Settings->get_setting(
'field' ) ) );
}
catch( Exception $e )
{
}
}
| compile_record_field |
( |
& |
$Settings | ) |
|
Function returns field value.
- Parameters
-
| $Settings | - Extraction parameters. |
- Returns
- Field value.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 135 of file db_markup.php.
{
try
{
$Value = '';
$id = $Settings->get_setting( 'id' );
if( $id != '0' )
{
$PackageObject = $this->Utilities->get_package( $Settings , __FILE__ , 'access_' );
if( method_exists( $PackageObject , 'get_by_id' ) == false )
{
$Message = 'The method "get_by_id" was not found in class '.get_class( $PackageObject );
throw( new Exception( $Message ) );
}
$Record = call_user_func( array( $PackageObject , 'get_by_id' ) , $id );
$Field = $Settings->get_setting( 'field' );
}
return( $Value );
}
catch( Exception $e )
{
}
}
Field Documentation
Cached objects.
- Author
- Dodonov A.A.
Definition at line 39 of file db_markup.php.
The documentation for this class was generated from the following file: