ultimix
report_utilities.php
Go to the documentation of this file.
1 <?php
2 
3  /*
4  * This source code is a part of the Ultimix Project.
5  * It is distributed under BSD license. All other third side source code (like tinyMCE) is distributed under
6  * it's own license wich could be found from the corresponding files or sources.
7  * This source code is provided "as is" without any warranties or garanties.
8  *
9  * Have a nice day!
10  *
11  * @url http://ultimix.sorceforge.net
12  *
13  * @author Alexey "gdever" Dodonov
14  */
15 
27 
38  var $Utilities = false;
39 
54  function __construct()
55  {
56  try
57  {
58  $this->Utilities = get_package( 'utilities' , 'last' , __FILE__ );
59  }
60  catch( Exception $e )
61  {
62  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
63  }
64  }
65 
88  function get_reports_list( &$Settings )
89  {
90  try
91  {
92  $PackageName = $tSettings->get_setting( 'package_name' );
93  $PackageVersion = $Settings->get_setting( 'package_version' , 'last' );
94  $Subfolder = $Settings->get_setting( 'subfolder' , '' );
95  $ReportsPath = _get_package_path_ex( $PackageName , $PackageVersion )."/res/reports/";
96  if( $Subfolder != '' )
97  {
98  $ReportsPath .= $Subfolder.'/';
99  }
100  $Settings->set_setting(
101  'name' , $Settings->get_setting( 'name' , 'report_template' )
102  );
103 
104  return( $this->Utilities->get_files_from_directory( $ReportsPath , '/\.rep/' ) );
105  }
106  catch( Exception $e )
107  {
108  $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
109  }
110  }
111  }
112 ?>