ultimix

- Main Page
- Data Structures
- Files
- Examples

- Data Structures
- Data Structure Index
- Data Fields

Public Member Functions | Data Fields
package_manager_view_1_0_0 Class Reference

## Public Member Functions
| __construct ()
| compile_package_tree_branch ($Branch, $Package)
| show_package_tree_rec ($Packages)
| show_package_tree ($Options)
| show_system_tree_meta_rec ($MetaFiles)
| show_system_tree_conf_rec ($ConfigFiles)
| compile_system_tree_branch ($Branch, $Package)
| show_system_tree_rec ($Packages)
| show_system_tree ($Options)
| view ($Options)

## Data Fields
| $CachedMultyFS = false
| $Output = false

## Detailed Description

This manager helps to manage packages.

Author
  Dodonov A.A.

Definition at line 26 of file package_manager_view.php.

## Constructor & Destructor Documentation

__construct | ( |  | ) |

Constructor.

Exceptions

  Exception | An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 54 of file package_manager_view.php.

{
try
{
$this->CachedMultyFS = get_package( 'cached_multy_fs' , 'last' , __FILE__ );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Member Function Documentation

compile_package_tree_branch | ( |  | $Branch,
|  |  | $Package
| ) |  |

Function compiles branch.

Parameters

  $Branch | - Branch code.
  $Package | - Package.

Returns
  HTML code of the tree brunch.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 104 of file package_manager_view.php.

{
try
{
$Title = $Package[ 'package_name' ].'.'.$Package[ 'package_version' ];
$Brunch .= $this->CachedMultyFS->get_template( __FILE__ , 'package_item_start.tpl' );
$Brunch = str_replace( '{title}' , $Title , $Brunch );
$Brunch .= $this->show_package_tree_rec( $Package[ 'subpackages' ] );
$Brunch .= $this->CachedMultyFS->get_template( __FILE__ , 'package_item_end.tpl' );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

compile_system_tree_branch | ( |  | $Branch,
|  |  | $Package
| ) |  |

Function compiles branch.

Parameters

  $Branch | - Branch code.
  $Package | - Package.

Returns
  HTML code of the tree brunch.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 336 of file package_manager_view.php.

{
try
{
$Title = $Package[ 'package_name' ].'.'.$Package[ 'package_version' ];
$Brunch .= $this->CachedMultyFS->get_template( __FILE__ , 'package_system_item_start.tpl' );
$Brunch = str_replace( '{title}' , $Title , $Brunch );
$Brunch .= $this->show_system_tree_rec( $Package[ 'subpackages' ] );
$Brunch .= $this->show_system_tree_meta_rec( $Package[ 'meta' ] );
$Brunch .= $this->show_system_tree_conf_rec( $Package[ 'conf' ] );
$Brunch .= $this->CachedMultyFS->get_template( __FILE__ , 'package_system_item_end.tpl' );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

show_package_tree | ( |  | $Options | ) |

Function draws component.

Parameters

  $Options | - Settings.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 188 of file package_manager_view.php.

{
try
{
$PackageAlgorithms = get_package( 'core::package_algorithms' , 'last' , __FILE__ );
$Packages = $PackageAlgorithms->get_packages_tree();
$this->Output = $this->CachedMultyFS->get_template( __FILE__ , 'package_start.tpl' );
foreach( $Packages as $i => $Package )
{
$this->Output = $this->compile_package_tree_brunch( $this->Output , $Package );
}
$this->Output .= $this->CachedMultyFS->get_template( __FILE__ , 'package_end.tpl' );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

show_package_tree_rec | ( |  | $Packages | ) |

Function draws component.

Parameters

  $Packages | - Packages.

Returns
  HTML code of the tree brunch.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 146 of file package_manager_view.php.

{
try
{
if( isset( $Packages[ 0 ] ) == false )
{
return( '' );
}
$Brunch = $this->CachedMultyFS->get_template( __FILE__ , 'package_branch_start.tpl' );
foreach( $Packages as $i => $Package )
{
$Branch = $this->compile_package_tree_branch( $Branch , $Package );
}
return( $Brunch.$this->CachedMultyFS->get_template( __FILE__ , 'package_branch_end.tpl' ) );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

show_system_tree | ( |  | $Options | ) |

Function draws component.

Parameters

  $Options | - Settings.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 424 of file package_manager_view.php.

{
try
{
$PackageAlgorithms = get_package( 'core::package_algorithms' , 'last' , __FILE__ );
$Packages = $PackageAlgorithms->get_packages_tree();
$this->Output = $this->CachedMultyFS->get_template( __FILE__ , 'system_start.tpl' );
foreach( $Packages as $i => $Package )
{
$this->Output = $this->compile_system_tree_branch( $this->Output , $Package );
}
$this->Output .= $this->CachedMultyFS->get_template( __FILE__ , 'system_end.tpl' );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

show_system_tree_conf_rec | ( |  | $ConfigFiles | ) |

Function draws config files.

Parameters

  $MetaFiles | - Config files.

Returns
  HTML code of the tree brunch.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 282 of file package_manager_view.php.

{
try
{
if( isset( $ConfigFiles[ 0 ] ) == false )
{
return( '' );
}
$Brunch = $this->CachedMultyFS->get_template( __FILE__ , 'package_conf_start.tpl' );
foreach( $ConfigFiles as $i => $File )
{
$Title = basename( $File );
$Brunch .= $this->CachedMultyFS->get_template( __FILE__ , 'package_conf_item.tpl' );
$Brunch = str_replace( '{title}' , $Title , $Brunch );
}
return( $Brunch.$this->CachedMultyFS->get_template( __FILE__ , 'package_conf_end.tpl' ) );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

show_system_tree_meta_rec | ( |  | $MetaFiles | ) |

Function draws meta files.

Parameters

  $MetaFiles | - Meta-files.

Returns
  HTML code of the tree brunch.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 232 of file package_manager_view.php.

{
try
{
if( isset( $MetaFiles[ 0 ] ) == false )
{
return( '' );
}
$Brunch = $this->CachedMultyFS->get_template( __FILE__ , 'package_meta_start.tpl' );
foreach( $MetaFiles as $i => $File )
{
$Title = basename( $File );
$Brunch .= $this->CachedMultyFS->get_template( __FILE__ , 'package_meta_item.tpl' );
$Brunch = str_replace( '{title}' , $Title , $Brunch );
}
return( $Brunch.$this->CachedMultyFS->get_template( __FILE__ , 'package_meta_end.tpl' ) );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

show_system_tree_rec | ( |  | $Packages | ) |

Function draws component.

Parameters

  $Packages | - Packages.

Returns
  HTML code of the tree brunch.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 382 of file package_manager_view.php.

{
try
{
if( isset( $Packages[ 0 ] ) == false )
{
return( '' );
}
$Brunch = $this->CachedMultyFS->get_template( __FILE__ , 'package_system_start.tpl' );
foreach( $Packages as $i => $Package )
{
$Brunch = $this->compile_system_tree_branch( $Branch , $Package );
}
return( $Brunch.$this->CachedMultyFS->get_template( __FILE__ , 'package_system_end.tpl' ) );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

view | ( |  | $Options | ) |

Function draws component.

Parameters

  $Options | - Settings.

Returns
  HTML code of the компонента.

Exceptions

  Exception | - An exception of this type is thrown.

Author
  Dodonov A.A.

Definition at line 468 of file package_manager_view.php.

{
try
{
$Context = get_package( 'gui::context' , 'last' , __FILE__ );
$Context->load_config( dirname( __FILE__ ).'/conf/cfcx_show_package_tree' );
if( $Context->execute( $Options , $this ) )return( $this->Output );
$Context->load_config( dirname( __FILE__ ).'/conf/cfcx_show_system_tree' );
if( $Context->execute( $Options , $this ) )return( $this->Output );
}
catch( Exception $e )
{
$a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
}
}

## Field Documentation

$CachedMultyFS = false

Cached objects.

Author
  Dodonov A.A.

Definition at line 38 of file package_manager_view.php.

$Output = false

View output.

Author
  Dodonov A.A.

Definition at line 76 of file package_manager_view.php.

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

- packages/core/packages/package_manager/packages/package_manager_view/package_manager_view.php