Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : SDO Functions : SDO_DAS_DataFactory::addType

SDO_DAS_DataFactory::addType

Add a new type to a model ()
void SDO_DAS_DataFactory::addType ( string type_namespace_uri, string type_name [, array options] )

Warning:

This function is EXPERIMENTAL. The behaviour of this function, the name of this function, and anything else documented about this function may change without notice in a future release of PHP. Use this function at your own risk.

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.

Parameters

type_namespace_uri

The namespace of the type.

type_name

The name of the type.

options

This array holds one or more key=>value pairs to set attribute values for the type. The optional keywords are:

open

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'.

sequenced

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 Working with Sequenced Data Objects.

basetype

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="...">.

Return Values

None.

Examples

Example 2187. A SDO_DAS_DataFactory::addType() example

The following adds a new data object type of 'CompanyType' where that type belongs to the namespace 'CompanyNS'.

<?php
 $df
->addType('CompanyNS', 'CompanyType');
?>


Change Language


Follow Navioo On Twitter
SDO_DAS_ChangeSummary::beginLogging
SDO_DAS_ChangeSummary::endLogging
SDO_DAS_ChangeSummary::getChangeType
SDO_DAS_ChangeSummary::getChangedDataObjects
SDO_DAS_ChangeSummary::getOldContainer
SDO_DAS_ChangeSummary::getOldValues
SDO_DAS_ChangeSummary::isLogging
SDO_DAS_DataFactory::addPropertyToType
SDO_DAS_DataFactory::addType
SDO_DAS_DataFactory::getDataFactory
SDO_DAS_DataObject::getChangeSummary
SDO_DAS_Setting::getListIndex
SDO_DAS_Setting::getPropertyIndex
SDO_DAS_Setting::getPropertyName
SDO_DAS_Setting::getValue
SDO_DAS_Setting::isSet
SDO_DataFactory::create
SDO_DataObject::clear
SDO_DataObject::createDataObject
SDO_DataObject::getContainer
SDO_DataObject::getSequence
SDO_DataObject::getTypeName
SDO_DataObject::getTypeNamespaceURI
SDO_Exception::getCause
SDO_List::insert
SDO_Model_Property::getContainingType
SDO_Model_Property::getDefault
SDO_Model_Property::getName
SDO_Model_Property::getType
SDO_Model_Property::isContainment
SDO_Model_Property::isMany
SDO_Model_ReflectionDataObject::__construct
SDO_Model_ReflectionDataObject::export
SDO_Model_ReflectionDataObject::getContainmentProperty
SDO_Model_ReflectionDataObject::getInstanceProperties
SDO_Model_ReflectionDataObject::getType
SDO_Model_Type::getBaseType
SDO_Model_Type::getName
SDO_Model_Type::getNamespaceURI
SDO_Model_Type::getProperties
SDO_Model_Type::getProperty
SDO_Model_Type::isAbstractType
SDO_Model_Type::isDataType
SDO_Model_Type::isInstance
SDO_Model_Type::isOpenType
SDO_Model_Type::isSequencedType
SDO_Sequence::getProperty
SDO_Sequence::insert
SDO_Sequence::move
eXTReMe Tracker