Location: PHPKode > scripts > HV WDDX Metadata > HV_WDDX_Metadata.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Mon Nov 24 10:42:30 NZDT 2003 -->
<TITLE>
: Class  HV_WDDX_Metadata
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">

<!-- ========== START OF NAVBAR ========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
Class  HV_WDDX_Metadata</H2>
<PRE>
<B>HV_WDDX_Metadata</B>
</PRE>
<HR>
<DL>
<DT>public class <B>HV_WDDX_Metadata</B></DL>

<P>
Manage data described in WDDX format.
<P>
<HR>

<P>
<!-- ======== INNER CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->


<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="HV_WDDX_Metadata.html#HV_WDDX_Metadata(var, var)">HV_WDDX_Metadata</A></B>(var&nbsp;$mode,
                 var&nbsp;$options)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initiliase error handling.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;unknown</CODE></FONT></TD>
<TD><CODE><B><A HREF="HV_WDDX_Metadata.html#HV_WDDX_Metadata_pregreplace(var)">HV_WDDX_Metadata_pregreplace</A></B>(var&nbsp;$match)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts &lt;char code=""/&gt; embedded in WDDX into characters for display.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;unknown</CODE></FONT></TD>
<TD><CODE><B><A HREF="HV_WDDX_Metadata.html#parse(var, var)">parse</A></B>(var&nbsp;$data,
      var&nbsp;$validate)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Insert $data into config and optionally validate.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;unknown</CODE></FONT></TD>
<TD><CODE><B><A HREF="HV_WDDX_Metadata.html#populate(var)">populate</A></B>(var&nbsp;$data)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Insert $data into WDDX config and grab options from database if specified.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;unknown</CODE></FONT></TD>
<TD><CODE><B><A HREF="HV_WDDX_Metadata.html#setConfig(var)">setConfig</A></B>(var&nbsp;$conf)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set WDDX configuration.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;unknown</CODE></FONT></TD>
<TD><CODE><B><A HREF="HV_WDDX_Metadata.html#setOptionDatabase(var)">setOptionDatabase</A></B>(var&nbsp;$db)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set database for populating option lists.</TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->


<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="HV_WDDX_Metadata(var, var)"><!-- --></A><H3>
HV_WDDX_Metadata</H3>
<PRE>
public <B>HV_WDDX_Metadata</B>(var&nbsp;$mode,
                        var&nbsp;$options)</PRE>
<DL>
<DD>Initiliase error handling. Refer to PEAR documentation for information regarding error handling.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>$mode</CODE> - <b>Default Value</b>: PEAR_ERROR_TRIGGER<DD><CODE>$options</CODE> - <b>Default Value</b>: E_USER_ERROR</DL>
</DD>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="HV_WDDX_Metadata_pregreplace(var)"><!-- --></A><H3>
HV_WDDX_Metadata_pregreplace</H3>
<PRE>
public unknown <B>HV_WDDX_Metadata_pregreplace</B>(var&nbsp;$match)</PRE>
<DL>
<DD>Converts &lt;char code=""/&gt; embedded in WDDX into characters for display.</DL>
<HR>

<A NAME="parse(var, var)"><!-- --></A><H3>
parse</H3>
<PRE>
public unknown <B>parse</B>(var&nbsp;$data,
                     var&nbsp;$validate)</PRE>
<DL>
<DD>Insert $data into config and optionally validate.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>$validate</CODE> - <b>Default Value</b>: HV_WDDX_METADATA_DO_VALIDATION</DL>
</DD>
</DL>
<HR>

<A NAME="populate(var)"><!-- --></A><H3>
populate</H3>
<PRE>
public unknown <B>populate</B>(var&nbsp;$data)</PRE>
<DL>
<DD>Insert $data into WDDX config and grab options from database if specified.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>$data</CODE> - <b>Default Value</b>: NULL</DL>
</DD>
</DL>
<HR>

<A NAME="setConfig(var)"><!-- --></A><H3>
setConfig</H3>
<PRE>
public unknown <B>setConfig</B>(var&nbsp;$conf)</PRE>
<DL>
<DD>Set WDDX configuration.
 Format follows WDDX specification - see www.openwddx.org. <br/>
 Typical format is as follows: <br/>
 <pre>
   &lt;var name="{Name of field}">&lt;struct>
     &lt;var name="name">&lt;string>{Name of field - same as above}&lt;/string>&lt;/var>
      &lt;var name="type">&lt;string>{type of field}&lt;/string>&lt;/var>
      &lt;var name="description">&lt;string>{Description of field}&lt;/string>&lt;/var>
      &lt;var name="node-attribute">&lt;array>
      &lt;struct>
        &lt;var name="name">&lt;string>{Display attribute name}&lt;/string>&lt;/var>
        &lt;var name="value">&lt;string>{Display attribute value}&lt;/string>&lt;/var>
     &lt;/struct>
     &lt;/array>&lt;/var>
     &lt;var name="validation-regexp">&lt;string>{Regular expression for validation}&lt;/string>&lt;/var>
     &lt;var name="validation-message">&lt;string>{Message if there is a validation error}&lt;/string>&lt;/var>
   &lt;/struct>&lt;/var>  
 </pre>

 Type of field includes: <br/>
  text      = text field <br/>
  date      = date picker <br/>
  time      = time picker <br/>
  textbox   = multiline text area <br/>
  radio     = radio buttons <br/>
  popup     = popup list <br/>
  select    = multiselect list <br/>
  checkbox  = checkbox <br/>
  checklist = combination of multiselect list with checkbox <br/>
  <br/>
 Refer to examples for more details of usage.</DL>
<HR>

<A NAME="setOptionDatabase(var)"><!-- --></A><H3>
setOptionDatabase</H3>
<PRE>
public unknown <B>setOptionDatabase</B>(var&nbsp;$db)</PRE>
<DL>
<DD>Set database for populating option lists.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>$db</CODE> - is passed by reference</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<HR>

</BODY>
</HTML>
Return current item: HV WDDX Metadata