ultimix

- Main Page
- Data Structures
- Files
- Examples

- File List
- Globals

string_markup.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 string_markup_1_0_0
27 {
28
39 var $BlockSettings = false;
40 var $String = false;
41
52 function __construct()
53 {
54 try
55 {
56 $Settings = get_package_object( 'settings::settings' , 'last' , __FILE__ );
57
58 $this->String = get_package( 'string' , 'last' , __FILE__ );
59 }
60 catch( Exception $e )
61 {
62 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
63 }
64 }
65
88 function compile_sprintf( &$Settings )
89 {
90 try
91 {
92 $Format = $Settings->get_setting( 'format' , '%s' );
93 $Value = $Settings->get_setting( 'value' , '' );
94
95 return( sprintf( $Format , $Value ) );
96 }
97 catch( Exception $e )
98 {
99 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
100 }
101 }
102
125 function compile_encoding( $Str , $Changed )
126 {
127 try
128 {
129 $Code = $this->CachedMultyFS->get_template( __FILE__ , 'encoding.tpl' );
130
131 $Name = $Settings->get_setting( 'name' , 'encoding' );
132 $Selected = $Settings->get_setting( 'selected' , 'utf-8' );
133
134 $Code = str_replace( '{name}' , $Name , $Code );
135 $Code = str_replace( '{selected'.$Selected.'}' , 'selected' , $Code );
136
137 return( $Code );
138 }
139 catch( Exception $e )
140 {
141 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
142 }
143 }
144 }
145
146 ?>