ultimix

- Main Page
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Data Fields

Public Member Functions | Data Fields
page_db_access_1_0_0 Class Reference

## Public Member Functions
| set_add_limitations ($theAddLimitation)
| get_package_appliance ($PageName)
| get_page_list ()
| get_page_description ($PageName)

## Data Fields
| $AddLimitations = '1 = 1'

## Detailed Description

Class provides access for data about pages.

Author
  Dodonov A.A.

Definition at line 26 of file page_db_access.php.

## Member Function Documentation

get_package_appliance | ( |  | $PageName | ) |

Выборка списка пакетов, применённых к странице $PageName.

Parameters

  $PageName | - имя страницы, для которой выбирается информация о примененных пакетах.

Returns
  Информация о примененных пакетах в формате array( array( 'package' , 'package_version' , 'options' , 'placeholder' ) )

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Додонов А.А. Function returns all applied packages.

Parameters

  $PageName | - page name.

Returns
  Information about all applied packages wich is returned as a list of array( array( 'package' , 'package_version' , 'options' , 'placeholder' ) )

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 153 of file page_db_access.php.

{
try
{
$Security = & get_package( 'security' );
$PageName = $Security->get( $PageName , string );
$PageName = htmlspecialchars( $PageName , ENT_QUOTES );
if( file_exists( dirname( __FILE__ ).'/../page_access/data/pa_'.$PageName ) )
{
return( $this->fetch_package_appliance( $PageName ) );
}
return( array() );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

get_page_description | ( |  | $PageName | ) |

Function returns description of the requested page.

Parameters

  $PageName | - Name of the requested page.

Returns
  Description of the requesting page in the folowing representation : array( 0 => array( id , title , name , template , template_version ) )

Note
  All data about pages is stored in the stand alone files (each record in each own file), name of the page is the same as file name. We know that it works slowly but this CMS is used to apply for sites with small amount of pages so it would not work VERY slow)).

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 239 of file page_db_access.php.

{
try
{
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

get_page_list | ( |  | ) |

Function returns list of paths to the available pages.

Returns
  List of available pages.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 193 of file page_db_access.php.

{
try
{
$Utilities = get_package( 'utilities' , 'last' , __FILE__ );
return( $Utilities->get_files_from_directory( dirname( __FILE__ ).'/data' , '/pa_.+/' ) );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

set_add_limitations | ( |  | $theAddLimitation | ) |

Function sets additional limitations.

Parameters

  $theAddLimitation | - Additional limitations.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 58 of file page_db_access.php.

{
try
{
if( $this->AddLimitations === '1 = 1' )
{
$this->AddLimitations = $theAddLimitation;
}
else
{
throw( new Exception( '"AddLimitations" was already set' ) );
}
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Field Documentation

$AddLimitations = '1 = 1'

Definition at line 38 of file page_db_access.php.

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

- packages/page/packages/page_db_access/page_db_access.php