ultimix

- Main Page
- Data Structures
- Files
- Examples

- File List
- Globals

sape.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
26 class sape_1_0_0{
27
38 var $CachedMultyFS = false;
39 var $Settings = false;
40 var $String = false;
41
52 var $SapeUser = false;
53
64 var $SapeClient = false;
65
76 var $SapeContext = false;
77
92 function __construct()
93 {
94 try
95 {
96 $this->CachedMultyFS = get_package( 'cached_multy_fs' , 'last' , __FILE__ );
97 $this->Settings = get_package_object( 'settings::package_settings' , 'last' , __FILE__ );
98 $this->String = get_package( 'string' , 'last' , __FILE__ );
99
100 $this->SapeUser = $this->Settings->get_package_setting(
101 'sape' , 'last' , 'cf_sape' , 'sape_user' , false
102 );
103 }
104 catch( Exception $e )
105 {
106 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
107 }
108 }
109
128 function pre_generation( $Options )
129 {
130 try
131 {
132 require_once( "./$this->SapeUser/sape.php" );
133
134 $Options['multi_site'] = true;
135 $this->SapeClient = new SAPE_client( $Options );
136 $this->SapeContext = new SAPE_context( $Options );
137 }
138 catch( Exception $e )
139 {
140 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
141 }
142 }
143
166 function compile_sape_common_links( &$Settings )
167 {
168 try
169 {
170 $Count = $Settings->get_setting( 'count' , null );
171
172 $Links = $this->SapeClient->return_links( $Count );
173
174 return( $Links );
175 }
176 catch( Exception $e )
177 {
178 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
179 }
180 }
181 }
182
183 ?>