Update of /cvsroot/owp/owp/inc/classes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17620/classes
Modified Files:
towp.class twebobject.class
Log Message:
Made a part of html integration.
Moved some constants.
Created some default handlers.
Index: towp.class
===================================================================
RCS file: /cvsroot/owp/owp/inc/classes/towp.class,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** towp.class 19 Apr 2006 02:26:32 -0000 1.1
--- towp.class 20 Apr 2006 00:45:44 -0000 1.2
***************
*** 46,59 ****
@ define('owp_events_onload','_onload');
! /**Name of onshow event, called before collecting HTML code*/
! @ define('owp_events_onshow','onshow');
!
! /**Name of input data handler*/
! @ define('owp_handlers_input','_process_input');
!
! /**Name of handler that returns html code*/
! @ define('owp_handlers_get_html','_get_html');
!
! class elements_container{}
class towp{
--- 46,50 ----
@ define('owp_events_onload','_onload');
! class elements_container{}//container for pages
class towp{
***************
*** 88,102 ****
$this->session_data = &$this->session['data'];//link
$this->elements = &new elements_container();
}//\\towp
! /**calls create_page() with file, build from templaate filename
! * @param string $file path to the template file
! * @return string result of create_page()
*/
! function create_page_using_template($file){
$pathinfo = pathinfo($file);
$file = build_path($pathinfo['dirname'],basename($pathinfo['basename'],'.'.$pathinfo['extension']).'.'.files_ext_owp);
! return $this->create_page($file);
! }//\\create_page_using_template
/**creates a page and created requered pages
--- 79,95 ----
$this->session_data = &$this->session['data'];//link
$this->elements = &new elements_container();
+
+ $this->load_serialized();
}//\\towp
! /**returns owp file file path
! * @param string $file path to the template
! * @return string path to the owp file
*/
! function get_owp_file_path($file){
$pathinfo = pathinfo($file);
$file = build_path($pathinfo['dirname'],basename($pathinfo['basename'],'.'.$pathinfo['extension']).'.'.files_ext_owp);
! return $file;
! }//\\get_owp_file_path
/**creates a page and created requered pages
***************
*** 140,144 ****
}//\\get_class_name
! /**loads a saved data
* @access private
*/
--- 133,137 ----
}//\\get_class_name
! /**loads a saved data if needed
* @access private
*/
***************
*** 148,155 ****
include_once $v;
! //unserializing data
! $this->elements = unserialize($this->session_data);
! //calling events
! $this->process_event($this->elements,owp_events_onload);
}//\\load_serialized
--- 141,151 ----
include_once $v;
! //do we have serialized data?
! if($data = unserialize($this->session_data)){
! //unserialized data
! $this->elements = $data;
! //calling events
! $this->process_event($this->elements,owp_events_onload);
! }//\\if
}//\\load_serialized
Index: twebobject.class
===================================================================
RCS file: /cvsroot/owp/owp/inc/classes/twebobject.class,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** twebobject.class 19 Apr 2006 02:26:32 -0000 1.1
--- twebobject.class 20 Apr 2006 00:45:44 -0000 1.2
***************
*** 23,26 ****
--- 23,29 ----
+ /**Name of handler that returns html code*/
+ @ define('owp_handlers_get_html','_get_html');
+
/**
* Contains root class for all owp classes
***************
*** 90,93 ****
--- 93,99 ----
/**returns php code, used by the Smarty compiler
+ * @param bool $open open or close tag?
+ * @param string $access_string complete access string to the this object
+ * @return string php code for compiler
*/
function _get_php($open,$access_string){
***************
*** 95,103 ****
'push'=>false,
'pop'=>false,
! 'code'=>false,
);
return $rarray;
}//\\_get_php
}//\\twebobject
--- 101,112 ----
'push'=>false,
'pop'=>false,
! 'code'=>'<?=$this->owp->elements->'.$access_string.'->'.owp_handlers_get_html.'()?>',
);
return $rarray;
}//\\_get_php
+ function _get_html(){
+ }//\\get_html
+
}//\\twebobject
|