Ref/sdo-Phpdoc专题
Data Access Services
The table below lists the currently provided SDO Data Access Services:
| DAS Name | Description |
|---|---|
| SDO_DAS_XML | An XML Data Access Service supporting reading/writing SDOs as XML documents. |
| SDO_DAS_Relational | A PDO-based Data Access Service supporting reading/writing SDO to relational databases. Implements an optimistic concurrency policy for updates. |
预定义类
SDO consists of three sets of interfaces. The first set covers those interfaces for use by typical SDO applications. These are identified by the package prefix 'SDO_'. The second set is those used to reflect on, and work with, the model of a data object. These are identified by the package prefix 'SDO_Model_'. Finally, the third set are those use by Data Access Service implementations and are identified by the package prefix 'SDO_DAS_'. The majority of SDO users will not need to use or understand the 'SDO_Model_' and 'SDO_DAS_' interfaces.
SDO Application Programmer Interface
SDO_DataObject
The main interface through which data objects are manipulated. In addition to the methods below, SDO_DataObject extends the ArrayAccess, SDO_PropertyAccess (defines get() / set() methods for property access overloading), Iterator, and Countable interfaces.
方法
-
getSequence - get the sequence for the data object
-
createDataObject - create a child data object
-
clear - unset the properties of a data object
-
getContainer - get the container (also known as 'parent') of this data object
-
getTypeName - get the name of the type for this data object
-
getTypeNamespaceURI - get the namespace URI of the type for this data object
SDO_Sequence
The interface through which sequenced data objects can be accessed to preserve ordering across a data object's properties and to allow unstructured text. SDO_Sequence preserves contiguous indices and therefore inserting or removing elements may shift other elements up or down. In addition to the methods below, SDO_Sequence extends the ArrayAccess, Iterator and Countable interface.
方法
-
getProperty - get the property for a given sequence index
-
move - move an element from one property index to another
-
insert - insert a new value into the sequence
SDO_List
The interface through which many-valued properties are manipulated. In addition to the method defined below, SDO_List extends ArrayAccess, Iterator and Countable. SDO_List preserves contiguous indices and therefore inserting or removing elements may shift other elements up or down.
方法
- insert - insert a new value into the list
SDO_DataFactory
The interface through which data objects can be created. A Data Access Service is responsible for populating the model (i.e. configuring the data factory with the type and structure information for the data objects it can create.) for the factory and can then optionally return an instance of, or implement, the SDO_DataFactory interface.
方法
- create - create a new data object
SDO_Exception
An SDO_Exception is thrown when the caller's request cannot be completed. The subclasses of SDO_Exception are:
-
SDO_PropertyNotSetException - the property specified exists but has not been set or does not have a default value
-
SDO_PropertyNotFoundException - the property specified is not part of the data object's type
-
SDO_TypeNotFoundException - the specified namespace URI or type name is unknown
-
SDO_InvalidConversionException - conversion between the types of the assignment is not possible
-
SDO_IndexOutOfBoundsException - the numeric index into a data object, sequence or list is not in the valid range
-
SDO_UnsupportedOperationException - the request cannot be completed because it is not allowed, for example an attempt to set a read-only property.
方法
One method is added to those inherited from the built in Exception class:
- getCause - get the cause of this SDO_Exception
SDO Reflection Application Programmer Interfaces
SDO_Model_ReflectionDataObject
The main interface used to reflect on a data object instance to obtain its model type and property information. It is designed to follow the reflection pattern introduced in PHP 5.
构造函数
- __construct - construct a new SDO_Model_ReflectionDataObject.
方法
-
export - get a string describing the data object.
-
getType - get the SDO_Model_Type for the data object.
-
getInstanceProperties - get the instance properties of the data object.
-
getContainmentProperty - get the property which defines the containment relationship to the data object.
SDO_Model_Type
The interface through which a data object's type information can be retrieved. This interface can be used to find out the type name and namespace URI of the type, whether the type allow open content, and so on.
方法
-
getName - get the name of the type.
-
getNamespaceURI - get the namespace URI of the type.
-
isInstance - test for a data object being an instance of the type.
-
getProperties - get the properties of the type.
-
getProperty - get a property of the type.
-
isDataType - test to see if this type is a primitive scalar type.
-
isSequencedType - test to see if this is a sequenced type.
-
isOpenType - test to see if this is an open type.
-
isAbstractType - test to see if this is an abstract type.
-
getBaseType - get the base type of this type (if one exists).
SDO_Model_Property
The interface through which a data object's property information can be retrieved. This interface can be used to find out the type of a property, whether a property has a default value, whether the property is contained or reference by its parent, its cardinality, and so on.
方法
-
getName - get the name of the property.
-
getType - get the type of the property.
-
isMany - test to see if the property is many-valued.
-
isContainment - test to see if the property describes a containment relationship.
-
getContainingType - get the type which contains this property.
-
getDefault - get the default value for a property.
SDO Data Access Service Developer Interfaces
SDO_DAS_DataObject
The interface through which a Data Access Service can access a data object's SDO_DAS_ChangeSummary. The change summary is used by the Data Access Service to check for conflicts when applying changes back to a data source.
方法
- getChangeSummary - get the change summary for a data object
SDO_DAS_ChangeSummary
The interface through which the change history of a data object is accessed. The change summary holds information for any modifications on a data object which occurred since logging was activated. In the case of deletions and modifications, the old values are also held in the change summary.
If logging is no longer active then the change summary only holds changes made up to the point when logging was deactivated. Reactivating logging clears the change summary. This is useful when a set of changes have been written out by a DAS and the data object is to be reused.
方法
-
beginLogging - begin logging changes made to a data object
-
endLogging - end logging changes made to a data object
-
isLogging - test to see if change logging is on
-
getChangedDataObjects - get a list of the data objects which have been changed
-
getChangeType - get the type of change which has been made to a data object
-
getOldValues - get a list of old values for a data object
-
getOldContainer - get the old container data object for a deleted data object
SDO_DAS_Setting
The interface through which the old value for a property is accessed. A list of settings is returned by the change summary method getOldValues.
方法
-
getPropertyIndex - get the property index for the changed property
-
getPropertyName - get the property name for the changed property
-
getValue - get the old value for the changed property
-
getListIndex - get the list index for the old value if it was part of a many-valued property
-
isSet - test to see if the property was set prior to being modified
SDO_DAS_DataFactory
The interface for constructing the model for an SDO_DataObject. The SDO_DAS_DataFactory is an abstract class providing a static method which returns a concrete data factory implementation. The implementation is used by Data Access Services to create an SDO model from their model. For example, a Relational Data Access Service might create and populate an SDO_DAS_DataFactory model based on a schema for a relational database.
方法
- getDataFactory - static methods for getting a concrete data factory instance
- addType - add a new type to the SDO model
- addPropertyToType - add a new property to a type definition in the SDO model
SDO_DAS_ChangeSummary::beginLogging
Begin change logging
说明
void <span class="methodname">SDO_DAS_ChangeSummary::beginLogging ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Begin logging changes made to the SDO_DataObject.
参数
None.
返回值
None.
SDO_DAS_ChangeSummary::endLogging
End change logging
说明
void <span class="methodname">SDO_DAS_ChangeSummary::endLogging ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
End logging changes made to an SDO_DataObject.
参数
None.
返回值
None.
SDO_DAS_ChangeSummary::getChangeType
Get the type of change made to an SDO_DataObject
说明
int <span
class="methodname">SDO_DAS_ChangeSummary::getChangeType ( <span
class="methodparam">SDO_DataObject
$dataObject )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Get the type of change which has been made to the supplied SDO_DataObject.
参数
dataObject
The SDO_DataObject which has been changed.
返回值
The type of change which has been made. The change type is expressed as an enumeration and will be one of the following four values:
-
SDO_DAS_ChangeSummary::NONE
-
SDO_DAS_ChangeSummary::MODIFICATION
-
SDO_DAS_ChangeSummary::ADDITION
-
SDO_DAS_ChangeSummary::DELETION
SDO_DAS_ChangeSummary::getChangedDataObjects
Get the changed data objects from a change summary
说明
SDO_List <span class="methodname">SDO_DAS_ChangeSummary::getChangedDataObjects ( void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Get an SDO_List of the SDO_DataObjects which have been changed. These data objects can then be used to identify the types of change made to each, along with the old values.
参数
None.
返回值
Returns an SDO_List of SDO_DataObjects.
SDO_DAS_ChangeSummary::getOldContainer
Get the old container for a deleted SDO_DataObject
说明
SDO_DataObject <span
class="methodname">SDO_DAS_ChangeSummary::getOldContainer (
SDO_DataObject
$data_object )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Get the old container (SDO_DataObject) for a deleted SDO_DataObject.
参数
data_object
The SDO_DataObject which has been deleted and whose container we wish
to identify.
返回值
The old containing data object of the deleted SDO_DataObject.
SDO_DAS_ChangeSummary::getOldValues
Get the old values for a given changed SDO_DataObject
说明
SDO_List <span
class="methodname">SDO_DAS_ChangeSummary::getOldValues ( <span
class="methodparam">SDO_DataObject
$data_object )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Get a list of the old values for a given changed SDO_DataObject. Returns a list of SDO_DAS_Settings describing the old values for the changed properties of the SDO_DataObject.
参数
data_object
The data object which has been changed.
返回值
A list of SDO_DAS_Settings describing the old values for the changed properties of the SDO_DataObject. If the change type is SDO_DAS_ChangeSummary::ADDITION, this list is empty.
SDO_DAS_ChangeSummary::isLogging
Test to see whether change logging is switched on
说明
bool <span class="methodname">SDO_DAS_ChangeSummary::isLogging ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Test to see whether change logging is switched on.
参数
None.
返回值
Returns true if change logging is on, otherwise returns
false.
SDO_DAS_DataFactory::addPropertyToType
Adds a property to a type
说明
void <span
class="methodname">SDO_DAS_DataFactory::addPropertyToType (
string
$parent_type_namespace_uri , <span
class="type">string $parent_type_name , <span
class="methodparam">string
$property_name , <span
class="type">string $type_namespace_uri , <span
class="methodparam">string $type_name
[, array
$options ] )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
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.
参数
parent_type_namespace_uri
The namespace URI for the parent type.
parent_type_name
The type name for the parent type.
property_name
The name by which the property will be known in the parent type.
type_namespace_uri
The namespace URI for the type of the property.
type_name
The type name for the type of the property
options
This array holds one or more key=>value pairs to set attribute values
for the property. The optional keywords are:
many
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').
readOnly
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').
containment
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.
default
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).
返回值
None.
更新日志
| 版本 | 说明 |
|---|---|
| PECL sdo 0.5.2 | Optional parameters many, readOnly, and containment deprecated in favour of the options array. |
范例
示例 #1 A <span class="function">SDO_DAS_DataFactory::addPropertyToType example
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'.
<?php
$df->addPropertyToType('PersonNS', 'PersonType',
'addressline', 'commonj.sdo', 'String', array('many'=>true));
?>
SDO_DAS_DataFactory::addType
Add a new type to a model
说明
void <span
class="methodname">SDO_DAS_DataFactory::addType ( <span
class="methodparam">string
$type_namespace_uri , <span
class="type">string $type_name [, <span
class="methodparam">array $options ]
)
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
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.
参数
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="...">.
返回值
None.
范例
示例 #1 A <span class="function">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');
?>
SDO_DAS_DataFactory::getDataFactory
Get a data factory instance
说明
SDO_DAS_DataFactory <span class="methodname">SDO_DAS_DataFactory::getDataFactory ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Static method to get an instance of an SDO_DAS_DataFactory. This instance is initially only configured with the basic SDO types. A Data Access Service is responsible for populating the data factory model and then allowing PHP applications to create SDOs based on the model through the SDO_DataFactory interface. PHP applications should always obtain a data factory from a configured Data Access Service, not through this interface.
参数
None.
返回值
Returns an SDO_DAS_DataFactory.
SDO_DAS_DataObject::getChangeSummary
Get a data object's change summary
说明
SDO_DAS_ChangeSummary <span class="methodname">SDO_DAS_DataObject::getChangeSummary ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Get the SDO_DAS_ChangeSummary for an SDO_DAS_DataObject, or NULL if it does not have one.
参数
None.
返回值
Returns the SDO_DAS_ChangeSummary for an SDO_DAS_DataObject, or NULL if it does not have one.
SDO_DAS_Setting::getListIndex
Get the list index for a changed many-valued property
说明
int <span class="methodname">SDO_DAS_Setting::getListIndex ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Get the list index for a modification made to an element of a many-valued property. For example, if we modified the third element of a many-valued property we could obtain an SDO_DAS_Setting from the change summary corresponding to that modification. A call to <span class="function">getListIndex on that setting would return the value 2 (lists are indexed from zero).
参数
None.
返回值
The list index for the element of the many-valued property which has been changed.
SDO_DAS_Setting::getPropertyIndex
Get the property index for a changed property
说明
int <span class="methodname">SDO_DAS_Setting::getPropertyIndex ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Returns the property index for the changed property. This index identifies the property which was modified in data object.
参数
None.
返回值
The property index for a changed property.
SDO_DAS_Setting::getPropertyName
Get the property name for a changed property
说明
string <span class="methodname">SDO_DAS_Setting::getPropertyName ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Returns the property name for the changed property. This name identifies the property which was modified in data object.
参数
None.
返回值
The property name for a changed property.
SDO_DAS_Setting::getValue
Get the old value for the changed property
说明
mixed <span class="methodname">SDO_DAS_Setting::getValue ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Returns the old value for the changed property. This can be used by a Data Access Service when writing updates to a data source. The DAS uses the old value to detect conflicts by comparing it with the current value in the data source. If they do not match, then the data source has been updated since the data object was originally populated, and therefore writing any new updates risks compromising the integrity of the data.
参数
None.
返回值
Returns the old value of the changed property.
SDO_DAS_Setting::isSet
Test whether a property was set prior to being modified
说明
bool <span class="methodname">SDO_DAS_Setting::isSet ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Test whether a property was set prior to being modified. If it was set prior to being modified then the SDO_DAS_Setting will also contain the old value.
参数
None.
返回值
Returns true if the property was set prior to being modified,
otherwise returns false.
SDO_DataFactory::create
Create an SDO_DataObject
说明
void <span
class="methodname">SDO_DataFactory::create ( <span
class="methodparam">string
$type_namespace_uri , <span
class="type">string $type_name )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Create a new SDO_DataObject given the data object's namespace URI and type name.
参数
type_namespace_uri
The namespace of the type.
type_name
The name of the type.
返回值
Returns the newly created SDO_DataObject.
错误/异常
SDO_TypeNotFoundException
Thrown if the namespaceURI and typeName do not correspond to a type
known to this data factory.
SDO_DataObject::clear
Clear an SDO_DataObject's properties
说明
void <span class="methodname">SDO_DataObject::clear ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Clear an SDO_DataObject's properties. Read-only properties are
unaffected. Subsequent calls to isset() for the data object will return
false.
参数
None.
返回值
No return values.
SDO_DataObject::createDataObject
Create a child SDO_DataObject
说明
SDO_DataObject <span
class="methodname">SDO_DataObject::createDataObject ( <span
class="methodparam">mixed $identifier
)
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Create a child SDO_DataObject of the default type for the property identified. The data object is automatically inserted into the tree and a reference to it is returned.
参数
identifier
Identifies the property for the data object type to be created. Can be
either a property name (string), a property index (int), or an
SDO_Model_Property.
返回值
Returns the newly created SDO_DataObject.
错误/异常
SDO_PropertyNotFoundException
Thrown if the identifier does not correspond to a property of the data
object.
SDO_DataObject::getContainer
Get a data object's container
说明
SDO_DataObject <span class="methodname">SDO_DataObject::getContainer ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Get the data object which contains this data object.
参数
None.
返回值
Returns the SDO_DataObject which contains this SDO_DataObject, or returns NULL if this is a root SDO_DataObject (i.e. it has no container).
SDO_DataObject::getSequence
Get the sequence for a data object
说明
SDO_Sequence <span class="methodname">SDO_DataObject::getSequence ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Return the SDO_Sequence for this SDO_DataObject. Accessing the SDO_DataObject through the SDO_Sequence interface acts on the same SDO_DataObject instance data, but preserves ordering across properties.
参数
None.
返回值
The SDO_Sequence for this SDO_DataObject, or returns NULL if the SDO_DataObject is not of a type which can have a sequence.
SDO_DataObject::getTypeName
Return the name of the type for a data object
说明
string <span class="methodname">SDO_DataObject::getTypeName ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Return the name of the type for a data object. A convenience method corresponding to SDO_Model_ReflectionDataObject::getType().getName().
参数
None.
返回值
The name of the type for the data object.
SDO_DataObject::getTypeNamespaceURI
Return the namespace URI of the type for a data object
说明
string <span class="methodname">SDO_DataObject::getTypeNamespaceURI ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Return the namespace URI of the type for a data object. A convenience method corresponding to SDO_Model_ReflectionDataObject::getType().getNamespaceURI().
参数
None.
返回值
The namespace URI of the type for the data object.
SDO_Exception::getCause
Get the cause of the exception
说明
mixed <span class="methodname">SDO_Exception::getCause ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Returns the cause of this exception or NULL if the cause is nonexistent or unknown. Typically the cause will be an SDO_CPPException object, which may be used to obtain additional diagnostic information.
参数
None.
返回值
Returns the cause of this exception or NULL if the cause is nonexistent or unknown.
SDO_List::insert
Insert into a list
说明
void <span
class="methodname">SDO_List::insert ( <span
class="methodparam">mixed $value [,
int $index
] )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Insert a new element at a specified position in the list. All subsequent list items are moved up.
参数
value
The new value to be inserted. This can be either a primitive or an
SDO_DataObject.
index
The position at which to insert the new element. If this argument is not
specified then the new value will be appended.
返回值
None.
错误/异常
SDO_IndexOutOfBoundsException
Thrown if the list index is less than zero or greater than the size of
the list.
SDO_InvalidConversionException
Thrown if the type of the new value does not match the type for the list
(e.g. the type of the many-valued property that the list represents).
SDO_Model_Property::getContainingType
Get the SDO_Model_Type which contains this property
说明
SDO_Model_Type <span class="methodname">SDO_Model_Property::getContainingType ( void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Returns the SDO_Model_Type which contains this property.
参数
None.
返回值
Returns the SDO_Model_Type which contains this property.
SDO_Model_Property::getDefault
Get the default value for the property
说明
mixed <span class="methodname">SDO_Model_Property::getDefault ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Returns the default value for the property. Only primitive data type properties can have default values.
参数
None.
返回值
Returns the default value for the property.
SDO_Model_Property::getName
Get the name of the SDO_Model_Property
说明
string <span class="methodname">SDO_Model_Property::getName ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Returns the name of the SDO_Model_Property.
参数
None.
返回值
Returns the name of the SDO_Model_Property.
SDO_Model_Property::getType
Get the SDO_Model_Type of the property
说明
SDO_Model_Type <span class="methodname">SDO_Model_Property::getType ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Get the SDO_Model_Type of the property. The SDO_Model_Type describes the type information for the property, such as its type name, namespace URI, whether it is a primitive data type, and so on.
参数
None.
返回值
Returns the SDO_Model_Type describing the property's type information.
SDO_Model_Property::isContainment
Test to see if the property defines a containment relationship
说明
bool <span class="methodname">SDO_Model_Property::isContainment ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Test to see if the property corresponds to a containment relationship.
Returns true if the property defines a containment relationship,
or false if it is reference.
参数
None.
返回值
Returns true if the property defines a containment relationship,
or false if it is reference.
SDO_Model_Property::isMany
Test to see if the property is many-valued
说明
bool <span class="methodname">SDO_Model_Property::isMany ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Test to see if the property is many-valued. Returns true if this
is a many-valued property, otherwise returns false.
参数
None.
返回值
Returns true if this is a many-valued property, otherwise returns
false.
SDO_Model_ReflectionDataObject::__construct
Construct an SDO_Model_ReflectionDataObject
说明
<span
class="methodname">SDO_Model_ReflectionDataObject::__construct
( SDO_DataObject
$data_object )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Construct an SDO_Model_ReflectionDataObject to reflect on an SDO_DataObject. Reflecting on an SDO_DataObject gives access to information about its model. The model contains information such as the data object's type, and whether that type is sequenced (preserves ordering across properties) or open (each instance can have its model extended). The model also holds information about the data object's properties, any default values they may have, and so on.
参数
data_object
The SDO_DataObject being reflected upon.
返回值
None.
SDO_Model_ReflectionDataObject::export
Get a string describing the SDO_DataObject
说明
mixed <span
class="methodname">SDO_Model_ReflectionDataObject::export (
<span
class="type">SDO_Model_ReflectionDataObject $rdo [,
bool
$return ] )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Get a string describing the SDO_DataObject. The default behaviour is to
print the output, but if true is specified for return, it is
returned as a string.
参数
rdo
An SDO_Model_ReflectionDataObject.
return
If true, return the output as a string, otherwise print it.
返回值
Returns the output if TRUE is specified for return, otherwise NULL.
SDO_Model_ReflectionDataObject::getContainmentProperty
Get the property which defines the containment relationship to the data object
说明
SDO_Model_Property <span class="methodname">SDO_Model_ReflectionDataObject::getContainmentProperty ( void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Get the SDO_Model_Property that contains the SDO_DataObject. This method is used to navigate up to the parent's property which contains the data object which has been reflected upon.
参数
None.
返回值
Returns the container's SDO_Model_Property which references the
SDO_DataObject, or null if it is a root SDO_DataObject.
SDO_Model_ReflectionDataObject::getInstanceProperties
Get the instance properties of the SDO_DataObject
说明
array <span class="methodname">SDO_Model_ReflectionDataObject::getInstanceProperties ( void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Get the instance properties for the SDO_DataObject. The instance properties consist of all the properties defined on the data object's type, plus any instance properties from open content (if the data object is an open type).
参数
None.
返回值
An array of SDO_Model_Property objects.
SDO_Model_ReflectionDataObject::getType
Get the SDO_Model_Type for the SDO_DataObject
说明
SDO_Model_Type <span class="methodname">SDO_Model_ReflectionDataObject::getType ( void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Returns the SDO_Model_Type for the SDO_DataObject. The SDO_Model_Type holds all the information about the data object's type, such as namespace URI, type name, whether it is a primitive data type, and so on.
参数
None.
返回值
Returns the SDO_Model_Type for the SDO_DataObject.
SDO_Model_Type::getBaseType
Get the base type for this type
说明
SDO_Model_Type <span class="methodname">SDO_Model_Type::getBaseType ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Get the base type for this type. Returns the SDO_Model_Type for the
base type if this type inherits from another, otherwise returns
null. An example of when base types occur is when a type defined
in XML schema inherits from another type by using
<extension base="...">
.
参数
None.
返回值
Returns the SDO_Model_Type for the base type if this type inherits
from another, otherwise returns null.
SDO_Model_Type::getName
Get the name of the type
说明
string <span class="methodname">SDO_Model_Type::getName ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Returns the name of the type. The combination of type name and namespace URI is used to uniquely identify the type.
参数
None.
返回值
Returns the name of the type.
SDO_Model_Type::getNamespaceURI
Get the namespace URI of the type
说明
string <span class="methodname">SDO_Model_Type::getNamespaceURI ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Returns the namespace URI of the type. The combination of namespace URI and type name is used to uniquely identify the type.
参数
None.
返回值
Returns the namespace URI of the type.
SDO_Model_Type::getProperties
Get the SDO_Model_Property objects defined for the type
说明
array <span class="methodname">SDO_Model_Type::getProperties ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Get an array of SDO_Model_Property objects describing the properties defined for the SDO_Model_Type. Each SDO_Model_Property holds information such as the property name, default value, and so on.
参数
None.
返回值
Returns an array of SDO_Model_Property objects.
SDO_Model_Type::getProperty
Get an SDO_Model_Property of the type
说明
SDO_Model_Property <span
class="methodname">SDO_Model_Type::getProperty ( <span
class="methodparam">mixed $identifier
)
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Get an SDO_Model_Property of the type, identified by its property index or property name.
参数
identifier
The property index or property name.
返回值
Returns the SDO_Model_Property.
SDO_Model_Type::isAbstractType
Test to see if this SDO_Model_Type is an abstract data type
说明
bool <span class="methodname">SDO_Model_Type::isAbstractType ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Test to see if this SDO_Model_Type is an abstract data type. Returns
true if this type is abstract, that is, no SDO_DataObject of this
type can be instantiated, though other types may inherit from it.
参数
None.
返回值
Returns true if this type is an abstract data type, otherwise
returns false.
SDO_Model_Type::isDataType
Test to see if this SDO_Model_Type is a primitive data type
说明
bool <span class="methodname">SDO_Model_Type::isDataType ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Test to see if this SDO_Model_Type is a primitive data type. Returns
true if this type is a primitive data type, otherwise returns
false.
参数
None.
返回值
Returns true if this type is a primitive data type, otherwise
returns false.
SDO_Model_Type::isInstance
Test for an SDO_DataObject being an instance of this SDO_Model_Type
说明
bool <span
class="methodname">SDO_Model_Type::isInstance ( <span
class="methodparam">SDO_DataObject
$data_object )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Test for an SDO_DataObject being an instance of this SDO_Model_Type.
Returns true if the SDO_DataObject provided is an instance of
this SDO_Model_Type, or a derived type, otherwise returns false.
参数
data_object
The SDO_DataObject to be tested.
返回值
Returns true if the SDO_DataObject provided is an instance of
this SDO_Model_Type, or a derived type, otherwise returns false.
SDO_Model_Type::isOpenType
Test to see if this type is an open type
说明
bool <span class="methodname">SDO_Model_Type::isOpenType ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Test to see if this type is open. Returns true if this type is
open, otherwise returns false. 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 defined by an
<xsd:any>
element.
参数
None.
返回值
Returns true if this type is open, otherwise returns false.
SDO_Model_Type::isSequencedType
Test to see if this is a sequenced type
说明
bool <span class="methodname">SDO_Model_Type::isSequencedType ( <span class="methodparam">void )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Test to see if this is a sequenced type. Returns true if this type
is sequence, otherwise returns false. Sequenced types can have the
ordering across properties preserved and can contain unstructured text.
For more information on sequenced types see the section on
Working with Sequenced Data Objects.
参数
None.
返回值
Returns true if this type is sequence, otherwise return
false.
SDO_Sequence::getProperty
Return the property for the specified sequence index
说明
SDO_Model_Property <span
class="methodname">SDO_Sequence::getProperty ( <span
class="methodparam">int
$sequence_index )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Return the property for the specified sequence index.
参数
sequence_index
The position of the element in the sequence.
返回值
An SDO_Model_Property. A return value of NULL means the sequence element does not belong to a property and must therefore be unstructured text.
错误/异常
SDO_IndexOutOfBoundsException
Thrown if the sequence index is less than zero or greater than the size
of the sequence.
SDO_Sequence::insert
Insert into a sequence
说明
void <span
class="methodname">SDO_Sequence::insert ( <span
class="methodparam">mixed $value [,
int
$sequenceIndex [, <span
class="type">mixed $propertyIdentifier ]] )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Insert a new element at a specified position in the sequence. All subsequent sequence items are moved up.
参数
value
The new value to be inserted. This can be either a primitive or an
SDO_DataObject.
sequenceIndex
The position at which to insert the new element. Default is NULL, which
results in the new value being appended to the sequence.
propertyIdentifier
Either a property index, a property name, or an
SDO_Model_Property,
used to identify a property in the sequence's corresponding
SDO_DataObject. A value of NULL signifies unstructured text.
返回值
None.
错误/异常
SDO_IndexOutOfBoundsException
Thrown if the sequence index is less than zero or greater than the size
of the sequence.
SDO_InvalidConversionException
Thrown if the type of the new value cannot be juggled to match the type
for the specified data object property.
SDO_Sequence::move
Move an item to another sequence position
说明
void <span
class="methodname">SDO_Sequence::move ( <span
class="methodparam"> int $toIndex,
int
$fromIndex )
Warning
此函数是实验性的。此函数的表象,包括名称及其相关文档都可能在未来的 PHP 发布版本中未通知就被修改。使用本函数风险自担。
Modify the position of the item in the sequence, without altering the value of the property in the SDO_DataObject.
参数
toIndex
The destination sequence index. If this index is less than zero or
greater than the size of the sequence then the value is appended.
fromIndex
The source sequence index.
返回值
None.
错误/异常
SDO_IndexOutOfBoundsException
Thrown if the fromIndex sequence index is less than zero or greater than
the size of the sequence.
目录
- SDO_DAS_ChangeSummary::beginLogging — Begin change logging
- SDO_DAS_ChangeSummary::endLogging — End change logging
- SDO_DAS_ChangeSummary::getChangeType — Get the type of change made to an SDO_DataObject
- SDO_DAS_ChangeSummary::getChangedDataObjects — Get the changed data objects from a change summary
- SDO_DAS_ChangeSummary::getOldContainer — Get the old container for a deleted SDO_DataObject
- SDO_DAS_ChangeSummary::getOldValues — Get the old values for a given changed SDO_DataObject
- SDO_DAS_ChangeSummary::isLogging — Test to see whether change logging is switched on
- SDO_DAS_DataFactory::addPropertyToType — Adds a property to a type
- SDO_DAS_DataFactory::addType — Add a new type to a model
- SDO_DAS_DataFactory::getDataFactory — Get a data factory instance
- SDO_DAS_DataObject::getChangeSummary — Get a data object's change summary
- SDO_DAS_Setting::getListIndex — Get the list index for a changed many-valued property
- SDO_DAS_Setting::getPropertyIndex — Get the property index for a changed property
- SDO_DAS_Setting::getPropertyName — Get the property name for a changed property
- SDO_DAS_Setting::getValue — Get the old value for the changed property
- SDO_DAS_Setting::isSet — Test whether a property was set prior to being modified
- SDO_DataFactory::create — Create an SDO_DataObject
- SDO_DataObject::clear — Clear an SDO_DataObject's properties
- SDO_DataObject::createDataObject — Create a child SDO_DataObject
- SDO_DataObject::getContainer — Get a data object's container
- SDO_DataObject::getSequence — Get the sequence for a data object
- SDO_DataObject::getTypeName — Return the name of the type for a data object
- SDO_DataObject::getTypeNamespaceURI — Return the namespace URI of the type for a data object
- SDO_Exception::getCause — Get the cause of the exception
- SDO_List::insert — Insert into a list
- SDO_Model_Property::getContainingType — Get the SDO_Model_Type which contains this property
- SDO_Model_Property::getDefault — Get the default value for the property
- SDO_Model_Property::getName — Get the name of the SDO_Model_Property
- SDO_Model_Property::getType — Get the SDO_Model_Type of the property
- SDO_Model_Property::isContainment — Test to see if the property defines a containment relationship
- SDO_Model_Property::isMany — Test to see if the property is many-valued
- SDO_Model_ReflectionDataObject::__construct — Construct an SDO_Model_ReflectionDataObject
- SDO_Model_ReflectionDataObject::export — Get a string describing the SDO_DataObject
- SDO_Model_ReflectionDataObject::getContainmentProperty — Get the property which defines the containment relationship to the data object
- SDO_Model_ReflectionDataObject::getInstanceProperties — Get the instance properties of the SDO_DataObject
- SDO_Model_ReflectionDataObject::getType — Get the SDO_Model_Type for the SDO_DataObject
- SDO_Model_Type::getBaseType — Get the base type for this type
- SDO_Model_Type::getName — Get the name of the type
- SDO_Model_Type::getNamespaceURI — Get the namespace URI of the type
- SDO_Model_Type::getProperties — Get the SDO_Model_Property objects defined for the type
- SDO_Model_Type::getProperty — Get an SDO_Model_Property of the type
- SDO_Model_Type::isAbstractType — Test to see if this SDO_Model_Type is an abstract data type
- SDO_Model_Type::isDataType — Test to see if this SDO_Model_Type is a primitive data type
- SDO_Model_Type::isInstance — Test for an SDO_DataObject being an instance of this SDO_Model_Type
- SDO_Model_Type::isOpenType — Test to see if this type is an open type
- SDO_Model_Type::isSequencedType — Test to see if this is a sequenced type
- SDO_Sequence::getProperty — Return the property for the specified sequence index
- SDO_Sequence::insert — Insert into a sequence
- SDO_Sequence::move — Move an item to another sequence position