<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >SDO_DAS_DataFactory::addType</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="Manual do PHP" HREF="index.html"><LINK REL="UP" TITLE="SDO Functions" HREF="ref.sdo.html"><LINK REL="PREVIOUS" TITLE="SDO_DAS_DataFactory::addPropertyToType" HREF="function.sdo-das-datafactory-addpropertytotype.html"><LINK REL="NEXT" TITLE="SDO_DAS_DataFactory::getDataFactory" HREF="function.sdo-das-datafactory-getdatafactory.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Manual do PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.sdo-das-datafactory-addpropertytotype.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.sdo-das-datafactory-getdatafactory.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.SDO-DAS-DataFactory-addType" ></A >SDO_DAS_DataFactory::addType</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN198268" ></A ><P > (no version information, might be only in CVS)</P >SDO_DAS_DataFactory::addType -- Add a new type to a model </DIV ><DIV CLASS="refsect1" ><A NAME="AEN198271" ></A ><H2 >Descrição</H2 >void <B CLASS="methodname" >SDO_DAS_DataFactory::addType</B > ( string type_namespace_uri, string type_name [, array options] )<BR ></BR ><DIV CLASS="warning" ><P ></P ><TABLE CLASS="warning" BORDER="1" WIDTH="100%" ><TR ><TD ALIGN="CENTER" ><B >Atenção</B ></TD ></TR ><TR ><TD ALIGN="LEFT" ><P >Esta função é <SPAN CLASS="emphasis" ><I CLASS="emphasis" >EXPERIMENTAL</I ></SPAN >. Isso quer dizer que o comportamento desta função e seu nome, incluindo TUDO o que está documentado aqui pode mudar em futuras versões do PHP, SEM QUALQUER NOTIFICAÇÃO. Esteja avisado, e use esta função por sua própria conta e risco.</P ></TD ></TR ></TABLE ></DIV ><P > Add a new type to the SDO_DAS_DataFactory, defined by its namespace and type name. The type becomes part of the model of data objects that the data factory can create. </P ></DIV ><DIV CLASS="refsect1" ><A NAME="AEN198289" ></A ><H2 >Parâmetros</H2 ><P > <P ></P ><DIV CLASS="variablelist" ><DL ><DT ><CODE CLASS="parameter" >type_namespace_uri</CODE ></DT ><DD ><P > The namespace of the type. </P ></DD ><DT ><CODE CLASS="parameter" >type_name</CODE ></DT ><DD ><P > The name of the type. </P ></DD ><DT ><CODE CLASS="parameter" >options</CODE ></DT ><DD ><P > This array holds one or more key=>value pairs to set attribute values for the type. The optional keywords are:</P ><P ></P ><DIV CLASS="variablelist" ><DL ><DT ><CODE CLASS="parameter" >open</CODE ></DT ><DD ><P >A flag to say whether the type is open. An SDO_DataObject whose type is open can have properties added to them which are not described by the type. This capability is used to support working with XML documents whose schema support open content such as that described by an <xsd:any> element. The default value is 'false'. </P ></DD ><DT ><CODE CLASS="parameter" >sequenced</CODE ></DT ><DD ><P > A flag to say whether the type is sequenced. Sequenced types can have the ordering across properties preserved and can contain unstructured text. The default value is 'false'. For more information on sequenced types see the section on <A HREF="ref.sdo.html#sdo.sample.sequence" >Working with Sequenced Data Objects</A >. </P ></DD ><DT ><CODE CLASS="parameter" >basetype</CODE ></DT ><DD ><P > If specified, an array of namespace URI and type name strings for the type from which this type is derived. An example of the use of base types is when a type derived in an XML schema inherits from another type by using <extension base="...">. </P ></DD ></DL ></DIV ></DD ></DL ></DIV > </P ></DIV ><DIV CLASS="refsect1" ><A NAME="AEN198325" ></A ><H2 >Valores de retornado</H2 ><P > None. </P ></DIV ><DIV CLASS="refsect1" ><A NAME="AEN198328" ></A ><H2 >Exemplos</H2 ><P > <TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="EXAMPLE" ><TR ><TD ><DIV CLASS="example" ><A NAME="AEN198331" ></A ><P ><B >Exemplo 1. A <B CLASS="function" >SDO_DAS_DataFactory::addType()</B > example</B ></P ><P > The following adds a new data object type of 'CompanyType' where that type belongs to the namespace 'CompanyNS'. </P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" CELLPADDING="5" ><TR ><TD ><code><font color="#000000"> <font color="#0000BB"><?php<br /> $df</font><font color="#007700">-></font><font color="#0000BB">addType</font><font color="#007700">(</font><font color="#DD0000">'CompanyNS'</font><font color="#007700">, </font><font color="#DD0000">'CompanyType'</font><font color="#007700">);<br /></font><font color="#0000BB">?></font> </font> </code></TD ></TR ></TABLE ></DIV ></TD ></TR ></TABLE > </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.sdo-das-datafactory-addpropertytotype.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Principal</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.sdo-das-datafactory-getdatafactory.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >SDO_DAS_DataFactory::addPropertyToType</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.sdo.html" ACCESSKEY="U" >Acima</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >SDO_DAS_DataFactory::getDataFactory</TD ></TR ></TABLE ></DIV ></BODY ></HTML >