function.sdo-das-datafactory-addtype.html

来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 209 行

HTML
209
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Add a new type to a model</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.sdo-das-datafactory-addpropertytotype.html">SDO_DAS_DataFactory::addPropertyToType</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.sdo-das-datafactory-getdatafactory.html">SDO_DAS_DataFactory::getDataFactory</a></div> <div class="up"><a href="ref.sdo.html">SDO Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.sdo-das-datafactory-addtype" class="refentry"> <div class="refnamediv">  <h1 class="refname">SDO_DAS_DataFactory::addType</h1>  <p class="verinfo">(No version information available, might be only in CVS)</p><p class="refpurpose"><span class="refname">SDO_DAS_DataFactory::addType</span> &mdash; <span class="dc-title">   Add a new type to a model  </span></p> </div> <div class="refsect1 description">  <h3 class="title">Description</h3>  <div class="methodsynopsis dc-description">   <span class="type"><span class="type void">void</span></span> <span class="methodname"><b><b>SDO_DAS_DataFactory::addType</b></b></span>    ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$type_namespace_uri</tt></span>   , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$type_name</tt></span>   [, <span class="methodparam"><span class="type">array</span> <tt class="parameter">$options</tt></span>  ] )</div>  <div class="warning"><b class="warning">Warning</b><p class="simpara">This function is<em class="emphasis">EXPERIMENTAL</em>. The behaviour of this function, its name, andsurrounding documentation may change without notice in a future release of PHP.This function should be used at your own risk.</p></div>  <p class="para">   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 parameters">  <h3 class="title">Parameters</h3>  <p class="para">   <dl>    <dt>     <span class="term">      <i><tt class="parameter">type_namespace_uri</tt></i>     </span>     <dd>      <p class="para">       The namespace of the type.      </p>     </dd>    </dt>    <dt>     <span class="term">      <i><tt class="parameter">type_name</tt></i>     </span>     <dd>      <p class="para">       The name of the type.      </p>     </dd>    </dt>    <dt>     <span class="term">      <i><tt class="parameter">options</tt></i>     </span>     <dd><p class="para"> This array holds one or more key=&gt;value pairs to set attribute      values for the type. The optional keywords are:</p>      <dl>       <dt>        <span class="term"><i><tt class="parameter">open</tt></i></span>        <dd>         <p class="para">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 &lt;xsd:any&gt; element.         The default value is &#039;false&#039;.         </p>        </dd>       </dt>       <dt>        <span class="term">         <i><tt class="parameter">sequenced</tt></i>        </span>        <dd>         <p class="para"> 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 &#039;false&#039;.         For more information on sequenced types see the section on          <a href="sdo.sample.sequence.html" class="link">Working with Sequenced Data         Objects</a>.         </p>        </dd>       </dt>       <dt>        <span class="term">         <i><tt class="parameter">basetype</tt></i>        </span>        <dd>         <p class="para"> 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 &lt;extension base=&quot;...&quot;&gt;.         </p>        </dd>       </dt>      </dl>     </dd>    </dt>   </dl>  </p> </div> <div class="refsect1 returnvalues">  <h3 class="title">Return Values</h3>  <p class="para">   None.  </p> </div>   <div class="refsect1 examples">  <h3 class="title">Examples</h3>  <p class="para">   <div class="example">    <p><b>Example #1 A     <b>SDO_DAS_DataFactory::addType()</b>example</b></p>    <div class="example-contents"><p>The following adds a new data object type of &#039;CompanyType&#039;where that type belongs to the namespace &#039;CompanyNS&#039;.    </p></div>    <div class="example-contents">     <div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />&nbsp;&nbsp;$df</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">addType</span><span style="color: #007700">(</span><span style="color: #DD0000">'CompanyNS'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'CompanyType'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>    </div>   </div>  </p> </div> </div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.sdo-das-datafactory-addpropertytotype.html">SDO_DAS_DataFactory::addPropertyToType</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.sdo-das-datafactory-getdatafactory.html">SDO_DAS_DataFactory::getDataFactory</a></div> <div class="up"><a href="ref.sdo.html">SDO Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?