<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >SDO_DAS_DataFactory::addPropertyToType</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_ChangeSummary::isLogging" HREF="function.sdo-das-changesummary-islogging.html"><LINK REL="NEXT" TITLE="SDO_DAS_DataFactory::addType" HREF="function.sdo-das-datafactory-addtype.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-changesummary-islogging.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-addtype.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.SDO-DAS-DataFactory-addPropertyToType" ></A >SDO_DAS_DataFactory::addPropertyToType</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN198154" ></A ><P > (no version information, might be only in CVS)</P >SDO_DAS_DataFactory::addPropertyToType -- Adds a property to a type </DIV ><DIV CLASS="refsect1" ><A NAME="AEN198157" ></A ><H2 >Descrição</H2 >void <B CLASS="methodname" >SDO_DAS_DataFactory::addPropertyToType</B > ( string parent_type_namespace_uri, string parent_type_name, string property_name, 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 > Adds a property to a type. The type must already be known to the SDO_DAS_DataFactory (i.e. have been added using addType()). The property becomes a property of the type. This is how the graph model for the structure of an SDO_DataObject is built. </P ></DIV ><DIV CLASS="refsect1" ><A NAME="AEN198184" ></A ><H2 >Parâmetros</H2 ><P > <P ></P ><DIV CLASS="variablelist" ><DL ><DT ><CODE CLASS="parameter" >parent_type_namespace_uri</CODE ></DT ><DD ><P > The namespace URI for the parent type. </P ></DD ><DT ><CODE CLASS="parameter" >parent_type_name</CODE ></DT ><DD ><P > The type name for the parent type. </P ></DD ><DT ><CODE CLASS="parameter" >property_name</CODE ></DT ><DD ><P > The name by which the property will be known in the parent type. </P ></DD ><DT ><CODE CLASS="parameter" >type_namespace_uri</CODE ></DT ><DD ><P > The namespace URI for the type of the property. </P ></DD ><DT ><CODE CLASS="parameter" >type_name</CODE ></DT ><DD ><P > The type name for the type of the property </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 property. The optional keywords are:</P ><P ></P ><DIV CLASS="variablelist" ><DL ><DT ><CODE CLASS="parameter" >many</CODE ></DT ><DD ><P >A flag to say whether the property is many-valued. A value of 'true' adds the property as a many-valued property (default is 'false'). </P ></DD ><DT ><CODE CLASS="parameter" >readOnly</CODE ></DT ><DD ><P > A flag to say whether the property is read-only. A value of 'true' means the property value cannot be modified through the SDO application APIs (default is 'false'). </P ></DD ><DT ><CODE CLASS="parameter" >containment</CODE ></DT ><DD ><P > A flag to say whether the property is contained by the parent. A value of 'true' means the property is contained by the parent. A value of 'false' results in a non-containment reference (default is 'true'). This flag is only interpreted when adding properties which are data object types, otherwise it is ignored. </P ></DD ><DT ><CODE CLASS="parameter" >default</CODE ></DT ><DD ><P > A default value for the property. Omitting this key means that the property does not have a default value. A property can only have a default value if it is a single-valued data type (primitive). </P ></DD ></DL ></DIV ></DD ></DL ></DIV > </P ></DIV ><DIV CLASS="refsect1" ><A NAME="AEN198239" ></A ><H2 >Valores de retornado</H2 ><P > None. </P ></DIV ><DIV CLASS="refsect1" ><A NAME="AEN198242" ></A ><H2 >Histórico</H2 ><P > <DIV CLASS="informaltable" ><P ></P ><A NAME="AEN198245" ></A ><TABLE BORDER="1" CLASS="CALSTABLE" ><COL><COL><THEAD ><TR ><TH >Versão</TH ><TH >Descrição</TH ></TR ></THEAD ><TBODY ><TR ><TD >0.5.2</TD ><TD >Optional parameters <CODE CLASS="varname" >many</CODE >, <CODE CLASS="varname" >readOnly</CODE >, and <CODE CLASS="varname" >containment</CODE > deprecated in favour of the <CODE CLASS="varname" >options</CODE > array. </TD ></TR ></TBODY ></TABLE ><P ></P ></DIV > </P ></DIV ><DIV CLASS="refsect1" ><A NAME="AEN198259" ></A ><H2 >Exemplos</H2 ><P > <TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" CLASS="EXAMPLE" ><TR ><TD ><DIV CLASS="example" ><A NAME="AEN198262" ></A ><P ><B >Exemplo 1. A <B CLASS="function" >SDO_DAS_DataFactory::addPropertyToType()</B > example</B ></P ><P > The following adds an 'addressline' property to a Person type. The person type is identified by its namespace, 'PersonNS', and type name, 'PersonType'. The type of the 'addressline' property is a many-valued SDO data type (primitive) with namespace 'commonj.sdo' and type name 'String'. </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">addPropertyToType</font><font color="#007700">(</font><font color="#DD0000">'PersonNS'</font><font color="#007700">, </font><font color="#DD0000">'PersonType'</font><font color="#007700">,<br /> </font><font color="#DD0000">'addressline'</font><font color="#007700">, </font><font color="#DD0000">'commonj.sdo'</font><font color="#007700">, </font><font color="#DD0000">'String'</font><font color="#007700">, array(</font><font color="#DD0000">'many'</font><font color="#007700">=></font><font color="#0000BB">true</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-changesummary-islogging.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-addtype.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >SDO_DAS_ChangeSummary::isLogging</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::addType</TD ></TR ></TABLE ></DIV ></BODY ></HTML >