Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 11155

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Add a new type to a model</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="sdo-das-datafactory.addpropertytotype.html">SDO_DAS_DataFactory::addPropertyToType</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="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="sdo-das-datafactory.addtype" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SDO_DAS_DataFactory::addType</h1>
  <p class="verinfo">(^)</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" id="refsect1-sdo-das-datafactory.addtype-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>SDO_DAS_DataFactory::addType</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$type_namespace_uri</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$type_name</code></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$options</code></span>
  ] )</div>


  <div class="warning"><strong class="warning">Warning</strong><p class="simpara">This function is
<em class="emphasis">EXPERIMENTAL</em>. The behaviour of this function, its name, and
surrounding 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" id="refsect1-sdo-das-datafactory.addtype-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term">
      <em><code class="parameter">type_namespace_uri</code></em>
     </span>
     <dd>

      <p class="para">
       The namespace of the type.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term">
      <em><code class="parameter">type_name</code></em>
     </span>
     <dd>

      <p class="para">
       The name of the type.
      </p>
     </dd>

    </dt>

    <dt>

     <span class="term">
      <em><code class="parameter">options</code></em>
     </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"><em><code class="parameter">open</code></em></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">
         <em><code class="parameter">sequenced</code></em>
        </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">
         <em><code class="parameter">basetype</code></em>
        </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" id="refsect1-sdo-das-datafactory.addtype-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   None.
  </p>
 </div>


 


 


 <div class="refsect1 examples" id="refsect1-sdo-das-datafactory.addtype-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-5466">
    <p><strong>Example #1 A
      <span class="function"><strong>SDO_DAS_DataFactory::addType()</strong></span>
example</strong></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 class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="sdo-das-datafactory.addpropertytotype.html">SDO_DAS_DataFactory::addPropertyToType</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="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>