[cvs-annodex] commit (/annodex): phpannodex/trunk/phpsrc/Classes/Annodex.php phpannodex/trunk/phpsrc/Classes/AnnodexWriter.php

ctford nobody at lists.annodex.net
Tue Jan 10 15:41:49 EST 2006


Update of /annodex (new revision 1767)

Modified files:
   phpannodex/trunk/phpsrc/Classes/Annodex.php
   phpannodex/trunk/phpsrc/Classes/AnnodexWriter.php

Log Message:
*Supports inserting DOMnode into Annodex
*Fixed bug in Annodex->close()

Modified: phpannodex/trunk/phpsrc/Classes/Annodex.php
===================================================================
--- phpannodex/trunk/phpsrc/Classes/Annodex.php	2006-01-10 03:33:57 UTC (rev 1766)
+++ phpannodex/trunk/phpsrc/Classes/Annodex.php	2006-01-10 04:41:49 UTC (rev 1767)
@@ -49,7 +49,7 @@
 		return anx_flush( $this->get_anx_handle() );
 	}
 	public function close() {
-		anx_close( $this->get_anx_handle );
+		anx_close( $this->get_anx_handle() );
 		return;
 	}
 	public function destroy() {

Modified: phpannodex/trunk/phpsrc/Classes/AnnodexWriter.php
===================================================================
--- phpannodex/trunk/phpsrc/Classes/AnnodexWriter.php	2006-01-10 03:33:57 UTC (rev 1766)
+++ phpannodex/trunk/phpsrc/Classes/AnnodexWriter.php	2006-01-10 04:41:49 UTC (rev 1767)
@@ -24,10 +24,14 @@
 		return $this->buffer_size;
 	}
 
-	public function insert_simple_xml( SimpleXMLElement $simple_xml ) {
+	public function insert_simplexml( SimpleXMLElement $simple_xml ) {
 		return $this->insert_cmml( $simple_xml->asXML() );
 	}
 
+	public function insert_dom_node( DOMNode $node ) {
+		return $this->insert_simplexml( simplexml_import_dom( $node ));
+	}
+
 	/* libannodex wrappers */
 	public function import( $filename, $id=NULL, $content_type=NULL, 
 				$start=0, $end=-1, $flags=0 ) {
@@ -38,9 +42,9 @@
 
 	}
 
-	public function insert_cmml( $at_time, $cmml, $n ) {
+	public function insert_cmml( $at_time, $cmml ) {
 		return anx_insert_cmml( $this->get_anx_handle(), $at_time, 
-				$cmml, $n );
+				$cmml, strlen( $cmml ) );
 	}
 		
 	public function write_output() {


-- 
ctford



More information about the cvs-annodex mailing list