ultimix

- Main Page
- Data Structures
- Files
- Examples

- File List
- Globals

ownership_controller.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 ownership_controller_1_0_0{
27
38 function __construct()
39 {
40 try
41 {
42 }
43 catch( Exception $e )
44 {
45 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
46 }
47 }
48
67 function pre_generation()
68 {
69 try
70 {
71 $this->register_owners();
72 }
73 catch( Exception $e )
74 {
75 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
76 }
77 }
78
97 function register_owners( $Options = false )
98 {
99 try
100 {
101 $OwnershipAccess = get_package( 'permit::ownership::ownership_access' , 'last' , __FILE__ );
102
103 $UserAlgorithms = get_package( 'user::user_algorithms' , 'last' , __FILE__ );
104 $User = $UserAlgorithms->get_user();
105
106 $OwnershipAccess->register_owner( get_field( $User , 'id' ) , 'user' );
107 }
108 catch( Exception $e )
109 {
110 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
111 }
112 }
113
132 function controller( $Options )
133 {
134 try
135 {
136 $ContextSet = get_package_object( 'gui::context_set' , 'last' , __FILE__ );
137 $ContextSet->add_context( dirname( __FILE__ ).'/conf/cfcx_register_owners' );
138 $ContextSet->execute( $Options , $this , __FILE__ );
139 }
140 catch( Exception $e )
141 {
142 $a = func_get_args();_throw_exception_object( __METHOD__ , $a , $e );
143 }
144 }
145 }
146
147 ?>